暴力破解忘记的zip,rar, pdf等文件密码

TanHaX
2022-09-14 / 12 评论 / 1,703 阅读 / 正在检测是否收录...
有时候忘了自己对文件设置的密码,又想不起来,可能就有人就对此文件放弃,但有人就巧妙的利益其他技术暴力破解

这里向大家推荐一种利用GPU的算力的破解工具:

hashcat
https://github.com/hashcat/hashcat

John the Ripper
https://github.com/openwall/john

使用

用John the Ripper中的工具获取hash,然后用hashcat破解。

以test.zip文件为例:

然后用john软件获取hash (其它类型文件需要找对应的,比如rar就用zip2john.exe),
命令行界面类似于

john-1.9.0-jumbo-1-win64\run>zip2john.exe C:\Users\用户名\Downloads\test.zip

执行完后得到并提取:

有了哈希值,我们就可以使用 hashcat 进行暴力破解

在使用hashcat中我需要使用几个参数:(详细请参考 hashcat wiki ):

  • -a 选择攻击方式,即掩码攻击(有规则约束的暴力穷举)
  • -m 选择攻击模式,针对不同的 hash 算法选择规定的值
  • m 指定文件类型为17225 因为这里是 $pkzip2$
    可以由 zip2john 提取出的 hash 值分辨出
  • --increment 代表自动增加位数 --increment-max=9 代表最大到9位 。

复制 zip2john 得到的哈希值,执行:

注意在 Bash 和 Powershell 中,$ 的含义为变量,需要用单引号括起来才可以使用

执行完后:

上面的 smiling 即为密码
11

打赏

评论 (12)

取消
  1. 头像
    11 秀才   
    Windows 10 · Google Chrome
    沙发

    111

    回复
  2. 头像
    11 秀才   
    Windows 10 · Google Chrome
    板凳

    123123

    回复
  3. 头像
    111 秀才   
    Windows 10 · Google Chrome
    地毯

    $pkzip2$哈希值是多少

    回复
    1. 头像
      Smilinghan 作者   
      Windows 10 · Google Chrome
      @ 111

      这个需要你去获取,每个文件的哈希值都不一样的

      回复
  4. 头像
    test 秀才   
    MacOS · Google Chrome
    第4栋大夏

    1

    回复
  5. 头像
    111 秀才   
    Windows 10 · Google Chrome
    第5栋大夏

    test

    回复
  6. 头像
    11 秀才   
    Windows 10 · Google Chrome
    第6栋大夏

    123表情

    回复
  7. 头像
    cici 秀才   
    Windows 10 · Google Chrome
    第7栋大夏

    1

    回复
  8. 头像
    11 秀才   
    Windows 10 · Google Chrome
    第8栋大夏

    1

    回复
  9. 头像
    adfa 秀才   
    Windows 10 · Google Chrome
    第9栋大夏

    111

    回复
  10. 头像
    dddd 秀才   
    Windows 10 · FireFox
    第10栋大夏

    test

    回复
  11. 头像
    aaaaa 秀才   
    Windows 10 · Google Chrome
    第11栋大夏

    ddddd

    回复