nitesh@gupta
Proving Grounds Windows

Craft

Full walkthrough — enumeration, foothold and privilege escalation.

Nmap Output

Nmap scan report for 192.168.167.169
Host is up (0.062s latency).
Not shown: 65534 filtered tcp ports (no-response)
PORT   STATE SERVICE VERSION
80/tcp open  http    Apache httpd 2.4.48 ((Win64) OpenSSL/1.1.1k PHP/8.0.7)
| http-methods: 
|_  Supported Methods: GET HEAD POST OPTIONS
|_http-favicon: Unknown favicon MD5: 556F31ACD686989B1AFCF382C05846AA
|_http-server-header: Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/8.0.7
|_http-title: Craft

We see a webserver running port 80

Craft walkthrough, Got the reverse shell, screenshot 1
Craft, step 1

After checking the website we see there’s a upload functionality which accepts ODT file

Craft walkthrough, Got the reverse shell, screenshot 2
Craft, step 2

I tried uploading php file and bypassing it but it didn’t work

So I created a malicious ODT file using https://github.com/0bfxgh0st/MMG-LO

Craft walkthrough, Got the reverse shell, screenshot 3
Craft, step 3

Uploaded it on the server

Craft walkthrough, Got the reverse shell, screenshot 4
Craft, step 4

Got the reverse shell

Craft walkthrough, Got the reverse shell, screenshot 5
Craft, step 5

Got local.txt (489bb41d0ec842e09f7ba1eb5055a0b7)

Craft walkthrough, Got the reverse shell, screenshot 6
Craft, step 6

After running winpeas. I noticed that there’s a apache user and we have write access to C:\xampp\htdocs so I uploaded a php shell & a reverse.exe file

Craft walkthrough, Got the reverse shell, screenshot 7
Craft, step 7

Executed reverse.exe reverse shell using shell.php

Craft walkthrough, Got the reverse shell, screenshot 8
Craft, step 8

Got reverse shell as apache user & it has SeImpersonate privilege

Craft walkthrough, Got the reverse shell, screenshot 9
Craft, step 9

Ran printspoofer & got NT access

Craft walkthrough, Got the reverse shell, screenshot 10
Craft, step 10

Got proof.txt(2cf175aaca1e7f087bb51f78e8cee9cf)

Craft walkthrough, Got the reverse shell, screenshot 11
Craft, step 11

More walkthroughs