作家
登录

解析XSLT服务器端注入攻击

作者: 来源: 2017-12-07 10:32:33 阅读 我要评论

  •             Console.WriteLine("# This is a Vulnerable-by-Design application to test XSLT Injection #"); 
  •             Console.WriteLine("#                                                                   #"); 
  •             Console.WriteLine("#####################################################################\n"); 
  •             Console.WriteLine("The application expects (in the current working directory):"); 
  •             Console.WriteLine(" - an XML file (data.xml) and\n - an XSLT style sheet (transform.xslt)\n"); 
  •             Console.WriteLine("==================================================================="); 
  •   
  •             String transformationXsltFileURI = "transform.xslt"
  •             String dataXMLFileURI = "data.xml"
  •   
  •             // Enable DTD processing to load external XML entities for both the XML and XSLT file 
  •             XmlReaderSettings vulnerableXmlReaderSettings = new XmlReaderSettings(); 
  •             vulnerableXmlReaderSettings.DtdProcessing = DtdProcessing.Parse; 
  •             vulnerableXmlReaderSettings.XmlResolver = new XmlUrlResolver(); 
  •             XmlReader vulnerableXsltReader = XmlReader.Create(transformationXsltFileURI, vulnerableXmlReaderSettings); 
  •             XmlReader vulnerableXmlReader = XmlReader.Create(dataXMLFileURI, vulnerableXmlReaderSettings); 
  •   
  •             XsltSettings vulnerableSettings = new XsltSettings(); 
  •             // Embedded script blocks and the document() function are NOT enabled by default 
  •             vulnerableSettings.EnableDocumentFunction = true
  •             vulnerableSettings.EnableScript

      推荐阅读

      引入机器学习前需要先弄明白这三件事

    很多公司声称本身的解决筹划中囊括了ML,但大年夜多半时刻,这项功能是被夸大年夜了的。钠揭捉?问供给商的问题,应落脚在他们体系的精确率、速度和效力上。分析的数据是大年夜哪儿来的?收集频率是多久一次?该解决筹>>>详细阅读


    本文标题:解析XSLT服务器端注入攻击

    地址:http://www.17bianji.com/lsqh/39533.html

  • 关键词: 探索发现

    乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

    网友点评
    自媒体专栏

    评论

    热度

    精彩导读
    栏目ID=71的表不存在(操作类型=0)