🐲
OSCP Notes
  • 🐲OSCP Notes
  • 🐲OSCP Methodology
  • 💡Misc
    • Metasploit
    • Antivirus Evasion
    • Password attacks
    • Reverse Shells
    • Port Forwarding, Tunneling and Pivoting
      • Local Port Forwarding
      • Remote Port Forwarding
      • Dynamic Port Forwarding
      • Lingolo-ng
    • Information Gathering
      • Passive Reconnaissance
        • Whois
        • Google Dorks
        • NetCraft
        • Git Repository
      • Active Reconnaissance
        • DNS Enumeration
        • Host Discovery
        • Port scanning
        • SMTP - 25
        • SNMP
  • Linux
    • Local Enumeration
    • Local Privileges Escalation
      • Scheduled tasks
      • Password Authentication
      • Monitor Processes
      • SetUID Binaries and Capabilities
      • Sudoers
      • Kernel Exploits
  • Windows
    • 🧠Mindmap
    • 🥝Mimikatz Basics
    • Enumeration
      • External Enumeration
      • Local Enumeration
      • Active Directory
        • PowerView
    • NTLM Hashes
    • Local Privilege Escalation
      • Service Binary Hijacking
      • Service DLL Hijacking
      • Unquoted Service Paths
      • Scheduled Tasks
      • Token impersonation
      • Backup Operators Group
    • Lateral Movement
      • WMI and WinRM
      • PsExec
      • Pass The Hash
      • Overpass The Hash
      • Pass The Ticket
      • DCOM
    • Persistence
      • Golden Ticket
      • Shadow Copy
    • Authentication Attacks
      • AS-REP Roasting
      • Kerberoasting
      • Password Spray
      • Silver Ticket
      • DC Sync
    • Client Side
    • NTLM Authentication
    • Kerberos Authentication
    • Cached Credentials
  • Web attacks
    • WordPress
    • SQL Injection (SQLi)
    • Command Injection
    • Directory Traversal
    • Local File Inclusion (LFI)
    • File Upload
Powered by GitBook
On this page
  • Domain Information
  • Users & Groups
  • Computers
  • Local Admin
  • SPN
  • AD Objects permissions
  • Shares
  • MISC
  • References
  1. Windows
  2. Enumeration
  3. Active Directory

PowerView

PowerView is a PowerShell toolset for AD enumeration, useful for penetration testing. It helps gather domain info, user/group details, inspect permissions, and identify network shares. Commonly used in Active Directory enumeration.

Domain Information

Retrieves details about the current AD domain (name, domain controller, forest info).

Get-NetDomain

Users & Groups

Lists all users in the AD domain with usernames and account status.

Get-NetUser

Displays common name, last password set date, and last logon for each user in the domain.

Get-NetUser | select cn,pwdlastset,lastlogon

Lists all groups in the AD domain.

Get-NetGroup | select cn

Retrieves members of a specific group (e.g., Domain Admins).

Get-NetGroup "<group_name>" | select -ExpandProperty member

Enumerating accounts with Kerberos pre-authentication disabled from inside the network.

Get-DomainUser -PreauthNotRequired -Verbose

Computers

Retrieves a list of all computers in the domain.

Get-NetComputer

Lists domain computers, showing their operating system and DNS hostname.

Get-NetComputer | select operatingsystem,dnshostname

Local Admin

Searches for machines where the current user has local administrator access.

Find-LocalAdminAccess

SPN

Enumerates users with SPNs (Service Principal Names) registered.

Get-NetUser -SPN | select samaccountname,serviceprincipalname

AD Objects permissions

Common Object Permissions:

  • GenericAll: Full control and permissions over the object.

  • GenericWrite: Allows modification of specific attributes on the object.

  • WriteOwner: Grants the ability to change the ownership of an object.

  • WriteDACL: Allows modification of the Discretionary Access Control List (ACE's) for the object.

  • AllExtendedRights: Grants extended rights like resetting or changing passwords.

  • ForceChangePassword: Allows forcing a password change for an object.

  • Self: Grants the ability to add oneself to a group or similar actions.

SecurityIdentifier (SID): This is the unique identifier for an AD Object which has the permission on the target object.

Displays the Access Control List (ACL) for a target AD object.

Get-ObjectAcl -Identity <target>

Filtering the output in order to display the important information.

Get-ObjectAcl -Identity "<target_object>" | select SecurityIdentifier,ActiveDirectoryRights

Get-DomainObjectAcl -ResolveGUIDs -Identity "<target_object>" | ? {$_.SecurityIdentifier -eq (Convert-NameToSid "<controlled_object>")}

Search for interesting ACEs

Find-InterestingDomainAcl -ResolveGUIDs | ?{$_.IdentityReferenceName -match "<controlled_object>"}

Shares

Enumerates shared folders across domain computers.

Find-DomainShare

MISC

Convert SIDs to Names

"<sid>,<sid>,<sid>,..." | Convert-SidToName

Lists active sessions on a specific machine.

Get-NetSession -ComputerName <computer>

References

PreviousActive DirectoryNextNTLM Hashes

Last updated 7 months ago

PowerSploit/PowerView.ps1 at master · PowerShellMafia/PowerSploitGitHub
PowerView
Logo