Methodology
Once you get initial access to the network, enumerate the target as much as you can. Things to enumerate:
Find the full IP config:
ipconfig /all
Check the DNS IP. This will mostly be the IP of the DC.
Check the privileges of the user:
whoami /priv
Check the membership of the user:
whoami /groups
Check the user's home directory: Desktop, Documents, Program Files etc.
Check the network connections: netstat -ano
Check running services and non-standard installed applications.
Enumerate the machine to find interesting files, credentials, references to other machines.
Enumerate using Sharphound and Bloodhound.
Use PowerView to enumerate.
Use Invoke-Portscan.ps1
Check if there are any domain names mentioned which can be added to /etc/hosts.
Run automated scripts such as WindowsExploitSuggester, WinPeas, PowerUp, Seatbelt.
Find hosts with SMB message signing disabled. (To perform SMB relay)
Once you are done with the enumeration, piece the information together and plan the attack:
As this is an AD environment, most machines will be interconnected to each other. So, check if there are other machines connected to the compromised machine. You can do this by using Invoke-Portscan.
If you cannot directly reach the other machines that means you will have to setup a port forwarding or a proxy. Do this by using chisel, socat, sshtunnel, metasploit.
Try using tools such as evil-winrm, psexec, xfreerdp, ssh to log into the other machine. Try proxychains.
Check if you can bruteforce something using the enumerated data from the previously compromised machine. Do this by using Hydra, Burp Suite, crackmapexec.
Dump the hashes using secretsdump.py, mimikatz, or by dumping the SAM and SYSTEM files.
Use responder. Maybe you can capture a user's hash.
If there is a mail server then try sending emails to everyone in the email list with a reverse shell file attached to the email. Maybe there is a script running on a machine that will automatically execute the file and give you a reverse shell.
Find accounts that are kerberoastable. Then use GetUserSPNs, GetNPUsers.py to dump the krbtgt hash.
To access a website that cannot be reached directly, setup the proxy/tunnel and use foxyproxy to access the website.
Find Principals with DCSync Rights. Find the account which has those rights and then use secretsdump.py to dump the hashes.
Add a new user and get an RDP connection (if ports are open).
Try performing SMB relay attack using ntlmrelayx.py
Check for IPv6 attacks.
Check for PassThePassword and PassTheHash.
Check for token impersonation.
Check for GPP/cPassword attacks.
Check for URL File attacks.
Check for Golden Ticket attacks.
Do process migration.
STUCK?
Check the command and the parameters carefully.
Try using a different tool.
Check if proxy has crashed.
Check if you can use the creds on some other service.
Last updated
Was this helpful?