# ACL

{% hint style="info" %}
Permissions to keep an eye on:

\- GenericAll = FullControl

\- GenericWrite

\- WriteOwner

\- WriteDACL

\- AllExtendedRights

\- ForceChangePassword

\- Self (Self-Membership)
{% endhint %}

## ADModule

```powershell
(Get-ACL ‘AD:\CN=Administrator,CN=Users,DC=alunos,DC=local’).Access
```

## Powerview

```powershell
Get-ObjectAcl -samAccountName <user> [-ResolveGUIDs]
	Get-NetUser | select name, objectsid
	ConvertFrom-SID <sid>
	ConvertTo-SID “<user>”

	Get-DomainObjectAcl | select @{ Name='<object>'; Expression={ConvertFrom-SID $_.SecurityIdentifier}},ObjectDN,ActiveDirectoryRights
	
	Get-ObjectAcl -SamAccountName <user> | select @{ Name='<object>'; Expression={ConvertFrom-SID $_.SecurityIdentifier}},ActiveDirectoryRights
	
	Get-ObjectAcl | ? {$_.SecurityIdentifier -match $(ConvertTo-SID “Domain Admins”)} | select ObjectDN,ActiveDirectoryRights
	
	Get-ObjectAcl  -SamAccountName Administrator | ? {$_.ActiveDirectoryRights -match “GenericAll”)} | select @{} Name=”principal ";Expression={ConvertFrom-SID $_.SecurityIdentifier}}
	
Invoke-ACLScanner -ResolveGUIDs	
Get-PathAcl -path “\\dc.domain.local\sysvol”
Get-ObjectAcl -ADSPath “LDAP://CN=Domain Admins,CN=Group,DC=domain, DC=local”
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://johnermac.gitbook.io/johnermac/active-directory/enumeration/acl.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
