`# Exploit Title: Dolibarr CRM < 3.9.1 - Command Injection Vulnerability
# Exploit Author: David Silveiro
# Exploit Author Github: github.com/davidsilveiro
# Exploit Author Twitter: twitter.com/david_silveiro
# Vendor Homepage: https://www.dolibarr.org
# Software Link: https://sourceforge.net/projects/dolibarr/files/
# Date: Zero Day
Dolibarr ERP is a modern CRM to manage your company.It's opensource software,
designed for small and medium companies, foundations and freelancers.
It seems Dolibarr is open to Command Injection via the backup tool available
to administrative users. While the intention of the developers wasn't to allow
shell access, they've happened to do just that. It could be argued that the
assumption that's been made is simply; "But he who has Admin on the CRM,
has Admin on the Server".
As we know, that's not always the case. Especially if the Server Administrator
is unaware.
Vulnerable files:
GET: Dolibar_export.php
POST: export.php
POC:
Navigate to;
1) System Tools
2) Backup
You'll now notice 'Full Path to MysqlDump Command' on the right hand side.
Enter;
whoami;ifconfig;
Then select;
1) Compression 'None'
2) Generate backup
Continue by downloading the generated file on the upper right handside,
where the output of our commands will be.
`
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation