Breach Walkthrough
Lab Info
Section titled “Lab Info”Lab Name: Breach
Difficulty: Medium
Platform: Vulnlab
Lab Overview
Section titled “Lab Overview”In Breach, we start without credentials and use a writable SMB share to capture NTLM authentication. After cracking the password, we Kerberoast a service account and forge a Silver Ticket for MSSQL access. Finally, we abuse SeImpersonatePrivilege to reach SYSTEM.
1. Initial Access and Enumeration
Section titled “1. Initial Access and Enumeration”1.1 Network Discovery Using RustScan
Section titled “1.1 Network Discovery Using RustScan”We scan for open ports and services to find an initial attack path.

- LDAP, Kerberos, and SMB are exposed, indicating an Active Directory environment.
- These services provide opportunities for user enumeration, authentication attacks, and lateral movement.

- The scan also reveals the domain name and Domain Controller hostname.
- Adding these entries to
/etc/hostshelps with Kerberos-based enumeration and improves tool reliability.
1.2 SMB Enumeration
Section titled “1.2 SMB Enumeration”We use nxc with anonymous authentication to find accessible shares.

- A share named
Usersis accessible with read permissions. - Another share named
shareis accessible with read and write permissions. - Read access to
IPC$allows RID cycling to enumerate domain users.
1.3 RID Cycling as Guest
Section titled “1.3 RID Cycling as Guest”Read access to IPC$ lets us enumerate domain users and groups through RID cycling.
impacket-lookupsid anonymous@10.10.123.133Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companiesPassword:[*] Brute forcing SIDs at 10.10.123.133[*] StringBinding ncacn_np:10.10.123.133[\pipe\lsarpc][*] Domain SID is: S-1-5-21-2330692793-3312915120-7062558561000: BREACH\BREACHDC$ (SidTypeUser)1101: BREACH\DnsAdmins (SidTypeAlias)1102: BREACH\DnsUpdateProxy (SidTypeGroup)1103: BREACH\SQLServer2005SQLBrowserUser$BREACHDC (SidTypeAlias)1104: BREACH\staff (SidTypeGroup)1105: BREACH\Claire.Pope (SidTypeUser)1106: BREACH\Julia.Wong (SidTypeUser)1107: BREACH\Hilary.Reed (SidTypeUser)1108: BREACH\Diana.Pope (SidTypeUser)1109: BREACH\Jasmine.Price (SidTypeUser)1110: BREACH\George.Williams (SidTypeUser)1111: BREACH\Lawrence.Kaur (SidTypeUser)1112: BREACH\Jasmine.Slater (SidTypeUser)1113: BREACH\Hugh.Watts (SidTypeUser)1114: BREACH\Christine.Bruce (SidTypeUser)1115: BREACH\svc_mssql (SidTypeUser)The output reveals several domain users:
- Julia.Wong
- Christine.Bruce
- Diana.Pope
- Jasmine.Price
- George.Williams
- Jasmine.Slater
- Hugh.Watts
- Christine.Bruce
- Claire.Pope
- Hilary.Reed
- svc_mssql
This user list is useful for further enumeration and password spraying attacks.
1.4 SMB Access as Guest
Section titled “1.4 SMB Access as Guest”We have read access to the Users share and read/write access to share. We can check both for useful files.
Using smbclient to access the shares


- We upload a test file named finance.txt to confirm that the share is writable. It works!
- We can use this writable share for an NTLM coercion (watering-hole) attack with NTLM Theft.
2. Credential Access
Section titled “2. Credential Access”2.1 Generating Malicious LNK
Section titled “2.1 Generating Malicious LNK”

We generate a malicious LNK file with ntlm_theft and upload it to the writable SMB share.
Setting Up responder
We start Responder to capture NTLM authentication attempts.


- An NetNTLMv2 challenge-response is captured for the user Julia.Wong.
2.2 Password Cracking
Section titled “2.2 Password Cracking”The captured NetNTLMv2 challenge-response is cracked using Hashcat with mode 5600.


- We cracked the password!
- Valid credentials are now available for authenticated enumeration.
2.3 Authenticated SMB Enumeration
Section titled “2.3 Authenticated SMB Enumeration”We use the credentials to enumerate shares as julia and check julia.wong under transfer for useful files.

- Julia Wong’s credentials give us more SMB access, and we find the user flag in
local.txt.
2.4 User flag
Section titled “2.4 User flag”
- We found and submitted the user flag.
- We now continue with further enumeration and exploitation to obtain the root flag.
3. Lateral Movement and Pivoting
Section titled “3. Lateral Movement and Pivoting”3.1 Dumping AD Object Information
Section titled “3.1 Dumping AD Object Information”We use nxc to collect AD objects and their relationships.

- After dumping the Active Directory object data, we can move the files to the current working directory and ingest them into BloodHound for attack path analysis.
3.2 Ingesting Dumped AD Data
Section titled “3.2 Ingesting Dumped AD Data”We import the data into BloodHound to look for attack paths from julia.wong.

- While using the built-in queries to identify Kerberoastable users, we discovered the
MSSQLSvcaccount, which we can potentially abuse.
3.3 Kerberoasting the MSSQL Service Account
Section titled “3.3 Kerberoasting the MSSQL Service Account”Let’s Kerberoast the MSSQLSvc service account using impacket-GetUserSPNs to request a Ticket Granting Service (TGS) ticket. Since Kerberos service tickets are encrypted using the service account’s NTLM hash, the retrieved TGS can be cracked offline to recover the plaintext password.

3.4 Password Cracking TGS Hash
Section titled “3.4 Password Cracking TGS Hash”Using Hashcat, we can attempt to crack the extracted Kerberos TGS hash by specifying the module -m 13100, which corresponds to Kerberos 5 TGS-REP (RC4-HMAC).


- We cracked the hash and recovered the password. We can check BloodHound for attack paths from this account.
4. Privilege Escalation
Section titled “4. Privilege Escalation”With control of the service account, we may be able to impersonate users within that service.
Note: I tried accessing MSSQL with impacket-mssqlclient, but it did not work. BloodHound also showed no special permissions for the account, so we try a Silver Ticket attack.
The permissions available to a service account determine what we can do with it. Here, we target the MSSQL server using the compromised account.
For the Silver Ticket attack, we need:
- The service account’s RC4-HMAC (NTLM) hash
- The domain SID and the target service SPN
4.1 Gathering Prerequisite Information
Section titled “4.1 Gathering Prerequisite Information”
- We identified the domain SID. Next, we convert the recovered password into an NTLM hash to create a silver ticket.
Note: This step can be skipped, as we already obtained the domain SID earlier while performing RID cycling using anonymous access!!.
Convert Password to NTLM Hash

- Using CyberChef, we converted the plaintext password into an NTLM hash.
4.2 Silver Ticket Attack
Section titled “4.2 Silver Ticket Attack”- We use
impacket-ticketerto forge a Silver Ticket and authenticate asAdministratorwithin the MSSQL service.

- The ticket has been successfully created.
Setting Env Variable for Authentication
Next, we export it by setting the Kerberos ticket environment variable so it can be used for authentication.

4.3 Shell as MSSQL
Section titled “4.3 Shell as MSSQL”
- We enable
xp_cmdshellto execute system commands. Using this capability, we upload a reverse shell to gain initial access and continue enumerating the system.
4.4 Finding SQLService Permissions
Section titled “4.4 Finding SQLService Permissions”
- Enumeration reveals that this user has the SeImpersonatePrivilege enabled.
- Since this privilege is present, we can abuse it by uploading GodPotato along with a stageless payload. Executing GodPotato with the payload allows us to escalate privileges and obtain an Administrator-level reverse shell.
4.5 Sliver for PrivEsc & Stable Shell
Section titled “4.5 Sliver for PrivEsc & Stable Shell”We use Sliver for a stable interactive session, with session management for post-exploitation and privilege escalation.

- In this step, we generate a Windows stageless payload using Sliver and configure a listener to receive the callback.

- Move the payload to the file_share folder so we can serve it to the target.
Setting up the listener

Setting up the HTTP server to deliver the payload

A lightweight HTTP server is set up to host the payload.
4.6 Upload and Payload Execution
Section titled “4.6 Upload and Payload Execution”We use xp_cmdshell to download both GodPotato and the stageless Sliver payload onto the target system via curl.
We transfer the binaries to C:\Temp, then run GodPotato with the stageless payload as its argument. It abuses SeImpersonatePrivilege through token impersonation and connects back to our Sliver listener.




- The Sliver session confirms successful privilege escalation, and the current token context is shown as:
NT AUTHORITY\SYSTEM
4.7 Root flag
Section titled “4.7 Root flag”
- We retrieved and submitted the root flag!
5. Attack Summary
Section titled “5. Attack Summary”- Anonymous SMB access enabled NTLM coercion via a writable share.
- NTLM credentials for Julia.Wong were captured and cracked.
- Kerberoasting exposed the svc_mssql service account.
- A Silver Ticket allowed Administrator impersonation to the targeted MSSQL service. That service ticket did not grant general-purpose Administrator access across the domain.
- SeImpersonatePrivilege was abused using GodPotato to achieve SYSTEM access.