SSD Advisory – Sentora Web Hosting Control Panel Multiple Vulnerabilities

Credit to Author: noam| Date: Tue, 11 Apr 2017 10:23:24 +0000

Want to get paid for a vulnerability similar to this one?
Contact us at: sxsxdx@xbxexyxoxnxdxsxexcxuxrxixtxy.xcom

Vulnerabilities Summary
The following advisory describes two (2) vulnerabilities found in Sentora Web Hosting Control Panel that lead to remote code execution.

Sentora is a free to download and use web hosting control panel developed for Linux, UNIX and BSD based servers or computers. The Sentora software can turn a domestic or commercial server into a fully fledged, easy to use and manage web hosting server.

The vulnerabilities found in Sentora Web Hosting Control Panel are:

  • Authenticated Code Execution
  • Privilege Escalation

Credit
An independent security researcher has reported this vulnerability to Beyond Security’s SecuriTeam Secure Disclosure program.

Vendor Response
The vendor has released an new version of the product which addressed the vulnerabilities.

Vulnerability Details

Authenticated Code Execution
An un-sanitized user input in cron module allows any logged in user to execute arbitrary commands via crafted request with the Apache default username permissions (www-data).

Vulnerable file: /etc/sentora/panel/modules/cron/code/controller.ext.php

Vulnerable parameter: inTiming

An attacker can add return carriages (‘n’) to the payload, which could be used to inject several commands in cron file, escaping from the sandbox used by Sentora to execute cron.

Proof of Concept

Privilege Escalation
A design flaw in zsudo binary allows any system user, who has enough privileges to execute system commands (Please look at the first vulnerability), to obtain root privileges.

Vulnerable file: /etc/sentora/panel/bin/zsudo

An attacker can insert crafted zsudo parameters to execute command as root. You can inject $(ANY_COMMAND) in a pipe redirection and the command will be executed as root.

Proof of Concept
An attacker can run the following command to execute /tmp/s.sh as root:

Exploit
To exploit those two vulnerabilities and get reverse root shell from ip/port you specify:

https://blogs.securiteam.com/index.php/feed