点击此处 获得更好的阅读体验
WriteUp来源 
纵横网络靶场社区 
题目描述 
请尝试分析出当前文件的flag。Flag格式为:flag{}
 
题目考点 
解题思路 
解压出来是⼀个sm.bin,使⽤foremost解出来⼀个png
继续对png进⾏foremost 最后得到floors和passcode
floors是不知道多少层的zip套娃,上脚本。
解密脚本poc.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 import  zipfileimport  reimport  osname = 'floors'  table = "012345679"  def  get_dic (passcode_file) :    dic = []     with  open(passcode_file, "r" ) as  f:         line = f.read()[25 :]         for  i in  table:             dic.append(line.replace("?" , i))     return  dic while  True :    new_path = ""      fz = zipfile.ZipFile(os.getcwd() + "/floors.zip" , "r" )     for  pwd in  get_dic(os.getcwd() + "/passcode.txt" ):         try :             fz.extractall(pwd=pwd, path=pwd)             print("Found Password: "  + pwd)             new_path = pwd             break          except  RuntimeError:             pass      fz.close()     cmd = "cd "  + new_path + "/"      new_path = os.getcwd() + "/"  + new_path     os.chdir(new_path) 
中间爆出差不多三⼗层的时候python脚本会报错,到了报错的地⽅就⾃⼰⼿动爆⼀次,然后再上脚本
⾃⼰⼿动爆三次就会出结果了。
Flag 
1 flag{thehighestbuildinginChinahas119floors}