CTF-NSSCTF Round#16 Basic:Litter 一、题目 公司的服务器被人入侵了,并且公司的一些敏感信息被攻击者所盗取。现在你作为公司的 SOC分析师,运维部门为你提取出来了当时时间段内服务器的流量数据,请对流量数据进行分析研判,在其中抽丝剥茧。
请找到攻击者所使用到的隧道工具的文件名称(如 Supertools.exe ),请问文件名称的md5 lowercase的值是什么?
攻击者试图将攻击过程中所使用的隧道工具重命名进行隐藏,请问重命名后的文件名是什么?
攻击者在服务器上窃取了一份客户数据文件,请问在这份文件中,第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: if (b'microsofto365.com' in line and len (line) > 100 and line[:-20 ].decode() not in result_str): result_str += line[:-20 ].decode() processed_str = result_str.replace('.' , '' ) hex_bytes = bytes .fromhex(processed_str) final_result = hex_bytes.decode('utf-8' , errors='ignore' ) 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()
一下发现一二两道题答案
往下搜一下418也就发现第三题了
就这样
好水啊,都不想放博客上了