FunZip
ISCC{xoMjL8NuYRRb}
Number_is_the_key
ISCC{Sanoyq6qGIPF}
精装四合一
四张图片尾部都存在多余数据,把多余数据分别提取出来保存成文件,未发现规律。根据提示,预计需要将四部分多余数据进行合并。提取四个部分前16个字节,写脚本分析规律。
当与255异或后,按照left_foot,left_hand,right_foot,right_hand顺序,出现了504B0304的特征,写脚本逐一提取异或255,再合并生成zip文件
解压缩密码65537,为RSA里e常用值,解压缩后得到Word文档
ISCC{572930528274934}
工业互联网模拟仿真数据分析
1. 题目一:在某些网络会话中,数据包可能保持固定大小,请给出含有此确定性特征的会话IP地址和数据包字节大小值。
答案:IP地址:XX.XX.XX.XX,XX.XX.XX.XX,…,数值:XX
(补充说明:IP顺序从小到大排列,涉及的IP个数由选手自己判断)
import os
com1 = "tshark -r 工业互联网模拟仿真数据.pcap -T fields -e data.len"
out = os.popen(com1,'r')
out = out.read().split("\n")
out_ =list(set(out))length_l = []
##第一步获取数据包长度和次数
for i in out_:n = 0if len(i) > 0:for j in out:if i == j:n = n + 1#至少出现10次以上if n > 10:length_l.append(i)print(f"数据包长度{i} , 出现次数{n}")##第二步根据数据包长度获取源与目的IP
com2 = 'tshark -r 工业互联网模拟仿真数据.pcap -T fields -e ip.src -e ip.dst -Y "data.len =='
for i in length_l:com = com2 + str(i) + '"'out = os.popen(com,'r')out = out.read()print(f"\n数据包长度 {i},源与目的IP:")print(out)print("-"*30)
数据包长度24 , 出现次数12
数据包长度12 , 出现次数14
数据包长度11 , 出现次数14
数据包长度10 , 出现次数12数据包长度 24,源与目的IP:
192.168.1.2 192.168.1.3
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
192.168.1.2 192.168.1.4
------------------------------
数据包长度 12,源与目的IP:
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.3
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.1 192.168.1.4
------------------------------
数据包长度 11,源与目的IP:
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.3 192.168.1.2
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.5 192.168.1.3
------------------------------
数据包长度 10,源与目的IP:
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
------------------------------
根据数据包交互数量分析
当数据包长度为24,有2种可能:192.168.1.2,192.168.1.3,192.168.1.4,24 或 192.168.1.2,192.168.1.4,24
当数据包长度为12,有2种可能:192.168.1.1,192.168.1.2,192.168.1.4,192.168.1.6,12 或 192.168.1.2,192.168.1.6,12
当数据包长度为11,有2种可能:192.168.1.2,192.168.1.3,192.168.1.5,192.168.1.6,11 或 192.168.1.2,192.168.1.6,11
当数据包长度为10,有1种可能:192.168.1.2,192.168.1.6,10
2. 题目二:通信包数据某些字段可能为确定的,请给出确定字节数值。
答案:XX
import os
length_l = [24,12,11,10]
com2 = 'tshark -r 工业互联网模拟仿真数据.pcap -T fields -e data.data -Y "data.len =='
for i in length_l:com = com2 + str(i) + '"'out = os.popen(com,'r')out = out.read()print(f"\n数据包长度{i} , 数据包内容:")print(out)print("-"*30)
数据包长度24 , 数据包内容:
20244653362a57c10203f6bc23b04166259f6efd7e568ebd
2024e7509f03063aef3a8929a7b1d10e48b766febd7abb48
2024b5f79c9216f837d77bd5a45142b3ac0befed8a44a0ff
202437f66e6e6bdc5e11b2ee2bc1b63e0a941dfbb0bc554b
20243d661d3add993da5a17b4d0fd2a28c65f69b6c6a4ca6
2024f8876d931b3bda4ead7511c4b4e2133d34098c67804b
2024993af5523bf308f94a0f3a5bb8ce2746b9ba71975351
2024ac20ffd42a888264a294b3ec5797334e883f072a91bc
20244bc4dbb927f54611325835ee03b35a4a935817706021
2024dd937db849ba8dd7a075894a5da3a1e3526d114b455a
2024d278e28ee3c63ffe344eb8c1574d0266f01526362afc
2024958473e31512b7485573df9b226a742c84ea64047c60
------------------------------
数据包长度12 , 数据包内容:
2024f7b039ae1f546c8e8b1b
2024b939b6fdd3a92dacee64
2024fd300d3fd17b85d1ae51
20249cf615176e00d3fde264
20247b5207a1d2b639fe1e55
202432b3b42ff36424a15d01
2024f2122ad847094be81d58
2024e866d7ec7b7d5ae618bf
20244057c7e66ca371b2c938
202433b4fba38bac7e29bc6a
2024796986cd9b1fc559ad61
20248c6b6efd392e9839a3eb
202462434670e7e76d766c58
20241cc66ab532ff8c8f1d2e
------------------------------
数据包长度11 , 数据包内容:
202408d7fd507dcc1a3dad
20241cfdf16c61e861a336
202496c2720189a1135d49
20243e3dc8adda1ec8e13b
20241d32bc1d86d91fe8eb
20241abec022960eac18ad
2024eed39cad90b2ca95c7
20241f1bc9e3f3fefd87c1
20242d07233b94a6173a23
2024e6937a1d272c423b29
2024f8fa2b2fbe69883b55
20249572ded51331201cf9
2024ba374382ca82446e68
2024959a30615c1af8f4f2
------------------------------
数据包长度10 , 数据包内容:
2024b4f6fe2b4621038f
2024fc3344c67d3a751d
2024004c866f1d1bd595
2024fccaad259c7e4708
20244ca38d047b5b765e
2024188773f3de56e92a
2024fae26900ab25a38f
2024a054623190d8bdf5
2024c5df2a2c6016aeed
202476caad4932ec66aa
2024269cdd2daee507f8
202493d54020f4ac8390
------------------------------
数据包头部都是2024,1种可能:2024
3. 题目三:一些网络通信业务在时间序列上有确定性规律,请提供涉及的IP地址及时间规律数值(小数点后两位)
答案:IP地址:XX.XX.XX.XX,XX.XX.XX.XX,…,数值:XX
(补充说明:IP顺序从小到大排列,涉及的IP个数由选手自己判断)
import os
from collections import Counter
IP_list =[["192.168.1.2","192.168.1.3"],["192.168.1.2","192.168.1.4"],["192.168.1.2","192.168.1.6"],["192.168.1.1","192.168.1.4"],["192.168.1.5","192.168.1.3"]]for i in IP_list:out = []src = i[0]dst = i[1]com2 = f'tshark -r 工业互联网模拟仿真数据.pcap -T fields -e frame.time_epoch -Y "ip_src=={src}" -Y "ip.dst=={dst}"'out = os.popen(com2,'r')out = out.read().split("\n")n = 0res = []for j in out:if len(j) > 0:j = float(j)if n != 0:res.append(round(j-n,2))n = jprint("源IP与目的IP",i)print(res)collect = Counter(res)print("相同时间差统计",collect)print("-"*30)
源IP与目的IP ['192.168.1.2', '192.168.1.3']
[0.05, 0.2, 0.12, 0.05, 0.02, 0.12, 0.09, 1.34, 0.06, 0.06, 0.19, 0.06, 0.06, 0.06, 0.06, 0.06, 0.25, 0.06, 0.06, 0.06, 0.06, 0.12]
相同时间差统计 Counter({0.06: 11, 0.12: 3, 0.05: 2, 0.2: 1, 0.02: 1, 0.09: 1, 1.34: 1, 0.19: 1, 0.25: 1})
------------------------------
源IP与目的IP ['192.168.1.2', '192.168.1.4']
[0.02, 0.05, 0.05, 0.03, 0.17, 0.08, 0.06, 0.05, 0.12, 0.03, 0.03, 0.03, 0.05, 0.06, 0.12, 0.08, 1.49, 0.02, 0.03, 0.02, 0.02, 0.06, 0.05, 0.12, 0.03, 0.08, 0.03, 0.11]
相同时间差统计 Counter({0.03: 7, 0.05: 5, 0.02: 4, 0.08: 3, 0.06: 3, 0.12: 3, 0.17: 1, 1.49: 1, 0.11: 1})
------------------------------
源IP与目的IP ['192.168.1.2', '192.168.1.6']
[0.0, 0.0, 0.13, 0.0, 0.0, 0.04, 0.0, 0.0, 0.03, 0.0, 0.0, 0.03, 0.0, 0.0, 0.06, 0.0, 0.0, 0.04, 0.0, 0.0, 0.14, 0.0, 0.0, 0.06, 0.0, 0.0, 0.08, 0.0, 0.0, 0.06, 0.0, 0.0, 0.05, 0.0, 0.0, 0.06, 0.03, 0.03, 0.11, 0.08, 0.06, 0.03, 0.08]
相同时间差统计 Counter({0.0: 24, 0.03: 5, 0.06: 5, 0.08: 3, 0.04: 2, 0.13: 1, 0.14: 1, 0.05: 1, 0.11: 1})
------------------------------
源IP与目的IP ['192.168.1.1', '192.168.1.4']
[0.02, 0.05, 0.05, 0.03, 0.17, 0.08, 0.06, 0.05, 0.12, 0.03, 0.03, 0.03, 0.05, 0.06, 0.12, 0.08, 1.49, 0.02, 0.03, 0.02, 0.02, 0.06, 0.05, 0.12, 0.03, 0.08, 0.03, 0.11]
相同时间差统计 Counter({0.03: 7, 0.05: 5, 0.02: 4, 0.08: 3, 0.06: 3, 0.12: 3, 0.17: 1, 1.49: 1, 0.11: 1})
------------------------------
源IP与目的IP ['192.168.1.5', '192.168.1.3']
[0.05, 0.2, 0.12, 0.05, 0.02, 0.12, 0.09, 1.34, 0.06, 0.06, 0.19, 0.06, 0.06, 0.06, 0.06, 0.06, 0.25, 0.06, 0.06, 0.06, 0.06, 0.12]
相同时间差统计 Counter({0.06: 11, 0.12: 3, 0.05: 2, 0.2: 1, 0.02: 1, 0.09: 1, 1.34: 1, 0.19: 1, 0.25: 1})
------------------------------
0.06数量最多,2种可能:192.168.1.2,192.168.1.3,0.06 或 192.168.1.3,192.168.1.5,0.06
4. 题目四:一些网络通信业务存在逻辑关联性,请提供涉及的IP地址
答案:XX.XX.XX.XX,XX.XX.XX.XX,…
(补充说明:IP顺序从小到大排列,涉及的IP个数由选手自己判断)
使用第一问脚本,获取数据包最长的源与目的IP
数据包长度12 , 出现次数14
数据包长度11 , 出现次数14数据包长度 12,源与目的IP:
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.3
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.1 192.168.1.4
------------------------------
数据包长度 11,源与目的IP:
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.3 192.168.1.2
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.2 192.168.1.6
192.168.1.5 192.168.1.3
3种可能:192.168.1.2,192.168.1.3,192.168.1.6 或 192.168.1.2,192.168.1.3,192.168.1.5 或192.168.1.2,192.168.1.3,192.168.1.5,192.168.1.6
5. 题目五:网络数据包往往会添加数据完整性校验值,请分析出数据校验算法名称及校验值在数据包的起始位和结束位(倒数位)
答案:XXXXX,X,X
(补充说明:数据校验算法名称长度为5个字符,其中英文字母大写)
import os
from collections import Counter
com2 = 'tshark -r 工业互联网模拟仿真数据.pcap -T fields -e data.data'
out = os.popen(com2,'r')
out = out.read().strip().split("\n")print(f"数据包长度:")
res = []
for i in out:res.append(len(i))
print(sorted(res))
collect = Counter(res)
print("数据包长度统计",collect)
数据包长度:
[20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 26, 26, 28, 28, 28, 28, 28, 30, 30, 32, 32, 32, 32, 34, 34, 36, 36, 38, 38, 38, 40, 40, 40, 40, 40, 42, 42, 42, 44, 46, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 52, 52, 52, 52, 52, 54, 54, 54, 56, 56, 60, 60, 62, 62, 64, 64, 66, 68, 70, 72, 72, 72, 72, 74, 74, 74, 74, 76, 76, 76, 80, 82, 86, 88, 90, 94, 94, 94, 96, 96, 96, 96, 96, 96, 98, 100, 100, 100, 102, 102, 106, 108, 110, 112, 112, 114, 114, 114, 114, 114, 114, 118, 118, 118, 120, 122, 124, 124, 126, 126, 128]
数据包长度统计
Counter({22: 14, 24: 14, 20: 12, 48: 12, 114: 6, 96: 6, 28: 5, 52: 5, 40: 5, 74: 4, 32: 4, 72: 4, 94: 3, 76: 3, 38: 3, 42: 3, 54: 3, 100: 3, 118: 3, 126: 2, 46: 2, 36: 2, 102: 2, 60: 2, 64: 2, 56: 2, 62: 2, 112: 2, 26: 2, 124: 2, 30: 2, 34: 2, 98: 1, 44: 1, 70: 1, 106: 1, 86: 1, 120: 1, 90: 1, 108: 1, 110: 1, 80: 1, 82: 1, 128: 1, 122: 1, 88: 1, 66: 1, 68: 1})
五个字符的校验算法:CRC16,CRC32,CRC64,ADLER
根据校验值长度,CRC16是4位,CRC32是8位,CRC64是16位(最短的数据包是20,可能性不大),ADLER是8位(完整名称是ADLER32,可能性不大),通常校验值都在数据的尾部,盲猜2种可能:CRC16,4,1 或 CRC32,8,1
结合5个问题所有可能答案,穷举MD5
import hashlibdef generate_flag(*answers):# 将所有答案使用英文逗号连接combined_answers = ','.join(answers)# 生成flag格式initial_flag = f"ISCC{{{combined_answers}}}"# 对flag进行MD5加密md5_hash = hashlib.md5(initial_flag.encode()).hexdigest()return md5_hash# 示例用法
if __name__ == "__main__":answer1 = ["192.168.1.2,192.168.1.3,192.168.1.4,24","192.168.1.2,192.168.1.4,24","192.168.1.1,192.168.1.2,192.168.1.4,192.168.1.6,12","192.168.1.2,192.168.1.6,12","192.168.1.2,192.168.1.3,192.168.1.5,192.168.1.6,11","192.168.1.2,192.168.1.6,11","192.168.1.2,192.168.1.6,10"]answer2 = ["2024"]answer3 = ["192.168.1.2,192.168.1.3,0.06","192.168.1.3,192.168.1.5,0.06"]answer4 = ["192.168.1.2,192.168.1.3,192.168.1.6","192.168.1.2,192.168.1.3,192.168.1.5","192.168.1.2,192.168.1.3,192.168.1.5,192.168.1.6"]answer5 = ["CRC16,4,1","CRC32,8,1"]# 每道题目的所有填空写在一个字符串中for a in answer1:for b in answer2:for c in answer3:for d in answer4:for e in answer5:answers = [a,b,c,d,e]#print(answers)#answers = ["192.168.1.2,192.168.1.4,24", # 第一小题答案:IP顺序从小到大排列,涉及的IP个数由选手自己判断,数值为整数#"2024", # 第二小题答案:数值为整数#"192.168.1.3,192.168.1.5,0.06", # 第三小题答案:IP顺序从小到大排列,涉及的IP个数由选手自己判断,数值保留小数点后2位#"192.168.1.2,192.168.1.3,192.168.1.6", # 第四小题答案:IP顺序从小到大排列,涉及的IP个数由选手自己判断#"CRC16,4,1" # 第五小题答案:数据校验算法名称长度为5个字符,其中英文字母大写#]# 生成MD5加密后的flagfinal_flag = generate_flag(*answers)# 输出最终的MD5加密字符串print(final_flag)
输出所有可能的MD5值,共84组。逐一提交尝试发现adcca5c2a82064a17a645d35b6b054cd正确。
五个问题正确答案
answers = ["192.168.1.2,192.168.1.4,24", # 第一小题答案:IP顺序从小到大排列,涉及的IP个数由选手自己判断,数值为整数"2024", # 第二小题答案:数值为整数"192.168.1.3,192.168.1.5,0.06", # 第三小题答案:IP顺序从小到大排列,涉及的IP个数由选手自己判断,数值保留小数点后2位"192.168.1.2,192.168.1.3,192.168.1.6", # 第四小题答案:IP顺序从小到大排列,涉及的IP个数由选手自己判断"CRC16,4,1" # 第五小题答案:数据校验算法名称长度为5个字符,其中英文字母大写]
#adcca5c2a82064a17a645d35b6b054cd
时间刺客
导出压缩包里的文件时间信息
ISCC{fpEjToGTSs9zKJvHY9}
RSA_KU
题目
n = 129699330328568350681562198986490514508637584957167129897472522138320202321246467459276731970410463464391857177528123417751603910462751346700627325019668100946205876629688057506460903842119543114630198205843883677412125928979399310306206497958051030594098963939139480261500434508726394139839879752553022623977
e = 65537
c = 59262872508386264919009293075130570641938655949746404314563261974209700653982824112565804482265937229278876337370688868472228040375494770493725120799773568171272185541591036884975797495277334905846509732054224833119184008550825971632987986354056413952106472455270923340278913397894031630888818845386116227844
#(p-2)*(q-1) = 129699330328568350681562198986490514508637584957167129897472522138320202321246467459276731970410463464391857177528123417751603910462751346700627325019668067056973833292274532016607871906443481233958300928276492550916101187841666991944275728863657788124666879987399045804435273107746626297122522298113586003834
#(p-1)*(q-2) = 129699330328568350681562198986490514508637584957167129897472522138320202321246467459276731970410463464391857177528123417751603910462751346700627325019668066482326285878341068180156082719320570801770055174426452966817548862938770659420487687194933539128855877517847711670959794869291907075654200433400668220458
Where_is_the_flag
ISCC{N2m2vLC5VGA0Wngzsgh0}
成语学习
导出png图片,并修复宽高
用密码解压缩something_copy.zip后,发现解压缩出的文件没有后缀,但是具有zip文件的头部特征。
加zip后缀继续解压缩后,一堆乱七八糟的文件夹,用关键词快速检索,发现flag.txt
双击打开,无0宽,无隐写,只有一段文字
《你信我啊》
李维斯特指着墙上的“少私寡欲”边享用areca边和你说,你千万不要拿我的食物去加密啊。
罗纳德·林·李维斯特发明了MD5和RSA,但是经测试两种算法都不适用,想到HMACMD5,这属于MD5哈希函数构造的一种键控哈希算法,可以接受任何大小的密钥,会将密钥与消息数据混合,正好符合【少私寡欲】和【areca】
ISCC{4cc2e7d358ff1a939ade866e48d31729}
钢铁侠在解密
M1 = flag + iscc,M2 = flag + good,已知N和e,RSA解密
ISCC{zhi_zu_chang_le_287}
Magic_Keyboard
参考https://github.com/apoirrier/CTFs-writeups/blob/master/PBCTF2021/Misc/GhostWriter.md
和https://github.com/shoyo/acoustic-keylogger/blob/master/acoustic_keylogger/audio_processing.py
直接抄代码
[97, 98, 99, 100, 97, 100, 97, 100, 101, 102, 101, 100, 103, 104, 103, 99, 99, 105, 103, 100, 103, 105, 101, 99, 103, 106, 103, 97, 99, 105, 103, 107, 103, 99, 99, 105, 103, 108, 103, 100, 101, 97, 103, 98, 101, 103, 103, 99, 99, 105, 103, 104, 101, 99, 103, 109, 103, 108, 103, 110, 101, 109]
对应:abcdadadefedghgccigdgiecgjgacigkgcciglgdeagbeggccighecgmglgnem
只有14个字符,联想到16进制,flag头部是ISCC{,尾部是}
那么abcdadadef对应495343437b,em对应7d
观察字符串 两两分割后 大部分为g开头 推断 flag包裹内容都是小写字母或下划线,列出对应表
小写字母范围
61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A下划线
5Fa:4
b:9
c:5
d:3
e:7
f:B
g:6
i:F
m:D
即分割出
49 53 43 43 7B 73 6h 65 5F 63 6F 75 6j 64 5F 6k 65 5F 6l 63 74 69 76 65 5F 6h 75 6D 6l 6n 7D
ISCC{s?e_cou?d_?e_?ctive_?um??}
还剩余1, 2, 8, 0, A, C, E未对应,61, 62, 68, 60, 6A, 6C, 6E分别为a b h ` j l n
穷举一下,找出有意义的单词:she_could_be_active_human
ISCC{she_could_be_active_human}