Crafty

Recon

nmap_scan.log

HTTP (80)

![Pasted_image_20240513004332.png]]![Pasted_image_20240513005444.pngarrow-up-rightPasted_image_20240513005511.png

Nothing interesting on webserver so far, let's move on to Minecraft server

Minecraft (25565)

Download the Client: https://github.com/UltimMC/Launcher?tab=readme-ov-file

Install 1.16.5 version as suggested by nmap

Playing inside a VM do be trippy...

The server doesn't allow you to move or anything and you only have access to chat so I decided to use Console Client: https://github.com/MCCTeam/Minecraft-Console-Client

Log4j exploit: https://github.com/kozmer/log4j-shell-poc/tree/main Get required Java version for the exploit: https://mirrors.huaweicloud.com/java/jdk/8u202-b08/

Changes:Pasted_image_20240513031617.pngPasted_image_20240513220636.png

A bit of a jetlag on reverse shell, but it worked after hitting Enter.

User.txt

Privileges Escalation

After doing tree /f I noticed plugins directory which seemed interesting. Since we are in pwncat-cs we can utilize download command:

jd-guiarrow-up-right can be used to view source of Jar file.

Pasted_image_20240513221510.png

rcon = new Rcon("127.0.0.1", 27015, "s67u84zKq8IXw".getBytes());

Nothing interesting in C:\inetpub\wwwroot\web.config and playcount.txt doesn't exist.

Anyway: RCON is a TCP/IP-based protocol that allows server administrators to remotely execute Minecraft commands. Introduced in Beta 1.9-pre4, it's basically an implementation of the Source RCON protocol for Minecraft.arrow-up-right

Hmmm... After some googling it seems this protocol isn't exactly safe. server.properties revealed that it's running on rcon.port=25575. The rcon seemed like a deadend because it has precompiled binary jar and is using it, command is fixed so that's downer.

We did find the password, could it be admin password? runas for some reason wasn't working so I uploaded RunasCs.exe:

I originally was using pwncat-cs but it was doing some funky stuff and kept disconnecting, so I just decided to stick to the basics, just netcat.

Root.txt

Pasted_image_20240513232731.pngNote: Im back to Kali and the command is powercat from apt, no longer on arch. Vanilla would be to just activate powershell and then generate payload.


Holy shit, catching the user shell was the hardest part because the damn server kept crashing and restarting box was pain 1. needed user votes, 2. restart limit.

Last updated