Nibbles
SUID misconfiguration in `find` binary led to privEsc
Summary
PostgreSQL running on non-standard port 5437 with unauthenticated access.
SQL enumeration revealed usernames and allowed RCE via command injection (CVE-2022-2625).
Reverse shell established as
postgres
.Privilege escalation via SUID misconfiguration using
find
binary to get a root shell.
๐งต Let's Unpack
๐ Enumeration
5437/tcp โ PostgreSQL 11.3
21/ftp โ Anonymous login allowed but no file listing
80/http โ Apache/2.4.38 with default landing page
139/445 โ SMB open but filtered
๐ PostgreSQL Enumeration & Exploitation
Found valid users:
postgres
,root
,wilson
Exploit Chain:
Reverse shell established as user:
postgres
Upgraded with:
Privilege Escalation
Ran linpeas.sh, which revealed:
Apache running as root
Interesting cron jobs and SUID binaries
/usr/bin/find
has SUID bit set
Used find
SUID trick to escalate:
โ Root shell achieved.
Last updated
Was this helpful?