Automated security testing and analysis toolkit for Flipper Zero devices and BadUSB payloads
Auto-Flipper-Tools is a comprehensive suite of automation tools designed for security professionals, researchers, and enthusiasts working with Flipper Zero devices. The toolkit focuses on automated analysis, classification, and preprocessing of security payloads with built-in intelligence for script categorization and validation.
- 🔍 BadUSB Payload Classification - Automatically categorize and organize BadUSB scripts
- 🤖 AI-Powered Analysis - Leverage Ollama for intelligent payload classification
- 🛡️ Security Automation - Streamline security testing workflows
- 📊 Batch Processing - Handle hundreds of payloads efficiently
- 🔄 Pipeline Integration - Integrate into existing security workflows
Intelligent classifier for Ducky Script payloads with multi-stage validation and categorization.
Features:
- Pattern-based Ducky Script validation
- AI-powered topic classification (23 categories)
- Automatic collision handling
- Comprehensive logging and statistics
- Recursive directory processing
python Bad_USB_Classifier/classify_badusb.py <directory>- ✅ BadUSB Classifier - Ducky Script analysis and categorization
- 🔜 Auto-Build System - Pre-build and validation for scripts before classification
- 🔜 App Fuzzer Automation - Automated app fuzzing payload generation
- 🔜 Script Validator - Enhanced validation across multiple script types
- 🔜 API Integrations - Flipper Zero device API automation
# Clone the repository
git clone https://github.com/TFD-42/Auto-Flipper-Tools.git
cd Auto-Flipper-Tools
# Optional: Install in virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt- Python 3.8+
- Ollama (optional, for AI classification)
# Classify BadUSB payloads
python Bad_USB_Classifier/classify_badusb.py ./payloads
# View results
cat classified_badusb/classification.logAuto-Flipper-Tools/
├── Bad_USB_Classifier/
│ ├── classify_badusb.py
│ ├── requirements.txt
│ └── README.md
├── docs/
│ ├── INSTALLATION.md
│ ├── USAGE.md
│ └── ARCHITECTURE.md
├── .github/
│ └── workflows/
│ ├── security-scan.yml
│ └── tests.yml
├── .gitignore
├── README.md
├── LICENSE
└── requirements.txt
- ✅ Secret Scanning - GitHub advanced security scanning enabled
- ✅ Input Validation - Proper validation of all user inputs
- ✅ No Credentials - No hardcoded secrets or credentials
- ✅ Safe Defaults - Conservative security defaults
- ✅ Error Handling - Comprehensive error handling without information leakage
This repository uses GitHub's built-in security features:
- Dependabot for dependency vulnerability scanning
- CodeQL analysis for code quality
- Secret scanning to prevent credential leaks
If you discover a security vulnerability, please email security concerns privately rather than opening a public issue.
Contributions are welcome and encouraged! Whether you're fixing bugs, adding features, improving documentation, or enhancing security—all help is appreciated.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- 🔧 New Tools - Create additional automation tools
- 📝 Documentation - Improve guides and API documentation
- 🧪 Testing - Enhance test coverage and quality
- 🚀 Performance - Optimize tool performance
- 🔒 Security - Report or fix security issues
- 🐛 Bug Fixes - Fix identified issues
- 💡 Features - Suggest or implement new capabilities
# Clone your fork
git clone https://github.com/TFD-42/Auto-Flipper-Tools.git
cd Auto-Flipper-Tools
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install development dependencies
pip install -r requirements.txt
pip install pytest black pylint
# Run tests
pytest
# Format code
black .
# Lint code
pylint Bad_USB_Classifier/| Operation | Performance |
|---|---|
| Pattern Detection | ~20ms per file |
| AI Classification | ~800ms per file |
| Batch Processing (100 files) | ~2-5 minutes |
| Directory Recursion | ~50ms per 100 files |
Benchmarks on typical modern hardware; results may vary
This toolkit builds upon and references:
- Flipper Zero - Multi-tool platform for security professionals
- BadUSB Research - Original BadUSB concept and research
- Ducky Script - Official USB Rubber Ducky documentation
- Hak5 USB Rubber Ducky - Original Ducky Script implementation
- Flipper Zero Community - BadUSB payload research and development
# Process entire BadUSB payload directory
python Bad_USB_Classifier/classify_badusb.py ~/badusb_payloads
# Output structure:
# badusb_payloads/classified_badusb/
# ├── exfiltration/
# ├── phishing/
# ├── credentials/
# ├── destructive/
# └── unassigned/# Organize payloads for Flipper Zero device
python Bad_USB_Classifier/classify_badusb.py ~/Flipper/badusb
# Copy organized payloads to device
cp -r ~/Flipper/badusb/classified_badusb/[category] ~/Flipper/SD/badusb/Q: Do I need Ollama for this tool? A: No, the tool works with pattern-based classification alone. Ollama is optional for enhanced accuracy.
Q: Is this tool legal to use? A: Yes, but only for authorized security testing and research. Always obtain proper authorization.
Q: What script formats are supported? A: Currently supports Ducky Script (.txt, .duck, .ds). Additional formats planned.
Q: How accurate is the AI classification? A: Accuracy depends on script quality and keyword presence. Pattern detection is ~95% accurate; AI adds ~10-15% additional accuracy.
Q: Can I use this commercially? A: Yes, under MIT license. Please include license attribution.
Error: Ollama not found - ensure it's installed and in PATH
Solution: Install Ollama from https://ollama.ai or add to PATH
Error: Ollama request timed out
Solution: Reduce file size limit in code or increase timeout value
Error: Cannot read file or Cannot move file
Solution: Check file permissions; ensure write access to output directory
- Additional classification models (GPT integration)
- Web interface for classification
- Real-time monitoring and alerts
- Integration with SOAR platforms
- Support for additional script formats
- Community payload database
- Advanced statistical analysis
- Custom rule engine
- Current Categories: 23
- Supported File Types: 3
- Processing Speed: 100+ files/minute
- Memory Usage: ~50MB baseline
This project is licensed under the MIT License - see the LICENSE file for details.
✅ Permitted: Commercial use, modification, distribution, private use
- Original Developer: Created as automation toolkit for Flipper Zero security testing
- Community Contributors: Welcome! See CONTRIBUTING.md
- 📖 Documentation: See
/docsdirectory - 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 🔗 Related: Flipper Zero Community
See CHANGELOG.md for version history and updates.
This project aggregates, classifies, and organizes BadUSB payloads from the community repositories listed below. Huge thanks to all the original authors for their work and contributions to the Flipper Zero ecosystem.
The full list is also available in Bad_USB_Classifier/url.txt — feel free to add your own URLs!
| Author | Repository | Description |
|---|---|---|
| I-Am-Jakoby | Flipper-Zero-BadUSB | Extensive BadUSB payload collection |
| aleff-github | my-flipper-shits | Flipper Zero scripts and BadUSB payloads |
| FalsePhilosopher | badusb | Multi-platform BadUSB scripts |
| UNC0V3R3D | Flipper_Zero-BadUsb | Flipper Zero BadUSB payloads |
| Kavitate | FlipperZeroBadUSB | BadUSB payload library |
| SeenKid | flipper-zero-bad-usb | BadUSB scripts for Flipper Zero |
| RamtinHaf | Flipper-Zero-Bad-USB | BadUSB payload collection |
| grugnoymeme | flipperzero-badUSB | Flipper Zero BadUSB scripts |
| DoobTheGoober | BADUSB | BadUSB payloads |
| anste5 | BADUSBrepo / BadUSB-badkb | BadUSB and BadKB scripts |
| hooker01 | FlipperZero-Payloads | Flipper Zero payloads |
| dagnazty | Flipper_Zero_Bad_USB | BadUSB collection |
| r3dsh3rl0ck | Flipper-Zero-Bad-USB-Payloads | Curated BadUSB payloads |
| ClumsyLulz | Flipper_Zero_Badusb_hack5_payloads | Hak5-style BadUSB payloads |
| narstybits | MacOS-DuckyScripts | macOS-targeted Ducky Scripts |
| zer0dayf | Ghost-Audit | Ghost Audit security scripts |
| Offensive-Wireless | Flipper-Zero | Offensive wireless payloads |
| Unknown3613 | BruceFlipperScripts | Flipper scripts and payloads |
| Author | Repository | Description |
|---|---|---|
| Zarcolio | flipperzero | Flipper Zero tools and Ducky Scripts |
| descambiado | flipper-purple-team | Purple team payloads |
| D4rkDr4gon | flipper-zero-Utils | Flipper Zero utilities |
| Angrido | Flipper-WiFi-Grabber | WiFi credential grabber |
| gam3r999 | Flipper-Zero-Android / Flipper-Zero-iOS | Mobile-targeting payloads |
| heeeyflo | flipperzero-pin-bypass | PIN bypass scripts |
| Author | Repository | Description |
|---|---|---|
| djsime1 | awesome-flipperzero | The original Awesome Flipper Zero list |
| anasancho | awesome-flipperzero | Awesome Flipper Zero fork |
| RogueMaster | awesome-flipperzero-withModules | Extended awesome list with modules |
| Author | Repository | Description |
|---|---|---|
| UberGuidoZ | Flipper / Flipper-IRDB | Massive Flipper asset database & IR DB |
| Zero-Sploit | FlipperZero-Subghz-DB | Sub-GHz frequency database |
| xMasterX | all-the-plugins / flipperzero-good-faps | Unleashed-compatible plugin collections |
| Author | Repository | Description |
|---|---|---|
| honeer | flipper-base | Flipper base tools |
| SYOP200 | Flipper-Zero-Downloads | Flipper Zero downloads |
| i12bp8 | TagTinker | NFC tag tools |
| Clawzman | Flipper_ListEM | Flipper listing tool |
| jblanked | FlipLibrary | Flipper library app |
| x0452950 | flipper-nfc-toolkit | NFC toolkit |
| TFD-42 | Mhz_Localiser | MHz frequency localiser |
Want to add your repo? Fork this project, add your URL to
Bad_USB_Classifier/url.txt, and open a Pull Request!
This toolkit is intended for authorized security testing, research, and educational purposes only. Users are responsible for legal compliance and obtaining proper authorization before testing security systems.
Made with tools for security professionals by the community
If you find this useful, please star the repository!