buuctf misc page 3

107 篇文章 4 订阅
39 篇文章 0 订阅

[HBNIS2018]低个头

键盘密码的一种
在这里插入图片描述

flag{CTF}

[HBNIS2018]caesar

凯撒加密
在这里插入图片描述
在这里插入图片描述

flag{flagiscaesar}

[SUCTF2018]single dog

010editor打开图片hex,尾部发现pk字符,另存位zip
在这里插入图片描述
解压后打开发现是aaencode
在这里插入图片描述
aaencode:http://www.hiencode.com/aaencode.html
在这里插入图片描述

我吃三明治

foremost分解出两张图片以为是盲水印,结果在两图的交界处找到base32的字符
在这里插入图片描述

在这里插入图片描述

[ACTF新生赛2020]NTFS数据流

跟题目名字一样考ntfs文件流
在这里插入图片描述

Mysterious

stegsolve打开图片发现bgr有图片,另存
在这里插入图片描述
发现图片只有一半,怀疑是修改了高度
在这里插入图片描述

import binascii
import struct
import sys

file = input("图片地址:")
fr = open(file,'rb').read()
data = bytearray(fr[0x0c:0x1d])
crc32key = eval('0x'+str(binascii.b2a_hex(fr[0x1d:0x21]))[2:-1])
#原来的代码: crc32key = eval(str(fr[29:33]).replace('\\x','').replace("b'",'0x').replace("'",''))
n = 4095
for w in range(n):
    width = bytearray(struct.pack('>i', w))
    for h in range(n):
        height = bytearray(struct.pack('>i', h))
        for x in range(4):
            data[x+4] = width[x]
            data[x+8] = height[x]
        crc32result = binascii.crc32(data) & 0xffffffff
        if crc32result == crc32key:
            print(width,height)
            newpic = bytearray(fr)
            for x in range(4):
                newpic[x+16] = width[x]
                newpic[x+20] = height[x]
            fw = open(file+'.png','wb')
            fw.write(newpic)
            fw.close
            sys.exit()

得到一个百度网盘的链接,里面有一个压缩包,解压后用查看ntfs文件流,并导出pyc文件

在这里插入图片描述
然后用在线pyc反编译工具进行反编译
网站: https://www.toolnb.com/tools/pyc.html
在这里插入图片描述
编写decode函数

import base64

def encode():
    flag = '*************'
    ciphertext = []
    for i in range(len(flag)):
        s = chr(i ^ ord(flag[i]))
        if i % 2 == 0:
            s = ord(s) + 10
        else:
            s = ord(s) - 10
        ciphertext.append(str(s))

    return ciphertext[::-1]
def decode(ciphertext):
    flag = ''

    for i in range(len(ciphertext)):
        #
        if i % 2 == 0:
            s = int(ciphertext[i]) - 10
        else:
            s = int(ciphertext[i]) + 10
        # s = s^i
        # flag+=(chr(s))
        print(chr(s^i),end='')
    print(flag)

ciphertext = [
 '96', '65', '93', '123', '91', '97', '22', '93', '70', '102', '94', '132', '46', '112', '64', '97', '88', '80', '82', '137', '90', '109', '99', '112']
decode(ciphertext[::-1])

john-in-the-middle

从scanlines.png其他通道可以找到,然后和logo.png 合并就出来了

在这里插入图片描述

在这里插入图片描述

弱口令

空格和table转成相应的.和-
在这里插入图片描述

a = """    
 
 	  
 	  
					
  	 
			
 	 
  	
		""".split('\n')
for b in a:
    for i in b:
        if ord(i) == 32:
            print(".",end='')
        else:
            print("-",end='')
    print(end=' ')

在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值