Report generated by Hoyt LLC at Wed Nov 24 19:09:59 CST 2010.


The DORK Report

Loading

1. SQL injection

1.1. http://www.facebook.com/extern/login_status.php [Referer HTTP header]

1.2. http://www.facebook.com/extern/login_status.php [name of an arbitrarily supplied request parameter]



1. SQL injection
There are 2 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.

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:



1.1. http://www.facebook.com/extern/login_status.php [Referer HTTP header]  next

Summary

Severity:   High
Confidence:   Tentative
Host:   http://www.facebook.com
Path:   /extern/login_status.php

Issue detail

The Referer HTTP header appears to be vulnerable to SQL injection attacks. A single quote was submitted in the Referer HTTP header, and a general 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.

Request 1

GET /extern/login_status.php?1'=1 HTTP/1.1
Accept: image/jpeg, image/gif, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */*
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive
Host: www.facebook.com
Referer: http://www.google.com/search?hl=en&q='

Response 1

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
X-Cnection: close
Date: Wed, 24 Nov 2010 02:20:19 GMT
Content-Length: 22

Invalid Application ID

Request 2

GET /extern/login_status.php?1'=1 HTTP/1.1
Accept: image/jpeg, image/gif, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */*
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive
Host: www.facebook.com
Referer: http://www.google.com/search?hl=en&q=''

Response 2

HTTP/1.1 200 OK
P3P: CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
Set-Cookie: datr=ZHbsTHQdVvJDbYxsF7grEgH3; expires=Fri, 23-Nov-2012 02:20:20 GMT; path=/; domain=.facebook.com
Content-Type: text/html; charset=utf-8
X-Cnection: close
Date: Wed, 24 Nov 2010 02:20:20 GMT
Content-Length: 989

<script>document.domain = "facebook.com";</script><script src="http://static.ak.connect.facebook.com/connect.php/en_US"></script><script>
var config = {"base_domain":"HelloMuncie.com","channel":
...[SNIP]...

1.2. http://www.facebook.com/extern/login_status.php [name of an arbitrarily supplied request parameter]  previous

Summary

Severity:   High
Confidence:   Tentative
Host:   http://www.facebook.com
Path:   /extern/login_status.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 general 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.

Request 1

GET /extern/login_status.php/1' HTTP/1.1
Host: www.facebook.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response 1

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Connection: close
Date: Wed, 24 Nov 2010 02:18:00 GMT
Content-Length: 22

Invalid Application ID

Request 2

GET /extern/login_status.php/1'' HTTP/1.1
Host: www.facebook.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response 2

HTTP/1.1 200 OK
P3P: CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
Set-Cookie: datr=2HXsTKR4fW5fcDb7nXh5Rnep; expires=Fri, 23-Nov-2012 02:18:00 GMT; path=/; domain=.facebook.com
Content-Type: text/html; charset=utf-8
Connection: close
Date: Wed, 24 Nov 2010 02:18:00 GMT
Content-Length: 992

<script>document.domain = "facebook.com";</script><script src="http://static.ak.connect.facebook.com/connect.php/en_US"></script><script>
var config = {"base_domain":"HelloSiouxCity.com","channe
...[SNIP]...

Report generated by Hoyt LLC at Wed Nov 24 19:09:59 CST 2010.