// Writing

The Blog

Security research, career reflections, and technical deep-dives. No fluff.

Machine Write-ups

Root-to-administrator compromises with full attack chains, tool output, and lessons learned.

Windows Machines
HTB Write-up 12 min read

Anonymous FTP. MDB, ZIP, PST. Telnet Shell. cmdkey Hands You Administrator.

HackTheBox Access: anonymous FTP exposes a Microsoft Access database and a password-protected zip. The database contains the zip password. The zip contains an Outlook PST. The PST contains an email with Telnet credentials. cmdkey /list confirms stored Administrator credentials. runas /savecred. Root without cracking a single hash.

HTB Write-up 15 min read

Open Share. Default Password. Three Accounts. Backup the SAM.

HackTheBox Cicada: Anonymous SMB finds a default password in an HR notice. impacket-lookupsid SID brute force builds the user list without credentials. Spray hits michael.wrightson. AD description field leaks david.orelious credentials. DEV share holds a PowerShell backup script with emily.oscars plaintext password. SeBackupPrivilege dumps the SAM. Pass-the-Hash delivers Administrator.

HTB Write-up 13 min read

Cisco Config in a Ticket. Crack It. Spray It. Dump the Browser.

HackTheBox Heist: Cisco router config in a support ticket yielded three passwords via Type 7 decode and Type 5 hashcat crack. RID brute force built the user list, credential spray hit Chase over WinRM. Firefox process memory dump revealed the Administrator password in plaintext.

HTB Write-up 12 min read

Change the Server Address. Catch the Password. Hijack the Service.

HackTheBox Return: printer admin panel on port 80 transmits LDAP credentials to a netcat listener when the server address is updated. svc-printer is in Server Operators. VSS service binary path hijack adds the account to local Administrators. Domain owned.

HTB Write-up 14 min read

Zip on a Share. Certificate Gets You In. History Leaks the Rest.

HackTheBox Timelapse: cracked a zip-protected PFX certificate on an anonymous SMB share, authenticated to WinRM over HTTPS using the extracted certificate, found svc_deploy credentials in PowerShell history, and read the LAPS Administrator password via ldapsearch.

HTB Write-up 16 min read

Custom Binary. XOR Creds. LDAP Info Field. RBCD to Domain Admin.

HackTheBox Support: reversed a custom .NET binary on an anonymous share to recover XOR-encoded LDAP credentials, dumped a plaintext password from a user's LDAP info field, and exploited GenericAll over the DC via RBCD to compromise the domain.

HTB Write-up 14 min read

Anonymous SMB. Groups.xml. Kerberoast the Admin. Domain Gone.

HackTheBox Active: anonymous SMB access exposed Groups.xml in SYSVOL, gpp-decrypt recovered SVC_TGS credentials, Kerberoasting the Administrator SPN cracked Ticketmaster1968, psexec delivered a SYSTEM shell.

HTB Write-up 15 min read

Web OSINT. AS-REP Roast. AutoLogon. DCSync. Full Domain Gone.

HackTheBox Sauna: harvested 6 employee names from a bank website, AS-REP Roasted fsmith, pivoted via WinPEAS AutoLogon credentials to svc_loanmgr, then DCSync'd the domain via pre-assigned replication rights.

HTB Write-up 15 min read

AS-REP Roasting to DCSync. Full Domain Compromise.

HackTheBox Forest: RPC null session user enumeration, AS-REP Roasting svc-alfresco, BloodHound path through 4 nested groups to WriteDACL, PowerView DCSync grant, and Pass the Hash to Administrator.

Linux Machines
HTB Write-up 12 min read

HTML Comment. Default Creds. PHP Upload. Writable sudo Script. Root.

HackTheBox Nibbles: an HTML comment in the index page source reveals the Nibbleblog CMS before any enumeration tool runs. admin/nibbles logs you in. The My Image plugin saves the PHP file to disk despite throwing errors. Shell lands as nibbler. sudo -l exposes a world-writable script in a NOPASSWD path. printf overwrites it. Root.

HTB Write-up 11 min read

phpbash in /dev/. Sudo Lateral to scriptmanager. Cron Runs Your Script as Root.

