Sitemap
Corlis

Corlis

Structure of writeups will vary depending on how much sleep I got.

TryHackMe — Dav (THM)

3 min readMay 15, 2026

--

Enumeration

From the port scan we can see that it only has port 80 enabled.

Since http is open, let’s do a directory scan.

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

Exploitation

Before doing anything I searched if metasploit contained any exploit for webdav, which it did. So I tested the exploit for uploading a php file, which didn’t work.

Press enter or click to view image in full size

So now I tried brute forcing for a while, but didn’t really give anything after a few minutes. So I searched up for default login credentials.

Press enter or click to view image in full size

What worked was wampp:xampp

Press enter or click to view image in full size

We can also see the php file metasploit uploaded earlier but was unable to create a session.

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

Checking all the metasploit settings, looks like it was right from the start.

Looked back and looks like I was using a windows exploit for a linux machine.

Get Corlis’s stories in your inbox

Join Medium for free to get updates from this writer.

Instead of overcomplicating it with metasploit, I just made use of cadaver which is a built-in tool for accessing webdav on kali for uploading a reverse shell php file.

Press enter or click to view image in full size

Now to just open the file from the browser.

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

user.txt

Answer: 449b40fe93f78a938523b7e4dcd66d2a

Escalation

Now to test pretty common escalation techniques.

Press enter or click to view image in full size

Looks like we have cat sudo privileges.

root.txt

This was pretty easy since we know the file name, if now I would have tried and brute force the password on /etc/shadow.

Press enter or click to view image in full size

Answer: 101101ddc16b0cdf65ba0b8a7af7afa5

Press enter or click to view image in full size

--

--

Corlis
Corlis

Structure of writeups will vary depending on how much sleep I got.