PywerView supports SChannel authentication, which lets you authenticate to Active Directory LDAP using an X.509 certificate and its corresponding private key instead of a password or hash. This is the authentication path you reach for after a successful AD CS (Active Directory Certificate Services) attack — for example, after abusing a vulnerable certificate template withDocumentation 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.
certipy or relaying NTLM authentication with ntlmrelayx.py to obtain a certificate on behalf of a target user or machine account. SChannel authentication is supported for a specific subset of LDAP-backed commands listed below.
Obtaining a Certificate
Any tool that can request or relay authentication to AD CS and export a PFX bundle will work. Common options include:- certipy — ESC1–ESC8 exploitation and certificate requests
- ntlmrelayx.py — relay NTLM to ADCS HTTP endpoint to mint a certificate
.pfx (PKCS#12) file containing the certificate and private key. PywerView requires them as separate PEM-encoded files.
Extracting the Certificate and Key from a PFX
Extract the private key
Pull the unencrypted private key. The
-nodes flag disables key encryption
so PywerView can read it without a passphrase prompt:Certificate Flags
Path to the X.509 certificate file in PEM format (
.crt or .pem). This is
the public certificate associated with the authenticating account.Path to the private key file in PEM format (
.key). Must be unencrypted
(use -nodes when extracting from a PFX).TLS Behavior with Certificate Authentication
The
--tls flag changes the underlying bind mechanism used for certificate
authentication:- Without
--tls— PywerView negotiates StartTLS on the standard LDAP port (389) and performs anEXTERNAL SASLbind, as described in the Microsoft MS-ADTS documentation. - With
--tls— PywerView connects directly to the LDAPS port (636) and presents the certificate over the TLS channel.
--tls to force LDAPS. See
TLS / LDAPS for more detail.Supported Commands
SChannel authentication is available for the following commands:| Command | Description |
|---|---|
get-adobject | Query objects by SID, samAccountName, or name |
get-objectowner | Return the owner of an AD object |
get-netpki | List pKIEnrollmentService (CA) objects |
get-netcerttmpl | List certificate templates |
get-netgmsa | List Group Managed Service Accounts |
get-netsmsa | List standalone Managed Service Accounts |
get-objectacl | Return the ACL of an AD object |
get-netuser | Query domain user information |
get-netgroup | List domain groups or group memberships |
get-netcomputer | Query domain computer accounts |
get-netdomaincontroller | List domain controllers |
get-netfileserver | List file servers from user attributes |
get-netou | List Organizational Units |
get-netsite | List AD sites |
get-netsubnet | List AD subnets |
get-netdomaintrust | List domain trusts |
get-netpso | List Password Settings Objects |
get-netgpo | List Group Policy Objects |
get-netgroupmember | List members of a domain group |
get-netsession, get-netshare) do not support SChannel and require NTLM or Kerberos credentials instead.