This project was conducted in a controlled lab environment for educational purposes only.
This project documents a local penetration testing assessment against a PostgreSQL instance running on a Linux system.
The objective of this assessment was to evaluate the security impact of misconfigured PostgreSQL permissions, OS-level trust relationships, and dangerous superuser features that may lead to full system compromise.
The assessment follows a structured attack chain from initial access to post-exploitation persistence.
- Database: PostgreSQL 17
- OS: Linux (Kali / Debian-based)
- Deployment: Local service (localhost / lab environment)
- Access type: Local shell access
- Service Enumeration
- Authentication Analysis
- Local Privilege Escalation
- Remote Code Execution
- Post-Exploitation Persistence
Each phase is documented with evidence and proof-of-concept commands.
| Phase | Impact |
|---|---|
| Enumeration | PostgreSQL service identified |
| Authentication | SCRAM-SHA-256 enforced |
| Privilege Escalation | OS trust allows access as postgres |
| RCE | Arbitrary OS command execution |
| Persistence | Cron-based persistence |
This project was conducted in a controlled lab environment for educational and portfolio purposes only.