简体   繁体   English

如何隐藏 MongoDB ip 地址

[英]How to hide the MongoDB ip address

I wanna ask about security in NodeJS.我想问一下 NodeJS 的安全性。

In my case, the atacker can have access to my database, I'm using MongoDB as my databse, my web server and my DB server is different, but the atacker can know the ip address of my database, ofcourse my DB server doesn't have any security.在我的情况下,攻击者可以访问我的数据库,我使用 MongoDB 作为我的数据库,我的 web 服务器和我的数据库服务器是不同的,但是攻击者可以知道我的数据库的 Z957B527BCFBAD2E3 我的 DB4F58D20683 地址当然没有没有任何安全感。

I wondering why the atacker can know my DB ipaddress, is the vulnerability was from my server so the atacker can read my DB ipaddress from the backend code, or what?我想知道为什么攻击者可以知道我的数据库 IP 地址,漏洞是来自我的服务器,所以攻击者可以从后端代码中读取我的数据库 IP 地址,还是什么? 在此处输入图像描述

If your Database Server and Web Server are separate, it could be that your MongoDB is open (without authentication) and Services like Shodan can be used to find these Servers without Authentication.如果您的数据库服务器和 Web 服务器是分开的,则可能是您的 MongoDB 已打开(无需身份验证),并且可以使用Shodan等服务无需身份验证即可找到这些服务器。 In this case I believe a Bot or Script was run to go over all Open Databases it could find, drop all collections, and leave this little ransom notice.在这种情况下,我相信一个机器人或脚本在它可以找到的所有开放数据库上运行到 go,删除所有 collections,并留下这个小小的赎金通知。

Your best bet would be to add Authentication, and ensure that only your Host Server can access your MongoDB Server via Firewall (IPTables, UFW)您最好的选择是添加身份验证,并确保只有您的主机服务器可以通过防火墙(IPTables,UFW)访问您的 MongoDB 服务器

If you don't have any Backups then your data is probably gone, but I wouldn't worry about “being reported to GDPR” or whatever this hilarious threat is.如果您没有任何备份,那么您的数据可能已经丢失,但我不会担心“被报告给 GDPR”或任何这种搞笑的威胁。

Edit: I forgot to clarify, they probably didn't specifically target you as the Note asks you to email them with your DB IP, which would insinuate that this Notice has gone out to a group of people, and not just yourself.编辑:我忘了澄清,他们可能没有专门针对您,因为注释要求您使用您的 DB IP 对他们进行 email,这将暗示此通知已发送给一群人,而不仅仅是您自己。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM