RFI to RCE Nagios/NagiosXI exploitation# NagiosXI RCE File-Upload
CVE-2021-40345
Authentified RFI to RCE Nagios/NagiosXI exploitation
Step 1 :
Go on the "dashlets" managing page and download one of them (I'm using "rss_dashlet" for the exemple) :
```
http://TARGET_IP/nagiosxi/admin/dashlets.php?download=rss_dashlet
```
Step 2 :
Modify the *.inc.php (I'm gonna use a tiny PHP reverse shell oneliner in line 34 for the exemple) :

Step 3 :
Start your listener and upload the malicious dashlet in the dashlets managing page :

And voilà, you got the shell !
[4.0K] /data/pocs/88d408b9d359a9ed42bbe36619c0b7440cd9c1f2
├── [1.0K] LICENSE
└── [ 757] README.md
0 directories, 2 files