HackTheBox Bashed: gobuster finds a /dev/ directory with directory listing enabled. phpbash.php is sitting there, left over from the developer's own research. Web shell lands as www-data. sudo -l reveals scriptmanager NOPASSWD:ALL. Lateral move to scriptmanager, /scripts/ ownership reveals a cron job executing test.py as root. Overwrite the script, wait for cron, root shell on port 5555.

HTB Write-up 10 min read

403 on the Directory. 200 on the Script Inside. Shellshock. Sudo Perl. Root.

HackTheBox Shocker: gobuster with .sh extension finds user.sh inside a forbidden /cgi-bin/ directory. Shellshock via User-Agent header fires through Apache's CGI handler on bash 4.3. Shell lands as shelly. sudo -l reveals Perl NOPASSWD as root. GTFOBins exec one-liner completes the escalation.

HTB Write-up 9 min read

Samba 3.0.20. CVE-2007-2447. Root Without a Privesc Step.

HackTheBox Lame: nmap service scan identifies Samba 3.0.20-Debian. CVE-2007-2447 exploits the username map script option, passing shell metacharacters in the authentication username directly to /bin/sh. The Samba daemon runs as root. One Metasploit module call delivers an immediate root shell with no privilege escalation required.

HTB Write-up 10 min read

IDOR to Root. How Cap Punishes Lazy Authorization.

HackTheBox Cap: exploited an IDOR to download another user's PCAP, extracted FTP plaintext credentials with Wireshark, reused them on SSH, and escalated to root via cap_setuid on Python 3.8.

Linux Breach Investigation

Six challenges. Five evidence types. One attacker. Read in order: each challenge builds on the last.

Ch 01. Log Analysis 12 min read

Six Log Files. One Attack. Full Reconstruction.

A Linux server compromised on November 14, 2025. Full attack timeline reconstructed through log analysis alone. 6/6 flags captured.

Ch 02. Memory Forensics 14 min read

One Memory Dump. A Beacon in /tmp. Six Flags.

A Cobalt Strike beacon disguised as a kernel process, credentials recovered from RAM, and a staged exfil archive. Reconstructed using Volatility. 6/6 flags captured.

Ch 03. Network Forensics 13 min read

One PCAP. DNS Exfil Uncovered. Five Flags.

C2 domain identified via DNS traffic, credentials stolen over a reverse shell, base64-encoded data hidden inside DNS subdomains. Reconstructed from one PCAP. 5/5 flags captured.

Ch 04. Disk Forensics 14 min read

Two Disk Images. Five Flags. Nothing Stays Deleted.

Hidden stolen-data file on a USB image, a log-shredding cleanup script, a PNG carved from raw sectors, and deleted credentials recovered from a wiped disk. 5/5 flags captured.

Ch 05. Malware Triage 15 min read

One Binary. One Macro. No Execution Required.

C2 address extracted from an ELF binary, beacon User-Agent identified, and a two-stage VBA macro infection chain fully reversed using only strings and cat. 5/5 flags captured.

Ch 06. Incident Timeline 16 min read

Five Challenges. One Timeline. The Full Breach Reconstructed.

The final challenge: correlate all previous evidence, reconstruct twelve attack events in exact chronological order. 4/5 flags captured.

HTB Academy Modules

Applied machine learning for security. Build real models, evaluate them against live APIs, understand how attackers reason about AI-based defences.

Academy Module 15 min read

Spam. Anomalies. Malware. Sentiment. Four AI Models Built for Security. All Scored Against Live APIs.

HackTheBox Academy: Applications of AI in InfoSec. Four labs, four machine learning models. Naive Bayes catches spam at 91% accuracy. Random Forest classifies network intrusions across 5 attack categories at 100%. ResNet50 transfer learning identifies malware families from binary visualisations. Naive Bayes sentiment model scores 100% on the skills assessment. All evaluated against live API endpoints on target machines.

Academy Module 16 min read

Evade. Poison. Extract. Backdoor. Six Attacks Against Machine Learning Systems. All Scored.

HackTheBox Academy: Introduction to Red Teaming AI. Six labs, six attack vectors. Adversarial text evades a Naive Bayes spam filter by flooding it with ham tokens. Label corruption poisons training data. An unauthenticated endpoint hands over the model file. Prompt manipulation forces an LLM past its system prompt. An adversarial image fools a vision captioning model. A trigger phrase planted in training data fires silently on command. AI models fail differently than traditional software.

