Open MongoDB → dump every collection
Shodan-indexed MongoDB on 27017 with no auth. Connect, list databases, dump every collection. Often the second stage is a ransom note in a new 'README' collection.
§ Context
Assumed environment: target operator left MongoDB exposed to the internet without authentication (defaults pre-3.6 + persistent misconfig in self-hosted deployments).
§ Steps
- 01mongodump every databaseExfiltrationT1041— Exfiltration Over C2 Channel
- 02Drop README collection with ransom noteImpactT1486— Data Encrypted for Impact
- 03show dbs / show collectionsDiscoveryT1087— Account Discovery
- 04Shodan: port:27017 mongodbReconnaissanceW-RECON-API-DISCO— API Endpoint Discovery
- 05mongosh --host <ip> → connects unauthInitial AccessDB-MONGO-NOAUTH— MongoDB / DocumentDB No-Auth Open
§ References
§ Frequently asked
- What is the "Open MongoDB → dump every collection" attack path?
- Shodan-indexed MongoDB on 27017 with no auth. Connect, list databases, dump every collection. Often the second stage is a ransom note in a new 'README' collection. It chains 5 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is mongodump every database (T1041) — a exfiltration primitive. Assumed environment: target operator left MongoDB exposed to the internet without authentication (defaults pre-3.
- What is the final impact of this kill-chain?
- The final step lands on mongosh --host <ip> → connects unauth (DB-MONGO-NOAUTH), which falls under Initial Access. From here, an operator typically pivots into post-exploitation or maintains persistence.
- How can defenders detect or prevent this attack?
- Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.
§ Related dossiers
- Shared techniques3
Stolen credentials → no-MFA Snowflake → mass tenant exfil (2024)
Infostealer logs from third-party machines yielded credentials for many Snowflake tenants. Tenants without enforced MFA / IP allow-lists were directly queried; dozens of customer data sets exfiltrated.
- Shared techniques2
Unauth DICOM PACS → mass medical-image exfil
PACS server accepts unauthenticated C-FIND / C-MOVE on port 104 / 11112. Query for every study, pull every image — exfil hundreds of thousands of patient scans + DICOM metadata (PII).
- Shared techniques2
MOVEit Transfer (CVE-2023-34362) → mass data exfil (Cl0p)
Pre-auth SQLi in MOVEit's web UI forges an admin session. .NET deserialisation chain drops a webshell as SYSTEM. Cl0p's 2023 mass-exfil playbook: download every file under /var/files.
- Shared techniques2
BACnet HVAC → disrupt building operations
BACnet on UDP/47808 is unauthenticated. From a foothold in corporate IT, write to HVAC controllers — over-cool a data centre, disable smoke evacuation, mess with elevators.
- Shared techniques2
ESXiArgs — OpenSLP unauth RCE → ransomware
Internet-facing ESXi with SLP service on TCP/427 unpatched for CVE-2021-21974. Single ROP gadget chain yields root, then a small bash script encrypts every .vmdk on local datastores.
- Shared techniques2
Reachable Modbus PLC → direct register override
Modbus has no authentication. From a foothold on a reachable OT network, write to coils / holding registers directly with pymodbus.