当前位置:网站首页>CTF problem solution five Web PHP Dafa (experiment)
CTF problem solution five Web PHP Dafa (experiment)
2022-08-09 14:52:00 【The goal is a tech house】
Experimental bar topic link: http://www.shiyanbar.com/ctf/54

First of all, according to the prompt in the question, pay attention to the backup file.
After clicking on the topic link, there is a prompt index.php.txt at the end.So visit.

The GET method is used, which means that it can be tested in the way of ?id=XXX later.
The main logic of the program is that the value of the id obtained by the GET method must be included in hackerDJ, but after a url decryption, it is equal to it.
This involves the features of the urldecode function in PHP.urldecode will decrypt all numbers with % in the string.
Try to enter ?id=%68ackerDJ and press enter, but nothing happens.Look at the url of the browser and find that the browser has completed a url decoding for us, as shown in the figure:

So we need to encrypt the url twice for hackerDJ.
See an example:
$a="%2568ackerDJ";$a=urldecode($a);echo $a, "";$a=urldecode($a);echo $a;?>The symbol corresponding to %25 is %.
So after the first decryption, %68ackerDJ is obtained, and after decryption again, hackerDJ is obtained.
Enter ?id=%2568ackerDJ to get the flag:
flag: DUTCTF{PHP_is_the_best_program_language}
边栏推荐
- CTF题解五 Web PHP大法(实验吧)
- RHCE课程总结
- *1-4 OJ 605 格雷码
- Shell course summary
- Recursive implementation of the Tower of Hanoi problem
- 网安学习-应急响应3
- Which applet making software is easy to use?how to choose?
- Small program template production process, small program template production is convenient and fast
- * 2-2 OJ 1163 missile interception of beta
- #25-1 OJ 78 计算生日星期几
猜你喜欢
随机推荐
*2-3 OJ 1164 导弹拦截之升级版
*4-1 CCF 2014-12-1 Access Control System
From the Dutch flag problem to the optimization and upgrade of quick row
汇编语言学习(三)
“未来10年,中国APP不可能回印度了”
C语言,if循环 for 循环 while循环 switch循环 do...while()循环
*4-2 CCF 2014-12-2 Z字形扫描
*3-2 CCF 2014-09-2 画图
[Video coding learning] - SAD and SATD
RHCE课程总结
阿里巴巴开源大规模稀疏模型训练/预测引擎DeepRec
How to develop small programs?should focus on features
图解LeetCode——1413. 逐步求和得到正数的最小值(难度:简单)
RHCE课程总结
小程序模板制作流程,小程序模板制作方便快捷
* 3-3 cattle from rearranged
C语言 一维数组和二维数组的定义及使用
RHCE Course Summary
微信小程序getPhoneNumber接口code=40013
Using the NVIDIA Kaolin Wisp reconstruction of 3 d scene








