ACL Enumeration
Enumerando ACLs com o PowerView
. .\PowerView.ps1
$sid = Convert-NameToSid wley #Obter o SID de um userGet-DomainObjectACL -Identity * | ? {$_.SecurityIdentifier -eq $sid}$guid= "00299570-246d-11d0-a768-00aa006e0529"
$searchBase = "CN=Extended-Rights,$((Get-ADRootDSE).ConfigurationNamingContext)"
Get-ADObject -SearchBase $searchBase -LDAPFilter "(objectClass=ControlAccessRight)" -Properties * | Where-Object {$_.rightsGuid -eq $guid} | Select Name, DisplayName, DistinguishedName, rightsGuid | Format-ListGet-DomainObjectACL -ResolveGUIDs -Identity * | ? {$_.SecurityIdentifier -eq $sid} Get-ADUser -Filter * | Select-Object -ExpandProperty SamAccountName > ad_users.txtforeach($line in [System.IO.File]::ReadLines("C:\Users\htb-student\Desktop\ad_users.txt")) {get-acl "AD:\$(Get-ADUser $line)" | Select-Object Path -ExpandProperty Access | Where-Object {$_.IdentityReference -match 'INLANEFREIGHT\\wley'}}Last updated