Giddy

Foothold

Nmap Results

┌──[Sat Nov  5 08:42:55 PM CDT 2022]-[wlan0:192.168.1.153 tun0:10.10.16.2]-[TheScriptKid]-[/home/pentester/Downloads]
└──# rscan $ip       
rustscan --accessible -u 5000 -b 2500 -a 10.129.96.140 -- -Pn -A
...
PORT     STATE SERVICE       REASON          VERSION
80/tcp   open  http          syn-ack ttl 127 Microsoft IIS httpd 10.0
| http-methods: 
|   Supported Methods: OPTIONS TRACE GET HEAD POST
|_  Potentially risky methods: TRACE
|_http-title: IIS Windows Server
|_http-server-header: Microsoft-IIS/10.0
443/tcp  open  ssl/http      syn-ack ttl 127 Microsoft IIS httpd 10.0
|_http-title: IIS Windows Server
| http-methods: 
|   Supported Methods: OPTIONS TRACE GET HEAD POST
|_  Potentially risky methods: TRACE
|_http-server-header: Microsoft-IIS/10.0
| ssl-cert: Subject: commonName=PowerShellWebAccessTestWebSite
| Issuer: commonName=PowerShellWebAccessTestWebSite
5985/tcp open  http          syn-ack ttl 127 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
Landing Page. Nothing of Interest.

Web Directory Bruteforcing

Some Kind Store Web App
Entering an Apostrophe in the Search Field Confirms That It's Vulnerable to SQL Injection
Confirmed SQL Injection
Performing The Injection Using Burp Suite With A Different Payload To Authenticate To A Malicious SMB Service

Setting Up Responder To Capture NTLMv2 Hash

After Forwarding The Request We Receive The NTLMv2 Hash

Cracking The Hash After Saving It To File

Gaining Initial Foothold Through WinRM Using The Credentials

User Proof

user.txt

Privilege Escalation

Searching For Installed Software

Searching for site:exploit-db.com *Ubiquiti UniFi Video* reveals a potential privilege escalation exploit https://www.exploit-db.com/exploits/43390arrow-up-right

Ubiquiti UniFi Video 3.7.3 - Local Privilege Escalation

According to the exploit is it required to upload a malicious file called taskkill.exe to C:\ProgramData\unifi-video\. I check to see if windows defender is running

Since windows defender is running, I will be using ParanoidNinja's Prometheus tool https://github.com/paranoidninja/0xdarkvortex-MalwareDevelopment/blob/master/prometheus.cpparrow-up-right and simply modify the ip and port of my attacking machine. I then proceed to compile.

With an already running malicious smb server running on my attacking machine, I upload the file

With the uploaded file I set up a netcat listener on port 443

I now stop and start the service according to the description of the exploit and gain system privileges

Root Proof

Badge

Last updated