当前位置:网站首页>MD5绕过
MD5绕过
2022-07-05 04:45:00 【哇咔哇咔哇咔哇咔】
1.0e绕过
弱比较会把0exxxx当做科学计数法,不管后面的值为任何东西,0的任何次幂都为0
if ($_GET['a'] != $_GET['b'])
{
if (md5($_GET['a']) == md5($_GET['b']))
echo '1';
else
echo '0';
}
else echo "请输入不同的a,b值";
要求get获取的a和b的值要求不相等,但要求其md值相同
QNKCDZO
240610708
s878926199a
s155964671a
s214587387a
s214587387a
这些字符串的 md5 值都是 0e 开头,在 php 弱类型比较中判断为相等
2. 数组绕过
md5()函数计算的是一个字符串的哈希值,对于数组则返回false
var_dump(md5($_GET['a']) == md5($_GET['b']))
传入
a[]=a&b[]=b
可以看到,MD5一个数组返回了null,null==null,成功绕过
3. 强类型绕过
因为强类型比较,不仅比较值,还比较类型,0e会被当做字符串,所以不能用0e来进行
但是可以用MD值完全相同的字符来进行绕过
if((string)$_POST['a'] !== (string)$_POST['b'] && md5($_POST['a']) === md5($_POST['b']))
上面的方法都不能用了,百度发现是强类型绕过
payload如下:
a=%4d%c9%68%ff%0e%e3%5c%20%95%72%d4%77%7b%72%15%87%d3%6f%a7%b2%1b%dc%56%b7%4a%3d%c0%78%3e%7b%95%18%af%bf%a2%00%a8%28%4b%f3%6e%8e%4b%55%b3%5f%42%75%93%d8%49%67%6d%a0%d1%55%5d%83%60%fb%5f%07%fe%a2
&b=%4d%c9%68%ff%0e%e3%5c%20%95%72%d4%77%7b%72%15%87%d3%6f%a7%b2%1b%dc%56%b7%4a%3d%c0%78%3e%7b%95%18%af%bf%a2%02%a8%28%4b%f3%6e%8e%4b%55%b3%5f%42%75%93%d8%49%67%6d%a0%d1%d5%5d%83%60%fb%5f%07%fe%a2
进行url解码后的MD5值相等
一些MD5值相等的字符串:
$Param1=“\x4d\xc9\x68\xff\x0e\xe3\x5c\x20\x95\x72\xd4\x77\x7b\x72\x15\x87\xd3\x6f\xa7\xb2\x1b\xdc\x56\xb7\x4a\x3d\xc0\x78\x3e\x7b\x95\x18\xaf\xbf\xa2\x00\xa8\x28\x4b\xf3\x6e\x8e\x4b\x55\xb3\x5f\x42\x75\x93\xd8\x49\x67\x6d\xa0\xd1\x55\x5d\x83\x60\xfb\x5f\x07\xfe\xa2”;
$Param2=“\x4d\xc9\x68\xff\x0e\xe3\x5c\x20\x95\x72\xd4\x77\x7b\x72\x15\x87\xd3\x6f\xa7\xb2\x1b\xdc\x56\xb7\x4a\x3d\xc0\x78\x3e\x7b\x95\x18\xaf\xbf\xa2\x02\xa8\x28\x4b\xf3\x6e\x8e\x4b\x55\xb3\x5f\x42\x75\x93\xd8\x49\x67\x6d\xa0\xd1\xd5\x5d\x83\x60\xfb\x5f\x07\xfe\xa2”;
$data1="\xd1\x31\xdd\x02\xc5\xe6\xee\xc4\x69\x3d\x9a\x06\x98\xaf\xf9\x5c\x2f\xca\xb5\x07\x12\x46\x7e\xab\x40\x04\x58\x3e\xb8\xfb\x7f\x89\x55\xad\x34\x06\x09\xf4\xb3\x02\x83\xe4\x88\x83\x25\xf1\x41\x5a\x08\x51\x25\xe8\xf7\xcd\xc9\x9f\xd9\x1d\xbd\x72\x80\x37\x3c\x5b\xd8\x82\x3e\x31\x56\x34\x8f\x5b\xae\x6d\xac\xd4\x36\xc9\x19\xc6\xdd\x53\xe2\x34\x87\xda\x03\xfd\x02\x39\x63\x06\xd2\x48\xcd\xa0\xe9\x9f\x33\x42\x0f\x57\x7e\xe8\xce\x54\xb6\x70\x80\x28\x0d\x1e\xc6\x98\x21\xbc\xb6\xa8\x83\x93\x96\xf9\x65\xab\x6f\xf7\x2a\x70";
$data2="\xd1\x31\xdd\x02\xc5\xe6\xee\xc4\x69\x3d\x9a\x06\x98\xaf\xf9\x5c\x2f\xca\xb5\x87\x12\x46\x7e\xab\x40\x04\x58\x3e\xb8\xfb\x7f\x89\x55\xad\x34\x06\x09\xf4\xb3\x02\x83\xe4\x88\x83\x25\x71\x41\x5a\x08\x51\x25\xe8\xf7\xcd\xc9\x9f\xd9\x1d\xbd\xf2\x80\x37\x3c\x5b\xd8\x82\x3e\x31\x56\x34\x8f\x5b\xae\x6d\xac\xd4\x36\xc9\x19\xc6\xdd\x53\xe2\xb4\x87\xda\x03\xfd\x02\x39\x63\x06\xd2\x48\xcd\xa0\xe9\x9f\x33\x42\x0f\x57\x7e\xe8\xce\x54\xb6\x70\x80\xa8\x0d\x1e\xc6\x98\x21\xbc\xb6\xa8\x83\x93\x96\xf9\x65\x2b\x6f\xf7\x2a\x70";
4. $ a==md5($a)
0e215962017的MD5值也是由0e开头,在 PHP 弱类型比较中相等
边栏推荐
- [groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)
- 直播預告 | 容器服務 ACK 彈性預測最佳實踐
- 10 programming habits that web developers should develop
- 2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
- 自动语音识别(ASR)研究综述
- Neural networks and deep learning Chapter 2: machine learning overview reading questions
- PHP reads the INI file and writes the modified content
- Neural networks and deep learning Chapter 3: linear model reading questions
- 揭秘技术 Leader 必备的七大清奇脑回路
- [groovy] closure (closure as function parameter | code example)
猜你喜欢
Minor spanning tree
Label exchange experiment
Emlog博客主题模板源码简约好看响应式
Séparation et combinaison de la construction du système qualité
2022-2028 global and Chinese virtual data storage Market Research Report
The remainder operation is a hash function
假设检验——《概率论与数理统计》第八章学习笔记
[popular science] basic knowledge of thermal design: heat dissipation analysis of 5g optical devices
2022-2028 global and Chinese FPGA prototype system Market Research Report
[Business Research Report] Research Report on male consumption trends in other economic times -- with download link
随机推荐
Practice | mobile end practice
Introduction to RT thread kernel (4) -- clock management
2022-2028 global and Chinese video coding and transcoding Market Research Report
Setting up redis cluster cluster under Windows
2022-2028 global and Chinese equipment as a Service Market Research Report
[crampon programming] lintcode decoding Encyclopedia - 1100 strange printer
数论函数及其求和 待更新
可观测|时序数据降采样在Prometheus实践复盘
3 minutes learn to create Google account and email detailed tutorial!
How to force activerecord to reload a class- How do I force ActiveRecord to reload a class?
Advanced length of redis -- deletion strategy, master-slave replication, sentinel mode
49 pictures and 26 questions explain in detail what is WiFi?
質量體系建設之路的分分合合
2022-2028 global and Chinese FPGA prototype system Market Research Report
2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
English topic assignment (26)
windows下Redis-cluster集群搭建
10 programming habits that web developers should develop
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
2021 electrician cup (the 12th "China Society of electrical engineering Cup" National Undergraduate electrician mathematical modeling) detailed ideas + codes + references