BUUCTF-Misc(151-160)

Muneyoshi發表於2024-06-16

[DDCTF2018]第四擴充套件FS

binwalk提取一下

image-20240614174405931

然後提取出來一個加密壓縮包,密碼就在圖片的備註裡Pactera

image-20240614174522119

提取出來是一個文字

image-20240614174559100

字頻統計得到flag

image-20240614174638856

flag{huanwe1sik4o!}

Beautiful_Side

010editor開啟,發現一個png檔案,我們提取出來

image-20240614220024822

發現是半張二維碼

image-20240614220044744

然後開啟QRazyBox - QR Code Analysis and Recovery Toolkit (merri.cx)去補全,先建立一個空白的二維碼

image-20240614224745549

然後載入圖片

image-20240614224817921

對著描點,然後掃描,我這裡沒搞

flag{OQWIC_4DS1A_S034S}

[INSHack2017]remote-multimedia-controller

追蹤流然後找到一大串base64

image-20240615191746740

然後Cyberchef解密

image-20240615191820207

[WMCTF2020]行為藝術

開啟圖片是一個壓縮包的十六進位制,經典 50 4B 03 04,但是好像少了

image-20240615192042198

我們改一下寬高,風二西的寬高一把梭工具

image-20240615192238890

然後手動出來吧

504B0304140000000800DB93C55086A3
9007D8000000DF01000008000000666C
61672E74787475504B0E823010DD9370
8771DDCCB0270D5BBD0371815A9148AC
6951C2ED9D271F89C62E2693D7F76BB7
DE9FC80D2E6E68E782A326D2E01F81CE
6D55E76972E9BA7BCCB3ACEF7B89F7B6
E90EA16A6EE2439D45179ECDD1C5CCFB
6B9AA489C1218C92B898779D765FCCBB
58CC920B6662C5F91749931132258F32
BBA7C288C5AE103133106608409DAC41
9F77241A3412907814AB7A922106B8DE
D0D25AEC8A634929025C46A33FE5A1D3
167A100323B1ABEE4A7A0708413A19E1
7718165F5D3E73D577798E36D5144B66
315AAE315078F5E51A29246AF402504B
01021F00140009000800DB93C55086A3
9007D8000000DF010000080024000000
000000002000000000000000666C6167
2E7478740A0020000000000001001800
4A0A9A64243BD601F9D8AB39243BD601
2D00CA13223BD601504B050600000000
010001005A000000FE00000000000000

然後010editor 新建十六進位制檔案,給這弄進去就好了,儲存為zip檔案

然後解壓需要密碼,發現這個是偽加密,我們改一下就好了

image-20240615192457602

然後就解壓出來一個flag.txt

image-20240615192531703

然後這個就是brainfuck解密

image-20240615192637537

[XMAN2018排位賽]AutoKey

參考:

[XMAN2018排位賽]AutoKey_[xman2018排位賽]autokey(autokeycipher)-CSDN部落格

開啟流量包發現是usb流量

image-20240615192800042

然後我們試試mumuzi的鍵鼠流量工具

image-20240615195004299

MPLRVFFCZEYOUJFJKYBXGZVDGQAURKXZOLKOLVTUFBLRNJESQITWAHXNSIJXPNMPLSHCJBTYHZEALOGVIAAISSPLFHLFSWFEHJNCRWHTINSMAMBVEXPZIZ

然後就是autokey爆破,需要使用breakautokey這個工具,網上可以搜一下怎麼搞得

image-20240615200759847

然後就是

flag{JHAWLZKEWXHNCDHSLWBAQJTUQZDXZQPF}

[INSHack2018]not so deep

