🆕Using Certificates
Using Certificates authentication with NetExec
PKINIT (default)
By default, nxc authenticates with the certificate through PKINIT: it asks the KDC for a TGT with the certificate, saves it to a ccache, then performs a regular Kerberos login with that ticket (from ccache). It works on every protocol, but requires the KDC to support PKINIT: the Domain Controller must hold a certificate with the KDC Authentication EKU (1.3.6.1.5.2.3.5), issued by a CA present in the NTAuth store.
nxc smb 192.168.0.1 --pfx-cert user.pfx -u user nxc smb 192.168.0.1 --pfx-cert user.pfx --pfx-pass password -u user nxc smb 192.168.0.1 --pfx-base64 user.pfx -u user nxc smb 192.168.0.1 --pem-cert user.pem --pem-key key.pem -u user 
UnPAC the hash (SMB only)
The login itself is done with Kerberos, so the NT hash of the account is no longer retrieved by default. With --unpac, nxc additionally performs a U2U request with the PKINIT TGT and extracts the NT hash of the account from the PAC_CREDENTIAL_INFO structure of the PAC. The hash is displayed and stored in the nxc database.

References
Schannel (LDAP only)
When the Domain Controller has no such certificate, PKINIT is unavailable and the authentication fails with KDC_ERR_PADATA_TYPE_NOSUPP. With --schannel, the certificate is presented directly in the TLS handshake and the bind is done with a SASL EXTERNAL bind: Kerberos is never involved, so it still works in that case.

Last updated
Was this helpful?