Academy Module 18 min read

Leak the Prompt. Poison the Data. Override the Rules. Sixteen Prompt Injection Labs. Full Coverage.

HackTheBox Academy: Prompt Injection Attacks. Sixteen labs across four categories. System prompts extracted via authority assertion, sentence completion, character spacing, and binary encoding. Direct injection plants instructions in user input. Indirect injection hides payloads in CSV files, HTML comments, and email bodies the LLM processes. Jailbreaks reframe the model through fiction and sudo override. Three defense mechanisms tested against the techniques they claim to block. Skills assessment chains it all into a multi-stage attack.

Academy Module 18 min read

XSS. SQL. Shell. Exfil. The LLM Output Is the Attack Surface. Fifteen Labs.

HackTheBox Academy: LLM Output Attacks. The vulnerability is never the LLM. It is the trust applications place in model-generated content when rendering it as HTML, executing it as SQL, passing it to shells, or invoking functions with it. Fifteen labs: script tags that execute in browsers, UNION queries that run against databases, shell commands that chain through allowlist bypasses, markdown image tags that silently exfiltrate chat history, and a system prompt compromise that turns every conversation into a data collection channel.

Academy Module 16 min read

Flip Labels. Plant Trojans. Hide Shells in Weights. Six Attacks on the Training Pipeline.

HackTheBox Academy: AI Data Attacks. Data attacks corrupt what the model learns before it is ever deployed, and that corruption persists. Six labs: random label flipping degrades accuracy uniformly; targeted flipping makes Class 0 misclassify as Class 1 while leaving Class 1 untouched; clean label attacks perturb features without touching labels, defeating label audits entirely; a trojan trigger embedded in MNIST images fires silently at inference; a reverse shell hidden inside model weight LSBs survives distribution through public model hubs.

Academy Module 18 min read

IDOR in the Chat History. SQL Through the LLM. ShellTorch RCE. Nine Labs on the AI Application Stack.

HackTheBox Academy: Attacking AI Applications and Systems. AI-powered applications are still web applications. Nine labs: model reverse engineering via query probing; IDOR on sequential chat IDs exposes full conversation histories; prompt injection claims an admin role to execute backend SQL; an exposed SQLite file leaks all chat data; ShellTorch YAML deserialization delivers RCE through TorchServe's management API; three MCP server labs cover bearer token disclosure in logs, command injection through unsanitized tool parameters, and UNION-based SQL injection through resource templates.

Academy Module 12 min read

Don't Touch the Model. Add Words Until It Flips. GoodWords Evasion, White-Box and Black-Box.

HackTheBox Academy: AI Evasion Foundations. Evasion attacks work at inference time against deployed models. Two labs on the GoodWords technique: inject words with high ham probability into a spam message until the Naive Bayes classifier crosses its decision boundary. The GoodWords challenge uses greedy API probing. The skills assessment covers the same attack from both sides: white-box ranks words directly from feature log probabilities in one pass; black-box approximates the same ranking through repeated API queries, one word at a time.

Academy Module 16 min read

One Step, Many Steps, Minimal Steps. FGSM, I-FGSM, and DeepFool on CIFAR-10. Four Labs.

HackTheBox Academy: AI Evasion First-Order Attacks. Compute the gradient of the loss with respect to the input and move in the direction that maximises misclassification within a bounded pixel budget. FGSM spends the entire budget in one gradient step: fast but suboptimal. I-FGSM distributes the same budget across many smaller steps and achieves a far higher success rate. DeepFool ignores the budget and solves for the minimum L2 perturbation to cross the nearest decision boundary, linearising the classifier at each iteration until the label flips.

Academy Module 14 min read

Change Fewer Pixels. Change Them More. ElasticNet EAD and JSMA. Three Labs on L0 Sparsity.

HackTheBox Academy: AI Evasion Sparsity Attacks. Sparsity attacks bound how many pixels change, not how much each one shifts. JSMA computes the Jacobian of the classifier output with respect to each pixel, ranks them by saliency toward the target class, and modifies only the highest-impact pairs. EAD uses FISTA with elastic-net regularization (L1 for sparsity, L2 for smoothness) and binary search over the regularization constant c to find the minimal sparse perturbation that crosses the decision boundary. Both attacks expose a different fragility than L-inf or L2 methods.