Troubleshooting
Common issues and solutions when using pwnAD.
Connection Issues
"Connection refused" or "Connection timed out"
Symptoms: - Cannot connect to the domain controller - Connection errors immediately after running command
Solutions:
-
Verify the DC IP is correct:
-
Check if LDAP port is open:
-
Ensure no firewall is blocking the connection
-
Try specifying the port explicitly:
"Connection reset by peer"
Symptoms: - Connection works initially but drops - Error appears after idle period
Solutions:
In interactive mode, use rebind:
"Server unwilling to perform"
Symptoms: - Operations fail with "unwillingToPerform" - Common with password changes
Solutions:
Most likely you need TLS. Either:
-
Connect with TLS from the start:
-
Upgrade with StartTLS in interactive mode:
Authentication Issues
"Invalid credentials"
Symptoms: - Authentication fails despite correct credentials - Works with other tools but not pwnAD
Solutions:
-
Check username format (should be just username, not
domain\user): -
Escape special characters in password:
-
Try using hash instead:
"KDC_ERR_PREAUTH_FAILED"
Symptoms: - Kerberos operations fail - "Pre-authentication failed" error
Solutions:
- Verify password/hash is correct
- Check for clock skew:
- Try NTLM instead of Kerberos (remove
-kflag)
Certificate Authentication Fails
Symptoms: - Schannel or PKINIT authentication fails - Certificate errors
Solutions:
-
Verify certificate is for the correct user:
-
Check certificate is not expired:
-
Ensure private key matches certificate:
-
Specify username explicitly:
LDAP Operation Errors
"Insufficient access rights"
Symptoms: - Operation denied - "insufficientAccessRights" error
Solutions:
- Verify you have the required permissions
- Check group memberships:
- Try with a higher-privileged account
"Object does not exist"
Symptoms: - Target not found - "noSuchObject" error
Solutions:
- Verify target name spelling
- Check if using sAMAccountName or DN:
"Constraint violation"
Symptoms: - Modification fails - "constraintViolation" error
Solutions:
Common with password changes:
- Password doesn't meet complexity requirements
- Password history conflict
- Minimum password age not met
Kerberos Issues
"KRB_AP_ERR_SKEW"
Symptoms: - All Kerberos operations fail - Time-related error
Solution:
Sync your clock with the DC:
"KDC_ERR_S_PRINCIPAL_UNKNOWN"
Symptoms: - getST fails - Service not found
Solutions:
-
Verify SPN format:
-
Check if SPN exists:
ccache Issues
Symptoms:
- -k flag doesn't use existing ticket
- "Credentials cache file not found"
Solutions:
-
Set KRB5CCNAME correctly:
-
Verify ccache exists and is readable:
Shadow Credentials Issues
"msDS-KeyCredentialLink not found"
Symptoms: - Shadow operations fail - Attribute error
Solutions:
- Verify domain functional level is 2016+
- Check if attribute exists on target:
PKINIT Fails After Adding Key Credential
Symptoms: - Key added successfully - Certificate authentication fails
Solutions:
- Ensure ADCS is deployed or Azure AD supports PKINIT
- Check certificate was generated correctly
- Try the
shadow autocommand for full automation
Debug Mode
Enable debug output for detailed information:
Debug mode shows:
- LDAP queries being sent
- Server responses
- Authentication flow
- Error details
Getting Help
If you're still stuck:
- Run with
--debugand capture the full output - Check GitHub Issues
- Open a new issue with:
- pwnAD version
- Command used (mask credentials!)
- Full error message
- Debug output
- Expected vs actual behavior