BUUCTF:菜刀666

题目地址:https://buuoj.cn/challenges#%E8%8F%9C%E5%88%80666

在这里插入图片描述
流量分析
过滤POST的包

http.request.method==POST

tcp.stream eq 7中发现了大量数据

在这里插入图片描述
FF D8开头FF D9结尾,判断为jpg图片,将这些十六进制复制出来,以原始文件流写入文件

#Author:Seanz7
import struct

a = open("str.txt","r")#十六进制数据文件
lines = a.read()
res = [lines[i:i+2] for i in range(0,len(lines),2)]

with open("res.jpg","wb") as f:
	for i in res:
		s = struct.pack('B',int(i,16))
		f.write(s)

在这里插入图片描述
再补一个在网上看到的脚本,感觉更好一点

原文地址: https://blog.csdn.net/weixin_44110537/article/details/108350267

s='填写16进制数据'
import binascii
out=open('2.jpg','wb')
out.write(binascii.unhexlify(s))
out.close()

在这个流中还发现了传输了一个hello.zip

在这里插入图片描述
foremost分离流量包,得到一个zip,输入上面图片上的密码

在这里插入图片描述
解压得到flag

flag{
    
    3OpWdJ-JP6FzK-koCMAK-VkfWBq-75Un2z}

猜你喜欢

转载自blog.csdn.net/mochu7777777/article/details/108899933
666