PostgreSQL:
Vulnerability Discovery
Guides for finding PostgreSQL auth flaws, weak creds, and misconfigs
PostgreSQL Superuser and Dangerous Privilege Detection
PostgreSQL Trust Authentication Detection
PostgreSQL Weak and Default Credential Check
PostgreSQL vulnerability discovery starts with pg_hba.conf, the file that controls who connects and how they authenticate. Trust authentication on non-localhost interfaces is an instant win, allowing passwordless access. Peer and ident methods on network connections are similarly dangerous when misconfigured.
Check for weak or default credentials on the postgres superuser and any application accounts. Superuser exposure is critical: if the account you compromised has SUPERUSER, CREATEDB, or CREATEROLE privileges, your exploitation options multiply. Query pg_roles to map exactly what each role can do.
Dangerous extensions (dblink, file_fdw, pg_read_file) that are loaded but unnecessary widen the attack surface. Look for servers listening on 0.0.0.0 instead of localhost, SSL set to off or prefer rather than require, and password_encryption set to md5 instead of scram-sha-256.