标签:fileinput tor ini 输入 employees use pre file string
1、除了SQL注入外还要考虑XPTH的过滤。
File d = new File(dir); XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); InputSource inputSource = new InputSource(new FileInputStream(d)); String expression = "/employees/employee[loginID/text()=‘" + username + "‘ and passwd/text()=‘" + password + "‘]"; nodes = (NodeList) xPath.evaluate(expression, inputSource, XPathConstants.NODESET);
在用户名处注入 Smith‘ or 1=1 or ‘a‘=‘a,这将会显示你登录系统的第一个用户。密码是必须的字段,可以任意输入。
WebGoat教程学习(七)--XPATH 注入(XPATH-Injection)
标签:fileinput tor ini 输入 employees use pre file string
原文地址:http://www.cnblogs.com/cindy-2014/p/6063941.html