前言
靶场地址:https://ctf.show/challenges
如果此时此刻还没burpsuite可以用开盒即用版的(域这里用的就是
![图片[1],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117175822797.png?imageView2/0/format/webp/q/75)
Web21
![图片[2],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117175834232.png?imageView2/0/format/webp/q/75)
![图片[3],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180221289.png?imageView2/0/format/webp/q/75)
这里进行抓包
![图片[4],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180149832.png?imageView2/0/format/webp/q/75)
这里可以看到他是通过Base64进行编码的
![图片[5],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180314368.png?imageView2/0/format/webp/q/75)
选择狙击手模式
![图片[6],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180334227.png?imageView2/0/format/webp/q/75)
密码字典下载他们给我们用的字典
我们要对admin:后的密码进行爆破所以需要截取一下
添加前缀
![图片[7],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180406232.png?imageView2/0/format/webp/q/75)
进行base64编码
![图片[8],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180436482.png?imageView2/0/format/webp/q/75)
url取消打勾(这里要进行base64编码 =会造成编码失败
![图片[9],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180618705.png?imageView2/0/format/webp/q/75)
![图片[10],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180642814.png?imageView2/0/format/webp/q/75)
![图片[11],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180723680.png?imageView2/0/format/webp/q/75)
Web22
![图片[12],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180931949.png?imageView2/0/format/webp/q/75)
![图片[13],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240117180905241.png?imageView2/0/format/webp/q/75)
Web22ctfshow挂了
Web23
![图片[14],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118030342388.png?imageView2/0/format/webp/q/75)
打开一看
![图片[15],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118030354987.png?imageView2/0/format/webp/q/75)
分析一下
这里包含了一个flag.php 需要满足条件输出
这里是isset是检查是否get传参token这个参数,如果传参了就进入if里
下一步将传参的token进行md5转换
![图片[16],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118030853550.png?imageView2/0/format/webp/q/75)
接着使用substr函数($token,1,1)这个意思是从token里从第一位截取一位也就是第二位
第一个if检查的是第二位 第十五位 第十八位是否相等如果相等进入下一个if
下一个if
![图片[17],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118031040761.png?imageView2/0/format/webp/q/75)
这个if使用了intval意思是转换整数 检查第二位第十五位和第十八位除以第二位相加是否等于第32位
编写PHP脚本
<?phpfor($i=0;$i<9999;$i++) {$token = md5($i);if (substr($token, 1, 1) === substr($token, 14, 1) && substr($token, 14, 1) === substr($token, 17, 1)) {if ((intval(substr($token, 1, 1)) + intval(substr($token, 14, 1)) + substr($token, 17, 1)) / substr($token, 1, 1) === intval(substr($token, 31, 1))) {echo "i="."$i"."token="."$token";}}}?><?php for($i=0;$i<9999;$i++) { $token = md5($i); if (substr($token, 1, 1) === substr($token, 14, 1) && substr($token, 14, 1) === substr($token, 17, 1)) { if ((intval(substr($token, 1, 1)) + intval(substr($token, 14, 1)) + substr($token, 17, 1)) / substr($token, 1, 1) === intval(substr($token, 31, 1))) { echo "i="."$i"."token="."$token"; } } } ?><?php for($i=0;$i<9999;$i++) { $token = md5($i); if (substr($token, 1, 1) === substr($token, 14, 1) && substr($token, 14, 1) === substr($token, 17, 1)) { if ((intval(substr($token, 1, 1)) + intval(substr($token, 14, 1)) + substr($token, 17, 1)) / substr($token, 1, 1) === intval(substr($token, 31, 1))) { echo "i="."$i"."token="."$token"; } } } ?>
![图片[18],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118032310321.png?imageView2/0/format/webp/q/75)
复制一下
![图片[19],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118034007238.png?imageView2/0/format/webp/q/75)
Web24
![图片[20],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118034848711.png?imageView2/0/format/webp/q/75)
![图片[21],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118034835457.png?imageView2/0/format/webp/q/75)
![图片[22],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118034916599.png?imageView2/0/format/webp/q/75)
这里是mt_srand函数意思是随机种子
让后传参r 如果r和随机种子的数值一样就输出随机种子
编写脚本:
<?phpmt_srand(372619038);echo (mt_rand());?><?php mt_srand(372619038); echo (mt_rand()); ?><?php mt_srand(372619038); echo (mt_rand()); ?>
![图片[23],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118035032109.png?imageView2/0/format/webp/q/75)
![图片[24],[CTFshow]Web爆破章节之[21-24]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118035057502.png?imageView2/0/format/webp/q/75)
ok下篇文章更新后四个
THE END
暂无评论内容