windowsBillyboss

Enumeration:

Port Scanning:

As always we are going to start with port scanning:

┌──(kali㉿kali)-[~/…/Machines/OffsecPG/Practice/Billyboss]
└─$ sudo nmap -sCV -p- --min-rate 4000 -oA nmap/services -vv 192.168.182.61
Starting Nmap 7.95 ( https://nmap.org ) at 2025-11-10 12:09 EST
Nmap scan report for 192.168.182.61
Host is up, received echo-reply ttl 125 (0.11s latency).
Scanned at 2025-11-10 12:09:20 EST for 198s 
Not shown: 65521 closed tcp ports (reset)
PORT      STATE SERVICE       REASON          VERSION
21/tcp    open  ftp           syn-ack ttl 125 Microsoft ftpd
| ftp-syst: 
|_  SYST: Windows_NT
80/tcp    open  http          syn-ack ttl 125 Microsoft IIS httpd 10.0
|_http-server-header: Microsoft-IIS/10.0
|_http-title: BaGet
|_http-cors: HEAD GET POST PUT DELETE TRACE OPTIONS CONNECT PATCH
|_http-favicon: Unknown favicon MD5: 8D9ADDAFA993A4318E476ED8EB0C8061
| http-methods: 
|_  Supported Methods: GET HEAD
135/tcp   open  msrpc         syn-ack ttl 125 Microsoft Windows RPC
139/tcp   open  netbios-ssn   syn-ack ttl 125 Microsoft Windows netbios-ssn
445/tcp   open  microsoft-ds? syn-ack ttl 125
5040/tcp  open  unknown       syn-ack ttl 125
7680/tcp  open  pando-pub?    syn-ack ttl 125
8081/tcp  open  http          syn-ack ttl 125 Jetty 9.4.18.v20190429
| http-methods: 
|_  Supported Methods: GET HEAD
|_http-server-header: Nexus/3.21.0-05 (OSS) 
|_http-favicon: Unknown favicon MD5: 9A008BECDE9C5F250EDAD4F00E567721
|_http-title: Nexus Repository Manager
| http-robots.txt: 2 disallowed entries 
|_/repository/ /service/
49664/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC
49665/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC
49666/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC
49667/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC
49668/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC
49669/tcp open  msrpc         syn-ack ttl 125 Microsoft Windows RPC
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

<snipped>

We have ftp running on port 21, http on ports 80, and 8081, smb on port 445.

HTTP (80):

We can play and search with the upload and push functionalities, but that is not the way in:

HTTP (8081):

Here we have sonatype nexus repositry manager running.

I searched for public exploits for this specific service:

We have RCE, and the version is mostly the same as ours but newer.

As stated in the title (Authenticated) so we need to login.

I tried a lot of default credentials, and searched online for specific default credentials for this, and could not login, I finally used nexus:nexus and:

Or we can use cewl to download the keywords from that page, and brute force the login form with hydra.

We can get the endpoint of the login request, and the parameters through burpsuite or easily with the browser developer tools under network:

We will notice the username, and password were base64 encoded.

Lets build our command and run it:

We will find the same result.

Exploitation:

Now lets pull our exploit, and adjust it to fit what we want then execute it:

What we will edit is the username:password, and target url, and finally the command to run:

Serve our shell.ps1 file with python web server:

Start a netcat listener as well:

Execute our script:

Here we have a shell.

Post-Exploitation:

Here we have again SeImpersonatePrivilege privilege, lets upload GodPotato and nc to the target:

Start another netcat listener:

Run GodPotato:

Here we have a shell as system.

Get the flags:

Last updated