參考:[BUU MISC INSHack2018 so deep 音訊隱寫 - Nemuzuki - 部落格園 (cnblogs.com)](https://www.cnblogs.com/nemuzuki/p/17205719.html)

直接Audacity開啟頻譜圖

image-20240615201044614

發現這個只有一半flag,還有一半在哪呢

然後提示了deepsound隱寫,開啟需要密碼

image-20240615202326764

我們先看一下這個wav的雜湊值,過會john爆破

#! python3
 
import logging
import os
import sys
import textwrap
 
def decode_data_low(buf):
  return buf[::2]
 
def decode_data_normal(buf):
  out = bytearray()
  for i in range(0, len(buf), 4):
    out.append((buf[i] & 15) << 4 | (buf[i + 2] & 15))
  return out
 
def decode_data_high(buf):
  out = bytearray()
  for i in range(0, len(buf), 8):
    out.append((buf[i] & 3) << 6     | (buf[i + 2] & 3) << 4 \
             | (buf[i + 4] & 3) << 2 | (buf[i + 6] & 3))
  return out
 
 
def is_magic(buf):
  # This is a more efficient way of testing for the `DSCF` magic header without
  # decoding the whole buffer
  return (buf[0] & 15)  == (68 >> 4) and (buf[2]  & 15) == (68 & 15) \
     and (buf[4] & 15)  == (83 >> 4) and (buf[6]  & 15) == (83 & 15) \
     and (buf[8] & 15)  == (67 >> 4) and (buf[10] & 15) == (67 & 15) \
     and (buf[12] & 15) == (70 >> 4) and (buf[14] & 15) == (70 & 15)
 
def is_wave(buf):
  return buf[0:4] == b'RIFF' and buf[8:12] == b'WAVE'
 
 
def process_deepsound_file(f):
  bname = os.path.basename(f.name)
  logger = logging.getLogger(bname)
 
  # Check if it's a .wav file
  buf = f.read(12)
  if not is_wave(buf):
    global convert_warn
    logger.error('file not in .wav format')
    convert_warn = True
    return
  f.seek(0, os.SEEK_SET)
  # Scan for the marker...
  hdrsz = 104
  hdr = None
  while True:
    off = f.tell()
    buf = f.read(hdrsz)
    if len(buf) < hdrsz: break
    if is_magic(buf):
          hdr = decode_data_normal(buf)
          logger.info('found DeepSound header at offset %i', off)
          break
    f.seek(-hdrsz + 1, os.SEEK_CUR)
  if hdr is None:
    logger.warn('does not appear to be a DeepSound file')
    return
  # Check some header fields
  mode = hdr[4]
  encrypted = hdr[5]
  modes = {2: 'low', 4: 'normal', 8: 'high'}
  if mode in modes:
    logger.info('data is encoded in %s-quality mode', modes[mode])
  else:
    logger.error('unexpected data encoding mode %i', modes[mode])
    return
  if encrypted == 0:
    logger.warn('file is not encrypted')
    return
  elif encrypted != 1:
    logger.error('unexpected encryption flag %i', encrypted)
    return
  sha1 = hdr[6:6+20]
  print('%s:$dynamic_1529$%s' % (bname, sha1.hex()))
if __name__ == '__main__':
  import argparse
  parser = argparse.ArgumentParser()
  parser.add_argument('--verbose', '-v', action='store_true')
  parser.add_argument('files', nargs='+', metavar='file',
    type=argparse.FileType('rb', bufsize=4096))
  args = parser.parse_args()
  if args.verbose:
    logging.basicConfig(level=logging.INFO)
  else:
    logging.basicConfig(level=logging.WARN)
  convert_warn = False
  for f in args.files:
    process_deepsound_file(f)
  if convert_warn:
    print(textwrap.dedent.rstrip(), file=sys.stderr)

然後成功的到hash值,然後john破解密碼

image-20240615202529416

得到密碼就是azerty,提取出來這個隱藏檔案

image-20240615202640400

最後拼一下這個flag

flag{Aud1o_st3G4n0_1s_4lwayS_Th3_S4me}

[QCTF2018]X-man-Keyword

參考:[QCTF2018]X-man-Keyword-CSDN部落格

開啟圖片就是一個

image-20240615203543327

然後提取檔案提取到zlib檔案,推測可能是lsb隱寫,我們就提取一下

image-20240615203737946

然後BUUCTF少了提示

Welcome to QCTF

hint1:把給出的keyword放到前面試試

hint2:一種把關鍵詞提前的置換

我們直接隨波逐流梭哈(但是好像得遵從大小寫,最後改一下大小寫)

image-20240615204016444

flag{cCgeLdnrIBCX9G1g13KFfeLNsnMRdOwf}

[INSHack2017]10-cl0v3rf13ld-lane-signal

foremost提取出來兩個圖片

image-20240616192949013

image-20240616193012074

然後第一張圖放大發現了東西

image-20240616193142469

.... . .-.. .--. -- .
helpme

然後看原檔案png後面還有一個檔案

image-20240616193441551

我們給他弄出來,儲存為ogg字尾

image-20240616193617049

然後audacity開啟,發現是莫斯密碼

image-20240616193706686

.. -. ... .- -.--. -- ----- .-. ..... ...-- ..--.- .-- .---- .-.. .-.. ..--.- -. ...-- ...- ...-- .-. ..--.- ....- --. ...-- -.-.-- -.--.-

然後網站解密線上摩斯密碼翻譯器 (lddgo.net)

image-20240616194023528

[MRCTF2020]尋找xxx

聽了一下音訊,感覺是手機撥號的音,我們去網站識別一下Detect DTMF Tones (dialabc.com)

image-20240616195046011

18684221609

然後這裡是發公眾號的,搜了wp,我這裡就直接放flag

flag{Oh!!!!!_Y0u_f1nd_my_secret}

一路到底

參考:BUUCTF:一路到底_buuctf 一路到底-CSDN部落格

一堆文字文件,然後發現前面的數字暗藏玄機

image-20240616200616780

轉成16進位制

image-20240616200732117

然後再看提示的下一個檔案,發現03 04 少了一個0,我們需要補全

image-20240616200824372

然後就用師傅的指令碼

import binascii

hexdata = ''
with open('./files/start.txt') as f:
    cont = f.read()
    nexttxt = cont[-36:]
    hexdata += '{:04x}'.format(int(cont[0:cont.find(':')-1]))
    while True:
        path = './files/' + nexttxt
        try:
            with open(path) as f:
                cont = f.read()
                nexttxt = cont[-36:]
                hexdata += '{:04x}'.format(int(cont[0:cont.find(':')-1]))
        except:
            break

with open('flag.zip','wb') as f:
    f.write(binascii.unhexlify(hexdata))

然後不想等了,出來就是一個壓縮包,爆破解密,記得勾選數字和小寫字母,然後出來檔案頭是個錯誤的,改成jpg