Let’s start with nmap:
Nothing interesting. Let’s run ffuf and investigate apache page for changes
After a bit of investigation i quite quickly found what to do next:
Let’s add 10.10.35.138 seasurfer.thm
to the hosts file
We see that strange page:
Seeing wp prefix I think it’s wordpress. Let’s check that theory:
So here is wordpress login page. Let’s use wpscan.
BTW there was problem with db and now it disappeared:
Looking thru sitemap I found username kyle
And that comment with hint:
Let’s edit hosts entry to 10.10.35.138 seasurfer.thm internal.seasurfer.thm
Let’s scan for other subdomains?
Nothing interesting…
Let’s try fuzzing thru things we haven’t tried:
There are no vulns in this version:
Let’s return to internal subdomain.
It generates pdf’s based on info. Let’s check what it does using Caido (burpsuite alternative that I wanted to test out)
So it uses “wkhtmltopdf 0.12.5”
Doesn’t look like smth that can be used.
Upon some more investigation I found
https://book.hacktricks.xyz/pentesting-web/xss-cross-site-scripting/server-side-xss-dynamic-pdf
So it looks like we can try XSS and SSRF. Let’s try!
Let’s try that for LFI!
Sadly it doesn’t work
Only thing I have idea to do is SSRF. Found this: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3570
So we can do LFI if we host php page and access it!
So let’s use example from this issue:
But modify it a bit to be able to change files that we get on the fly:
Let’s run php -S 0.0.0.0:1234
And now let’s use that file inside our comment
It works!
We only see two users with shell: kyle
and root
Looking thru files in /var/www
I found /var/www/wordpress/wp-config.php
Let’s use that db creds on adminer we found earlier
It worked!
Here i found kyle’s password hash
I created file for john to crack it and it did so:
Now we have access to wordpress admin panel. Let’s add revshell to template.
I generated revshell with https://www.revshells.com/ and pasted it to 404 php file.
After opening that page we got connection:
I stabilized shell and started investigation.
so it’s tar with wildcard as privesc again…
I remember it too well so I wont even open gtfobins.
It didn’t connect so I checked:
Oops… Wrong nc. Fixed it with
And we got kyle connection!
Got user flag!