新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> DTD, XML Schema(XMLS), RELAX NG
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - XML技术『 DTD/XML Schema 』 → XML 的安全弱点和漏洞 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 7571 个阅读者浏览上一篇主题  刷新本主题   平板显示贴子 浏览下一篇主题
     * 贴子主题: XML 的安全弱点和漏洞 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     hongjuesir 帅哥哟,离线,有人找我吗?魔羯座1982-1-1
      
      
      等级:大三(要不要学学XML呢?)
      文章:73
      积分:625
      门派:XML.ORG.CN
      注册:2007/6/12

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给hongjuesir发送一个短消息 把hongjuesir加入好友 查看hongjuesir的个人资料 搜索hongjuesir在『 DTD/XML Schema 』的所有贴子 点击这里发送电邮给hongjuesir 访问hongjuesir的主页 引用回复这个贴子 回复这个贴子 查看hongjuesir的博客楼主
    发贴心情 XML 的安全弱点和漏洞

    1.Large XML Documents  成为 DoS attack

    Have a client post an XML doc of extreme length/depth <foo><foo><foo>...</foo></foo></foo> This does bad things to DOM parsers and memory consumption on the server: a DoS attack. The issue here is that the costs of handling a large XML document are much greater than the cost of generating one.

    如果客户端发送一个无限长和无线深度的<foo><foo><foo>...</foo></foo></foo> 样子的xml给服务器,那么就会造成服务器内存消耗光,那么这就成为DoS attack攻击的一种。处理一个大xml的代价比生成一个大xml的代价要大得多。

    2.Entity Expansion Attacks.

    If an XML doc header declares some recursive entity declarations, and the file refers to them, then bad things happen. (Most of XML parser became immune to this, which will throw exception. )

    An recursive entity value is like following:
    <!ENTITY            recursiveEntity “1+&recursiveEntity;”>  //递归的实体声明

    如果一个xml头部声明一些递归的实体引用,那么就会发生坏事情。不过幸好大多数xml分析器对此免疫,会抛出异常。

    3.  Entities referring to the filesystem.

    Here you declare an entity referring to a local file, then expand it. Result: you may be able to probe for files, perhaps even get a copy of it in the error response. This is high risky.

    Though some XML related software  does not support entities ( Like axis , which resists this. ), If your code has any way of resolving URLs from incoming messages, you may recreate this problem.

    如果声明一个实体引用指向一个本地文件,然后展开它。结果是,你可以成为文件的探针,甚至可以在错误信息的回复中得到文件的拷贝。风险很大。

    尽管许多xml相关软件不支持实体,但如果你的代码以任何方式来处理收到信息中的urls,那么你可能有碰到这个问题。


       收藏   分享  
    顶(0)
      




    ----------------------------------------------
    踏实啃书

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2007/10/30 11:57:00
     
     GoogleAdSense魔羯座1982-1-1
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 DTD/XML Schema 』的所有贴子 点击这里发送电邮给Google AdSense 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/4/19 0:38:56

    本主题贴数3,分页: [1]

     *树形目录 (最近20个回帖) 顶端 
    主题:  XML 的安全弱点和漏洞(1690字) - hongjuesir,2007年10月30日
        回复:  怎么了?是从别人那里简单翻译了一下贴上去的(42字) - hongjuesir,2007年11月3日
        回复:  (2字) - dandanyidian,2007年11月3日

    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    62.988ms