exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Ezylog Photovoltaic Management SQL Injection / Command Injection

Ezylog Photovoltaic Management SQL Injection / Command Injection
Posted Sep 11, 2012
Authored by Roberto Paleari, Ivan Speziale

Ezylog Photovoltaic Management Server suffers from remote SQL injection, broken session management, hard-coded credential, and command injection vulnerabilities. The vendor has ignored the researcher.

tags | exploit, remote, vulnerability, sql injection
SHA-256 | c08de71fe982a59f6dfe14d76d8893338a491e1cf4c84021950bc3a71f354cac

Ezylog Photovoltaic Management SQL Injection / Command Injection

Change Mirror Download
Multiple vulnerabilities in Ezylog photovoltaic management server
=================================================================

[ADVISORY INFORMATION]
Title: Multiple vulnerabilities in Ezylog photovoltaic management server
Discovery date: 27/08/2012
Release date: 11/09/2012
Credits: Roberto Paleari (roberto@greyhats.it, @rpaleari)
Ivan Speziale (ivan.speziale@hush.com)

[AFFECTED PRODUCTS]
The vulnerabilities discussed in this advisory affect the Schneider Electric
Ezylog photovoltaic SCADA management server. However, the same management
server is shared among different photovoltaic SCADA products from several
manufacturers, with few customization. Thus, the same vulnerabilities should
also apply to other products as well. All the firmware versions we analyzed
have been found to be affected by these issues.

[VULNERABILITY DETAILS]
The software running on the affected devices is vulnerable to multiple security
issues, that allow unauthenticated remote attackers to gain administrative
access and execute arbitrary commands. The details of the vulnerabilities we
found are discussed next.

a) SQL injection vulnerabilities

Many of the web pages included inside the device firmware are vulnerable to SQL
injection (SQLI) issues, and allow attackers to interact with the underlying
MySQL database. In the following we provide just few examples for this
vulnerability class, but the same kind of defect also affects several different
web pages.

Page "dettagliinverter.php" can be accessed with no authentication, with two
GET parameters:

/dettagliinverter.php?primo=primo&inverterselect=3

The "inverterselect" argument is subject to a very straightforward SQLI issue,
exploitable both manually or with publicly-available tools. Thus, attackers can
easily leverage this issue to access the content of the SQL table that contains
all valid username/password combinations (passwords are in plain text).

Similarly, page "changelanguagesession.php" is affected by a similar issue,
concerning the POST parameter "lingua".

b) Hard-coded accounts

The web page "login.php" checks user-supplied credentials against the
username/password combinations stored inside the MySQL database. However, the
device also authorizes 2 (or 3, in some setups) hard-coded accounts, when the
user provides a specific password, regardless of the supplied username. These
predefined passwords are hard-coded inside the PHP file, thus they cannot be
changed (or removed) by the user.

The relevant code fragments from "login.php" are reported below:

<code>
$password = mysql_escape_string($_POST['password']);

if (crypt($password,salt)=='satIZufhIrUfk'){
$sql_pthr_ = "SELECT user,password FROM account WHERE livello = 0";
..

}

if ($password=='astridservice' and $stilecustumization=='astrid'){
..
}

if (crypt($password,salt)=='saF8bay.tvfOk'){
$sql_insert="INSERT INTO account(user,password,livello,nome) VALUES ('sinapsi','sinapsi','0','Amministratore Sinapsi')";
..
}
</code>

We already decoded the encrypted password "satIZufhIrUfk", which corresponds to
the string "36e44c9b64".

c) Command-injection

Attackers can exploit the "ping.php" page to execute arbitrary commands on the
device, with administrative privileges. More precisely, the "ip_dominio" POST
parameter is not sanitize properly, thus it is possible to leverage traditional
command-injection techniques to inject arbitrary commands.

Example:
curl "http://<target address>/ping.php?ping=ok" -d "ip_dominio=192.168.1.1 -n 1 %26 dir"

Such an HTTP request forces the device to execute the following command:
ping 192.168.1.1 -n 1 & dir

As the POST parameter is used to build a command-line argument without being
sanitized before, attackers can leverage termination characters (e.g., '&') to
execute arbitrary commands (e.g., "dir").

d) Broken session enforcement

The device software does not verify whether an user who accesses most of the
management web pages (e.g., "ping.php") is associated with a properly
authenticated session. In other terms, the command-execution and SQLI
vulnerabilities discussed in the previous sections can be exploited by
unauthenticated attackers.

[REMEDIATION]
We are not aware of an updated firmware that corrects the issues described in
this advisory. Users should avoid exposing the management interface of the
device on the Internet.

[DISCLOSURE TIME-LINE]
* 29/08/2012 - Initial vendor contact.
* 05/09/2012 - No reply from vendor, re-contacting via e-mail.
* 11/09/2012 - Still no reply from vendor. Disclosure.

[DISCLAIMER]
The authors are not responsible for the misuse of the information provided in
this security advisory. The advisory is a service to the professional security
community. There are NO WARRANTIES with regard to this information. Any
application or distribution of this information constitutes acceptance AS IS,
at the user's own risk. This information is subject to change without notice.
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close