TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Local Postgres database hacked, how?

6 点作者 Kkoala超过 1 年前
I&#x27;m running the TimescaleDB image on Docker on a Windows machine. Somehow that postgres database was accessed and all of the data deleted.<p>There is a readme_to_recover table now, and has a generic extortion mail: &quot;Data is backed up bla bla, pay bitcoin to recover bla bla&quot;<p>Data I can get back, but I&#x27;m concerned about how this could have happened?<p>For some reason the pg_hba.conf has the line: &quot;host all all all scram-sha-256&quot;, which I think means that it can be accessed from anywhere right?<p>The docker image was running on 5432, and but I had binded that to 5434 on my local machine.<p>Logs have couple of &quot;FATAL: password authentication failed for user &quot;postgres&quot;&quot; lines, so the password was attempted couple of times. I had a very common password though since it was a local instance, so it was easy to crack. And then after that lines for dropping all the databases. And then &quot;FATAL: terminating connection due to administrator command&quot; and &quot;FATAL: terminating background worker &quot;TimescaleDB Background Worker Scheduler&quot; due to administrator command&quot;<p>Do I have some virus on my computer? Does the TimescaleDB Docker image have vulnerability that would cause this? Could some rogue website &#x2F; ad &#x2F; extension have accessed my Postgres db running locally like that?

3 条评论

LinuxBender超过 1 年前
<i>Data I can get back, but I&#x27;m concerned about how this could have happened?</i><p>Very good that you have backups, it could have been worse. Were any ports from your app or PG itself exposed to the web and are there associated web application access logs enabled that were relayed somewhere off-host? <i>e.g. port 5432 for postgres</i>.<p><i>Do I have some virus on my computer?</i><p>Yes, that is ransomware. [1]<p>[1] - <a href="https:&#x2F;&#x2F;www.imperva.com&#x2F;blog&#x2F;postgresql-database-ransomware-analysis&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.imperva.com&#x2F;blog&#x2F;postgresql-database-ransomware-...</a>
mjochim超过 1 年前
If you used docker run -p 5434:5432, this port is accessible from your network, not just your local machine. Couple that with an IPv6 uplink to your ISP (i.e. typically a gobally reachable IP address for your machine) and a disabled firewall in your home router, and that&#x27;s one possible way how this could have happened. Of course, home router firewalls are not usually disabled. But it&#x27;s a possibility.
评论 #38256786 未加载
alexfromapex超过 1 年前
Windows is not very secure my dude. No one knows if you have a virus, you should get a scanner and scan the machine.