On Cyber War
TwitterGitHubLinkedIn
  • Welcome
  • Source Zero Con References
  • 1. Reconnaissance/ OSINT
    • Information gathering
    • OSINT tools
    • Search Engine OSINT
    • Sock puppets
  • 2. Scanning
    • Host discovery
    • Port Scanning with Nmap
    • Nmap Scripting Engine
  • 3. Enumeration
    • 21 - FTP
    • 22 - SSH
    • 25 - SMTP
    • 53 - DNS
    • 80/443 - HTTP(s)
    • 111 - NFS
    • 135 - RPC
    • 139/445 - NetBIOS/SMB
    • 161 (UDP) - SNMP
    • Wordpress
    • Finger (Solaris)
    • Active Directory
  • 4. Exploitation
    • Public exploits
    • Web application attacks
      • Command injection
      • Cross site scripting
      • Directory traversal
      • File inclusion
      • SQL injection
    • Password attacks
    • Buffer overflows
    • Active Directory
    • Metasploit
  • 5. Maintaining access
    • Upgrading simple shells
    • Reverse shells
    • MSFvenom
    • File transfers
    • Linux privilege escalation
    • Windows privilege escalation
    • Tunneling/Port Forwarding
  • 6. Miscellaneous
    • Connections
  • 7. Walkthroughs
    • HTB - Blunder
    • HTB - Haircut
    • THM -HackPark
Powered by GitBook
On this page
  1. 3. Enumeration

Active Directory

Enumeration

There are numerous tools available for enumerating Active Directory environments. For the OSCP, I recommend picking one or two tools, getting familiar with those tools in the lab environment, and sticking with that tool through the exam. After you earned the OSCP you can explore additional tools and expand your Active Directory knowledge. For my OSCP journey my AD enumeration tool of choice was PowerView.ps1.

Bloodhound

pip install bloodhound
bloodhound-python -u user -p pass -d domain -c All

PowerView

To use PowerView we first need to modify the powershell execution policy to enable script execution.

Set-ExecutionPolicy -ExecutionPolicy (RemoteSigned) or (Bypass)

Next, dot source the script.

. .\script.ps1 (be sure to include the space between ellipses)

Basic enumeration (Powerview.ps1)

Get-Domain
Get-DomainPolicy
(Get-DomainPolicy).KerberosPolicy
Get-DomainController
Get-DomainUser -Identity student1
Get-NetUser -SPN (Kerberoastable users)
Get-NetUser -PreauthNotRequired (AS-REP Roastable users)
Get-DomainGroup
Get-DomainGroupMember -Identity "Domain Admins" -Recurse
Get-DomainComputer
Get-DomainComputer | select Name
Get-NetComputer -Unconstrained (unconstrained delegation **need to verify**)
Get-DomainUser
Get-DomainUser | select samaccountname
Get-DomainUser -SPN | select serviceprincipalname
Get-NetLoggedon -ComputerName name (requires local admin rights)
Get-DomainGPO
Get-DomainOU | select name

User hunting

Find-LocalAdminAccess -Verbose : Finds all machines on the domain where the current user has local admin access
Find-DomainUserLocation -Verbose
Find-DomainUserLocation -UserGroupIdentity : Find computers where a domain admin (or specified user/group) has sessions

PreviousFinger (Solaris)NextPublic exploits

Last updated 2 years ago