// htb writeup Hack The Box 2026-02-25
Reset
HackTheBox Easy Hack The Box
root obtained // PWNED

🧪 Reset – Hack The Box

Platform: Hack The Box
Difficulty: Easy
IP Address: 10.129.234.130
Date Completed: [Insert Date]


🧭 Overview

Reset is an Easy-rated Linux machine that showcases a chained attack involving log poisoning and PHP code execution via the Apache access log. The foothold is gained through a password reset functionality and Remote Code Execution (RCE) using poisoned logs. Privilege escalation involves abusing r-services for rlogin and hijacking a tmux session, followed by executing nano with sudo privileges to spawn a root shell.


🔍 Enumeration

🔎 Nmap

nmap -p- --min-rate 10000 10.129.234.130
nmap -p 22,80,512,513,514 -sCV -oN nmapscan 10.129.234.130

Open ports:

Apache hosts an admin login page with a password reset option.


🪜 Foothold

🔑 Password Reset + Log Poisoning

  1. Use admin in the password reset field
  2. Burp Suite reveals:
    {"username":"admin","new_password":"f73e1be2"}
    
  3. Login with admin:f73e1be2

💥 Log Injection RCE

Got a shell as www-data.

📄 user.txt
19ba954c************************


⚙️ Privilege Escalation

🔁 Rlogin + Tmux Hijack

🔼 Sudo Privileges

sudo -l

Allowed commands:

Used Nano shell escape:

Gained root shell.

📄 root.txt
7ad6951b************************


🧠 Lessons Learned


📸 Proof

reset.png