初赛

ez_usb

tshark过滤提取出不同src的usb流量

tshark -r ez_usb.pcapng -Y "usb.src==\"2.8.1\"" -T fields -e usb.capdata > usb.dat
tshark -r ez_usb.pcapng -Y "usb.src==\"2.10.1\"" -T fields -e usb.capdata > usb.dat

WangYihang/UsbKeyboardDataHacker: USB键盘流量包取证工具 , 用于恢复用户的击键信息 (github.com) 的脚本稍微修改一下

#!/usr/bin/env python

import sys
import os

DataFileName = "usb.dat"

presses = []

normalKeys = {"04":"a", "05":"b", "06":"c", "07":"d", "08":"e", "09":"f", "0a":"g", "0b":"h", "0c":"i", "0d":"j", "0e":"k", "0f":"l", "10":"m", "11":"n", "12":"o", "13":"p", "14":"q", "15":"r", "16":"s", "17":"t", "18":"u", "19":"v", "1a":"w", "1b":"x", "1c":"y", "1d":"z","1e":"1", "1f":"2", "20":"3", "21":"4", "22":"5", "23":"6","24":"7","25":"8","26":"9","27":"0","28":"<RET>","29":"<ESC>","2a":"<DEL>", "2b":"\t","2c":"<SPACE>","2d":"-","2e":"=","2f":"[","30":"]","31":"\\","32":"<NON>","33":";","34":"'","35":"<GA>","36":",","37":".","38":"/","39":"<CAP>","3a":"<F1>","3b":"<F2>", "3c":"<F3>","3d":"<F4>","3e":"<F5>","3f":"<F6>","40":"<F7>","41":"<F8>","42":"<F9>","43":"<F10>","44":"<F11>","45":"<F12>"}

shiftKeys = {"04":"A", "05":"B", "06":"C", "07":"D", "08":"E", "09":"F", "0a":"G", "0b":"H", "0c":"I", "0d":"J", "0e":"K", "0f":"L", "10":"M", "11":"N", "12":"O", "13":"P", "14":"Q", "15":"R", "16":"S", "17":"T", "18":"U", "19":"V", "1a":"W", "1b":"X", "1c":"Y", "1d":"Z","1e":"!", "1f":"@", "20":"#", "21":"$", "22":"%", "23":"^","24":"&","25":"*","26":"(","27":")","28":"<RET>","29":"<ESC>","2a":"<DEL>", "2b":"\t","2c":"<SPACE>","2d":"_","2e":"+","2f":"{","30":"}","31":"|","32":"<NON>","33":"\"","34":":","35":"<GA>","36":"<","37":">","38":"?","39":"<CAP>","3a":"<F1>","3b":"<F2>", "3c":"<F3>","3d":"<F4>","3e":"<F5>","3f":"<F6>","40":"<F7>","41":"<F8>","42":"<F9>","43":"<F10>","44":"<F11>","45":"<F12>"}

def main():
# check argv
if len(sys.argv) != 2:
print("Usage : ")
print(" python UsbKeyboardHacker.py data.pcap")
print("Tips : ")
print(" To use this python script , you must install the tshark first.")
print(" You can use `sudo apt-get install tshark` to install it")
print("Author : ")
print(" WangYihang <wangyihanger@gmail.com>")
print(" If you have any questions , please contact me by email.")
print(" Thank you for using.")
exit(1)

# get argv
pcapFilePath = sys.argv[1]

# get data of pcap
#os.system("tshark -r %s -Y \"usb.src==\"2.8.1\"\" -T fields -e usb.capdata > %s" % (pcapFilePath, DataFileName))
# read data
with open(DataFileName, "r") as f:
for line in f:
presses.append(line[0:-1])
# handle
result = ""
for press in presses:
if press == '':
continue
if ':' in press:
Bytes = press.split(":")
else:
Bytes = [press[i:i+2] for i in range(0, len(press), 2)]
if Bytes[0] == "00":
if Bytes[2] != "00" and normalKeys.get(Bytes[2]):
result += normalKeys[Bytes[2]]
elif int(Bytes[0],16) & 0b10 or int(Bytes[0],16) & 0b100000: # shift key is pressed.
if Bytes[2] != "00" and normalKeys.get(Bytes[2]):
result += shiftKeys[Bytes[2]]
else:
print("[-] Unknow Key : %s" % (Bytes[0]))
print("[+] Found : %s" % (result))

# clean the temp data
#os.system("rm ./%s" % (DataFileName))


if __name__ == "__main__":
main()
image-20220529201128268

得到

526172211a0700cf907300000d00000000000000c4527424943500300000002a00000002b9f9b0530778b5541d33080020000000666c61672e747874b9ba013242f3afc000b092c229d6e994167c05a78708b271ffc042ae3d251e65536f9ada87c77406b67d0e6316684766a86e844dc81aa2c72c71348d10c43d7b00400700

35c535765e50074a

第一个可以转化为rar压缩包,第二个是密码,得到flag

everlasting_night

图片尾有额外数据 FB3EFCE4CEAC2F5445C7AE17E3E969AB

md5解密得到 ohhWh04m1

stegsolve查看注意到Alpha 2时右下角有东西,data extract查看Alpha 2通道,得到 f78dcd383f1b574b

考虑lsb隐写,cloacked-pixel

python lsb.py extract everlasting_night.png flag.zip f78dcd383f1b574b

得到flag.zip

ohhWh04m1解压缩,得到一张格式上是png但是无法查看的图片

用gmip原始数据导入,得到flag

image-20220529203423135

babydisk(复现)

取证大师打开vmdk文件,发现一个音频和一个SECRET文件。

john爆破deepsound,得到密码 feedback

