Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/the-useless-one/pywerview/llms.txt

Use this file to discover all available pages before exploring further.

get-objectacl retrieves the full access control list from the nTSecurityDescriptor of any Active Directory object, exposing every ACE (Access Control Entry) that governs who can read, write, or control that object. By default the DACL (Discretionary ACL) is returned, but switching to the SACL (System ACL) is also possible for auditing scenarios. The command pairs naturally with --resolve-sids and --resolve-guids to turn raw SID and GUID values into human-readable principal names and right descriptions — a workflow that closely mirrors the output produced by BloodHound’s ACL analysis engine. Filtering by a specific rights type lets you zero in on high-value delegations such as password resets or group membership writes without wading through every ACE.

Synopsis

pywerview get-objectacl -t <DC_IP> -w <DOMAIN> -u <USER> -p <PASSWORD> \
    [--sid <SID> | --sam-account-name <SAM> | --name <NAME>] \
    [-d <DOMAIN>] [-a <ADS_PATH>] \
    [--custom-filter <FILTER>] \
    [--sacl] \
    [--rights-filter {reset-password,write-members,allowed-to-authenticate,all}] \
    [--resolve-sids] [--resolve-guids] \
    [--json] [-l LEVEL]

Parameters

Connection

-t, --dc-ip
string
required
IP address of the Domain Controller to target.
-w, --workgroup
string
Name of the domain used for authentication (e.g. contoso.com).
-u, --user
string
Username to authenticate with against the Domain Controller.
-p, --password
string
Password associated with the user account.
--hashes
string
NTLM hashes for pass-the-hash authentication. Format: [LMHASH:]NTHASH.
-k
boolean
Use Kerberos authentication. Credentials are read from the ccache file referenced by the KRB5CCNAME environment variable. Falls back to command-line credentials if no valid ticket is found.
--tls
boolean
Force a TLS-encrypted connection to the Domain Controller.
--simple-auth
boolean
Force SIMPLE LDAP authentication instead of the default NTLM/SASL binding.

SChannel (Certificate Authentication)

--cert
string
Path to the certificate file associated with the user account, used for SChannel-based authentication.
--key
string
Path to the private key file associated with the user certificate.

Object Selection

--sid
string
SID of the object whose ACL you want to retrieve. Wildcards are accepted.
--sam-account-name
string
samAccountName of the object to look up. Wildcards are accepted (e.g. svc_*).
--name
string
Display name of the object to look up. Wildcards are accepted (e.g. Domain*).
-d, --domain
string
The domain to query. Defaults to the domain of the authenticated user.
-a, --ads-path
string
Additional ADS path to restrict the LDAP search base (e.g. OU=Groups,DC=contoso,DC=com).
--custom-filter
string
A raw LDAP filter string appended to the generated query, enabling arbitrary filtering beyond the built-in selectors.

ACL Options

--sacl
boolean
Return the SACL (System ACL) instead of the DACL. The SACL contains auditing entries and typically requires a privileged account to read.
--rights-filter
string
Filter ACEs to a specific delegated right. Accepted values:
ValueDescription
reset-passwordACEs granting the ability to reset the object’s password
write-membersACEs granting write access to the member attribute
allowed-to-authenticateACEs granting the Allowed-To-Authenticate extended right
allAll ACEs (equivalent to no filter)

Resolution

--resolve-sids
boolean
Resolve trustee SIDs in the ACL entries to their distinguished names. Without this flag, raw SID strings are returned.
--resolve-guids
boolean
Resolve object-type and inherited-object-type GUIDs to their display names by querying the schema and extended-rights containers on the DC.

Output

--json
boolean
Print results as JSON instead of the default human-readable format.
-l, --logging-level
string
Verbosity of log output written to stderr. Choices: CRITICAL (default), WARNING, DEBUG, ULTRA.

Usage Examples

# Dump the full DACL for a user object (raw SIDs and GUIDs)
pywerview get-objectacl -t dc.contoso.com -u alice -p 'P@ssw0rd' -w contoso.com \
    --sam-account-name bob
# Resolve SIDs and GUIDs for human-readable output
pywerview get-objectacl -t dc.contoso.com -u alice -p 'P@ssw0rd' -w contoso.com \
    --sam-account-name bob --resolve-sids --resolve-guids
# Find every principal that can reset a user's password
pywerview get-objectacl -t dc.contoso.com -u alice -p 'P@ssw0rd' -w contoso.com \
    --sam-account-name bob --rights-filter reset-password --resolve-sids
# Find every principal that can write to Domain Admins membership
pywerview get-objectacl -t dc.contoso.com -u alice -p 'P@ssw0rd' -w contoso.com \
    --name 'Domain Admins' --rights-filter write-members --resolve-sids
# Check allowed-to-authenticate rights on a computer object
pywerview get-objectacl -t dc.contoso.com -u alice -p 'P@ssw0rd' -w contoso.com \
    --name 'WEBSERVER01' --rights-filter allowed-to-authenticate --resolve-sids
# Retrieve the SACL for a user (requires privileged account)
pywerview get-objectacl -t dc.contoso.com -u alice -p 'P@ssw0rd' -w contoso.com \
    --sam-account-name bob --sacl
# Output full DACL as JSON for offline processing
pywerview get-objectacl -t dc.contoso.com -u alice -p 'P@ssw0rd' -w contoso.com \
    --sam-account-name bob --resolve-sids --resolve-guids --json
# Pass-the-hash with rights filter
pywerview get-objectacl -t dc.contoso.com -u alice --hashes :aad3b435b51404eeaad3b435b51404ee \
    -w contoso.com --sam-account-name bob --rights-filter all --resolve-sids
--sacl requires that the authenticating account holds the SeSecurityPrivilege right (typically granted to Domain Admins or explicitly delegated). Attempting to read the SACL without sufficient privileges will result in an LDAP access error.
Combining --resolve-sids and --resolve-guids produces output that closely mirrors what BloodHound displays in its ACL analysis view. Pipe the result with --json into jq or a Python script to build targeted lists of principals with dangerous delegations such as GenericAll, WriteDacl, or extended rights like Reset-Password.

SChannel Support

Certificate-based SChannel authentication is supported via --cert and --key. Combine with --tls to connect over LDAPS — particularly important when reading nTSecurityDescriptor attributes, as some DC configurations restrict security descriptor reads to encrypted channels.
pywerview get-objectacl -t dc.contoso.com --tls \
    --cert user.pem --key user.key \
    -w contoso.com --sam-account-name bob --resolve-sids --resolve-guids

Build docs developers (and LLMs) love