6

【Root-Me】 Hash - SHA-2

 2 years ago
source link: https://exp-blog.com/safe/ctf/rootme/cryptanalysis/hash-sha-2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

【Root-Me】 Hash



水题,主要要有观察和分析能力,题目就是提示,SHA-2 解密。

需要知道 SHA-2 散列算法的特征, SHA-2 又分为两种算法,SHA-224 和 SHA-256。两者生成的密文都是由 0-9a-fA-F 组成的,其中 SHA-224 的密文长度固定是 56,SHA-256 的密文长度是 64 。

数了一下题目给出的密文串,是 65 个字符,而且不难发现其中多了一个范围外的字符 k

注意到题目描述说,这是截获下来的一段 Hash 码,而且在传输过程中出现错误,那么这个 k 很显然就是错误字符,将其去掉后密文串长度变成 64, 符合 SHA-256 的特征。

接下来就是对这个去掉 k 的密文串进行 SHA-256 解密了。但是很遗憾的是,我搜了很多在线的 SHA-256 解密工具,都没有收录这个密钥字条。不得已只能暴力碰撞破解,最终得到的明文串是 4dM1n (可能是彩蛋,不就是 admin 的变体么。。。)。

最后不要忘记,真正的答案还需要对 4dM1n 进行 SHA-1 加密,随便搜一个 SHA-1 在线加密工具即可,完成挑战。

01.png

flag 下载后的 flagzip 的文件需要手动更改后缀为 *.zip,然后解压即可(为了避免直接刷答案)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK