
Dieses Skript wird verwendet, um MongoDB-Dienste zu identifizieren, die netzwerkexponiert sind und unauthentifizierte Protokoll-Handshakes erlauben.
mongo_exposure_scanner.py
Python überprüfen:
python3 --version
| Datei | Zweck |
|---|---|
mongo_scanner.py | Scanner-Skript |
targets.txt | Zielhosts und Ports |
mongo_exposed_targets.txt | Scanergebnisse (automatisch erstellt) |
targets.txt)Unterstützte Formate:
# Host only (default ports used)
10.99.1.52
# Host with specific port
mongo.example.com:3717
# Multiple ports
192.168.1.10:27017,28017
# Port range
172.16.0.20:27017-27030
Hinweise:
# werden ignoriertScanner ausführen:
python3 mongo_scanner.py
Das Skript fragt nach:
Enter target file name (default: targets.txt):
Optionen:
targets.txtprod_mongo.txtpython3 mongo_scanner.py
Enter target file name (default: targets.txt): prod_mongo.txt
[*] Using target file: prod_mongo.txt
[*] Total host:port pairs: 4
[*] Concurrency: 50 | Timeout: 5s
------------------------------------------------------------
[+] MongoDB OPEN: 10.99.1.52:3717
[-] 192.168.1.10:27017 - Not exposed
------------------------------------------------------------
[*] Done. Results saved to mongo_exposed_targets.txt
mongo_exposed_targets.txt
[2026-01-20 12:34:07] 10.99.1.52:3717 - Unauthenticated MongoDB exposed
[2026-01-20 12:34:07] dds-d9j6c3a7096ded641.mongodb.ap-southeast-5.rds.aliyuncs.com:3717 - Unauthenticated MongoDB exposed
| Status | Bedeutung |
|---|---|
MongoDB OPENMongoDB-Dienst antwortete auf hello |
Unauthenticated MongoDB exposed | Handshake ohne Authentifizierung erlaubt |
Not exposed | Kein MongoDB oder Authentifizierung/Verbindung blockiert |
Connection refused / timeout | Dienst nicht erreichbar |