What problem does it solve?
During authorized penetration tests, PostgreSQL instances are frequently misconfigured with trust authentication, default credentials, or over-privileged roles, yet testers often miss the exact steps needed to prove real impact such as OS command execution. This Skill provides a structured methodology to enumerate, authenticate, exploit, and escalate against PostgreSQL services with concrete confirmation steps for each finding.
Core Features & Use Cases
- Authentication Testing: Checks for pg_hba.conf trust authentication, default postgres:postgres credentials, and brute-force logins using hydra, medusa, or netexec.
- Privilege & Role Enumeration: Extracts roles, password hashes from pg_shadow, installed extensions, and superuser status to map escalation paths.
- Command Execution & File Access: Demonstrates COPY ... FROM PROGRAM RCE, pg_read_file/lo_import file reads, file writes, CREATEROLE privilege escalation, and config-file RCE via archive_command or preloaded libraries.
- Use Case: A tester finds port 5432 open, connects with default credentials, confirms superuser status, and proves OS-level command execution by running 'id' through COPY FROM PROGRAM, then documents the finding with evidence and remediation steps.
Quick Start
Ask the AI to test the PostgreSQL service on the target host for trust authentication, weak credentials, and COPY FROM PROGRAM command execution, then report confirmed findings with evidence.