https://github.com/PowerShellMafia/PowerSploit/tree/master/Recon
Resource
- https://book.hacktricks.xyz/windows-hardening/basic-powershell-for-pentesters/powerview
- https://gist.github.com/HarmJ0y/184f9822b195c52dd50c379ed3117993
Start
powershell.exe -ExecutionPolicy bypassBypass PowerShell execution policy to run scripts.
. .\PowerView.ps1Run POWERVIEW script.
Users and Groups
Get-NetUserEnumerate users and their properties.
Get-NetUser | select cnEnumerate domain Common Names for users.
Get-NetUser | select descriptionEnumeration description for users.
Get-UserPropery -Properties logoncountShow connection count (might see a honeypot account).
Get-NetGroupMember -name "Domain Admins"Enumerate users belonging to admin groups.
Get-NetGroup -name *admin*Enumerate all groups with admin in it.
Domain
Get-NetDomainInfos about the domain.
Get-NetDomainControllerInfo about the Domain Controller.
Get-NetComputerInfos about servers and computers in the domain.
Get-DomainPolicyInfos about Domain Policy.
Get-NetGPOList GPOs.
Get-NetGPO | select displayname, whenchangedList policies with when they were changed.