当前位置:网站首页>CTF入门之md5
CTF入门之md5
2022-08-02 03:25:00 【SevenCold】
一道很综合的md5的题
一共有三关
1.md5(s,true)

在响应头中发现
select * from 'admin' where password=md5($pass,true)
可以看到md5函数第二个参数是True,意为返回原始16字符二进制格式。
也就是说如果md5值经过hex转成字符串后为 ‘or’+balabala这样的字符串
目的就是让md5函数的结果为true
这里提供一个最常用的:ffifdyop,该字符串md5加密后若raw参数为True时会返回 'or’6 (其实就是一些乱码和不可见字符,这里只要第一位是非零数字即可被判定为True,后面的会在MySQL将其转换成整型比较时丢掉)
输入ffifdyop进入下一关
2.md5弱比较绕过
查看源码

‘==’ 会将两个变量变为同类型比较,所以寻找两个明文不同但md5值为"0exxxxx"的字符串,因为0exxxx会被看成科学计数法,所以0exxxx都为0
,所以相等。
列举几个例子:
QNKCDZO
0e830400451993494058024219903391
240610708
0e462097431906509019562988736854
s878926199a
0e545993274517709034328855841020
s155964671a
0e342768416822451524974117254469
s214587387a
0e848240448830537924465865611904
s214587387a
0e848240448830537924465865611904
s878926199a
0e545993274517709034328855841020
s1091221200a
0e940624217856561557816327384675
s1885207154a
0e509367213418206700842008763514
s1502113478a
0e861580163291561247404381396064
s1885207154a
0e509367213418206700842008763514
s1836677006a
0e481036490867661113260034900752
s155964671a
0e342768416822451524974117254469
payload:levels91.php?a=s878926199a&b=s155964671a
进入下一关
3.强比较绕过

‘===’可以用数组绕过,因为所有数组的md5值都为NULL(当然第二关也可以用此方法绕过)

得到flag!

边栏推荐
- 你的本地创建的项目库还在手动创建远端代码仓库再推送吗,该用它了
- [phpunit/php-timer]一个用于代码执行时间的计时器
- js __proto__、prototype、constructor的关系
- [symfony/mailer]一个优雅易用的发送邮件类库
- 第一次手撕代码,如何解出全排列问题
- 2.PHP变量、输出、EOF、条件语句
- ES6数组的扩展方法map、filter、reduce、fill和数组遍历for…in for…of arr.forEach
- Query the indexes of all tables in the database and parse them into sql
- [symfony/finder] The best file manipulation library
- Scrapy爬虫遇见重定向301/302问题解决方法
猜你喜欢
随机推荐
SQL: DDL, DML, DQL, DCL corresponding introduction and demonstration
Pycharm打包项目为exe文件
正则笔记(2)- 正则表达式位置匹配攻略
[symfony/mailer] An elegant and easy-to-use mail library
easyswoole uses redis to perform geoRadiusByMember Count invalid fix
[symfony/finder] The best file manipulation library
What will be new in PHP8.2?
[league/climate] A robust command-line function manipulation library
4.表单与输入
ES6介绍+定义变量+不同情况下箭头函数的this指向
PHP图片压缩到指定的大小
(5) 模块与包、编码格式、文件操作、目录操作
Thread Pool (Introduction and Use of Thread Pool)
4. PHP array and array sorting
一分种一起来了解Vite的基础
Turn trendsoft/capital amount of Chinese capital library
(2) 顺序结构、对象的布尔值、选择结构、循环结构、列表、字典、元组、集合
[mikehaertl/php-shellcommand]一个用于调用外部命令操作的库
轮播图详解(完整代码在最后)
阿里云服务器如何使用admin账户登录









