TUCoPS :: HP Unsorted M :: bu-1707.htm

Multiple vulnerabilities found in evalmsi 2.1.03
CORELAN-10-008 - Multiple vulnerabilities found in evalmsi 2.1.03
CORELAN-10-008 - Multiple vulnerabilities found in evalmsi 2.1.03



--_002_C0641B79F7D6A44791BA8FA35BC143F9016897B9533Bapollocorel_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

|------------------------------------------------------------------|
|                         __               __                      |
|   _________  ________  / /___ _____     / /____  ____ _____ ___  |
|  / ___/ __ \/ ___/ _ \/ / __ `/ __ \   / __/ _ \/ __ `/ __ `__ \ |
| / /__/ /_/ / /  /  __/ / /_/ / / / /  / /_/  __/ /_/ / / / / / / |
| \___/\____/_/   \___/_/\__,_/_/ /_/   \__/\___/\__,_/_/ /_/ /_/  |
|                                                                  |
| http://www.corelan.be:8800 | 
| security@corelan.be | 
|                                                                  |
|-------------------------------------------------[ EIP Hunters ]--|
|                                                                  |
|                 Vulnerability Disclosure Report                  |
|                                                                  |
|------------------------------------------------------------------|

Advisory        : CORELAN-10-008
Disclosure date : February 4th, 2010


0x00 : Vulnerability information
--------------------------------

[*] Product : evalsmsi
[*] Version : 2.1.03
[*] URL : http://sourceforge.net/projects/evalsmsi/ 
[*] Platform : PHP/MySQL
[*] Type of vulnerability : SQL Injection, Authentication Bypass,
                            Cross-Site Scripting
[*] Risk rating : High
[*] Issue fixed in version : 2.2.00
[*] Vulnerability discovered by : ekse
[*] Corelan Team is : corelanc0d3r, EdiStrosar, rick2600, mr_me, ekse, MarkoT,
                      sinn3r, Jacky & jnz


0x01 : Vendor description of software
-------------------------------------
>From the vendor website:
"evalSMSI is a web application, developed in PHP / MySQL, to evaluate the
Information Security Management System for some entities."


0x02 : Vulnerability details
----------------------------
evalsmsi 2.1.03 contains multiple vulnerabilities.


1 - Insecure storage of password
The passwords are stored in plaintext in the database.
table : authentification
column: password


2 - Authentication Bypass
While a valid username and password is needed to access the application, it is
possible to make requests via ajax.php. It doesn't give access to much
interesting information but the lack of authentication augments the risks
associated with the following vulnerabilities.


3 - SQL Injection
SQL injection is possible via the script ajax.php

The vulnerable code is the following (ajax.php, line 5):

$id = $_GET['query'];
$action = $_GET['action'];

$base = evalsmsiConnect();
switch ($action) {
case 'sub_par':
$request = "SELECT MAX(numero) FROM sub_paragraphe WHERE id_paragraphe="$id"";
break;
case 'question':
$request = "SELECT * FROM sub_paragraphe WHERE id_paragraphe="$id"";
break;
case 'num_quest':
$request = "SELECT MAX(numero) FROM question WHERE id_sub_paragraphe="$id"";
break;
default:
break;

As a proof-of-concept, it is possible to obtain the username and password
(in plaintext) of the first user with the following requests :

first user name
http://server/evalsmsi/ajax.php?action=question&query=1%22%20UNION%20SELECT%20NULL%20,%20login,%20NULL,%20NULL,%20NULL%20FROM% 
20authentification%20UNION%20SELECT%20NULL%20,%20NULL,%20NULL,%20NULL,%20%22

first user password
http://server/evalsmsi/ajax.php?action=question&query=1%22%20UNION%20SELECT%20NULL%20,%20password,%20NULL,%20NULL,%20NULL%20FROM% 
20authentification%20UNION%20SELECT%20NULL%20,%20NULL,%20NULL,%20NULL,%20%22


4 - Persistent Cross-Site Scripting

It is possible to inject Javascript in the comment box of reports. Normally
this would be less critical because you need a valid account to access reports.
However, due the preceding vulnerabilities it is possible to obtain valid
credentials.

As a proof of concept, the following string can be inserted in the comment box :





0x03 : Vendor communication
---------------------------
[*] January 14th, 2010 - First contact
[*] January 15th, 2010 - Vendor acknowledges the problems
[*] January 20th, 2010 - Update request
[*] February 1st, 2010 - Vendor update
[*] February 4th, 2010 - Version 2.2.00 released

Please note that the passwords are still stored in plaintext in the database
with this release, yet the fix for the SQL Injection and authentication bypass
are greatly lowering the risks.

We wish to thank Michel Dubois for his cooperation in fixing the bugs we
reported in a timely manner.


This transmission is intended only for use by the intended recipient(s).  If you are not an intended recipient you should not read, disclose, copy, circulate or in any other way use the information contained in this transmission.  The information contained in this transmission may be confidential and/or privileged.  If you have received this transmission in error, please notify the sender immediately and delete this transmission including any attachments.

--_002_C0641B79F7D6A44791BA8FA35BC143F9016897B9533Bapollocorel_
Content-Type: text/plain; name="corelan-10-008 evalmsi.txt"
Content-Description: corelan-10-008 evalmsi.txt
Content-Disposition: attachment; filename="corelan-10-008 evalmsi.txt";
	size=4667; creation-date="Thu, 04 Feb 2010 22:54:56 GMT";
	modification-date="Thu, 04 Feb 2010 22:59:08 GMT"
Content-Transfer-Encoding: base64

fC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLXwNCnwgICAgICAgICAgICAgICAgICAgICAgICAgX18gICAgICAgICAgICAgICBf
XyAgICAgICAgICAgICAgICAgICAgICB8DQp8ICAgX19fX19fX19fICBfX19fX19fXyAgLyAvX19f
IF9fX19fICAgICAvIC9fX19fICBfX19fIF9fX19fIF9fXyAgfA0KfCAgLyBfX18vIF9fIFwvIF9f
Xy8gXyBcLyAvIF9fIGAvIF9fIFwgICAvIF9fLyBfIFwvIF9fIGAvIF9fIGBfXyBcIHwNCnwgLyAv
X18vIC9fLyAvIC8gIC8gIF9fLyAvIC9fLyAvIC8gLyAvICAvIC9fLyAgX18vIC9fLyAvIC8gLyAv
IC8gLyB8DQp8IFxfX18vXF9fX18vXy8gICBcX19fL18vXF9fLF8vXy8gL18vICAgXF9fL1xfX18v
XF9fLF8vXy8gL18vIC9fLyAgfA0KfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwNCnwgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBodHRwOi8vd3d3LmNvcmVsYW4uYmU6ODgwMCB8DQp8ICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlY3VyaXR5QGNvcmVsYW4uYmUg
fA0KfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
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GUgYnVncyB3ZQ0KcmVwb3J0ZWQgaW4gYSB0aW1lbHkgbWFubmVyLg0KDQo
--_002_C0641B79F7D6A44791BA8FA35BC143F9016897B9533Bapollocorel_--

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH