This module exploits a command injection vulnerability in Mida Solutions eFramework version 2.9.0 and prior. The `ajaxreq.php` file allows unauthenticated users to inject arbitrary commands in the `PARAM` parameter to be executed as the apache user. The sudo configuration permits the apache user to execute any command as root without providing a password, resulting in privileged command execution as root. This module has been successfully tested on Mida Solutions eFramework-C7-2.9.0 virtual appliance.
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/linux/http/mida_solutions_eframework_ajaxreq_rce
msf exploit(mida_solutions_eframework_ajaxreq_rce) > show targets
...targets...
msf exploit(mida_solutions_eframework_ajaxreq_rce) > set TARGET < target-id >
msf exploit(mida_solutions_eframework_ajaxreq_rce) > show options
...show and set options...
msf exploit(mida_solutions_eframework_ajaxreq_rce) > exploit
Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.
– Jim O’Gorman | President, Offensive Security