buuctf-Misc 题目解答分解109-111

109.[CFI-CTF 2018]webLogon capture

流量包分析, wireshark 打开

 就这几个数据包,追踪http

进行url 解码

URL网址解码器 - 在线网址解码

 

得到flag CFI{1ns3cur3_l0g0n}

110.[GKCTF 2021]excel 骚操作

 

下载 excel 文件 ,打开

 

发现点击其他地方,是有数据的 数字1

excel据说有个好玩的点 如果单元格类型为"…;"时,excel会隐藏单元格中的数字

点击一个单元格,右键 快速分析

 

 

扩展完整个表格

 

全选 点击格式,修改行高和列宽

 

 

修改颜色为黑色

 

然后用中国编码APP 扫码

 

flag flag{9ee0cb62-f443-4a72-e9a3-43c0b910757e}

111.[MRCTF2020]pyFlag

 

解压压缩包里面是 三张图片

 

每一个图片打开后就显示是有一个压缩包的,而且还分了3部分,给了编号

本来以为压缩包分卷压缩

 

但是发现改后缀就显示压缩包损坏。正常分卷压缩不是这样的。根据010 editor 的显示 每一个图片的压缩包内容是不完整的。

因此 ,需要拼接 这三张图片 压缩包的内容。

新建一个hex 文件

 

 

保存为1.zip

 

 

但是需要密码 ,使用 zip 破解工具

 

得到密码 1234

 flag 里面是一串 编码

提示 进行 0x10 为16进制,10进制为16,根据提示 进行了 base16,base32,base64,base85 编码 ,但是顺序不知道

用脚本去试

import re
import base64
base = "G&eOhGcq(ZG(t2*H8M3dG&wXiGcq(ZG&wXyG(j~tG&eOdGcq+aG(t5oG(j~qG&eIeGcq+aG)6Q<G(j~rG&eOdH9<5qG&eLvG(j~sG&nRdH9<8rG%++qG%__eG&eIeGc+|cG(t5oG(j~sG&eOlH9<8rH8C_qH9<8oG&eOhGc+_bG&eLvH9<8sG&eLgGcz?cG&3|sH8M3cG&eOtG%_?aG(t5oG(j~tG&wXxGcq+aH8V6sH9<8rG&eOhH9<5qG(<E-H8M3eG&wXiGcq(ZG)6Q<G(j~tG&eOtG%+<aG&wagG%__cG&eIeGcq+aG&M9uH8V6cG&eOlH9<8rG(<HrG(j~qG&eLcH9<8sG&wUwGek2)"
pattern1 = "^[0-9A-F]+$"
pattern2 = "^[A-Z2-7=]+$"
pattern3 = "^[A-Za-z0-9+/=]+$"
def basedecode(content: str,type: int):
    if type == 1:
        return base64.b16decode(content)
    elif type == 2:
        return base64.b32decode(content)
    elif type == 3:
        return base64.b64decode(content)
    elif type == 4:
        return base64.b85decode(content)
    else:
        print("no")
def get_type(content: str):
    try:
        if re.match(pattern1,content.decode()) is not None:
            return 1
    except:
        print("not16")
    try:
        if re.match(pattern2,content.decode()) is not None:
            return 2
    except:
        print("not32")
    try:
        if re.match(pattern3,content.decode()) is not None:
            return 3
    except:
        print("not64")
    return 4
content = base
while(True):
    type = get_type(content)
    content = basedecode(content,type)
    print(content)

在线运行Python(3.8.1) 在线运行一下

 

得到flag

MRCTF{Y0u_Are_4_p3rFect_dec0der} 

 

  • 7
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值