Vulnversity
Date: 06, January, 2021
Author: Dhilip Sanjay S
Click Here to go to the TryHackMe room.
Reconnaissance
nmap is an free, open-source and powerful tool used to discover hosts and services on a computer network.
Scan the box, how many ports are open?
Answer: 6
Steps to Reproduce:
nmap <MACHINE_IP> Starting Nmap 7.91 ( https://nmap.org ) at 2021-01-06 12:58 IST Nmap scan report for <MACHINE_IP> Host is up (0.21s latency). Not shown: 994 closed ports PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 139/tcp open netbios-ssn 445/tcp open microsoft-ds 3128/tcp open squid-http 3333/tcp open dec-notes Nmap done: 1 IP address (1 host up) scanned in 3.24 seconds
What version of the squid proxy is running on the machine?
Answer: 3.5.12
Steps to Reproduce:
How many ports will nmap scan if the flag -p-400 was used?
Answer: 400
Note:
-p-100- will scan 100 ports.-p100- will scan 100th port.
Using the nmap flag -n what will it not resolve?
Answer: DNS
Steps to Reproduce:
-n/-R: Never do DNS resolution/Always resolve [default: sometimes]
What is the most likely operating system this machine is running?
Answer: Ubuntu
What port is the web server running on?
Answer: 3333
Locating Directories using GoBuster
-e
Print the full URLs in your console
-u
The target URL
-w
Path to your wordlist
-U and -P
Username and Password for Basic Auth
-p
Proxy to use for requests
-c
Specify a cookie for simulating your auth
What is the directory that has an upload form page?
Answer: /internal/
Steps to Reproduce:
Compromise the web server
Try upload a few file types to the server, what common extension seems to be blocked?
Answer: .php
Steps to Reproduce:
Usually php files are not allowed to be uploaded.
Run this attack, what extension is allowed?
Answer: .phtml
Note: The content length is different for phtml and the response shows
Success.
Reverse shell
What is the name of the user who manages the webserver?
Answer: bill
Steps to Reproduce:
What is the user flag?
Answer: 8bd7992fbe8a6ad22a63361004cfcedb
Steps to Reproduce:
Privilege Escalation
On the system, search for all SUID files. What file stands out?
Answer: /bin/systemctl
Steps to Reproduce:
Become root and get the last flag (/root/root.txt)
Answer: a58ff8579f0a9270368d33a9966c7fd5
Steps to Reproduce:
Refer GTFO Bins
Last updated