ruye07

导航

BUUCTF刷题MISC[九] (89-96)

刷题随笔,不足的地方望大佬指正

刷题网址BUUCTF:https://buuoj.cn/challenges
c90547438437b196ad2b0e046ecf0fe30fe46749ae9d1170edbf02c2833305e1

目录

image

[WUSTCTF2020]girlfriend

Audacity打开来听到是拨号的声音
没见过这种,上网下了大佬的dtmf2num工具
https://link.csdn.net/from_id=105412940&target=http://aluigi.altervista.org/mytoolz/dtmf2num.zip
image

把得到的DTMF numbers放九格输入法里看看,参照博主的手机

f709aea9d910b09edcc5ceddd72e1388

不怎么用九格,这里找的豆包
image
image

flag{youaremygirlfriends} (为什么要用s?)

[SUCTF2018]followme

导出http
发现貌似在爆破login密码
image
ubuntu打开grep -r 'CTF'
image

flag{password_is_not_weak}

[DDCTF2018](╯°□°)╯︵ ┻━┻

image
十六进制转文本得到这东西
image
由于ascii的范围是0-127,十六进制转为十进制之后再减去128,转为文本

image

flag{922ab9974a47cd322cf43b50610faea5}

百里挑一

从流量中http导出了一百多张图片

image

在utunbu上用exiftool和grep指令找flag

image

后来发现可以直接在分组字节流查到半个flag
image
再用id查找

image

2 6 a 3 c 0 5 8 9 d 2 3 e d e e c }

flag{ae58d0408e26e8f26a3c0589d23edeec}

[MRCTF2020]千层套路

image

之前写过这种的,解压密码就是自己的名字,手动解压显然解不完,弄脚本自己解压就行

import zipfile
import os
import shutil


def extract_zip_layer(zip_path, extract_dir):
    """
    解压单个ZIP文件(密码=文件名),返回解压后新的ZIP文件路径
    :param zip_path: 当前要解压的ZIP文件路径
    :param extract_dir: 解压目录
    :return: 新的ZIP文件路径/None(无新ZIP时)
    """
    # 1. 获取ZIP文件名(不含后缀)作为密码
    zip_name = os.path.splitext(os.path.basename(zip_path))[0]
    password = zip_name.encode('utf-8')  # ZIP密码需为bytes格式

    # 2. 创建解压目录(避免重复)
    os.makedirs(extract_dir, exist_ok=True)

    try:
        # 3. 解压ZIP文件(密码=文件名)
        with zipfile.ZipFile(zip_path, 'r') as zf:
            # 设置密码并解压所有文件
            zf.extractall(pwd=password, path=extract_dir)
            print(f" 解压成功:{zip_path} | 密码:{zip_name}")

            # 4. 查找解压后目录中的ZIP文件(找下一层)
            new_zip_path = None
            for root, dirs, files in os.walk(extract_dir):
                for file in files:
                    if file.lower().endswith('.zip'):
                        new_zip_path = os.path.join(root, file)
                        # 找到第一个ZIP就返回(千层ZIP通常只有一个下一层)
                        return new_zip_path
            # 无新ZIP文件,返回None
            return None
    except zipfile.BadZipFile:
        print(f" 错误:{zip_path} 不是有效的ZIP文件")
        return None
    except RuntimeError as e:
        if "password" in str(e).lower():
            print(f" 密码错误:{zip_path} | 尝试密码:{zip_name}")
        else:
            print(f" 解压失败:{zip_path} | 原因:{e}")
        return None
    except Exception as e:
        print(f" 处理失败:{zip_path} | 原因:{e}")
        return None


def extract_all_layers(initial_zip, base_extract_dir="zip_extract"):
    """
    递归解压千层ZIP,直到无新ZIP文件
    :param initial_zip: 初始ZIP文件路径
    :param base_extract_dir: 基础解压目录
    """
    current_zip = initial_zip
    layer = 1  # 记录解压层数

    # 检查初始ZIP是否存在
    if not os.path.exists(current_zip):
        print(f" 初始ZIP文件不存在:{current_zip}")
        return

    print(f"===== 开始解压千层ZIP(初始文件:{current_zip})=====")

    while current_zip:
        # 每层解压到独立目录(避免文件覆盖)
        current_extract_dir = os.path.join(base_extract_dir, f"layer_{layer}")
        # 解压当前层,获取下一层ZIP路径
        next_zip = extract_zip_layer(current_zip, current_extract_dir)

        # 清理:将下一层ZIP移到基础目录(方便后续处理),避免多层嵌套查找
        if next_zip:
            new_next_zip = os.path.join(base_extract_dir, os.path.basename(next_zip))
            shutil.move(next_zip, new_next_zip)
            current_zip = new_next_zip
            layer += 1
            print(f" 进入下一层(第{layer}层):{current_zip}")
        else:
            print(f"\n 解压完成!共解压 {layer} 层,最终文件在:{current_extract_dir}")
            current_zip = None


# ===================== 脚本运行入口 =====================
if __name__ == "__main__":
    # 配置:修改为你的初始ZIP文件路径
    INITIAL_ZIP_PATH = r"E:\attachment\0573.zip"

    # 开始递归解压
    extract_all_layers(INITIAL_ZIP_PATH)

    # 防止窗口闪退
    input("\n按回车键退出...")

image
image
打开是一个文本

image

转换成二维码,我用的是随波逐流
得到MRCTF{ta01uyout1nreet1n0usandtimes}

flag{ta01uyout1nreet1n0usandtimes}

[BSidesSF2019]zippy

分组字节流搜索flag发现flag.zip字样
image

追踪流
image

分析一下这张图,大概就是说通过 nc 监听端口接收远程发送的 flag.zip 文件,然后用指定密码解压得到 flag.txt,解压密码是supercomplexpassword
用foremost分离
用密码解压得到CTF{this_flag_is_your_flag}

flag{this_flag_is_your_flag}

[MRCTF2020]CyberPunk

(读着像赛博朋克)
解压得到exe文件打开
image
拖到010查看
搜索MRCTF

image

MRCTFÛðÿ{We1cOm3_70_#_securÚy}换成flag输入发现错误
把日期改为2020/9/17,重新运行看看

image

MRCTF{We1cOm3_70_cyber_security}
flag{We1cOm3_70_cyber_security}

[UTCTF2020]basic-forensics

010打开jpeg文件
image
刚开始还以为是字频分析,后来发现搜索flag就行

image

flag{fil3_ext3nsi0ns_4r3nt_r34l}

posted on 2026-02-07 21:15  ruye07  阅读(261)  评论(0)    收藏  举报