db-enum is a security-focused database enumeration tool designed for penetration testing and bug bounty programs. It allows you to gather basic information about various database types without accessing sensitive data, demonstrating potential impact to clients or bounty programs while preserving privacy.
- MySQL
- PostgreSQL
- Microsoft SQL Server
- MongoDB
- Redis
- Elasticsearch
- Cassandra
- Neo4j
- CouchDB
- InfluxDB
- Automatic database type detection
- Individual commands for each supported database type
- Collects schema information, table names, and approximate sizes without accessing row data
- Docker Compose setup for easy testing with all supported databases
pip install -U git+https://github.com/uwuzone/db-enum.git
To use db-enum, you can either use the magic
command to automatically detect the database type, or specify the database type explicitly.
pdm run db-enum magic --host localhost --port <port> --user <username> --password <password> --database <dbname>
pdm run db-enum <dbtype> --host localhost --port <port> --user <username> --password <password> --database <dbname>
Replace <dbtype>
with one of: mysql, postgres, mssql, mongodb, redis, elasticsearch, cassandra, neo4j, couchdb, influxdb
make test
This runs docker compose up
and tests the script against all db types.
To add support for a new database type:
- Create a new Python file in
src/db_enum/db/
named after the database (e.g.,newdb.py
). - Implement the
check_connection
andenumerate
functions in this file. - The new database type will be automatically detected and added to the CLI.
- Add to docker-compose.yml and test.
This tool is intended for ethical hacking and security analysis purposes on authorized systems only. Unauthorized use of this tool to access or modify systems without permission is illegal and unethical. Always obtain proper authorization before using this tool on any system.
For any issues or contributions, please refer to the project's repository.