Back to skills
SKILL.md
Database Enumeration
ASecurityDirect database service assessment — MSSQL, MySQL/MariaDB, PostgreSQL, Oracle, MongoDB, Redis, Elasticsearch, Memcached, CouchDB and CassandraDB — covering default/weak and unauthenticated access, enumeration, privilege checks, and service-specific escalation to code execution or host access. Injection points for each. Use when database ports are exposed.
- 16 stars
- 0 votes
- 0 copies
- 3 views
- Added November 17, 2026
Works with
Security analysis
96/100- Uses curl or wget to download content
npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill database-enumeration --agent claude-codeAre you the author of Database Enumeration?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-database-enumeration)---
name: database-enumeration
description: Direct database service assessment — MSSQL, MySQL/MariaDB, PostgreSQL, Oracle, MongoDB, Redis, Elasticsearch, Memcached, CouchDB and CassandraDB — covering default/weak and unauthenticated access, enumeration, privilege checks, and service-specific escalation to code execution or host access. Injection points for each. Use when database ports are exposed.
---
# Database Service Enumeration & Exploitation
Exposed DBs are frequently unauthenticated or default-credentialed and often lead to data theft or RCE. Test each by its protocol.
## Trigger phrases
`database pentest, mssql, mysql, postgres, oracle, mongodb, redis, elasticsearch, unauth database, xp_cmdshell`
## Per-service (default ports / checks / escalation)
- **MSSQL (1433):** `netexec mssql`/`mssqlclient.py`; default/weak sa; `xp_cmdshell` (enable via sysadmin), `xp_dirtree`/`xp_fileexist` → UNC hash capture/relay, OLE automation, linked-server pivoting, impersonation (`EXECUTE AS`). Injection points: app SQLi → `web-sqli`.
- **MySQL/MariaDB (3306):** anon/weak root; `LOAD_FILE`/`INTO OUTFILE` (webshell write), UDF RCE if privileged; `mysql_native` hash dump.
- **PostgreSQL (5432):** default postgres/trust auth; `COPY ... FROM PROGRAM` (RCE ≥9.3 superuser), large-object file write, `pg_read_file`.
- **Oracle (1521):** TNS poisoning, SID brute (`odat`), default creds, `odat` for file read/RCE, `DBMS_SCHEDULER`.
- **MongoDB (27017):** unauth access (`mongosh`), dump DBs, `$where`/mapReduce JS exec on misconfig.
- **Redis (6379):** unauth → `CONFIG SET dir/dbfilename` webshell write, SSH authorized_keys write, module load RCE, replication RCE.
- **Elasticsearch (9200):** unauth `_search`/`_cat`, data theft, old CVEs (CVE-2015-1427 Groovy RCE on legacy).
- **Memcached (11211):** unauth `stats`/`items` dump; UDP amp (don't abuse).
- **CouchDB (5984):** `_users` priv-esc (CVE-2017-12635), Erlang RCE chains.
## Discover & test
```
nmap -sV -p1433,3306,5432,1521,27017,6379,9200,11211,5984 <host>
netexec mssql <host> -u sa -p '' --local-auth ; redis-cli -h <host> ping ; mongosh --host <host>
curl http://<host>:9200/_cat/indices ; odat all -s <host>
```
## Backend / Tier
Kali/HexStrike. Destructive writes (OUTFILE, CONFIG SET, COPY PROGRAM) are exploitation → Tier-1 within RoE; prove with a benign marker where possible, don't tamper production data.
## Verification (background, before reporting)
Re-confirm unauth/default access and any RCE with an independent command; distinguish "exposed/unauth" from "RCE-confirmed."
## Evidence
Connection proof, data/priv accessed (per RoE), and the escalation PoC + remediation.
Attribution
Related skills
View all in security →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.