TryHackMe - Steel Mountain Writeup
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
Port Scanning
First we make a nmap to the ip an we discover some webservers and that is a windows machine.
- The web in port 80 contain info for some secundary flags.
- The web in port 8080 is the main way to obtain the user flag and the root.
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
Enumeration
Source code
We can see the first flag as a comment in the web hosted on the port 80, we can see going to this web and pressing Ctrl+U:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
As we see in the image The name of the photo is Bill Harper with this info we know the who is the employee of the month and we have the first Flag.
Bill Harper
Http File Server
After that enumerating the web on the port 80, It looks like you have nothing else, it will be time to go to the one on port 8080, We discover a http file server and if we look on exploit-db it has a exploit for RCE for this web app.
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
To know the exact program we can google it or click on httpfileserver 2.3 that redirect to the info page of the webapp, next to knowing the exact app is we can found it on exploit-db and start exploiting it.
With this we have three of four flags in task 2.
Scan the machine with nmap. What is the other port running a web server on?
8080
Take a look at the other web server. What file server is running?
Rejetto HTTP File Server
What is the CVE number to exploit this file server?
2014-6287
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
Explotation
This is the exploit:
https://www.exploit-db.com/exploits/39161
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
Understanding the exploit:
This Exploit works as a curious way:
First it retrieves from a webserver a netcat binary, you have to edit and set your IP Address and Local Port, and start the server in the same directory where the compiled netcat binary is located.
With the exploit downloaded and the ip and port changed we have to download a static binary of netcat from github:
In this case we use this file but any static binary of netcat will be ok.
After download it we have to set up a local web server in the same directory we download it, we can do it with php or other languages but this time i'm gonna use python3.
As we said before the exploit first download a the netcat binary in the target machine and the second time we run the exploit we receive a shell to the ip that we writed.
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
To receive it we have to close the http server and set-up a netcat listener on our PC.
After run the exploit twice we receive a shell on the target.
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
If we go to Bill Desktop we can see the flag:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
With this we have the last question of task 2:
b04763b6fcf51fcd7c13abc7db4fd365
It's time to privesc!
๐ช ROOT PRIVESC
At the beggining if we not have idea we can run winpeas.bat
In this case the Room say to us that is a Unquoted Service Path Vulnerability
To enumerate the services we use some of this two commands:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
To exploit this Vulnerability we need to understand how Windows search the files after understanding this we know that AdvancedSystemCareService9 is not in quotes and it will be a explotable service.
Now we have to generate the payload and upload to the directory of the machine. We have to go to:
C:\Program Files (x86)\IObit\
and download here with certutil but first generate the payload and start the web server with python:
- To generate the payload we use msfvenom:
- Then start the webserver:

- Download the file into the target machine with certutil:

After that we create a nc listener in the port that we configured the payload(80 in this case) and we have to restart the service, to do it we use the following commands:
After executing those commands we receive a SYSTEM shell in our nc listener and we can read the root flag.

The root flag is:
9af5f314f57607c00fd09803a587db80
You can find me on:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
Twitter
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
Github
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
TryHackMe
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More โ
HackTheBox