pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: ransomware
Date: Tue, 2 Feb 2021 16:14:33 +0100
Message-ID: <20210202151433.GA1814@hjp.at> (raw)
In-Reply-To: <CADX_1abm=fefTEbt3zOMABgxN=D5zMacgf1-mKzXJ292q_3SzQ@mail.gmail.com>
References: <CADX_1aYKLCGfi-jnm51iyoFd9cEK-vBxP-v_pAvbDkPzHSOu9Q@mail.gmail.com>
	<YBisuYlPwBhFepLt@paquier.xyz>
	<CADX_1abm=fefTEbt3zOMABgxN=D5zMacgf1-mKzXJ292q_3SzQ@mail.gmail.com>

On 2021-02-02 15:44:31 +0100, Marc Millas wrote:
> I know its quite general. It is as I dont know what approaches may exist.
> 
> Requirement is extremely simple: Is there anyway, from a running postgres
> standpoint, to be aware that a ransomware is currently crypting your data ?

PostgreSQL can be set up to store a checksum with every page (I think
that's even the default in recent releases). If an external process
encrypts a data file used by PostgreSQL it is unlikely to get the
checksums correct (unless it was written explicitely with PostgreSQL in
mind). So the next time PostgreSQL reads some data from that file it
will notice that the data is corrupted.

Of course is would notice that anyway since all the other structures it
expects aren't there either.


> answer can be as simple as: when postgres do crash.....

Yep. That's what I would expect to happen pretty quickly on a busy
database. The question is: Does that help you? At that point the data is
already gone (at least partially), and you can only restore it from
backup.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (5+ messages)  latest in thread

Message-ID: <20210202151433.GA1814@hjp.at>
Permalink:  ../20210202151433.GA1814@hjp.at/
Also on:    postgresql.org/message-id/20210202151433.GA1814@hjp.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hjp-pgsql@hjp.at
  Subject: Re: ransomware
  In-Reply-To: <20210202151433.GA1814@hjp.at>
  References: <CADX_1aYKLCGfi-jnm51iyoFd9cEK-vBxP-v_pAvbDkPzHSOu9Q@mail.gmail.com> <YBisuYlPwBhFepLt@paquier.xyz> <CADX_1abm=fefTEbt3zOMABgxN=D5zMacgf1-mKzXJ292q_3SzQ@mail.gmail.com> <20210202151433.GA1814@hjp.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox