// SYSTEM_INFO — READ BEFORE PROCEEDING
Welcome to m4rthacks — a personal archive of CTF writeups, hacking notes, tools, and tips & tricks.
You'll find detailed walkthroughs of Capture The Flag challenges across categories like web exploitation, binary exploitation, cryptography, reverse engineering, forensics, and OSINT. Each writeup breaks down the thought process, the tools used, and the steps taken to get the flag.
Feel free to explore, learn, and hack responsibly.
WRITEUPS: 109
Hack The Box — Garfield (Windows)
We overwrite the logon script of a user to get a reverse shell on the DC. We change the password of another user and log in remotely on the DC. We change the password of the RODC machine account and use ligolo-ng to pivot to it. We add ourselves to the RODC Administrators group and become admin of the RODC. We dump its secrets and perform a key list attack to get the krbtgt hash of the domain. We use it to create a golden ticket and get a root shell on the DC.
Hack The Box — MakeSense (Linux)
We start with a XSS on a contact form, which allows us to change the password of a wordpress user. Then we log in on wordpress and edit the theme files to get a reverse shell. We find credentials in the wordpress configuration file, which allow us to log in as walter. We use ssh local port forwarding to access a web application that runs as root. We use an OCR to php command execution technique to make /bin/bash setuid root and get a root shell.
Hack The Box — Checkpoint (Windows)
We restore a deleted user in the domain, and we find that it has the same password as the user we have credentials for. We write a malicious VS Code extension into a share, which gives us a reverse shell as another user. We find that this user has GenericWrite permissions on a service account, and we perform a BadSuccessor attack to impersonate it and get a shell. We use VMkatz to extract credentials from the files in the VMBackups share, which allows us to get a shell as the administrator.
Hack The Box — Eloquia (Windows)
Exploit Eloquia's OAuth account-linking flow through stored HTML redirection, use SQLite extension loading for command execution, recover Olivia.KAT's Edge credentials, and escalate to SYSTEM by replacing a writable Failure2Ban binary.
Hack The Box — DevHub (Linux)
A vulnerability in MCPJam Inspector allows us to get a reverse shell as the user mcp-dev. Then, we leak the Jupyter token from the process command line to get a reverse shell as the user analyst. Finally, we abuse a hidden tool in the MCP server to get the root SSH private key.
Hack The Box — Reactor (Linux)
The react2shell vulnerability allows us to get a shell on the system. We find a SQLite database and we crack the password of the engineer user. Then, we abuse the Node.js debugger to get a reverse shell as root.
Hack The Box — SmartHire (Linux)
We start with a MLflow vulnerability to get a reverse shell as the user svcweb. Then, we exploit a Python script vulnerability to get code execution as root.
Hack The Box — Silentium (Linux)
We begin with a subdomain running Flowise where a password reset vulnerability leaks a temporary token for the user Ben. We use this token to reset the password, log in, and exploit a custom MCP node-load method vulnerability to achieve remote code execution inside a Docker container. After finding plaintext credentials in the container's environment variables, we log in via SSH to the host system. Finally, we forward a local port running Gogs and exploit a command execution vulnerability in the Git service to gain root access.
Hack The Box — Hercules (Windows)
LDAP injection reveals domain users and a password in an Active Directory description. Kerberos access leads to web application machine-key forgery, NTLM capture, shadow credentials, OU manipulation, AD CS ESC3 abuse, and an SPN-less resource-based constrained delegation attack to compromise Administrator.
Hack The Box — Pirate (Windows)
We begin with a low-privileged account on the Pirate domain, which allows us to discover pre-created computer accounts and extract sensitive gMSA passwords. Using these credentials, we gain access to the WEB01 machine. From there, a NTLM relay attack allows us to impersonate Administrator on WEB01. We harvest the credentials of a.white. Finally, we manipulate the SPNs of WEB01 to perform a resource-based constrained delegation attack, allowing us to impersonate Administrator on the domain controller.
Hack The Box — Cobblestone (Linux)
We begin with a SQL injection in a web application, which allows us to read files on the remote system. We can also upload a PHP web shell, which allows us to read the users table in a database. We crack a password and log in via SSH. Finally, we exploit a vulnerability in Cobbler XML-RPC API to get root.
Hack The Box - Helix (Linux)
We find a hidden virtual host flow.helix.htb that runs Apache NiFi 1.21.0, which is vulnerable to CVE-2023-34468. We exploit this vulnerability to get a reverse shell as the user operator. We find the operator's SSH private key and use it to SSH into the target machine. We find that we can run the program helix-maint-console as root, but it requires a privileged maintenance window to be open. We find an OPC UA port that allows us to change some values in the plant, which opens the privileged maintenance window, allowing us to run helix-maint-console and get a root shell.