PowerView
Purpose
Use this skill for focused PowerShell-based AD reconnaissance when the engagement permits scripted domain discovery within an approved scope.
Phase Fit
- Primary: Discovery and Reconnaissance, Vulnerability Analysis
- Secondary: Threat Modeling and Test Planning, Retest and Closure
Use When
- Need to inspect domain groups, users, computers, or local admin relationships.
- Need flexible AD discovery without a full graph collection.
- Need a repeatable PowerShell workflow for retest.
Avoid When
- Scripted AD reconnaissance is not explicitly approved.
- Domain or host scope is unclear.
Inputs
- Approved domain or host scope
- PowerShell execution constraints and logging expectations
- Specific AD question to answer
Procedure
- Load only the approved PowerView functions needed for the question.
- Keep queries tightly aligned to the current hypothesis.
- Record the exact host, user context, and functions used.
- Correlate results with
bloodhound,ldapsearch, or manual validation. - Preserve the exact query path for retest.
Command Syntax
Replace sample commands with the minimum approved discovery functions.
# Import PowerView
Import-Module .\PowerView.ps1
# Get domain information
Get-Domain -Domain contoso.com
# Enumerate domain users
Get-DomainUser | Select-Object SamAccountName, Description, MemberOf
# List domain administrators
Get-DomainGroupMember -Identity "Domain Admins"
# Find computers where domain admins are logged in
Find-DomainUserLocation -UserGroupIdentity "Domain Admins"
# Enumerate all computers
Get-DomainComputer | Select-Object DNSHostName, OperatingSystem
# Find ACEs interesting for privilege escalation
Find-InterestingDomainAcl -ResolveGUIDs
# Get domain trusts
Get-DomainTrust -Domain contoso.com
# Enumerate Kerberoastable accounts (have SPN)
Get-DomainUser -SPN | Select-Object SamAccountName, ServicePrincipalName
Evidence to Capture
- Domain relationships or exposure that materially change risk
- Exact host, user context, and functions used
- Minimal output needed to support the finding
Safety Boundaries
- Keep scripted queries narrowly scoped and approved.
- Avoid broad enumeration that exceeds the current phase objective.