justpaint
1、题目信息
FLAG被我弄丢了>_<不过,JBN应该记得,或许你能从他那得到一些线索。
附件是压缩包有密码。。
2、解题方法
暴力破解压缩包,测试长度为6,选择所有数字
得到密码后解压
train.py
import torchimport torch.nn as nnimport numpy as npimport matplotlib.pyplot as pltfrom PIL import Imageimport cv2class JBN(nn.Module): def __init__(self): super(JBN, self).__init__() self.main = nn.Sequential( nn.Linear(100, 256), nn.ReLU(), nn.Linear(256, 512), nn.ReLU(), nn.Linear(512, 452 * 280), nn.Tanh() ) def forward(self, x): img = self.main(x) img = img.view(-1, 452, 280) return imgdef watch_flag(img): flag = cv2.imread('./data/data/flag.png') gray_image = cv2.cvtColor(flag, cv2.COLOR_BGR2GRAY) flag_tensor = torch.from_numpy(np.array(gray_image)) flag_tensor = flag_tensor.unsqueeze(0).transpose(1, 2) img_tensor = img flag_tensor = flag_tensor.unsqueeze(0) img_tensor = img_tensor.unsqueeze(0) loss_fn = torch.nn.MSELoss() loss = loss_fn(flag_tensor.float(), img_tensor) return lossjbn = JBN()g_optimizer = torch.optim.Adam(jbn.parameters(), lr=0.001)min_loss = float('inf')for epoch in range(10): random_noise = torch.randn(1, 100) jbn_img = jbn(random_noise) g_optimizer.zero_grad() g_loss = watch_flag(jbn_img) g_loss.backward() g_optimizer.step() with torch.no_grad(): if g_loss < min_loss: min_loss = g_loss torch.save(jbn.state_dict(), 'jbn.pth')
还有一个jbn.pth
懒得看了,直接交给GPT看看能不能解
import torchimport torch.nn as nnimport numpy as npimport matplotlib.pyplot as pltfrom PIL import Imageimport cv2class JBN(nn.Module): def __init__(self): super(JBN, self).__init__() self.main = nn.Sequential( nn.Linear(100, 256), nn.ReLU(), nn.Linear(256, 512), nn.ReLU(), nn.Linear(512, 452 * 280), nn.Tanh() ) def forward(self, x): img = self.main(x) img = img.view(-1, 452, 280) return imgjbn = JBN()jbn.load_state_dict(torch.load('jbn.pth'))random_noise = torch.randn(1, 100)jbn_img = jbn(random_noise)jbn_img = jbn_img.squeeze().detach().numpy()jbn_img = (jbn_img + 1) / 2 # 将图像像素值范围从[-1, 1]转换为[0, 1]jbn_img = (jbn_img * 255).astype(np.uint8) # 将图像像素值转换为[0, 255]的整数jbn_img = cv2.resize(jbn_img, (280, 452)) # 调整图像大小为452x280flag_image = Image.fromarray(jbn_img)flag_image.save('flag.png')
得到flag图片,需要翻转一下,放到PS里垂直翻转画布即可
NoPasswd
1、题目信息
小C收到了一个加密的word文档,但是苦于没有密码,你能帮他解开吗?
2、解题方法
有个加密文档,所以要破解密码,010打开分析一下
拉到尾部范围内也是有很多字符串信息,其中有一段十六进制,但这些都解不出来没啥用,仔细往上看可以发现一些宏的现象。
所以我们可以用oletools提取出vba脚本。
oletools是一个python工具包,用于分析Microsoft OLE2文件,如Microsoft Office文档或Outlook消息,主要用于恶意软件分析、取证和调试。
其中的 olevba 用来从文件中提取和分析VBA宏代码,示例:
# 扫描单个文件olevba file.doc# 扫描单个文件 只显示VBA代码,不分析olevba file.doc -c# 扫描单个文件 显示解码之后的混淆字符串olevba file.doc --decode# 扫描单个文件 显示经过字符串反混淆之后的VBA宏代码olevba file.doc --reveal
了解之后我们提取一下
olevba attachment.doc
得到
Sub XOREncryptFile() Dim numbers(8) As Integer numbers(0) = 19 numbers(1) = 71 numbers(2) = 122 numbers(3) = 99 numbers(4) = 65 numbers(5) = 111 numbers(6) = 43 numbers(7) = 67 Dim CurrentDirectory As String CurrentDirectory = ".\" If Dir(CurrentDirectory & "abc") = "" Then Exit Sub End If Dim FileNumber As Integer FileNumber = FreeFile Open CurrentDirectory & "abc" For Binary Access Read Write As #FileNumber Dim FileContent As String FileContent = Input$(LOF(FileNumber), #FileNumber) Close #FileNumber Dim EncryptedContent As String For i = 1 To Len(FileContent) EncryptedContent = EncryptedContent & Chr(Asc(Mid(FileContent, i, 1)) Xor numbers((i - 1) Mod 8)) Next i FileNumber = FreeFile Open CurrentDirectory & "enc" For Binary Access Write As #FileNumber Put #FileNumber, , EncryptedContent Close #FileNumber End Sub
仔细分析发现是xor,而被xor的字符串感觉像是文档最下面的那一串十六进制,总觉得这串肯定有用
于是我们去解一下看看,注意这里我们通过vba脚本可以得到“13477a63416f2b43”这个就是异或的key
然后得到密码去打开文档得到信息
UEsDBBQACQAIAFZ/RVfYoRV90yAAAJUhAAAEAAAAZmxhZy5wbme1Wvc3HM4Wl0TiKwUJUUIiBRuiR7DKCtFWWdFZLVr0tnpPEZ1NdLFL9LJ6t1jRIgiy+tqou4LVgtVZz/edV/6Ad979Yc7cmTtn5jMz98znzkzUS4jKjat3rlJRUd0AqyrqUFFRA87zcn9dOU9HznLkqajuU4EV5fX8EOtIaRgBfSs80BWZr0pnan6h9SIu6lHhYNFLCI/n8g/a21BcXjwizfRt3btiWo0NJZbRDC7VBdyXvDPUQuvSQaSzzJ3pOJ7nJ1Dav6j+LfcZzq6ZUf1HTMVVIf+te/w/K2cfBP+V/6KmzaToDzn007C+g7VnQitSUc2xcAH+Wff15uWBQi3y1v6f1IweOTKoc21SQkm8sGHCDsrPfSYCcdgFWQoxUlG5vyWGAfZwGwS58qez77CRQc37goeP8mZktSN9hvpfzz5ldnGdnV307N+QkWkM2ljZfxTa2ufh8VGiQHPfvZYAXFEuE8w327IcUexWdLtbZ4yzsNv+XVmKnwEFlrMU8jNLkuH+pjf0J84EHfxl5EOuGyRcy/7ifKToO1za9dNy+9pa9dcvlmS3+QWVB4Gg/IbQCfKfQGXG1Ic0pMDaBEZbgszdQmxgU3YGe87qKg0azRlzxbbcRTwfPwH1dzNfxquPG0smH7K3hvCXDLYkR+YcfDLn4IVq25B399Q4O4qLm+qQJ8fQNhux1mBupPm40t6ekkXDaNZ0d8E0aIWwObv9+mgHNOLpbvXKzk2LPIXfuNkdFYDzOT38xZKnuNAkFLq839VgLWgfcqzI2RMqal/BsEsKulbHyAIY/LYg/we48m0cIys0tVqdvO86Epnj6vkBraStIRQ6M71nWCMM8aL8aaSggSMvIMb8BxNyex7PHps1dCafuf5kqei1kpG9QN4WmBpfoBXsLbBGmxSdiht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+8D24+OFyohqR2YTZBcA6YjC3KUUhdCmZDvqeC8F0bR/I63ujh05Fsuvv9c3jjFkJxdim9drhkp+1x5TgcH3SaXc4cO1HkyhnquX4G0feVTj0098WtJ2lY8MzeL2rgbI0IQNLD8RGBzDZ0ba7scz6mFtApRJyx1ukZImjmUGbyAXTRluDzg1uPFKrTXS0v1L1HEkVmm785QOwEAB23AC8+Flb30D1mAibpUVBde/v0X4NX3d6Ca+tmL/7J/mfslq6/HjdzmEkmkbnz8bWKMnsRvvmTFeuFfBsI8gdLQbMHIeyvmnizXExjnclgHzItg9/u30781NIgh7ZJsVXX/Zfvm1qKvbjVwoLCBvOonR5PcFBW4vtk+l8E4t/29IK695tvYTcd/mbpvSGYaWi5SN8o4D6Vf+Vfhz/vRAxYHlKUWMSoEVW6vdHBFiO6nYCx+ieZUQG4GNhLI/u+OZG8qfUpTkwUNd57+IP1l7LxK9W95/rKy7NJ/NHl52MX/l3Iop8mOozaHNz/7WwUrQRTLFV69+wdQSwECPwAUAAkACABWf0VX2KEVfdMgAACVIQAACAAkAAAAAAAAACAAAAAAAAAAZmxhZy5wbmcKACAAAAAAAAEAGAB4FtrCYffZARc9ZA1i99kBhPTMwmH32QFQSwUGAAAAAAEAAQBaAAAA+SAAAAAA
百度一下可以知道这是一串zip的base64形式,我们转成zip保存,但发现有密码。。。010看一波
我们发现第A列下第二行处04这个地方文件名长度有问题,我们给它改回去改成08
但还是需要密码,我们用伪加密解看看
成功解决,解压后是一张图片内容就是flag
SecretZip
1、题目信息
Do you know the classic encryption method for zip?
2、解题方法
明文攻击,尝试后发现所给的key文件就是经过压缩的secret key.zip的前半段,于是直接拿来用
.\bkcrack -C purezip.zip -c "secret key.zip" -p key -o 0 >1.log
得到密钥e63af7cc 55ef839d dc10b922,直接解压
.\bkcrack -C purezip.zip -c "secret key.zip" -k e63af7cc 55ef839d dc10b922 -d 1.zip
注意此时的zip是压缩之后的,需要解压一下,然后cyberchef里面使用raw inflate解一下
压缩包注释提示password is two bytes
直接zip2john和hashcat进行爆破,得到密码为$HEX[9c07]
随便写个脚本解压,然后里面给了一串密钥,结合zpaq文件尾的提示,一眼丁真直接爆
.\bkcrack -k e48d3828 5b7223cc 71851fb0 -r 3 ?b
得到密码
MD5再用bandizip解开zpaq压缩包即可。
justlisten
1、题目信息
听听这是什么
2、解题方法
我们先扫一下hint.png
明显是汉信码,但在线工具扫不出来,然后发现还有一个可以扫“中国编码APP”下载一下APP扫就行了
得到密码“0urS3cret”我们利用ourSecret来解bmp文件,导入文件,输入密码得到txt文件。
这里为什么用这个工具,因为密码的提示以及文件的名字就可以想到。
打开txt得到
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_}{-?!
像是某种表。。先不管它了看看WAV吧
音频的话试了好多发现使用Sonic Visualiser可以,下载官网:https://www.sonicvisualiser.org/
打开一看就是十进制,右上方是设置。
我们需要提取十进制数据,左上角导出图片然后写脚本读像素
from PIL import Imageimg = Image.open('1.png')flag = []for x in range(58,6561,17): for y in range(868): col = img.getpixel((x,y))[0] if(col >= 210): flag.append(y) breakflgg = []for i in flag: if(i < 250): print(0,end='') elif(i < 280): print(1,end='') elif(i < 320): print(2,end='') elif(i < 350): print(3,end='') elif(i < 390): print(4,end='') elif(i < 430): print(5,end='') elif(i < 470): print(6,end='') elif(i < 520): print(7,end='') elif(i < 580): print(8,end='') else: print(9,end='')
然后得到十进制数据
0900030907000309100003100007100307100022277031005192203203432284426284735274836292742424842463147282734424837362942334460720080624061811100213180401000920140308111000181321001411220513021020010006211814083733362813100301092108201804080511070022131021010910032111041881000051310002215140514150005142926442845316448075218191108130662196162281413321042462081305141712001952141367676763
根据我们第一步解出来的txt文件中的表猜测可能是每两位int一下后再去表里找相应的字符,如果超出范围就舍去。
table = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_}{-?!"a = "0900030907000309100003100007100307100022277031005192203203432284426284735274836292742424842463147282734424837362942334460720080624061811100213180401000920140308111000181321001411220513021020010006211814083733362813100301092108201804080511070022131021010910032111041881000051310002215140514150005142926442845316448075218191108130662196162281413321042462081305141712001952141367676763"for i in range(len(a)//2): try: ii = a[2*i:2*i+2] print(table[int(ii)],end='') except: continue
但只得到了右半边的flag
脑洞一下,删掉第一个0再转一下,得到了另一半flag,为什么这么干呢?我们可以分析下第一次得到的结果“{Q2qSvkE?vqwPHvey_informat1on!!!}”,明显我们可以发现前面的“Q2qSvkE?vqwPHvey”肯定不全是flag,一般我们得到的flag都是有一定意义的(大部分形式上都可以翻译出来)为什么得到的不全是flag呢?因为我们刚才也说了两位一组超出范围就舍去所以肯定有出入。因此我们可以通过控制十进制前面数字的增减来查看情况,经检验发现把开头0删去可以得到flag前缀“DASCTF{”,那么也就是说这样做是正确的。
经过上面两次结果我们可以拼接出flag大概形式
DASCTF{Wh1stling_t0_ConGkQUuEZPubvPK Q2qSvkE?vqwPHvey_informat1on!!!}
我们再根据意义来分析一下最终可得正确flag
DASCTF{Wh1stling_t0_Convey_informat1on!!!}