Tags:流量分析
,CHIMA
,应急响应
0x00. 题目
附件路径:https://pan.baidu.com/s/1GyH7kitkMYywGC9YJeQLJA?pwd=Zmxh#list/path=/CTF附件
附件名称:202205_CHIMA_follow.zip
-
发起攻击的IP地址
-
受到攻击的资产的IP+Port
-
上传的木马完整路径
-
上传的文件md5值
0x01. WP
1-3略
1. 过滤筛选上传请求
过滤命令http contains "shell7"
,找到上传位置
2. 通过文件对象导出
,导出上传请求
3. 分析请求流量,找到有效数据起止位置,编写合并脚本
exp.py
import structfile=""# 合并十六进制字符串
for i in range(1,11):with open(str(i), 'r') as f:file_lines = f.readlines()start = file_lines[0].find("272b=")+5end = file_lines[0].find("&k451")tmp_file=file_lines[0][start:end]file=file+tmp_fileprint("tmp_file",len(tmp_file),",file",len(file))with open("hex.txt", 'w') as f:f.write(file)strY = ''
i = 0# 十六进制文件转二进制
with open("output","wb") as f:for x in file:strY += xi+=1if (i%2 == 0):xHex = int(strY, 16)xHex = struct.pack("B",xHex)f.write(xHex)strY = ''print("Done!")
4. 计算导出文件的MD5值
md5值为9243bbdc47535e088fd1bdbb63e8bcf2