赞
踩
1.SimpleFlow;
2.熟悉的猫;
3.冰墩墩;
下载得到SimpleFlow的压缩包,解压得到SimpleFlow.pcapng,流量分析题目。查找 flag. ,可以知道一共有四个flag.txt文件,一个flag.zip文件。用kali的foremost指令可以分离出flag.zip文件,发现flag.zip需要密码。
再追踪每个flag.txt。
发现蚁剑流量,一个一个base64解码,
在其中一个txt文件中得到:
Y2QgIi9Vc2Vycy9jaGFuZy9TaXRlcy90ZXN0Ijt6aXAgLVAgUGFTc1ppUFdvckQgZmxhZy56aXAgLi4vZmxhZy50eHQ7ZWNobyBbU107cHdkO2VjaG8gW0Vd
base64解码得到:cd "/Users/chang/Sites/test";zip -P PaSsZiPWorD flag.zip ../flag.txt;echo [S];pwd;echo [E]。得到密码:PaSsZiPWorD
解开压缩包得到flag:DASCTF{f3f32f434eddbc6e6b5043373af95ae8}
下载得到zip文件,用kali的foremost指令分离得到一个kdbx文件和一个需要密码的flag.zip文件。
len5.kdbx文件用keepass2打开,需要密码。
可以用kali进行爆破,由文件名可以推测密码是5位数。可以用crunch指令生成一个5位数的密码字典。用如下指令爆破出密码:
密码为:13152。(ps:得到的keepass.txt需要删去len5)
用keepass2打开len5.kdbx。
copy出zipzip中的密码:jbRw5PB2kFmor6IeYYil。
打开压缩包,得到一个png图片和一个hint;
看大佬的wp,hint中有零宽度字节,太菜具体是啥我也不清楚,解出来是22*160。
用塔珀自指公式去解k,网上的脚本需要把17,106改成22,160
- import numpy as np
- import matplotlib.pyplot as plt
- from PIL import Image
- a=22
- b=160
- def Tupper_self_referential_formula(k):
- aa = np.zeros((a,b))
- def f(x, y):
- y += k
- a1 = 2**-(-a*x - y%a)
- a2 = (y // a) // a1
- return 1 if a2 % 2 > 0.5 else 0
- for y in range(a):
- for x in range(b):
- aa[y, x] = f(x, y)
- return aa[:,::-1]
-
- k=92898203278702907929705938676672021500394791427205757369123489204565300324859717082409892641951206664564991991489354661871425872649524078000948199832659815275909285198829276929014694628110159824930931595166203271443269827449505707655085842563682060910813942504507936625555735585913273575050118552353192682955310220323463465408645422334101446471078933149287336241772448338428740302833855616421538520769267636119285948674549756604384946996184385407505456168240123319785800909933214695711828013483981731933773017336944656397583872267126767778549745087854794302808950100966582558761224454242018467578959766617176016660101690140279961968740323327369347164623746391335756442566959352876706364265509834319910419399748338894746638758652286771979896573695823608678008814861640308571256880794312652055957150464513950305355055495262375870102898500643010471425931450046440860841589302890250456138060738689526283389256801969190204127358098408264204643882520969704221896973544620102494391269663693407573658064279947688509910028257209987991480259150865283245150325813888942058
- aa = Tupper_self_referential_formula(k)
- plt.figure(figsize=(15,10))
- plt.imshow(aa,origin='lower')
- plt.savefig("tupper.png")
- img = Image.open('flag.png')
- dst1 = img.transpose(Image.FLIP_LEFT_RIGHT).rotate(180)
- plt.imshow(dst1)
- plt.show()
得到一张图片。
翻转一下得到三个值:33,121,144。用猫脸转换去解
- from PIL import Image
-
- img = Image.open('flag.png')
- if img.mode == "P":
- img = img.convert("RGB")
- assert img.size[0] == img.size[1]
- dim = width, height = img.size
-
- st = 33
- a = 121
- b = 144
- for _ in range(st):
- with Image.new(img.mode, dim) as canvas:
- for nx in range(img.size[0]):
- for ny in range(img.size[0]):
- y = (ny - nx * a) % width
- x = (nx - y * b) % height
- canvas.putpixel((y, x), img.getpixel((ny, nx)))
- canvas.show()
- canvas.save('falg(1).png')
得到一张png图片,flag就在图片上:DASCTF{751476c0-6cff-497f-9541-83ede0ebc5a0}
下载文件,这个压缩包解压时间可能有点久。解压后得到10w个txt文本。
文本内容:
其中有个start.txt文本,二进制数据应该就从start开始,用脚本得到压缩包。
- import re
- from binascii import *
-
-
- tmp_filename = 'start.txt'
- bin_data = ''
- while True:
- try:
- file_path = './BinDunDun/' + tmp_filename
- with open(file_path) as f:
- content = f.read()
- next_file = re.findall(r'\w{10}\.txt', content)
- if next_file != []:
- tmp_filename = next_file[0]
- bin_data += content[:content.find(' ')].zfill(16)
- else:
- print(file_path)
- break
- except:
- break
-
- hex_data = ''
- with open('BinDun.zip', 'wb') as f1:
- for i in range(0, len(bin_data), 8):
- hex_data += '{:02x}'.format(int(bin_data[i:i+8], 2))
- f1.write(unhexlify(hex_data))
解压后,得到一个pyc和一个无拓展名的文件,修改无拓展名的文件的文件头可以得到一个jpg图片。
pyc要用剑龙去解,得到BingD@nD@n_in_BeiJing_Winter_Olympics,
看大佬的wp说是jpg隐写,用jphs05解出REFTQ1RGe0dvb2RfSm9kX0dpdmVfVGhlX0ZGRkZMQGdfVG9fWW91IX0=
base64解码得到flag:DASCTF{Good_Jod_Give_The_FFFFL@g_To_You!}
文章脚本来源:https://blog.csdn.net/mochu7777777/category_9858482.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。