Skip to content
Back to skills

Database Enumeration

ASecurity

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.

  • 16 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 17, 2026
securityrustgoshellsqldatabasebackend

Works with

  • cli

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill database-enumeration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Database Enumeration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Database Enumeration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-database-enumeration/badge)](https://www.skillsdirectory.com/skills/anandjogawade-database-enumeration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.