本博客爲西南石油大學(南充校區)CTF團隊賽的題解html
全部題目網址:http://47.106.87.69:9000/game前端
解壓後發現壓縮包中是一個帶有密碼的圖片,winhex分析二進制,發現文件數據區的全局加密爲00 00,但壓縮源文件目錄區的全局方位標記爲09 00,可知爲僞加密,更改成00 00便可在解壓出圖片,再用notepad打開便可發現藏在文件末尾的flagpython
打開./robots.html便可發現flagandroid
放大後便可發現flagapp
甲子紀年法,60一甲子,把年份對應成數字爲ide
5 7 28 6 20 21 21 19,而後根據+甲子,再加上60即爲ui
65 67 88 86 80 81 81 79編碼
都在A-Z的範圍,翻譯提交不正確,可猜想還有字符加密,經過柵欄解密,再分別凱撒解密,便可獲得最後flag加密
wireshark或者brupsuite抓包便可,也能夠禁止網頁js達到進制頁面跳轉的效果。spa
枚舉不一樣組合便可
跑一下發現文件下面還有一個GIF文件,分離出來,而後再分幀找到最後一句話便可獲得flag
js代碼aaencode加密
控制檯跑一下便可
修改apk爲rar文件,解壓獲得classes.dex文件,而後丟jadx-gui分析源碼便可獲得flag
寫個腳本跑一下便可,腳本以下
import hashlib # 明文爲: djas?djashkj?as?ad # 密文爲 : 765781f???2485b8b727ce3c???d0e90 str1 = 'djas' str2 = 'djashkj' str3 = 'as' str4 = 'ad' #遍歷全部字符 res = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] def getMd5(plaintext): md5Object = hashlib.md5() md5Object.update(str(plaintext).encode("UTF-8")) return md5Object.hexdigest() for i in res: for j in res: for k in res: plaintext = str1 + i + str2 + j + str3 + k + str4 # 拼接明文字符串 print (plaintext + " ",end = " ") md5 = getMd5(plaintext) print (md5) # 判斷是否成功 if md5.startswith('765781f') and md5.endswith('d0e90'): print ('Flag is : spctf{' + md5 + '}') exit(0)
看着像二維碼,對比一下發現顏色反了,Stegsolve打開相反色掃描便可獲得Flag
基礎python反彙編,經過https://tool.lu/pyc/獲得源碼,而後編寫解密腳本便可獲得Flag
import base64 def decode(message): message = base64.b64decode(message) s = '' for i in message: x = int(i) - 16 x = x ^ 32 s += chr(x) return s correct = 'Y2BTZFZrWY9kWFleW49ZJ48hY49VUWppbQ==' print(decode(correct))
既讓pass變量和thepassword_123變量相等便可,因此經過POST傳參使得兩變量相等便可獲得flag
Ook編碼解密便可獲得Flag
abcd對應qwer便可獲得Flag
ReversingKr原題,自行百度
ReversingKr原題,自行百度
右下角水印找到原微博便可在評論區找到Flag
分析二進制發現有ZIP文件結尾,可是文件開頭PK改爲了PL,改成PK便可找到隱藏壓縮包中的FLAG文件
編寫腳本異或兩文件便可獲得Flag,腳本以下
import binascii import struct def str2hex(str): hexs = [] for s in str: tmp = (hex(ord(s)).replace('0x','')) if len(tmp) == 2: hexs.append(tmp) else: hexs.append('0'+tmp) return hexs arr = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'] arr2 = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] def tran(r): for i in range(len(arr)): if r == arr[i]: return arr2[i] f = open('A','rb') f2 = open('B','rb') hexs = [] hexs2 = [] while True: t = f.readline() t2 = f2.readline() if not t or not t2: break hexs.extend(str2hex(t)) hexs2.extend(str2hex(t2)) f.close() f2.close() ff = open('out.txt','wb') for i in range(min(len(hexs),len(hexs2))): a = tran(hexs[i][0])*16+tran(hexs[i][1]) b = tran(hexs2[i][0])*16+tran(hexs2[i][1]) B = struct.pack('B',a^b) ff.write(B) ff.close()
羣文件有WP,再也不寫