Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeP2o-00086U-LB for pgsql-general@arkaria.postgresql.org; Wed, 24 Jan 2018 17:41:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeP2o-0001s4-15 for pgsql-general@arkaria.postgresql.org; Wed, 24 Jan 2018 17:41:06 +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.84_2) (envelope-from ) id 1eeP2n-0001rp-Mj for pgsql-general@lists.postgresql.org; Wed, 24 Jan 2018 17:41:05 +0000 Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eeP2k-0004vE-Cm for pgsql-general@lists.postgresql.org; Wed, 24 Jan 2018 17:41:04 +0000 Received: by mail-pf0-x22a.google.com with SMTP id i66so3632604pfd.7 for ; Wed, 24 Jan 2018 09:41:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=WewlhWd+muYBnlmXKrND51qFw0jB3EswTf0VZUqwEoc=; b=pR37f4GvSxIOxTfxurUuHIzZJne00gpRz/U/wK9e8+Hz2CgmeVbLO/s3OHcpqCB7ph dqT37hHs8rUcOZ1aYBpdFt7tyXgTcfPwe0AyLCfIWnEY+L5LeJqr/gD7sMdYga71FzXW Ov2PV45V31U7MBCIm0taNY8sFlXPx8yBajDG1jt8TWQaEv+FydRLMLY9OCuQVRvM56Ol nVjmpipP6u4d05XM+6DIx603SN6HFmh4OBnJ0t0ZnQcGg8VTPRTibRxH5vv/9ZUeVW3M CJvODW25Bkpk063SDN+3TJuDpC4WGABkcaaHFPAolotJi7N0IWXSisOqsS6YXVMX7MEn VzjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=WewlhWd+muYBnlmXKrND51qFw0jB3EswTf0VZUqwEoc=; b=Gs3rL8EnUPlH7UvYYsCylIGr2ZHm2O5ziCbK70mTyr10gIGaRri6vhsgRf1lk2wjCW dv7wxHNN1LZkno7vP+tOiw1d7OKx3LFUnYUDUtzeetPLp6OCk9f3YWFel+EbdIRPHQaV WVRQy9/fz+da4cRXwO+dH5b7yYmss5lJ2EmrkPR8ZEjjHAxqaE1lMC9hnqPc/YJY/wog 3RD4wMASIBbaEHp9q8yfex2zSZvJDu25dBTFtu5BlpZDtK5t+XTRll6TxvkSo8+2Ap00 9mmkMg6DWxb3uX7f53KLTJmUF6onzIi1nZmtB56DyJZ8N6hdGq9cWb0himvKWHDf1i4J vq0A== X-Gm-Message-State: AKwxytea7ub1jZOm+375TODDFmqZJHjlafoLzSIP7QqCL70RzsS9+VOV 3OqEfzudn5goXPj1B8TNY/n8hKsO X-Google-Smtp-Source: AH8x224UzE7y+KAcCaoAXmQ64fsgKuOiAHUUhcU9GH85tOm/Oy127Pyrte37zuVybFs+eBK2X3GcfA== X-Received: by 10.101.92.195 with SMTP id b3mr11166129pgt.319.1516815659337; Wed, 24 Jan 2018 09:40:59 -0800 (PST) Received: from [10.104.134.14] ([155.100.47.6]) by smtp.gmail.com with ESMTPSA id 191sm10928458pfv.127.2018.01.24.09.40.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 09:40:58 -0800 (PST) Subject: Re: PGSQL 10, many Random named DB To: pgsql-general@lists.postgresql.org References: From: Rob Sargent Message-ID: <18ce79d1-0a17-cf28-db0c-989c971075fe@gmail.com> Date: Wed, 24 Jan 2018 10:40:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 01/24/2018 10:22 AM, Merlin Moncure wrote: > On Wed, Jan 24, 2018 at 4:52 AM, Durumdara wrote: >> Hello! >> >> Somewhere the system administrator (who don't know the PG really) installed >> a PGSQL server (10.x) with a database. >> He couldn't manage the server well. >> >> Yesterday my colleague saw 21 databases in this server with random names. >> He checked it with built in PGAdmin IV. >> Today we checked it again, and we saw 33 databases. >> >> The first name is "ahucli" for example - like an aztec king... :-). >> >> The server OS is Windows, the PGSQL is 10.x. >> >> What can cause this strange thing? >> >> 1.) PGAdmin IV bug? >> 2.) Their server is hacked/cracked from outside? >> 3.) A wrong configured tool, or an automation? >> 4.) "Alien invasion", etc. >> >> Did you see same thing anywhere? >> >> Thank you for any advice in this theme! > You could be looking at a very serious situation. Random data stored > without your knowledge can be symptom of a hack or simple bug. > Figuring out which is which is a very urgent consideration. You may > want to consider: > > *) poke around created database and try to determine if the created > databases point to something you created or more suspicious things. > this is URGENT > *) review firewall and network configuration > *) review pg_hba.conf > *) generally check logs everywhere, be advised hackers are often smart > and covert tracks > *) log all connections. adjust logging to also capture client ip and > pid if not already > *) log all queries (also with ajustments above). this is expensive, > so be prepared to turn off when problem is found > > merlin > Step one for me would be to unplug the ethernet cable.  If it in some unaccessible place shut it down, make it accessible, then go with Merlins list.