mongodb - 为什么我的 mongo 集合在 azure ubuntu 实例上被删除?

标签 mongodb azure ubuntu

我正在使用 azure ubuntu 实例每分钟在 mongo 数据库中存储一些数据。我注意到数据大约每天被删除一次。我想知道为什么我的数据被删除?

我每分钟都有一个日志显示数据库的计数。这是连续两分钟,显示所有记录均被删除

**************************************
update at utc: 2022-08-06 10:19:02.393351 local: 2022-08-06 20:19:02.393366
count after insert = 1745
**************************************
update at utc: 2022-08-06 10:20:01.643487 local: 2022-08-06 20:20:01.643544
count after insert = 1
**************************************

您可以看到数据被删除,插入后计数从 1745 变为 1。我的问题是为什么我的数据被删除?

最佳答案

简短回答

数据在勒索攻击中被删除。我没有使用 mongo 密码,因为最初我只是在本地测试 mongo。然后,当我将bindIp设置为0.0.0.0以进行远程访问时,这意味着任何人只要猜出主机就可以访问(这对我来说太愚蠢了)。

始终使用密码保护服务器,尤其是当您的bindIp 为0.0.0.0 时。有关说明,请参阅 https://www.mongodb.com/features/mongodb-authentication

<小时/>

更多详细信息

要检查您是否受到勒索攻击,请查找勒索字条。可能会出现额外的数据库,请参阅 show dbs 在我的情况下,带有勒索信息的新数据库称为“READ__ME_TO_RECOVER_YOUR_DATA”

All your data is a backed up. You must pay 0.05 BTC to 1Kz6v4B5CawcnL8jrUvHsvzQv5Yq4fbsSv 48 hours for recover it. After 48 hours expiration we will leaked and exposed all your data. In case of refusal to pay, we will contact the General Data Protection Regulation, GDPR and notify them that you store user data in an open form and is not safe. Under the rules of the law, you face a heavy fine or arrest and your base dump will be dropped from our server! You can buy bitcoin here, does not take much time to buy https://localbitcoins.com or https://buy.moonpay.io/ After paying write to me in the mail with your DB IP: [email protected] and/or [email protected] and you will receive a link to download your database dump.

检查可疑事件的另一种方法是在/var/log/mongodb/mongod.log 中的 Mongodb 服务日志中。对于其他系统,文件名可能是 mongodb.log。对我来说,日志中有一系列关于攻击时间的命令,其中第一个是:

{"t":{"$date":"2022-08-07T09:54:37.779+00:00"},"s":"I",  "c":"COMMAND",  "id":20337,   "ctx":"conn30393","msg":"dropDatabase - starting","attr":
{"db":"READ__ME_TO_RECOVER_YOUR_DATA"}}

该命令删除数据库或开始删除数据库。正如怀疑的那样,没有读取任何数据的命令,这意味着攻击者没有像他们声称的那样进行备份。不幸的是,本月早些时候确实有人向这个骗子付款。 https://www.blockchain.com/btc/tx/65d035ca4db759a73bd9cb68610e04742ffe0e0b71ecdf88f54c7e464ee80a51

关于mongodb - 为什么我的 mongo 集合在 azure ubuntu 实例上被删除?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73260190/

相关文章:

javascript - 如何向mongodb中插入数据

node.js - 监听附加端口 Microsoft Azure Nodejs

c# - 当我指定 <Setting name ="serilog:write-to:AzureDocumentDB.endpointUrl"/> 时,.cscfg 文件给出错误

azure - 如何在 AAD 中同意应用程序及其依赖服务

ruby-on-rails - 本地主机中出现 NoMethodError :3000

json - Grails-向现有的Map域类成员添加新的默认值

php - MongoDB/PHP : delete element from array

mongodb - 将副本集转换为独立服务器后遇到 MongoDB 警告

带有包管理器的 ubuntu 上的 Swift 2.2

python - PyQt:Qt.Popup 小部件有时会在不关闭的情况下失去焦点,变得无法关闭