当前位置:网站首页>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}
边栏推荐
- 阿里巴巴开源大规模稀疏模型训练/预测引擎DeepRec
- 模拟实现strcpy函数的实现(含多次优化思想)
- [Video coding learning] - SAD and SATD
- What is the cost of small program development and production?Three development methods cost analysis!
- C语言中常用的数组排序方法:冒泡排序、选择排序、插入排序、数组的移动(含代码详解)以及相关联系题
- #25-1 OJ 78 计算生日星期几
- 同事的接口文档我每次看着就头大,毛病是真的多多多。。。
- 【视频编码学习】——变换的理解
- Assembly language learning (3)
- *1-2 OJ 190 游程编码
猜你喜欢
随机推荐
汇编语言学习(五)
C语言 一维数组和二维数组的定义及使用
汇编语言学习(七)
PerparedStatement防止SQL注入
Add-apt-repository command details
Bubble sort (detailed)
display:inline-block 什么时候不会显示间隙?
C语言,if循环 for 循环 while循环 switch循环 do...while()循环
Difference between apt-get install and pip install
Assembly language learning (7)
手机厂商失守元宇宙
*1-4 OJ 605 Gray Code
*3-4 CCF 2014-09-3 字符串匹配
apt-cache command
*1-1 OJ 56 Hamming Distance
word编号和文本间距过大
Analysis of SEATA Distributed Transaction Framework
测试研发的人数科学比例
RHCE课程总结
Assembly language learning (9)









