Understanding the application
The author reviewed the source of Zentao Pro and found that the cronjob feature passes a user-supplied command value to command execution without any sanitisation. An authenticated user could therefore run arbitrary commands on the server.
medium.com
Published on medium.com
In July, a remote command execution exploit was released on an application named Zentao Pro. When I examined the application’s code, I found another area which could be exploited to gain RCE.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the cronjob 'command' value is passed straight to a command execution function with no sanitisation or validation.
Impact
An authenticated user could run arbitrary commands on the server, leading to full remote code execution.
What the attacker needed
An account able to create cronjobs; access to Zentao Pro 8.8.2 or 8.8.3
How it was found
- Create a new cronjob in the application.
- Intercept the POST request and note the 'command' value.
- Search the code for that keyword to find where the command is executed.
- Work backwards from the execution point to check for sanitisation.
- Confirm that no sanitisation exists and achieve remote code execution.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Zentao Pro is a project management tool, similar to Jira. It lets users schedule cronjobs, which are tasks the server runs automatically. The author found that the command typed into a cronjob was run by the server without being checked, so someone with an account could make the server run their own commands.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.