Module 07 // identity surface
AD + Windows.
Make DNS, time and identity explicit before SMB, LDAP or Kerberos work. Keep NetExec artifacts private and validate every credential against scope.
Foundation first
pe status
pe vpn route "$IP"
dig @DC_IP lab.htb
timedatectl statusKerberos depends on correct names and close clock alignment. Record the domain, DC FQDN, DC IP and discovered realm. Add only confirmed lab names to local resolution.
SMB and authentication
smbclient -N -L "//$IP"
nxc smb "$IP" -u USER -p 'PASSWORD'
nxc smb "$IP" -u USER -H NTLM_HASH --sharesThe Zsh nxc/netexec wrapper sets umask 077. Start secret-bearing commands with a literal space. Never spray accounts unless the lab explicitly allows it and you understand lockout policy.
LDAP
ldapsearch -x -H "ldap://$IP" -s base namingContexts
ldapsearch -x -H "ldap://DC_IP" -D 'LAB\USER' -W \
-b 'DC=lab,DC=htb' '(objectClass=user)' sAMAccountNameUse -W to prompt rather than placing a password in argv. Narrow attributes and filters to keep output reviewable.
Kerberos checks
impacket-GetNPUsers 'lab.htb/' -dc-ip DC_IP -usersfile users.txt -no-pass
impacket-GetUserSPNs 'lab.htb/USER' -dc-ip DC_IP -requestRun only against the lab domain. Protect hashes, tickets and ccache files with mode 600, and remove them when the exercise ends.
AD CS inventory
certipy find -u 'USER@lab.htb' -p 'PASSWORD' \
-dc-ip DC_IP -enabled -stdoutTreat “vulnerable” template output as a hypothesis. Read the template permissions and enrollment conditions, then follow the lab objective and rules.
Relationship mapping
bloodhound-python -u USER -p 'PASSWORD' -d lab.htb \
-ns DC_IP -c DCOnly --zipBloodHound ZIP/JSON contains sensitive identity topology. Store it under the private target loot/ directory, import locally, and never publish it with the repository.
Authorized remote access
evil-winrm -i "$IP" -u USER -p 'PASSWORD'
ssh USER@"$IP"Use the least invasive protocol already exposed by the lab. Record which credential worked with pe cred valid ID 1 rather than repeatedly testing it.
No entry matches. Press Esc to reset.