BUUCTF:[SWPU2019]神奇的二维码

    科技2022-07-16  136

    题目地址:https://buuoj.cn/challenges#[SWPU2019]神奇的二维码

    binwalk分析图片,发现藏有RAR压缩包,-e直接分离

    得到4个压缩包,三个能解压,只有18494.rar需要密码

    716A文件夹中的压缩包解压也需要密码

    首先看encode.txt

    PS C:\Users\Administrator> php -r "var_dump(base64_decode('YXNkZmdoamtsMTIzNDU2Nzg5MA=='));" string(19) "asdfghjkl1234567890"

    接着看flag.doc

    又是一大串base64,稍微测试了一下,应该编码了多次,直接写脚本跑

    import base64 def decode(f): n = 0; while True: try: f = base64.b64decode(f) n += 1 except: print('[+]Base64共decode了{0}次,最终解码结果如下:'.format(n)) print(str(f,'utf-8')) break if __name__ == '__main__': f = open('./base64.txt','r').read() decode(f) PS C:\Users\Administrator\Desktop> python .\test.py [+]Base64共decode了20次,最终解码结果如下: comEON_YOuAreSOSoS0great

    asdfghjkl1234567890是看看flag在不在里面^_^.rar的密码 其实这里面什么都没有,就是单纯的图片,什么都没有隐写…浪费我时间…

    comEON_YOuAreSOSoS0great是18394.rar的密码 解压得到good.mp3,一听很明显就是摩斯电码

    使用Audacity打开

    粗线条是- 细线条是.

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

    摩斯电码在线转换:http://www.zhongguosou.com/zonghe/moersicodeconverter.aspx

    PS:这里有个坑,也不是第一次碰到了,搞不懂为什么摩斯码最后得到的字符都要转小写才能提交正确

    PS C:\Users\Administrator\Desktop> php -r "echo strtolower('MORSEISVERYVERYEASY');" morseisveryveryeasy flag{morseisveryveryeasy}
    Processed: 0.009, SQL: 8