Sploitus

Exploit for Improper Access Control in Webmin

githubexploit Β· 2025-08-05

Exploit Code

README126 lines
## https://sploitus.com/exploit?id=28772621-D70F-54E5-B275-8119C1B337F6
# Webmin-CVE-2022-0824-Enhanced-Exploit
> [!IMPORTANT]
>
> Enhanced version of the Webmin CVE-2022-0824 vulnerability exploitation tool – supports both command execution and reverse shell modes.

[![Python Version](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![CVE](https://img.shields.io/badge/CVE-2022--0824-red.svg)](https://vulners.com/cve/CVE-2022-0824)

> [!IMPORTANT]
>
> An enhanced version of the Webmin CVE-2022-0824 vulnerability exploitation tool, supporting both direct command execution and reverse shell modes. ## πŸš€ Features

- βœ… **Dual-mode support**: Command execution mode + Reverse shell mode
- βœ… **Multiple payloads**: Perl, Bash, Python payloads
- βœ… **Smart file management**: Automatically generates unique filenames to avoid conflicts
- βœ… **Automatic overwrite of uploaded files**: Handles overwriting of existing files
- βœ… **Multiple upload methods**: HTTP download, direct upload, command execution for creation
- βœ… **Detailed debugging information**: Complete execution logs
- βœ… **User-friendly interface**: Colorful output and clear status messages

## πŸ“‹ Vulnerability Information

- **CVE Number**: CVE-2022-0824
- **Affected Versions**: Webmin /dev/null

## 🚦 How It Works

1. **Login Verification**: Log into the Webmin management interface using provided credentials
2. **Payload Generation**: Generates the corresponding CGI script based on the mode selected
3. **File Upload**: Uploads the payload via the file manager’s HTTP download function
4. **Permission Setting**: Sets the execution permissions for the uploaded files
5. **Command Execution**: Executes commands or establishes a reverse connection by accessing the uploaded CGI script

## πŸ›‘οΈ Protection Recommendations

- Update Webmin to the latest version (>= 1.990)
- Limit network access to the Webmin management interface
- Use strong passwords and two-factor authentication
- Regularly audit system logs
- Deploy a Web application firewall (WAF)

## ⚠️ Disclaimer

**This tool is used solely for authorized security testing and education purposes.**

- 🚫 Not to be used on unauthorized systems
- 🚫 Not to be used for malicious attacks
- 🚫 Users must bear corresponding legal responsibilities
- βœ… Only use in environments with explicit authorization
- βœ… For security research and vulnerability validation

## πŸ“š Technical Details

### Payload Types
- **Perl CGI**: Main payload, best compatibility
- **Bash CGI**: Secondary payload, suitable for Linux systems
- **Python CGI**: Secondary payload, most feature-rich

### Upload Methods
1. **HTTP Download**: Via the Webmin file manager’s remote download function
2. **Direct Upload**: Via the file upload interface
3. **Command Creation**: Creates files through system commands

### File Naming Strategy
- Based on the MD5 hash of the command content
- Timestamp suffix
- Ensures different filenames for each execution

## πŸ”„ Update Log

### v5.0 (2025-08-05)
- ✨ Added command execution mode
- πŸ› Fixed file overwrite issues
- πŸ”§ Improved file naming strategy
- πŸ“ˆ Enhanced error handling

### v4.0 (Based on original version)
- 🎯 Based on faisalfs10x’s original code
- πŸ”§ Improved CGI compatibility
- πŸ“ Added detailed logs

## 🀝 Contribute

Feel free to submit Issues and Pull Requests! 1. Fork this project
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## πŸ“„ License

This project uses the MIT license – see [LICENSE](LICENSE) for details

## πŸ™ Thanks

- Original code author: [@faisalfs10x](https://github.com/faisalfs10x)
- Original project link: [Webmin-CVE-2022-0824-revshell](https://github.com/faisalfs10x/Webmin-CVE-2022-0824-revshell)
- CVE Discoverer: Relevant security researchers

## πŸ“ž Contact Information

If you have questions or suggestions, please contact us as follows:

- πŸ“§ Submit a GitHub Issue
- πŸ› Report security issues via private message

---

**⭐ If this project helped you, please give it a Star!**

## πŸ”— Related Links

- [CVE-2022-0824 Details](https://vulners.com/cve/CVE-2022-0824)
- [Webmin Official Website](https://www.webmin.com/)
- [Original Project](https://github.com/faisalfs10x/Webmin-CVE-2022-0824-revshell)

## requirements.txt

```txt
requests>=2.25.1
urllib3>=1.26.0
```

[source-iocs-preserved url=http://192.168.1.100:10000/ ipv4=192.168.1.100,192.168.1.50]