前言
接上回章节
![图片[1],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118042332725.png?imageView2/0/format/webp/q/75)
Web25
![图片[2],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118055700230.png?imageView2/0/format/webp/q/75)
![图片[3],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118055708919.png?imageView2/0/format/webp/q/75)
没想到都是随机种子的爆破…
![图片[4],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118061114675.png?imageView2/0/format/webp/q/75)
传入r用0-随机生成的种子
如果设置的cookie等于第二次和第三次随机种子之和则输出flag
下载Php随机种子爆破包https://www.openwall.com/php_mt_seed/php_mt_seed-4.0.tar.gz
编译一下
如果出错了在前面需要加#include <sys/times.h>头文件
make #编译
![图片[5],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118060249334.png?imageView2/0/format/webp/q/75)
先给他随机传参
![图片[6],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118062900454.png?imageView2/0/format/webp/q/75)
检查一下php版本是7.1+
![图片[7],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118061318946.png?imageView2/0/format/webp/q/75)
我们找个7.1+版本
![图片[8],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118092710283.png?imageView2/0/format/webp/q/75)
编写脚本(注意这个种子可能需要爆破多次,所以这里只是提供一个方法)我尝试多个种子爆破
<?php
mt_srand(1064029812);
echo mt_rand()."\n";
$result = mt_rand()+mt_rand();
echo $result;
?>
![图片[9],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118094525477.png?imageView2/0/format/webp/q/75)
我们复制第二次的种子
![图片[10],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118094659155.png?imageView2/0/format/webp/q/75)
这里cookie传入的token需要是第一次和第二次的种子之和
我们使用我们的cookie-Editor进行写入token
![图片[11],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118094747857.png?imageView2/0/format/webp/q/75)
下一步进行传参r进入循环
![图片[12],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118094450456.png?imageView2/0/format/webp/q/75)
Web26
![图片[13],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118095111209.png?imageView2/0/format/webp/q/75)
打开一看需要安装
![图片[14],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118095130224.png?imageView2/0/format/webp/q/75)
![图片[15],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118095144362.png?imageView2/0/format/webp/q/75)
这里数据库的信息CTFshow都给我们了
![图片[16],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118095551371.png?imageView2/0/format/webp/q/75)
但是连接是失败的所以需要爆破
![图片[17],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118095501915.png?imageView2/0/format/webp/q/75)
需要爆破密码
![图片[18],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118095646180.png?imageView2/0/format/webp/q/75)
![图片[19],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118095703924.png?imageView2/0/format/webp/q/75)
用他们给的字典并没有爆破出来
![图片[20],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118095828739.png?imageView2/0/format/webp/q/75)
我们查看发送到重放器里查看一下逻辑
![图片[21],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118095929670.png?imageView2/0/format/webp/q/75)
发送之后给了一串utf-8编码
解码后原来是数据库连接失败啊,有点尬
![图片[22],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118100110525.png?imageView2/0/format/webp/q/75)
这里我发现
![图片[23],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118100831878.png?imageView2/0/format/webp/q/75)
如果不填点击开始安装是可以连接成功的
我们不填去发送
![图片[24],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118100746620.png?imageView2/0/format/webp/q/75)
flag就出了
Web27
![图片[25],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118101243104.png?imageView2/0/format/webp/q/75)
打开一看是个管理系统
![图片[26],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118103424514.png?imageView2/0/format/webp/q/75)
但是需要登录进去
这里给出了录取名单以及学生学籍信息查询系统
我们下载进行查看一波
![图片[27],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118103504628.png?imageView2/0/format/webp/q/75)
![图片[28],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118103515464.png?imageView2/0/format/webp/q/75)
可以看到这里给的身份证号是给隐藏的所以我们需要爆破身份证号
编写python脚本(借鉴别人的,这里身份证的组成原理是需要研究一下的,
id_head = 621022
id_reap = 5237
year = 1989
with open('id.txt', 'w') as fp:
for i in range(year, 1991):
for month in range(1, 13):
for day in range(1, 32):
if day < 10 and month < 10:
id = str(id_head) + str(i).zfill(2) + str(month).zfill(2) + str(day).zfill(2) + str(id_reap) + "\n"
elif day < 10:
id = str(id_head) + str(i).zfill(2) + str(month).zfill(2) + str(day).zfill(2) + str(id_reap) + "\n"
elif month < 10:
id = str(id_head) + str(i).zfill(2) + str(month).zfill(2) + str(day) + str(id_reap) + "\n"
else:
id = str(id_head) + str(i).zfill(2) + str(month) + str(day) + str(id_reap) + "\n"
fp.write(id)
![图片[29],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118103924972.png?imageView2/0/format/webp/q/75)
生成了
![图片[30],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118104127495.png?imageView2/0/format/webp/q/75)
让后我们去抓包爆破
![图片[31],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118110014469.png?imageView2/0/format/webp/q/75)
这里看到第404个爆破出来了
![图片[32],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118110054367.png?imageView2/0/format/webp/q/75)
![图片[33],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118110119596.png?imageView2/0/format/webp/q/75)
![图片[34],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118110254583.png?imageView2/0/format/webp/q/75)
Web28
![图片[35],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118112338430.png?imageView2/0/format/webp/q/75)
这里打开一看什么也没有
![图片[36],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118112356719.png?imageView2/0/format/webp/q/75)
这里发现他是301强制跳转
也就是说访问http://5ab14198-de2b-4ad2-bfa8-0b8d3ce6c1ac.challenge.ctf.show会跳转到http://5ab14198-de2b-4ad2-bfa8-0b8d3ce6c1ac.challenge.ctf.show/0/1/2.txt
我们需要找到他们的主文件index.php所在的目录
index是网站的首页
爆破的就是目录0 1
我们用php编写一个0-100的数字去复制他
<?php
for($i=0;$i<=100;$i++){
echo $i."\n";
}
?>
![图片[37],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118113434259.png?imageView2/0/format/webp/q/75)
复制到txt中
![图片[38],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118113511975.png?imageView2/0/format/webp/q/75)
进行抓包选择集束炸弹模式
![图片[39],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118115009709.png?imageView2/0/format/webp/q/75)
![图片[40],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118113640475.png?imageView2/0/format/webp/q/75)
线程我设置的是10,开始爆破
![图片[41],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118115134889.png?imageView2/0/format/webp/q/75)
![图片[42],[CTFshow]Web爆破章节之[25-28]笔记,网络安全爱好者中心-神域博客网](https://img.godyu.com/2024/01/20240118115247864.png?imageView2/0/format/webp/q/75)
OK 解决
暂无评论内容