Dependency Confusion Vulnerability Scanner and PoC Generator
Project description
DepRaptor
Dependency Confusion Vulnerability Scanner and PoC Generator
Developer: LAKSHMIKANTHAN K (letchupkt)
Overview
DepRaptor is a production-grade security tool designed for security researchers and bug bounty hunters to detect and demonstrate dependency confusion vulnerabilities in software projects. It scans projects across multiple ecosystems, identifies packages vulnerable to dependency confusion attacks, and automatically generates proof-of-concept packages.
Features
- Multi-Ecosystem Support: Python (PyPI), Node.js (npm), Ruby (RubyGems), Go, Rust (crates.io)
- Local & Remote Scanning: Scan local directories or GitHub repositories
- Automated Detection: Check packages against public registries
- PoC Generation: Automatically create proof-of-concept packages
- Professional Reports: Generate JSON and Markdown reports
- Modern CLI: Rich terminal UI with progress indicators
- Multithreaded: Fast registry checks with configurable thread pools
- Comprehensive Logging: Detailed logs for audit trails
Installation
From PyPI (when published)
pip install depraptor
From Source
git clone https://github.com/letchupkt/depraptor.git
cd depraptor
pip install -e .
Usage
Basic Scan
Scan current directory:
depraptor scan .
Scan specific project:
depraptor scan ./my-project
Scan GitHub repository:
depraptor scan https://github.com/org/repo
Advanced Options
depraptor scan <target> [OPTIONS]
Options:
--threads, -t: Number of threads for registry checks (default: 10)--output, -o: Custom output directory (default: ./results)--repo-dir: Custom repository clone directory (default: ./repos)--verbose, -v: Enable verbose logging
Examples
# Scan with 20 threads
depraptor scan . --threads 20
# Custom output directory
depraptor scan ./project --output ./scan-results
# Verbose mode
depraptor scan https://github.com/org/repo --verbose
Output Structure
./
├── repos/ # Cloned repositories
│ └── org_repo/
├── results/ # Scan results
│ ├── report.json # JSON report
│ ├── report.md # Markdown report
│ ├── dependencies.json
│ ├── pocs/ # Generated PoC packages
│ │ └── package-name/
│ │ ├── setup.py
│ │ ├── payload.py
│ │ └── README.md
│ └── logs/
│ └── depraptor.log
Supported Dependency Files
Python
requirements.txtsetup.pypyproject.tomlPipfile
Node.js
package.json
Ruby
Gemfile
Go
go.mod
Rust
Cargo.toml
How It Works
- Dependency Extraction: Recursively scans project for dependency files
- Registry Checking: Queries public registries to verify package existence
- Vulnerability Detection: Identifies packages not found in public registries
- PoC Generation: Creates proof-of-concept packages for vulnerable dependencies
- Report Generation: Produces comprehensive reports in multiple formats
PoC Package Behavior
Generated PoC packages are designed for authorized testing only. When installed, they:
- Log system information (username, hostname, working directory)
- Capture environment variables
- Write all data to
payload_log.txt
The PoC packages DO NOT:
- Exfiltrate data to external servers
- Modify system files
- Execute malicious code
Security Notice
⚠️ WARNING: This tool is intended ONLY for:
- Authorized security testing
- Bug bounty programs with proper scope
- Security research with explicit permission
DO NOT:
- Upload PoC packages to public registries without authorization
- Use this tool on systems you don't own or have permission to test
- Violate any laws or terms of service
Unauthorized use may be illegal and unethical.
Example Output
██████╗ ███████╗██████╗ ██████╗ █████╗ ██████╗ ████████╗ ██████╗ ██████╗
██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██╔═══██╗██╔══██╗
██║ ██║█████╗ ██████╔╝██████╔╝███████║██████╔╝ ██║ ██║ ██║██████╔╝
██║ ██║██╔══╝ ██╔═══╝ ██╔══██╗██╔══██║██╔══██╗ ██║ ██║ ██║██╔══██╗
██████╔╝███████╗██║ ██║ ██║██║ ██║██║ ██║ ██║ ╚██████╔╝██║ ██║
╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
Dependency Confusion Scanner
Developer: LAKSHMIKANTHAN K (letchupkt)
✓ Found 45 dependencies
✓ Found 3 vulnerable dependencies
✓ Generated 3 PoC packages
✓ Reports saved to ./results
Development
Project Structure
depraptor/
├── cli/
│ └── main.py # CLI interface
├── scanner/
│ ├── dependency_parser.py # Dependency extraction
│ └── confusion_checker.py # Vulnerability detection
├── poc/
│ └── poc_generator.py # PoC package generation
├── report/
│ └── report_writer.py # Report generation
└── utils/
├── banner.py # CLI banner
├── config.py # Configuration
├── filesystem.py # File utilities
├── github.py # GitHub integration
└── registry.py # Registry checking
Running Tests
pytest tests/
Building the Package
python -m build
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - See LICENSE file for details
Disclaimer
This tool is provided for educational and authorized security testing purposes only. The author and contributors are not responsible for any misuse or damage caused by this tool. Always obtain proper authorization before testing any systems.
Acknowledgments
Built for the security research community to help identify and responsibly disclose dependency confusion vulnerabilities.
Developer: LAKSHMIKANTHAN K (letchupkt)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file depraptor-1.0.0.tar.gz.
File metadata
- Download URL: depraptor-1.0.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86806950b87f6742afd7909248158cb105c7a504b21ee38da9066e1e4f046d6e
|
|
| MD5 |
5132dc7adc6354f9db94c354c8f2fee9
|
|
| BLAKE2b-256 |
9ff6d82baf66ded7856fc171f2e7df2a80cb4c17b533673f0b30b0fa5868b1e5
|
File details
Details for the file depraptor-1.0.0-py3-none-any.whl.
File metadata
- Download URL: depraptor-1.0.0-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25db0812f83359305c90d5dd1fc797e6e841ecff6b64dc7cc388e3bd5ced7e02
|
|
| MD5 |
b20fc5630df6775f342c0553a861f65f
|
|
| BLAKE2b-256 |
ad7d3a44307a83e7253358194ba34490516cfceb1baa8c5560651eea6421dba1
|