تخطَّ إلى المحتوى

Polenum

Polenum is a Python-based security tool that extracts password policies and domain information from Windows domain controllers via RPC (Remote Procedure Call) protocol. It can query password complexity requirements, lockout policies, and other security settings without requiring valid domain credentials, making it essential for security assessments and penetration tests targeting Active Directory environments.

sudo apt-get install python3 python3-pip
pip3 install polenum
git clone https://github.com/Wh1t3Fox/polenum.git
cd polenum
pip3 install impacket
python3 polenum.py
pip3 install impacket
pip3 install pycrypto
pip3 install pycryptodome
python3 polenum.py --version
python3 polenum.py --help

Polenum uses RPC to communicate with domain controllers without authentication, exploiting the information disclosure inherent in Active Directory.

  • Minimum Password Length: Minimum characters required
  • Password History: Number of previous passwords remembered
  • Maximum Password Age: Days before password expiration
  • Minimum Password Age: Minimum days between password changes
  • Password Complexity: Requirement for uppercase, lowercase, numbers, symbols
  • Account Lockout Threshold: Failed login attempts before lockout
  • Account Lockout Duration: Minutes account remains locked
  • Account Lockout Observation Window: Reset period for failed login counter
  • Domain name
  • Forest name
  • Domain functional level
  • Trust relationships
  • Default domain policy
  • Password complexity requirements
  • Kerberos settings
python3 polenum.py -u DOMAIN.com
python3 polenum.py 192.168.1.10
python3 polenum.py -u DOMAIN.com -t 192.168.1.100
python3 polenum.py -u DOMAIN.com -U username
python3 polenum.py -u DOMAIN.com -l
CommandDescription
python3 polenum.py DOMAIN.comQuery domain password policy
python3 polenum.py 192.168.1.10Query DC by IP address
python3 polenum.py -u DOMAIN.com -t DC_IPTarget specific DC
python3 polenum.py -u DOMAIN.com -U adminQuery user account info
python3 polenum.py -u DOMAIN.com -lList domain information
python3 polenum.py DOMAIN.com -o output.txtSave results to file
python3 polenum.py DOMAIN.local
python3 polenum.py -u DOMAIN.com -v
python3 polenum.py DOMAIN.local -vv
python3 polenum.py -u DOMAIN.com -t domain-controller.domain.com
python3 polenum.py DOMAIN.com > policy_output.txt
python3 polenum.py DOMAIN.local -o domain_policy.txt
python3 polenum.py -u DOMAIN.com
python3 polenum.py -u DOMAIN.com -l
python3 polenum.py -u DOMAIN.com --trusts
python3 polenum.py -u DOMAIN.com -U username
python3 polenum.py -u DOMAIN.com -U "domain\username"
for domain in domain1.com domain2.com domain3.com; do
    python3 polenum.py $domain >> all_policies.txt
done
python3 polenum.py DOMAIN.com | grep -i kerberos
python3 polenum.py DOMAIN.com | grep -i "minimum password length"
for ip in 192.168.1.{10..20}; do
    python3 polenum.py $ip 2>/dev/null
done
python3 polenum.py DOMAIN.com | grep -A 5 "Password Policy"
python3 polenum.py DOMAIN.com | grep "Password required"
python3 polenum.py DOMAIN.com | grep "Lockout"
echo "=== Domain Password Policies ===" > report.txt
python3 polenum.py DOMAIN.com >> report.txt
python3 polenum.py -u DOMAIN.com -t DC2 >> report.txt
#!/bin/bash
DOMAINS=("DOMAIN1.com" "DOMAIN2.com" "DOMAIN3.local")

for domain in "${DOMAINS[@]}"; do
    echo "=== Querying $domain ===" >> assessment_report.txt
    python3 polenum.py $domain >> assessment_report.txt
    echo "" >> assessment_report.txt
done
python3 polenum.py DOMAIN.com | grep -i "minimum password length" | awk '{print $NF}'
python3 polenum.py DOMAIN.com | grep -i "default\|standard\|minimum"
python3 polenum.py DOMAIN.com | grep -i "lockout"
# Ensure network connectivity to DC
ping domain-controller.domain.com

# Verify RPC port 135 is accessible
nmap -p 135 192.168.1.10
# Specify DC by IP instead of hostname
python3 polenum.py 192.168.1.10

# Add domain to hosts file
echo "192.168.1.10 domain.com" | sudo tee -a /etc/hosts
# Try different RPC binding
python3 polenum.py -u DOMAIN.com -t DC_IP --rpc-port 135
# Increase timeout
timeout 60 python3 polenum.py DOMAIN.com
[+] Attempting to connect to 192.168.1.10
[+] Successfully connected to domain.local

[+] Domain Admins: domain\Domain Admins (S-1-5-21-xxx)
[+] Domain Users: domain\Domain Users (S-1-5-21-xxx)

Password Policy:
    Complexity: Enabled
    Minimum Length: 8
    History: 5 previous passwords
    Maximum Age: 90 days
    Minimum Age: 1 day
    Lockout Threshold: 5 attempts
    Lockout Duration: 30 minutes
[+] Trust Relationships Found:
    DOMAIN.local (Parent)
    CHILD.local (Child)
    EXTERNAL.com (External)
python3 -c "
import json
# Parse polenum output and convert to JSON
policy_data = {
    'domain': 'DOMAIN.com',
    'min_length': 8,
    'complexity': True,
    'lockout_threshold': 5
}
print(json.dumps(policy_data, indent=2))
"
# Use minimum password length to optimize wordlist generation
MIN_LEN=$(python3 polenum.py DOMAIN.com | grep -i "minimum length" | awk '{print $NF}')
echo "Target minimum password length: $MIN_LEN"
python3 polenum.py DOMAIN.com > domain_policy_$(date +%Y%m%d).txt
  • Obtain Authorization: Ensure written permission before enumeration
  • Document Findings: Record all policy findings for reporting
  • Compare Baselines: Track policy changes across assessments
  • Risk Assessment: Identify weak policies vs. organizational standards
  • Recommendation Mapping: Map findings to security benchmarks (CIS, NIST)
  • Multiple Targets: Query multiple DCs to identify policy variations
  • Time Stamps: Log when enumeration was performed
  • Network Segmentation: Ensure assessment system has proper network access
Minimum Length: 14+ characters
Complexity: Enabled (uppercase, lowercase, numbers, symbols)
History: 5-12 previous passwords
Maximum Age: 60-90 days
Threshold: 5 failed attempts
Duration: 30 minutes minimum
Observation Window: 30 minutes
  • CIS Benchmark: Password policy settings
  • NIST SP 800-63B: Digital identity guidelines
  • Windows Security Baseline: Default secure configurations
  • Enum4Linux: Linux enumeration tool for Windows domains
  • ADRecon: Active Directory reconnaissance tool
  • Bloodhound: AD data visualization and analysis
  • Impacket: Network protocol suite for Python
  • Crackmapexec: Multi-protocol credential validation
  • Ldapsearch: LDAP directory search tool