[FD] CVE-2014-2230 - OpenX Open Redirect Vulnerability

2014-10-16 Thread Jing Wang
Exploit Title: OpenX Open Redirect Vulnerability
Product: OpenX
Vendor:  OpenX
Vulnerable Versions: 2.8.10 and probably prior
Tested Version: 2.8.10
Advisory Publication: OCT 8, 2014
Latest Update:  OCT 8, 2014
Vulnerability Type: Open Redirect [CWE-601]
CVE Reference: CVE-2014-2230
Risk Level: Low
CVSSv2 Base Score: 2.6 (AV:N/AC:H/Au:N/C:N/I:P/A:N)
Solution Status: Solution Available
Credit: Wang Jing [Mathematics, Nanyang Technological University, Singapore]







Vulnerability Details:

OpenX adclick.php, ck.php, vulnerable to Open Redirect attacks.

Source code of adclick.php:
$destination = MAX_querystringGetDestinationUrl($adId[0]);
MAX_redirect($destination);

The MAX_redirect function is bellow,
function MAX_redirect($url)
{
if (!preg_match('/^(?:javascript|data):/i', $url)) {
header('Location: '.$url);
MAX_sendStatusCode(302);
}

The header() function sends a raw HTTP header to a client without any
checking of the $dest parameter at all.


(1) For adclick.php, the vulnerability occurs with dest parameter.


(2) For ck.php, it uses adclick.php file. the vulnerability occurs with
_maxdest parameter.








Solutions:
2014-10-12 Public disclosure with self-written patch.


References:
https://github.com/kriwil/OpenX/blob/master/www/index.php
http://www.tetraph.com/blog/cves/cve-2014-2230-openx-open-redirect-vulnerability/
http://www.openx.com
http://cwe.mitre.org
http://cve.mitre.org/

___
Sent through the Full Disclosure mailing list
http://nmap.org/mailman/listinfo/fulldisclosure
Web Archives  RSS: http://seclists.org/fulldisclosure/


[FD] New York Times nytimes.com Page Design XSS Vulnerability (Almost all Article Pages Before 2013 are Affected)

2014-10-16 Thread Jing Wang
New York Times nytimes.com Page Design XSS Vulnerability (Almost all
Article Pages Before 2013 are Affected)


Domain:
http://www.nytimes.com/



Vulnerability Description:
The vulnerability occurs at New York Times’s URLs. Nytimes (short for New
York Times) uses part of the URLs to construct its pages. However, it seems
that Nytimes does not filter the content used for the construction at all
before 2013.

Based on Nytimes’s Design, Almost all URLs before 2013 are affected (All
pages of articles). In fact, all article pages that contain “PRINT” button,
“SINGLE PAGE” button, “Page *” button, “NEXT PAGE” button are affected.

Nytimes changed this mechanism since 2013. It decodes the URLs sent to its
server. This makes the mechanism much safer now.

However, all URLs before 2013 are still using the old mechanism. This means
almost all article pages before 2013 are still vulnerable to XSS attacks. I
guess the reason Nytimes does not filter URLs before is cost. It costs too
much (money  human capital) to change the database of all posted articles
before.




Living POCs:
http://www.nytimes.com/2012/02/12/sunday-review/big-datas-impact-in-the-world.html/“img
src=x onerror=prompt(‘justqdjing’)
http://www.nytimes.com/2011/01/09/travel/09where-to-go.html/“img src=x
onerror=prompt(‘justqdjing’)?pagewanted=all_r=0
http://www.nytimes.com/2010/12/07/opinion/07brooks.html/“img src=x
onerror=prompt(‘justqdjing’)
http://www.nytimes.com/2009/08/06/technology/06stats.html/“img src=x
onerror=prompt(‘justqdjing’)
http://www.nytimes.com/2008/07/09/dining/091crex.html/“img src=x
onerror=prompt(‘justqdjing’)
http://www.nytimes.com/2007/11/14/opinion/lweb14brain.html/“img src=x
onerror=prompt(‘justqdjing’)




POC Video:
https://www.youtube.com/user/tetraph




Vulnerability Analysis:
Take the following link as an example,
http://www.nytimes.com/2012/02/12/sunday-review/big-datas-impact-in-the-world.html/
“vulnerabletoattack

We can see that for the page reflected, it contains the following codes.
All of them are vulnerable.

li class=”print”
a
href=”/2012/02/12/sunday-review/big-datas-impact-in-the-world.html/”vulnerabletoattack?pagewanted=print”Print/testtesttest?pagewanted=print”/a
/li

li class=”singlePage”
a
href=”/2012/02/12/sunday-review/big-datas-impact-in-the-world.html/”testtesttest?pagewanted=all”
Single Page/vulnerabletoattack?pagewanted=all”/a
 /li

li a onclick=”s_code_linktrack(‘Article-MultiPagePageNum2′);”
title=”Page 2″
href=”/2012/02/12/sunday-review/big-datas-impact-in-the-world.html/”vulnerabletoattack?pagewanted=2″2/testtesttest?pagewanted=2″/a
/li

li a onclick=”s_code_linktrack(‘Article-MultiPagePageNum3′);”
title=”Page 3″
href=”/2012/02/12/sunday-review/big-datas-impact-in-the-world.html/”vulnerabletoattack?pagewanted=3″3/testtesttest?pagewanted=3″/a
/li

a class=”next” onclick=”s_code_linktrack(‘Article-MultiPage-Next’);”
title=”Next Page”
href=”/2012/02/12/sunday-review/big-datas-impact-in-the-world.html/”vulnerabletoattack?pagewanted=2″Next
Page »/testtesttest?pagewanted=2″/a





The vulnerability can be attacked without user login. Tests were performed
on Firefox (26.0) in Ubuntu (12.04) and IE (9.0.15) in Windows 7.





Cross-site scripting (XSS) is a type of computer security vulnerability
typically found in Web applications. XSS enables attackers to inject
client-side script into Web pages viewed by other users. A cross-site
scripting vulnerability may be used by attackers to bypass access controls
such as the same origin policy.





Reported By:
Wang Jing, mathematics student from Nanyang Technological University,
Singapore.
http://tetraph.com/wangjing/




More Details:
http://www.tetraph.com/blog/xss-vulnerability/new-york-times-nytimes-com-page-design-xss-vulnerability-almost-all-article-pages-are-affected/

___
Sent through the Full Disclosure mailing list
http://nmap.org/mailman/listinfo/fulldisclosure
Web Archives  RSS: http://seclists.org/fulldisclosure/

[FD] Bypassing blacklists based on IPy

2014-10-16 Thread Nicolas Grégoire

IPy is a Python class and tools for handling of IPv4 and IPv6 addresses
and networks (https://github.com/haypo/python-ipy). This library is
sometimes used to implement blacklists forbidding internal, private or
loopback addresses.

Using octal encoding (supported by urllib2), it is possible to bypass
checks based on the result of the iptype() function. For example, IP
address '0177...0001' is considered as 'PUBLIC' but resolves to
'127.0.0.1' when accessed via urllib2.

Developers were informed, no news since then... More details on my blog:
http://www.agarri.fr/kom/archives/2014/10/15/bypassing_blacklists_based_on_ipy/index.html

Cheers,
Nicolas Grégoire




___
Sent through the Full Disclosure mailing list
http://nmap.org/mailman/listinfo/fulldisclosure
Web Archives  RSS: http://seclists.org/fulldisclosure/