记一道Misc流量题——CTF-NSSCTF Round#16 Basic:Litter

CTF-NSSCTF Round#16 Basic:Litter

一、题目

公司的服务器被人入侵了,并且公司的一些敏感信息被攻击者所盗取。现在你作为公司的 SOC分析师,运维部门为你提取出来了当时时间段内服务器的流量数据,请对流量数据进行分析研判,在其中抽丝剥茧。

  1. 请找到攻击者所使用到的隧道工具的文件名称(如 Supertools.exe ),请问文件名称的md5 lowercase的值是什么?
  2. 攻击者试图将攻击过程中所使用的隧道工具重命名进行隐藏,请问重命名后的文件名是什么?
  3. 攻击者在服务器上窃取了一份客户数据文件,请问在这份文件中,第418条记录所记录的客户的电子邮箱地址为?

二、解题思路

题目说用到了隧道工具,然后发现 dns 有问题,很多向microsoft365.com发送的dns请求,并且带着超长前缀

使用tshark提取所有请求

1
tshark.exe -r suspicious_traffic.pcap -T fields -e dns.qry.name > data.txt

用以下脚本进行加工

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
def extract_and_save_info():
# 初始化存储结果的字符串
result_str = ""

try:
# 读取二进制文件并筛选符合条件的行
with open('data.txt', 'rb') as in_file:
lines = in_file.readlines()

for line in lines:
# 条件:包含目标域名、长度超100字节、内容未重复
if (b'microsofto365.com' in line
and len(line) > 100
and line[:-20].decode() not in result_str):

# 追加符合条件的内容(截取前n-20字节并解码)
result_str += line[:-20].decode()

# 移除所有点号,准备十六进制转换
processed_str = result_str.replace('.', '')

# 十六进制转字节,再解码为UTF-8
hex_bytes = bytes.fromhex(processed_str)
final_result = hex_bytes.decode('utf-8', errors='ignore')

# 将结果写入data2.txt
with open('data2.txt', 'w', encoding='utf-8') as out_file:
out_file.write(final_result)

print(f"信息提取完成,已保存至 data2.txt(共 {len(final_result)} 字符)")

except FileNotFoundError as e:
print(f"文件错误:{e}(请检查data1.txt是否存在)")
except ValueError as e:
print(f"十六进制转换错误:{e}(可能是数据格式异常)")
except Exception as e:
print(f"处理过程出错:{e}")

# 执行函数
extract_and_save_info()

image-20250722222303157

一下发现一二两道题答案

往下搜一下418也就发现第三题了

image-20250722224301414

就这样

好水啊,都不想放博客上了


记一道Misc流量题——CTF-NSSCTF Round#16 Basic:Litter
http://example.com/2025/07/22/记一道Misc流量题——CTF-NSSCTF-Round-16-Basic:Litter/
作者
yuhua
发布于
2025年7月22日
许可协议