202205_CHIMA_follow

Tags:流量分析,CHIMA,应急响应

0x00. 题目

附件路径:https://pan.baidu.com/s/1GyH7kitkMYywGC9YJeQLJA?pwd=Zmxh#list/path=/CTF附件

附件名称:202205_CHIMA_follow.zip

  1. 发起攻击的IP地址

  2. 受到攻击的资产的IP+Port

  3. 上传的木马完整路径

  4. 上传的文件md5值

0x01. WP

1-3略

1. 过滤筛选上传请求

过滤命令http contains "shell7",找到上传位置

image

2. 通过文件对象导出,导出上传请求

image

3. 分析请求流量,找到有效数据起止位置,编写合并脚本

image

exp.py

import struct

file=""

# 合并十六进制字符串
for i in range(1,11):
    with open(str(i), 'r') as f:
        file_lines = f.readlines()
        start = file_lines[0].find("272b=")+5
        end = file_lines[0].find("&k451")
        tmp_file=file_lines[0][start:end]
        file=file+tmp_file
        print("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 += x
        i+=1
        if (i%2 == 0):
            xHex = int(strY, 16)
            xHex = struct.pack("B",xHex)
            f.write(xHex)
            strY = ''
            
print("Done!")

4. 计算导出文件的MD5值

md5值为9243bbdc47535e088fd1bdbb63e8bcf2

image

过程数据详见:附件网盘的202205_CHIMA_follow_过程数据.zip

posted @ 2025-09-14 10:37  JasonJHu  阅读(6)  评论(0)    收藏  举报