hidglobal.com, SQL Injection, DORK, CWE-89, CAPEC-66

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

Report generated by CloudScan Vulnerability Crawler at Mon Feb 14 13:54:23 CST 2011.

The DORK Report

Loading

1. SQL injection

1.1. http://www.hidglobal.com/onlineOrderStatusRegistration.php [name of an arbitrarily supplied request parameter]

1.2. http://www.hidglobal.com/page.php [name of an arbitrarily supplied request parameter]

1.3. http://www.hidglobal.com/page.php [page_id parameter]



1. SQL injection
There are 3 instances of this issue:

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.

Remediation background

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:



1.1. http://www.hidglobal.com/onlineOrderStatusRegistration.php [name of an arbitrarily supplied request parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.hidglobal.com
Path:   /onlineOrderStatusRegistration.php

Issue detail

The name of an arbitrarily supplied request parameter appears to be vulnerable to SQL injection attacks. A single quote was submitted in the name of an arbitrarily supplied request parameter, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be MySQL.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request 1

GET /onlineOrderStatusRegistration.php?1'=1 HTTP/1.1
Host: www.hidglobal.com
Proxy-Connection: keep-alive
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: __utmz=10140716.1297708154.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); PHPSESSID=kr9b485jm7dv1f9g8un99oala4; __utma=10140716.584761103.1297708154.1297708154.1297708154.1; __utmc=10140716; __utmb=10140716.2.10.1297708154; s_cc=true; s_sq=%5B%5BB%5D%5D; s_vi=[CS]v1|26ACBA4A851D330C-6000012840002166[CE]

Response 1

HTTP/1.1 200 OK
Date: Mon, 14 Feb 2011 18:30:20 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.3
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 45563

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templ
...[SNIP]...
</script>

       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 ''
       LIMIT
       0,1' at line 6

Request 2

GET /onlineOrderStatusRegistration.php?1''=1 HTTP/1.1
Host: www.hidglobal.com
Proxy-Connection: keep-alive
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: __utmz=10140716.1297708154.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); PHPSESSID=kr9b485jm7dv1f9g8un99oala4; __utma=10140716.584761103.1297708154.1297708154.1297708154.1; __utmc=10140716; __utmb=10140716.2.10.1297708154; s_cc=true; s_sq=%5B%5BB%5D%5D; s_vi=[CS]v1|26ACBA4A851D330C-6000012840002166[CE]

Response 2

HTTP/1.1 200 OK
Date: Mon, 14 Feb 2011 18:30:20 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.3
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 46667

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templ
...[SNIP]...

1.2. http://www.hidglobal.com/page.php [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.hidglobal.com
Path:   /page.php

Issue detail

The name of an arbitrarily supplied request parameter appears to be vulnerable to SQL injection attacks. A single quote was submitted in the name of an arbitrarily supplied request parameter, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be MySQL.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request 1

GET /page.php?page_id=223&1'=1 HTTP/1.1
Host: www.hidglobal.com
Proxy-Connection: keep-alive
Referer: http://www.hidglobal.com/
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: s_cc=true; __utmz=10140716.1297708154.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=10140716.584761103.1297708154.1297708154.1297708154.1; __utmc=10140716; __utmb=10140716.1.10.1297708154; s_sq=%5B%5BB%5D%5D

Response 1

HTTP/1.1 200 OK
Date: Mon, 14 Feb 2011 18:29:52 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.3
Set-Cookie: PHPSESSID=cfjmn8vtu0cmn1oi7iger0jp04; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 21882


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Temp
...[SNIP]...
</script>

       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 ''
       LIMIT
       0,1' at line 6

Request 2

GET /page.php?page_id=223&1''=1 HTTP/1.1
Host: www.hidglobal.com
Proxy-Connection: keep-alive
Referer: http://www.hidglobal.com/
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: s_cc=true; __utmz=10140716.1297708154.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=10140716.584761103.1297708154.1297708154.1297708154.1; __utmc=10140716; __utmb=10140716.1.10.1297708154; s_sq=%5B%5BB%5D%5D

Response 2

HTTP/1.1 200 OK
Date: Mon, 14 Feb 2011 18:29:52 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.3
Set-Cookie: PHPSESSID=tg0873033tauklk9gpsb9ch9a5; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 22979


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Temp
...[SNIP]...

1.3. http://www.hidglobal.com/page.php [page_id parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.hidglobal.com
Path:   /page.php

Issue detail

The page_id parameter appears to be vulnerable to SQL injection attacks. A single quote was submitted in the page_id parameter, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be MySQL.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request 1

GET /page.php?page_id=223' HTTP/1.1
Host: www.hidglobal.com
Proxy-Connection: keep-alive
Referer: http://www.hidglobal.com/
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: s_cc=true; __utmz=10140716.1297708154.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=10140716.584761103.1297708154.1297708154.1297708154.1; __utmc=10140716; __utmb=10140716.1.10.1297708154; s_sq=%5B%5BB%5D%5D

Response 1

HTTP/1.1 200 OK
Date: Mon, 14 Feb 2011 18:29:42 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.3
Set-Cookie: PHPSESSID=mmvj5cve5qhq8i7ov5e41rbg30; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 20580


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Temp
...[SNIP]...
</script>

       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 ''/page.php?page_id=223''
       LIMIT
       0,1' at line 6

Request 2

GET /page.php?page_id=223'' HTTP/1.1
Host: www.hidglobal.com
Proxy-Connection: keep-alive
Referer: http://www.hidglobal.com/
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: s_cc=true; __utmz=10140716.1297708154.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=10140716.584761103.1297708154.1297708154.1297708154.1; __utmc=10140716; __utmb=10140716.1.10.1297708154; s_sq=%5B%5BB%5D%5D

Response 2

HTTP/1.1 200 OK
Date: Mon, 14 Feb 2011 18:29:42 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.3
Set-Cookie: PHPSESSID=tbn39g53q91sf7q5ourk4cg5l3; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 21654


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Temp
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Mon Feb 14 13:54:23 CST 2011.