首页 > 其他分享 >2020祥云杯网络安全大赛 MISC Writeup

2020祥云杯网络安全大赛 MISC Writeup

时间:2023-06-19 19:32:57浏览次数:46  
标签:docx DPT off struct Writeup self MISC flag 2020



文章目录

  • 签到
  • 进制反转
  • 到点了
  • xixixi
  • 带音乐家
  • Charles Sensor



签到

PS C:\Users\Administrator> php -r "var_dump(base64_decode('ZmxhZ3txcV9ncm91cF84MjY1NjYwNDB9'));"
string(24) "flag{qq_group_826566040}"

进制反转

题目描述:

电脑中到底使用的是什么进制呢?真是麻烦,有时候还是手机好用。结果用flag{}包住,并且全为大写

2020祥云杯网络安全大赛 MISC Writeup_进制


2020祥云杯网络安全大赛 MISC Writeup_ci_02


WinRAR打开显示文件头损坏,其次有加密,猜测RAR伪加密,使用010 Editor打开

2020祥云杯网络安全大赛 MISC Writeup_ci_03


文件结尾发现提示:flag is the song's name

2020祥云杯网络安全大赛 MISC Writeup_进制_04


接着找到第三块struct RarBlock block[0]下的struct FileHeadFlags HEAD_FLAGS

2020祥云杯网络安全大赛 MISC Writeup_ci_05


修改ubyte PASSWORD_ENCRYPTED的值为0

2020祥云杯网络安全大赛 MISC Writeup_bc_06


解压得到flag.wav,无法使用Audacity打开,就通过导入文件->导入->原始数据

2020祥云杯网络安全大赛 MISC Writeup_进制_07


听着很明显是歌声但是却是倒放,Ctrl+A全选,点击效果 > 反向(时间),然后再效果 > 改变速率,调节到一个正常歌曲的播放速度,然后经过降噪,消除咔嚓声等一系列操作,最后听歌识别

先推个在线识别歌曲网站:https://www.acrcloud.com/identify-songs-music-recognition-online/

2020祥云杯网络安全大赛 MISC Writeup_ci_08


听歌识曲识别不出来,就听歌词找吧,也挺快的,考验听力水平

歌名:《Too Good At Goodbyes》

flag{TOOGOODATGOODBYES}

到点了

题目描述:

我那么多遗憾,那么多期盼,你知道吗(下雨熊猫头

2020祥云杯网络安全大赛 MISC Writeup_进制_09


1.docx打开,勾选隐藏文字

2020祥云杯网络安全大赛 MISC Writeup_进制_10


2.docx有加密,根据1.docx提供的提示,使用Accent OFFICE Password Recovery爆破密码

2020祥云杯网络安全大赛 MISC Writeup_进制_11


2020祥云杯网络安全大赛 MISC Writeup_进制_12


先尝试爆破8位纯数字,毕竟8位字母数字就太多了,还不知道分不分大小写

2020祥云杯网络安全大赛 MISC Writeup_ci_13


爆破过程就不看了,时间太长了,直接贴结果,密码为:20201024

解开2.docx,全选标红,发现有一串AB字符,很明显应该是培根密码

2020祥云杯网络安全大赛 MISC Writeup_进制_14

AABBAABBBAABBBAAAABBABBABABAAAAABBAAABBBBAABBBAABABABBAAABAAAABAABAABBABAAAAABAA

培根在线解码:https://tool.bugku.com/peigen/

2020祥云杯网络安全大赛 MISC Writeup_bc_15

GOODNIGHTSWEETIE
goodnightsweetie

2020祥云杯网络安全大赛 MISC Writeup_进制_16


binwalk分离3.docx,得到一个4.zip,里面有一张4.bmp

2020祥云杯网络安全大赛 MISC Writeup_进制_17


4.bmp

2020祥云杯网络安全大赛 MISC Writeup_bc_18


bmp隐写,有密码,试了不是LSB,尝试使用wbs43open

2020祥云杯网络安全大赛 MISC Writeup_bc_19


2020祥云杯网络安全大赛 MISC Writeup_ci_20


2020祥云杯网络安全大赛 MISC Writeup_bc_21


密码:goodnightsweetie

2020祥云杯网络安全大赛 MISC Writeup_bc_22

flag{2ec9405ac7bcfb16f5fd494bcf21337c}

xixixi

题目描述:

室友最近沉迷y神,又氪又肝,还ghs。为了他的身体着想,我把他的s图整没了。但我明明删了脚本啊,为什么还能被他发现......8说了,医院的空调真舒服~

new.vhd

2020祥云杯网络安全大赛 MISC Writeup_进制_23


2020祥云杯网络安全大赛 MISC Writeup_bc_24


可以使用DiskGenius或者Win7的磁盘管理进行挂载,建议使用DiskGenius挂载

DiskGenius->磁盘->打开虚拟磁盘文件

2020祥云杯网络安全大赛 MISC Writeup_进制_25


kejin.png

2020祥云杯网络安全大赛 MISC Writeup_ci_26


以及还有两个Py脚本

import struct

class FAT32Parser(object):
	def __init__(self, vhdFileName):
		with open(vhdFileName, 'rb') as f:
			self.diskData = f.read()
		self.DBR_off = self.GetDBRoff()
		self.newData = ''.join(self.diskData)

	def GetDBRoff(self):
		DPT_off = 0x1BE
		target = self.diskData[DPT_off+8:DPT_off+12]
		DBR_sector_off, = struct.unpack("<I", target)
		return DBR_sector_off * 512

	def GetFAT1off(self):
		target = self.diskData[self.DBR_off+0xE:self.DBR_off+0x10]
		FAT1_sector_off, = struct.unpack("<H", target)
		return self.DBR_off + FAT1_sector_off * 512

	def GetFATlength(self):
		target = self.diskData[self.DBR_off+0x24:self.DBR_off+0x28]
		FAT_sectors, = struct.unpack("<I", target)
		return FAT_sectors * 512

	def GetRootoff(self):
		FAT_length = self.GetFATlength()
		FAT2_off = self.GetFAT1off() + FAT_length
		return FAT2_off + FAT_length

	def Cluster2FAToff(self, cluster):
		FAT1_off = self.GetFAT1off()
		return FAT1_off + cluster * 4

	def Cluster2DataOff(self, cluster):
		rootDir_off = self.GetRootoff()
		return rootDir_off + (cluster - 2) * 512
import struct
from xixi import FAT32Parser
from xixixi import Padding, picDepartList

def EncodePieces():
	global clusterList
	res = []
	Range = len(picDepartList)    # 58
	# GetRandomClusterList(n) - Generate a random cluster list with length n
	clusterList = GetRandomClusterList(Range)

	for i in range(Range):
		if i != Range - 1:
			newCRC = struct.pack("<I", clusterList[i+1])
			plainData = picDepartList[i][:-4] + newCRC
		else:
			plainData = picDepartList[i]

		# Show the first piece to him, hhh
		if i == 0:
			newPiece = plainData
		else:
			newPiece = ''
			key = clusterList[i] & 0xFE
			for j in plainData:
				newPiece += chr(ord(j) ^ key)
		# Padding() -- Fill to an integral multiple of 512 with \xFF
		res.append(Padding(newPiece))
	return res

参考上面给出的脚本进行还原,还原脚本参考的是Timeline Sec团队的脚本

原文地址:https://mp.weixin.qq.com/s/CP3-W8VcLokQNYMSbXw9wg

# -*- coding: utf-8 -*-
# @Project: Hello Python!
# @File   : exp
# @Author : Tr0jAn <[email protected]>
# @Date   : 2020-11-22
import struct
import binascii

class FAT32Parser(object):
  def __init__(self, vhdFileName):
    with open(vhdFileName, 'rb') as f:
      self.diskData = f.read()
    self.DBR_off = self.GetDBRoff()
    self.newData = ''.join(str(self.diskData))


  def GetDBRoff(self):
    DPT_off = 0x1BE
    target = self.diskData[DPT_off+8:DPT_off+12]
    DBR_sector_off, = struct.unpack("<I", target)
    return DBR_sector_off * 512


  def GetFAT1off(self):
    target = self.diskData[self.DBR_off+0xE:self.DBR_off+0x10]
    FAT1_sector_off, = struct.unpack("<H", target)
    return self.DBR_off + FAT1_sector_off * 512


  def GetFATlength(self):
    target = self.diskData[self.DBR_off+0x24:self.DBR_off+0x28]
    FAT_sectors, = struct.unpack("<I", target)
    return FAT_sectors * 512


  def GetRootoff(self):
    FAT_length = self.GetFATlength()
    FAT2_off = self.GetFAT1off() + FAT_length
    return FAT2_off + FAT_length


  def Cluster2FAToff(self, cluster):
    FAT1_off = self.GetFAT1off()
    return FAT1_off + cluster * 4


  def Cluster2DataOff(self, cluster):
    rootDir_off = self.GetRootoff()
    return rootDir_off + (cluster - 2) * 512

    
def read(n):
    global key
    binary = b''
    for i in vhd.read(n):
        binary += (i ^ (key & 0xFE)).to_bytes(length=1, byteorder='big', signed=False)
    return binary


FAT = FAT32Parser("new.vhd")
vhd = open("new.vhd", "rb")
vhd.seek(0x27bae00)  # 定位磁盘中图片位置
flag = open("flag.png", "wb")
flag.write(vhd.read(8))  # 写入png头
key = 0
while True:
    d = read(8)
    length, cType = struct.unpack(">I4s", d)
    print(length, cType)  # length为数据长度,cType为数据块类型
    data = read(length)
    CRC = struct.unpack(">I", read(4))[0]
    print(CRC)
    rCRC = binascii.crc32(cType + data) & 0xffffffff
    print(rCRC)
    rDATA = struct.pack(">I", length) + cType + data + struct.pack(">I", rCRC)
    flag.write(rDATA)
    if CRC != rCRC:  # CRC错误的IDAT数据块
        b_endian = struct.pack(">I", CRC)
        clusterList = struct.unpack("<I", b_endian)[0]
        print(clusterList)
        vhd.seek(FAT.Cluster2DataOff(clusterList))
        key = clusterList & 0xFE
    if cType == b"IEND":
        break

2020祥云杯网络安全大赛 MISC Writeup_ci_27

flag{0cfdd1ad80807da6c0413de606bb0ae4}

带音乐家

MIDI文件

2020祥云杯网络安全大赛 MISC Writeup_ci_28

Velato语言使用MIDI文件作为源代码,音乐的模式决定程序命令

官网下载编译器

http://velato.net/

2020祥云杯网络安全大赛 MISC Writeup_进制_29


2020祥云杯网络安全大赛 MISC Writeup_进制_30

Hello, World!

Doc1.rar注释有东西

2020祥云杯网络安全大赛 MISC Writeup_bc_31


2020祥云杯网络安全大赛 MISC Writeup_进制_32


摩斯,短的转为.,长的转为-

.- . ... -.- . -.-- ----. ..--- .---- ----. ..--- ...-- ..--- ...-- ..--- ..---
AESKEY9219232322

解压Doc1.rar,打开Doc1.docx(记得开启隐藏字符)

2020祥云杯网络安全大赛 MISC Writeup_bc_33

nvPrjrss1PyqAZB/14lkvJGTJ9l4rOfwJeqSqSHSqXU=

2020祥云杯网络安全大赛 MISC Writeup_进制_34

flag{mU51c_And_ch@ract0rs~}

Charles Sensor

等待大佬wp…orz


标签:docx,DPT,off,struct,Writeup,self,MISC,flag,2020
From: https://blog.51cto.com/u_16159500/6517109

相关文章

  • 2020全国大学生网安邀请赛暨第六届上海市大学生网安大赛Misc-Writeup
    文章目录签到pcappcapanalysis可乐加冰除了签到所有Misc题以上线到BMZCTF平台方便大家复现BMZCTF:http://bmzclub.cn/challenges签到{echo,ZmxhZ3t3MzFjMG1lNX0=}|{base64,-d}|{tr,5,6}Linux下直接运行即可flag{w31c0me6}pcapchallenge2.pcapng根据提示查看dnp3协议,以长度为排......
  • 2020全国大学生网安邀请赛暨第六届上海市大学生网安大赛-千毒网盘
    根目录/www.zip有源码index.php<htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width,initial-scale=1.0"><linkrel="stylesheet"h......
  • 2020 第四届强网杯 线上赛Misc_Writeup
    目录upload签到问卷调查miscstudyupload下载附件,打开是流量包文件,wireshark打开查看http的包,追踪一下很明显是POST上传的图片File->ExportObject->HTTP...将文件Saveall保存出来,得到如下:%5c有提示steghide隐藏steghide.php用notepad++打开去掉前面这四行,保存修改后缀为jpg或......
  • BUUCTF:[ACTF2020 新生赛]Upload
    题目地址:https://buuoj.cn/challenges#[ACTF2020%20%E6%96%B0%E7%94%9F%E8%B5%9B]Upload图片马,filename改为.phtmlhttp://7f46d4ae-8320-44f5-a608-db84399f39e5.node3.buuoj.cn/uplo4d/0094153d9fd2e4a052850a6d656cefb6.phtml......
  • 2022DASCTF Apr X FATE 防疫挑战赛 Writeup
    文章目录[MISC]SimpleFlow[MISC]熟悉的猫[MISC]冰墩墩[MISC]SimpleFlow首先tcp.streameq50中分析传入的执行命令的变量是$s,也就是参数substr($_POST["g479cf6f058cf8"],2)找到对应的参数,然后去掉前面两位字符解码即可cd"/Users/chang/Sites/test";zip-PPaSsZiPWorDfl......
  • BUUCTF: [MRCTF2020]Ezpop
    https://buuoj.cn/challenges#[MRCTF2020]Ezpop<?phpclassModifier{protected$var;publicfunctionappend($value){include($value);}publicfunction__invoke(){$this->append($this->var);}}classShow{......
  • 第四届“强网”拟态防御国际精英挑战赛MISC-mirror
    题目附件请自取链接:https://pan.baidu.com/s/18K00ClgwJsqmKphPmqMpHw提取码:6r3jfull.png使用010Editor打开出现CRC校验报错,猜测需要修复宽高,其次发现了文件末尾附加了镜像翻转的png字节流数据将附加数据提取出来另存为png文件,通过分析不难发现将字节流数据逆序然后每十六个字......
  • BUUCTF:[羊城杯 2020]image_rar
    binwalk分析xiao_mi2.mp4发现很多压缩包,压缩了很多图片将xiao_mi2.mp4修改后缀改为xiao_mi2.zip得到一个hint,但这个压缩包密码并不是指当前的zip压缩包继续往后看,解压这些图片之后发现里面只有65.jpg显示不正常010Editor打开65.jpg文件头ara!,非常类似rar压缩包的文件头Rar!,修......
  • BMZCTF:2020sdnisc-损坏的流量包
    http://bmzclub.cn/challenges#2020sdnisc-%E6%8D%9F%E5%9D%8F%E7%9A%84%E6%B5%81%E9%87%8F%E5%8C%851.pcapng无法使用wireshark打开可能破坏了pcapng的文件结构,但是应该不会破坏数据内容,尝试使用foremost看看能不能从这个数据包中分离出什么东西得到一个zip压缩包,解压得到key.tx......
  • BUUCTF:[UTCTF2020]sstv
    https://buuoj.cn/challenges#[UTCTF2020]sstvattachment.wavKali安装QSSTVapt-getinstallqsstvOptions->Configuration->Sound勾选Fromfile然后点击这个小按钮,选择attachment.wav开始解码flag{6bdfeac1e2baa12d6ac5384cdfd166b0}......