This module exploits a vulnerability found in Dolibarr ERP/CRM 3's backup feature. This software is used to manage a company's business information such as contacts, invoices, orders, stocks, agenda, etc. When processing a database backup request, the export.php function does not check the input given to the sql_compat parameter, which allows a remote authenticated attacker to inject system commands into it, and then gain arbitrary code execution.
Linux,Unix
cmd
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/dolibarr_cmd_exec
msf exploit(dolibarr_cmd_exec) > show targets
...targets...
msf exploit(dolibarr_cmd_exec) > set TARGET < target-id >
msf exploit(dolibarr_cmd_exec) > show options
...show and set options...
msf exploit(dolibarr_cmd_exec) > 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