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 1fL0tm-0008V2-O3 for pgsql-general@arkaria.postgresql.org; Tue, 22 May 2018 06:35:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fL0ti-0007iT-CL for pgsql-general@arkaria.postgresql.org; Tue, 22 May 2018 06:35:50 +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 1fL0ti-0007iJ-4U for pgsql-general@lists.postgresql.org; Tue, 22 May 2018 06:35:50 +0000 Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fL0te-0006WM-29 for pgsql-general@postgresql.org; Tue, 22 May 2018 06:35:49 +0000 Received: by mail-wr0-x22e.google.com with SMTP id v60-v6so18220819wrc.7 for ; Mon, 21 May 2018 23:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language; bh=KK1txvTJ66INqp+AVTd/5dSUStyGbzytZNIZLBwSYNU=; b=Xnj7OtExzDOQGzU4w7YaXVhW/3QsQJOK2gktDKx+aEn9y1WPhVLw43ZUQNOw3Gk01c 2FYMNnYSQLedmTvCdwF6FYFYi5yI+CGDEA+i7aB46j/yEVZxTYgZbSxuVWCvhD4eYtZj sKdbSA2/IqlnZ0LY/4nSed6tUW4HInp/QT1QEdllj1PfB/ULHHPsP/m0ztEroKmc2w0u 9mkEo5d/lGHL6DioNiYj9Wo+qzxxGcomo8WP1uVnE+zAO8CMrd3cj8jl9SW9j0hAVB5E VV3JOz1Uzqy5jiKVQEXYo0DMP0JPfuc1jqEsycy7nD7VbVbJc7B34RKyeijxwgRklW7r qRAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=KK1txvTJ66INqp+AVTd/5dSUStyGbzytZNIZLBwSYNU=; b=LVJN5FkXSp4ikJRD1QdhYo0RdSr6jP74dqd9NucuOs92kBi1zLwzEatKazx93rs2j/ MWnrEezW3TqfVGzudyYVclHYQlGEC1YQblNxVlTlt1CdZawL4hwBo7lhIaFnRfcKrRwZ 28PIm7rF+bR2lhI7ob5SuigxHm+0rdymv6LUVnbaVtP9Rvi6Nb8PcvojUbS8iZs4wUxh j2tvBNOtC7+G6vOHefRCjtcXvMIRENAo7gXR3ruadX+83N4DfScKEBQpuzwsZCn3Wk6b mW5rk1BGcuVcrj/51yBJWDtdVrGymsxgUFbEpz0y0B7rbiJYivuvNVzAK6AiLEvcRXAa n9/g== X-Gm-Message-State: ALKqPwehGA8ZElMlU6bpSbvs1xjtiZw0FWWjwMuP2czbWdLMvoMrPeiq I0G0LQoBOZMxfKJ5goN7FsyNIg== X-Google-Smtp-Source: AB8JxZoogivQyVA5BnL4yasYNUhDE0zd7yDggHnc9//5lVdIEqqvZyzme9cjUW0bN/rTEkiFOKgQVQ== X-Received: by 2002:adf:972c:: with SMTP id r41-v6mr19036459wrb.79.1526970943752; Mon, 21 May 2018 23:35:43 -0700 (PDT) Received: from DESKTOPF2QEVGJ (193-192-185-103.static.ip.netia.com.pl. [193.192.185.103]) by smtp.gmail.com with ESMTPSA id x17-v6sm45454527wmd.46.2018.05.21.23.35.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 23:35:42 -0700 (PDT) From: "Bartosz Dmytrak" To: "'Adrian Klaver'" Cc: References: <020901d3f14c$512a46d0$f37ed470$@gmail.com> In-Reply-To: Subject: RE: posgresql.log Date: Tue, 22 May 2018 08:35:47 +0200 Message-ID: <021c01d3f197$1ecaf6d0$5c60e470$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQHFVJEXYjoV8D/4j52jJnMBjBQK0gJ3fPgHpETG7LA= Content-Language: pl List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk -----Original Message----- From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]=20 Sent: Tuesday, May 22, 2018 12:03 AM To: Bartosz Dmytrak ; pgsql-general@postgresql.org Subject: Re: posgresql.log On 05/21/2018 02:40 PM, Bartosz Dmytrak wrote: > Hi Gurus, >=20 > Looking into my postgresql.log on one of my test servers I found scary > entry: Is there a Web app running on this server? The log entries below are from the Postgres logs in?: /var/log/postgresql/ >=20 > --2018-05-19 05:28:21-- http://207.148.79.161/post0514/post >=20 > Connecting to 207.148.79.161:80... connected. >=20 > HTTP request sent, awaiting response... 200 OK >=20 > Length: 1606648 (1.5M) [application/octet-stream] Hmm, the below says it downloaded 12.5M. >=20 > Saving to: =E2=80=98/var/lib/postgresql/10/main/postgresq1=E2=80=99 The postgresq1 file is actually there? If so have you looked at the file: file postgresq1 to get an idea of what it is? >=20 > 0K .......... .......... .......... .......... .......... 3% 71.0K=20 > 21s >=20 > 50K .......... .......... .......... .......... .......... 6%=20 > 106K 17s >=20 > 100K .......... .......... .......... .......... .......... 9%=20 > 213K 13s >=20 > 150K .......... .......... .......... .......... .......... 12%=20 > 213K 11s >=20 > 200K .......... .......... .......... .......... .......... 15%=20 > 16.3M 9s >=20 > 250K .......... .......... .......... .......... .......... 19% =20 > 215K 8s >=20 > 300K .......... .......... .......... .......... .......... 22%=20 > 15.6M 7s >=20 > 350K .......... .......... .......... .......... .......... 25%=20 > 11.7M 6s >=20 > 400K .......... .......... .......... .......... .......... 28% =20 > 219K 5s >=20 > 450K .......... .......... .......... .......... .......... 31%=20 > 12.1M 5s >=20 > 500K .......... .......... .......... .......... .......... 35%=20 > 11.7M 4s >=20 > 550K .......... .......... .......... .......... .......... 38%=20 > 12.2M 3s >=20 > 600K .......... .......... .......... .......... .......... 41%=20 > 12.1M 3s >=20 > 650K .......... .......... .......... .......... .......... 44% =20 > 228K 3s >=20 > 700K .......... .......... .......... .......... .......... 47%=20 > 12.2M 3s >=20 > 750K .......... .......... .......... .......... .......... 50%=20 > 12.1M 2s >=20 > 800K .......... .......... .......... .......... .......... 54%=20 > 11.7M 2s >=20 > 850K .......... .......... .......... .......... .......... 57%=20 > 12.1M 2s >=20 > 900K .......... .......... .......... .......... .......... 60%=20 > 11.8M 2s >=20 > 950K .......... .......... .......... .......... .......... 63%=20 > 12.1M 1s >=20 > 1000K .......... .......... .......... .......... .......... 66%=20 > 12.0M 1s >=20 > 1050K .......... .......... .......... .......... .......... 70% =20 > 243K 1s >=20 > 1100K .......... .......... .......... .......... .......... 73%=20 > 12.1M 1s >=20 > 1150K .......... .......... .......... .......... .......... 76%=20 > 12.1M 1s >=20 > 1200K .......... .......... .......... .......... .......... 79%=20 > 11.7M 1s >=20 > 1250K .......... .......... .......... .......... .......... 82%=20 > 12.1M 1s >=20 > 1300K .......... .......... .......... .......... .......... 86%=20 > 12.1M 0s >=20 > 1350K .......... .......... .......... .......... .......... 89%=20 > 11.8M 0s >=20 > 1400K .......... .......... .......... .......... .......... 92%=20 > 12.1M 0s >=20 > 1450K .......... .......... .......... .......... .......... 95%=20 > 12.1M 0s >=20 > 1500K .......... .......... .......... .......... .......... 98%=20 > 11.8M 0s >=20 > 1550K .......... ........ 100% 12.5M=3D2.6s >=20 > 2018-05-19 05:28:25 (598 KB/s) - > =E2=80=98/var/lib/postgresql/10/main/postgresq1=E2=80=99 saved = [1606648/1606648] >=20 > Downloaded file is not posgresql but postgresq1(one). >=20 > It was pure pg instalation without any contrib modules addons etc,=20 > istalled on ubuntu box by apt manager using repos: >=20 > http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main >=20 > http://apt.postgresql.org/pub/repos/apt xenial-pgdg >=20 > I have never seen such entry on other my other servers=E2=80=A6 >=20 > Could you be so kind and explain me what is it? I am afraid my=20 > postgres has been hacekd. >=20 > Best Regards >=20 > */Bartosz Dmytrak/* >=20 -- Adrian Klaver adrian.klaver@aklaver.com HI, thanks for response, Yes - there is also webapp running on the server, but still it's rather = odd to find it's logs in postgresql.log file (located in = /var/log/postgresql, where my log exists). postgresq1 file exists in = /var/lib/postgresql/10/main and it's binary file, I've also noticed = there is a n596tx.so which is not a part of standard installation. Fortunately there is no important data on this server so, a according to = other advice, I'll rebuilt it with more aggressive security settings and = I'll apply them to other servers too.=20 Best regards, Bartek