其他分享
首页 > 其他分享> > 河南省第二届“金盾信安杯”网络安全大赛 WriteUp Crypto+Misc

河南省第二届“金盾信安杯”网络安全大赛 WriteUp Crypto+Misc

作者:互联网

2020年 河南省第二届“金盾信安杯”网络安全大赛 Write UP Crypto+Misc

作者:ch4nge
时间:2020.12.20

题目资源下载

https://download.csdn.net/download/qq_25094483/13743845

前言


今天的比赛,趁着热乎,写一篇writeup记录一下做出来的题目,比赛是针对萌新的,很友好,我只做了Crypto和Misc部分,幸运的是把这两类题目做完了,在这里分享一下思路,希望可以帮助CTF入门的小伙伴~

注意:一些编解码网站直接在超链接里面,蓝色字体就是。

比赛体验感一般,上午9点刚开始比赛,平台的比赛入口就没了~最后离结束十几分钟的时候排名也是疯狂掉哇QAQ

文章目录


Crypto

base

题目类型:编码
解题步骤:

1、下载文件,解压得到base文件,打开发现是Data URI scheme数据,也就是一个png图片的base64格式
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAASbUlEQVR4nO2bQbJrOxIC3/433T1x/Dt1KYxISmSEpjICDjP/+18ppYTwzy2glFK+pYNVSomhg1VKiaGDVUqJoYNVSomhg1VKiaGDVUqJoYNVSomhg1VKieHrwfr371/P4RkFIrybAOF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqcBuF9pPx6Zj53sCBBnPqswO2X2mdSfj0zn2WDtRlS4QnvS/MiUXMiHSwI2wvfweJpTqSDBWF74TtYPM2JdLAgbC98B4unOZEOFoTthe9g8TQn0sGCsL3wHSye5kQ6WBC2F76DxdOcSAcLwvbCd7B4mhPpYEHYXvgOFk9zIh0sCNsL38HiaU5k5WApPw6K5gmJ76N44b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lIdtPqNAAHrrxTua3TqnmjtYkCBu+JykYQpFh4rErBWaO1iQIG74nKRhCkWHisSsFZo7WJAgbvicpGEKRYeKxKwVmjtYkCBu+JykYQpFh4rErBWaO1iQIG74nKRhCkWHisSsFZo7WJAgbvicpGEKRYeKxKwVmjtYkCBu+JykYQpFh4rErBWaO1iQIG74nKRhCkWHisSsFZo7WJAgbvicpGEKRYeKxKwVmjtYkCBu+JykYQpFh4rErBWaO1iQIG74nKRhCkWHisSsFZrzkiulPEsHq5QSQwerlBJDB6uUEkMHq5QSQwerlBJDB6uUEkMHq5QSQwerlBLD/wFfXgShUHPDXQAAAABJRU5ErkJggg==
2、将数据复制到浏览器打开,保存图片

001

3、图片是个二维码,在线解码一下

得到F#S<YReBy{f.WwU{CSv^e^'n*D

4、根据题目名字base,这个编码应该是base类型的编码结果,使用basecrack(base全家桶解密)工具

命令:

python basecrack.py -b "F#S<YReBy{f.WwU{CSv^e^'n*D"

###记得加双引号

002

5、得到答案

Decoding as Base92: flag{you_very_good!!}
编码方式 Base92


6、附:basecrack使用方法
$ git clone https://github.com/mufeedvh/basecrack.git
$ cd basecrack
$ pip install -r requirements.txt
$ python basecrack.py -h
$ python basecrack.py -b "F#S<YReBy{f.WwU{CSv^e^'n*D"

不一样的凯撒

题目类型:编码
解题步骤:

1、下载文件,打开是一串字符
bhag{asb_zsz_vtsz_aszw}
2、题目提示凯撒,按照凯撒密码的原理,对其进行解密

得到一串接近答案的字符串
flek{ewf_dwd_zxwd_ewda},但是显然这不是正确答案,与密文字符串对比发现此字符前两个与密文字符串第3 4位字符加一起是flag
bhag{asb_zsz_vtsz_aszw}
flek{ewf_dwd_zxwd_ewda}

3、对字符移动位数查找规律

发现在密文字符的十进制为偶数的时候才进行移4位操作,奇数的时候不变
003
bh分别为98 104,加4之后是102 108,ag是奇数 103 123,不变,结果是flag

>>> chr(102)
'f'
>>> chr(108)
'l'
4、使用python3编写脚本进行解密.

两个if判断用来区分大小写操作

# -*- coding: utf-8 -*-
c = 'bhag{asb_zsz_vtsz_aszw}'
yy = 4#移位4
d=''

for i in range(len(c)):
    if c[i]>='a' and c[i]<='z' and ord(c[i])%2 == 0:
        d=d+chr((ord(c[i])+yy-97)%26+97)
    elif c[i]>='A' and c[i]<='Z' and ord(c[i])%2 == 0:
        d=d+chr((ord(c[i])+yy-65)%26+65)
    else:
        d=d+c[i]
print(d)
d=''
5、运行得到答案
flag{asf_dsd_zxsd_asdw}

第一次看到这么不可读的flag,你敢信这是答案

标签:文明诚信,友善,WriteUp,民主,Crypto,金盾,平等,和谐,文明
来源: https://blog.csdn.net/qq_25094483/article/details/111462285