Sitemap
pack3tsniper

pack3tsniper

Hack The Box: SecNotes Walkthrough

3 min readMay 9, 2025

--

Press enter or click to view image in full size

Here’s a quick walkthrough of the SecNotes machine from Hack The Box.

Nmap Scan result:

Press enter or click to view image in full size

Service Enumeration

8808/tcp

Found IIS default page running on port 8808.

Press enter or click to view image in full size

80/tcp

When I navigated to the target IP, I was automatically redirected to /login.php, landing on this login page:

Press enter or click to view image in full size

/register.php

Get pack3tsniper’s stories in your inbox

Join Medium for free to get updates from this writer.

Clicking on Sign up now, we are presented with the registration page.

Press enter or click to view image in full size

We create an account with the username 'OR 1 OR' and a password of our choice. After logging in, we’re redirected to /home.php, where we discover a note revealing credentials:

Press enter or click to view image in full size
Registering an account with the username ‘OR 1 OR’ to test for SQL injection.
Press enter or click to view image in full size
Logging in with the username ‘OR 1 OR’
Press enter or click to view image in full size
Successfully logged in as ‘OR 1 OR’ user

Found credentials for tyler in the note: tyler / 92g!mA8BGjOirkL%OG*&

Initial Access

smbclient

Using smbclient and the found credentials, we enumerated shares and found thenew-sitesmb share.

Press enter or click to view image in full size

We accessed the new-site SMB share and found iisstart.htm and iisstart.png.

Press enter or click to view image in full size

Since we saw the IIS page on port 8808 earlier, finding iisstart.htm and iisstart.png in the new-site share suggests the web server is serving files from this share.

Shell as tyler

Let’s listen on port 8808 to catch the reverse shell.

Press enter or click to view image in full size

We uploaded nc.exe and a PHP reverse shell (rev_shell.php) to the new-site SMB share. The reverse shell is configured to connect back to our IP 10.10.14.41 on listening port 8808. Once uploaded, we can trigger the PHP file via the web server to get a shell.

Press enter or click to view image in full size
Press enter or click to view image in full size

Despite the 500 error in the browser, we still got a reverse shell as secnotes\tyler.

Press enter or click to view image in full size

Shell as nt authority\system

Privilege Escalation via WSL

Using where /R, we searched for wsl.exe and found its path inside the WinSxS folder.

Press enter or click to view image in full size

Using the full path inside WinSxS, we executed wsl.exe, dropping us into a root shell inside WSL.

Press enter or click to view image in full size

We upgraded the shell using python3 -c 'import pty;pty.spawn("/bin/bash")' for a better interactive experience. Then, by checking .bash_history, we found administrator credentials using smbclient to access the c$ share on 127.0.0.1.

Press enter or click to view image in full size

psexec

Learn more about how impacket-psexec works here

Using impacket-psexec with the admin credentials, we successfully got a SYSTEM shell on the target.

Press enter or click to view image in full size

--