HTB Series - Chatterbox
We start by scanning the target with nmap to find open ports
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Drilling down to the ports marked with the tcpwrapped service
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Using searchsploit
searchsploit achat
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
I don't want to figure out the directory for this so I'll just paste it into current directory with searchsploit -m exploitID
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Exploit Logic
- The achat service is vulnerable to a buffer overflow exploit.
- To leverage the exploit, we generate a payload with msfvenom based on powershell and we specify a file to be downloaded on the remote server (in this case we name it Awaken.rocks)
- Start a python web server from which the file (Awaken.rocks) will be downloaded
- We create a listener on the desired ip and port with netcat
- We run the exploit and that should open up a reverse shell on the listening port.
Achat service vulnerability
Based on Achat exploit
Generate payload
Use the command to create the desired exploit
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Use the output payload to edit the python script and edit the server address details at the bottom
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
We can use the nishang powershell script to invoke a reverse shell then set up a listener on the desired port
Remember to change the IP address and port, copy the line to the bottom of the nishang script, then copy the script to the folder where you will run the webserver to have the victim download the script from.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Edited Nishang Invoke Powershell Script
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Connection Established to Listener
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Establish current privs
whoami /all
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Escalating Privileges
We can leverage the Powersploit suite of tools, specifically the Privilege Escalation tools > PowerUp script to escalate privileges.
Copy the PowerUp.ps1 script to the folder being served on the webserver then from the shell earlier acquired download the PowerUp Script and run the Invoke-All Checks command
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
From the output we can see Registry Autologons are enabled and the default password.
Lets take a look at the users on the machine
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
We note there is an Administrator user.
Following a similar methodology, lets try to spawn a reverse shell using the Invoke Power Shell script from earlier and pass in the default password as the password for the administrator.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Set up a listener on the desired port and when you download the script, a reverse shell is spawned as admin
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