專業(yè)做網站公司 前景sem是什么意思
題目附件給了 modbus.pcap
存在多個協議 但是這道題多半是 考 modbus
會發(fā)現 每次的 Query
末尾的兩個字符 存在規(guī)律
猜測是base家族
可以嘗試提取流量中的數據
其中Word Count
字段中的22871
是10進制轉16進制在轉ascii字符串
先提取 過濾器判斷字段
tshark -r modbus.pcap -Y "modbus" -T json > 1.json
tshark -r modbus.pcap -Y "modbus" -T json -e modbus.word_cnt > 2.json
當作字典正常提取即可
以為部分不存在 modbus.word_cnt
字段
用 try-catch
處理 異??瞻?/p>
import json
import libnum
with open('2.json') as f:data = json.load(f)a=[]
for i in data:try:a.append(i['_source']['layers']['modbus.word_cnt'][0])except:continue
result=b""
for i in a:if i != '5':result+=libnum.n2s(int(i))
print(result)
得到數據 MMYWMX3GNEYWOXZRGAYDA===
解密后是base32編碼
c1f_fi1g_1000
NSSCTF{c1f_fi1g_1000}