Skip to content

Commit 386a968

Browse files
authored
Update 1-CTF_WEB.md
1 parent e5bfcb2 commit 386a968

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/CyberSecurity/CTF/1-CTF_WEB.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
# CTF-WEB
1+
# CTF-WEB
22

33
## 1. PHP md5 相等绕过
4-
54
要求字符串不同,但MD5相同
5+
66
![image.png](img/1-CTF_WEB/1723443073686-5b063869-00fe-4b1e-9c56-7725ef648760.png)
7+
78
解题参考
89
[PHP md5 相等绕过 - Ainsliaea - 博客园 (cnblogs.com)](https://www.cnblogs.com/ainsliaea/p/15126218.html)
910
**方法1:**
1011
处理hash字符串时,PHP会将每一个以 0E开头的哈希值解释为0,同时后面都是数字,不能包含其他字符的字符串,md5 值会相等(`==` 的结果为 True,但 `===` 的结果为 False)。那么PHP会认为它们相同
12+
1113
![](img/1-CTF_WEB/1723443990504-3cbbfbb8-44db-483b-91d1-f250f3732497.jpeg)
14+
1215
**方法2:**
1316
使用数组绕过,在 PHP5 和 PHP7 中,当两个 md5 进行比较时,若参数是不同的数组,那么 `==``===` 比较的结果均为 True
17+
1418
![](img/1-CTF_WEB/1723444019927-4af6822b-4053-477d-a114-a7028a5e6a4f.jpeg)
19+
1520
**方法3:**
1621
利用 fastcoll 进行 md5 碰撞,生成两个字面值不同但 md5 相同的文件。[HashClash (tue.nl)](https://www.win.tue.nl/hashclash/)
1722

0 commit comments

Comments
 (0)