SECRET文件是TrueCrypt加密文件,用上面的密码VeraCrypt挂载,拿到spiral文件,意思是螺旋

spiral文件大小是7569字节,刚好是87的平方,可以凑一个矩阵

螺旋矩阵,python实现_幽幽山村一小生的博客-CSDN博客_python螺旋矩阵

import binascii

def function(n):
matrix = [[0] * n for _ in range(n)]

number = 1
left, right, up, down = 0, n - 1, 0, n - 1
while left < right and up < down:
# 从左到右
for i in range(left, right):
matrix[up][i] = number
number += 1

# 从上到下
for i in range(up, down):
matrix[i][right] = number
number += 1

# 从右向左
for i in range(right, left, -1):
matrix[down][i] = number
number += 1

for i in range(down, up, -1):
matrix[i][left] = number
number += 1
left += 1
right -= 1
up += 1
down -= 1
# n 为奇数的时候,正方形中间会有个单独的空格需要单独填充
if n % 2 != 0:
matrix[n // 2][n // 2] = number
return matrix


with open(r"spiral","rb") as fr:
r = fr.read()
spiral = function(87) # 返回的是下面这种
# 1 2 3
# 8 9 4
# 7 6 5
for i in range(87):
for j in range(87):
#保证下标的一致性 防止溢出
spiral[i][j] -= 1
res = []
for i in range(87):
for v in spiral[i]: #根据spiral每行的值进行取值
tmp = hex(r[v])[2:]
if len(tmp) == 1:
#补首位0
tmp = "0"+tmp
res.append(tmp)
print("".join(res))
flag = "".join(res)
# 写入文件
with open(r"flag.zip", "wb") as f:
f.write(binascii.unhexlify(flag))

得到

ohhhhhhf5-410f3f969bI696}6-a-1eb59ge1-4d3{f9af107

分成7x7

image-20220606171418333

按螺旋法读取即可得到flag

华东北分区赛

pikalang

stegsolve查看,三个0通道都有隐藏数据,勾选提取出来

cGkgcGkgc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BpIHBpIHBpIHBpIHBpIHBpa2FjaHUga2Ega2Ega2Ega2Ega2Ega2EgcGlrYWNodSBwaXBpIHBpIHBpa2FjaHUgcGljaHUgcGlrYWNodSBwaXBpIGthIGthIGthIGthIGthIHBpa2FjaHUgcGkgcGkgcGkgcGkgcGkgcGlrYWNodSBwaWNodSBrYSBrYSBwaWthY2h1IHBpIHBpIHBpIHBpIHBpa2FjaHUga2EgcGlrYWNodSBrYSBrYSBrYSBrYSBwaWthY2h1IHBpIHBpIHBpIHBpIHBpIHBpIHBpIHBpIHBpa2FjaHUgcGlwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaSBwaWthY2h1IA==

base64解码

pi pi pi pi pi pi pi pi pi pi pika pipi pi pipi pi pi pi pipi pi pi pi pi pi pi pi pipi pi pi pi pi pi pi pi pi pi pi pichu pichu pichu pichu ka chu pipi pipi pipi pipi pi pi pikachu pi pi pi pi pi pi pikachu ka ka ka ka ka ka ka ka ka ka ka pikachu pi pi pi pi pi pi pikachu pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pikachu ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka pikachu pichu ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka ka pikachu ka ka ka ka pikachu pi pi pikachu pi pi pikachu pipi pikachu pichu ka ka ka ka ka pikachu pipi pi pi pikachu pichu pi pi pi pikachu ka ka ka pikachu pipi pikachu ka ka ka ka ka pikachu pi pi pi pikachu pichu ka pikachu pi pi pi pikachu ka pikachu pipi pi pikachu pikachu pichu pi pikachu ka ka ka pikachu pi pikachu pi pi pi pi pi pi pi pi pikachu ka ka ka ka ka ka pikachu pipi pi pikachu pichu pikachu pipi ka ka ka ka ka pikachu pi pi pi pi pi pikachu pichu ka ka pikachu pi pi pi pi pikachu ka pikachu ka ka ka ka pikachu pi pi pi pi pi pi pi pi pikachu pipi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pi pikachu

搜索得知皮卡丘编程语言

Pikalang Programming Language - Online Pikachu Decoder, Translator (dcode.fr)

在线网站解密得到flag

snowberg

zsteg查看发现”b1,rgb,lsb,xy”通道有zip压缩包,提取出来

压缩包里分别是1.txt,2.txt,3.txt,key.txt

其中前三个文件都是6字节,尝试crc爆破

theonlypwner/crc32: CRC32 tools: reverse, undo/rewind, and calculate hashes (github.co

得到 y0u_f0und_th1s_k3y,解压得到key.txt:63f0c7380cc3a35

010 editor打开图片,很多chunk块的crc报错,把所有报错的crc值提取出来得到

553246736447566b58312b6d4d78726330596b4776546142306333413945674657766a67687161386a2b4a34767330534f38713471584f2b4f664b4f4969682b7a4f774c426536344c32334d637562555465316478413d3d

hex 转 base64

U2FsdGVkX1+mMxrc0YkGvTaB0c3A9EgFWvjghqa8j+J4vs0SO8q4qXO+OfKOIih+zOwLBe64L23McubUTe1dxA==

aes解密 在线AES加密 | AES解密 - 在线工具 (sojson.com) key就是之前得到

得到flag

内存中的secret

逆天题,偏旁当密码,到现在也没想明白🤢

waiting to update……

good lock

waiting to update……

Folder’s revenge

waiting to update……

嫌疑人的秘密

waiting to update……

Android emulator Forensics

waiting to update……