A security assessment tool for Duo MFA implementations that uses the Duo Auth API to test various authentication mechanisms. For authorized penetration testing use only.
- User enumeration through preauth endpoint
- Device ID retrieval for enrolled users
- Multiple auth factor support:
- Push notifications
- Phone calls
- SMS passcodes
- OTP/passcodes
- Auth status checking with transaction IDs
- Lockout testing with configurable attempts
- Rate limiting for stealthy operations
- Proxy support for anonymization
- Asynchronous requests for faster operations
- Batch operations for efficient testing
- Session management for complex scenarios
- Response caching to reduce API calls
- Comprehensive logging with configurable verbosity
git clone https://github.com/yourusername/duopwn.git
cd duopwn
pip install -e .
pip install git+https://github.com/yourusername/duopwn.git
git clone https://github.com/yourusername/duopwn.git
cd duopwn
pip install -r requirements.txt
python duopwn.py --help
Basic command structure:
python duopwn.py -U <api-hostname> -i <integration-key> -s <secret-key> -A <action> [options]
- Enumerate users from a list:
python duopwn.py -U api-xyz.duosecurity.com -i IKEY -s SKEY -l users.txt
- Force a push notification:
python duopwn.py -U api-xyz.duosecurity.com -i IKEY -s SKEY -u username -A auth -d DEVICE_ID -f push
- Test account lockout:
python duopwn.py -U api-xyz.duosecurity.com -i IKEY -s SKEY -u username -A lockout --attempts 5
- Check auth status:
python duopwn.py -U api-xyz.duosecurity.com -i IKEY -s SKEY -u username -A auth_status -t TXID
ping
: Test API connectivitycheck
: Verify integration keyenroll
: Start enrollment processenroll_status
: Check enrollment statuspreauth
: Check user enrollment and get device infoauth
: Initiate authenticationauth_status
: Check authentication statuslockout
: Test account lockout mechanismsbatch
: Perform operations on multiple users efficiently
-U, --url
: Duo API hostname-i, --ikey
: Integration key-s, --skey
: Secret key-u, --user
: Single username-l, --list
: File containing usernames-d, --device
: Device ID (from preauth)-f, --factor
: Auth factor (push/phone/sms/passcode)-p, --passcode
: OTP/passcode value-t, --txid
: Transaction ID for status checks--attempts
: Number of attempts for lockout testing--proxy
: Proxy URL (e.g., http://127.0.0.1:8080, socks5://127.0.0.1:9050)--rate-limit
: Requests per second (default: 1.0)--async
: Use asynchronous requests for batch operations--no-cache
: Disable response caching-v, --verbose
: Increase verbosity (use -v or -vv)
This tool is for authorized penetration testing and security research only. Users must ensure they have explicit permission to test the target Duo implementation. Unauthorized testing may violate applicable laws.
duopwn -U api-xyz.duosecurity.com -i IKEY -s SKEY -A batch -l users.txt --async --rate-limit 2.0
duopwn -U api-xyz.duosecurity.com -i IKEY -s SKEY -u username -A preauth --proxy socks5://127.0.0.1:9050
duopwn -U api-xyz.duosecurity.com -i IKEY -s SKEY -u username -A auth -d DEVICE_ID -f push -vv
The project has been refactored into a modular structure:
duopwn/
├── __init__.py # Package initialization
├── __main__.py # Entry point for python -m duopwn
├── actions.py # Action-specific functions
├── api.py # API interaction functions
├── cli.py # Command-line interface
└── utils.py # Utility functions and classes
This modular structure makes the code more maintainable, testable, and extensible.