SSL renegotiation攻击已成现实

原文参见我的英文博客:http://xizhizhu.blogspot.com/2009/11/ssl-renegotiation-vulnerability.html

 

本月初刚刚发现的SSL renegotiation漏洞 已经被很快的利用。一名名为Anil Kurmus的土耳其学生,近日展示 如何利用该漏洞盗取Twitter帐号(改漏洞现已被Twitter修复),并提供了相关代码下载 。让我们看看这个攻击是如何实现的。

通过Twitter提供的API,我们可以通过HTTP的POST消息将状态更新提交到http://twitter.com/statuses/update.xml,但在每条消息中也会包含用户名和密码。该消息如下所示:
POST /statuses/update.xml HTTP/1.1
Authorization: Basic 用户名:密码
User-Agent: curl/7.19.5
Host: twitter.com
Accept:*/*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

status=你的状态


利用SSL renegotiation漏洞,攻击者能够插入一个伪造的POST头,使得受害者的POST请求成为攻击者POST请求的内容:
POST /statuses/update.xml HTTP/1.1
Authorization: Basic username:password
User-Agent: curl/7.19.5
Host: twitter.com
Accept:*/*
Content-Length: 140
Content-Type: application/x-www-form-urlencoded
status=
POST /statuses/update.xml HTTP/1.1
Authorization: Basic username:password
...

红色部分是攻击者插入的POST头,蓝色部分则是受害者的POST消息,会被服务器当做攻击者的POST body处理,并更新为攻击者的状态粘贴。

非常简单的攻击!尽管该漏洞已被Twitter修复,但还有多少类似漏洞呢?最起码,我们应当警醒,SSL renegotiation攻击并不是纸上谈兵,而已经是实实在在的了!

你可能感兴趣的:(api,ssl,服务器,basic,twitter,authorization)