Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fKtWq-0004eT-Ah for pgsql-general@arkaria.postgresql.org; Mon, 21 May 2018 22:43:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fKtWp-0007Ns-1w for pgsql-general@arkaria.postgresql.org; Mon, 21 May 2018 22:43:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fKtWo-0007Ni-QT for pgsql-general@lists.postgresql.org; Mon, 21 May 2018 22:43:42 +0000 Received: from mail.wordtothewise.com ([184.105.179.154]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fKtWg-00042n-Fh for pgsql-general@postgresql.org; Mon, 21 May 2018 22:43:41 +0000 Received: from satsuke.wordtothewise.com (204.11.227.194.static.etheric.net [204.11.227.194]) by mail.wordtothewise.com (Postfix) with ESMTPSA id BEFFB23379; Mon, 21 May 2018 15:44:31 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: posgresql.log From: Steve Atkins In-Reply-To: Date: Mon, 21 May 2018 15:43:31 -0700 Cc: bdmytrak@gmail.com Content-Transfer-Encoding: quoted-printable Message-Id: <36FAFC91-E9C9-4732-83A3-9DD5B392FD7C@blighty.com> References: <020901d3f14c$512a46d0$f37ed470$@gmail.com> To: PG-General Mailing List X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On May 21, 2018, at 3:21 PM, Steve Crawford = wrote: >=20 >=20 >=20 > If this is a test server and you can take it offline for forensics I = would do so, especially if it could provide a path to other internal or = critical resources. If you can image it for safekeeping and forensics, = even better. +1 It's compromised. Image it if possible; save the compromise payload you = know about if not. Treat it as compromised and unsafe to attach to a network until you = completely wipe and reinstall it. >=20 > That appears to be output from wget but the intrusion, if any, could = be through any number of vectors (web, ssh, local attack, etc.) not = directly related to PostgreSQL. Check in your other logs starting with a = search for anything related to that IP address. It's probably a compromise via postgresql open to the network with = insecure settings. I've seen several of those reported recently, and = this one is saving it's payload to the postgresql data directory - = somewhere no other user or app will have access to, but which a = compromised postgresql can easily write to. Check the pg_hba.conf and packet filter / firewall settings and see what = the issue may be. Do the same checks on all your other postgresql = servers, test and production. If there's a configuration mistake that = let one server be compromised it's may well be there on others too. >=20 > Verify the usual. Patches up to date, ports appropriately firewalled = off, no default passwords, etc. >=20 > IP comes back to vultr.com which is a cloud company (i.e. could be = anyone) but if it is an attack perhaps contact their abuse department. The C&C server there is already down; It can't hurt to notify them, but = I doubt Choopa would be particularly interested beyond that point unless = a subpoena or search warrant were involved. > Unless you are positive the server was not attacked, don't trust it = unless you can be absolutely certain it is clean. Best bet is to backup = any critical data (and check it for trustworthiness), wipe and rebuild. +1. >=20 > Only you (well, OK, maybe them, now) know what data was on this server = but depending on its importance, internal policies, legal requirements = and agreements with third-parties you may have notification requirements = and could need to engage forensics experts. Cheers, Steve