暴力破解pdf文档密码

目录

前言

准备系统环境

安装pdfcrack

使用指定字符开始暴力破解

使用字典文件进行爆破

附pdfcrack man手册


前言

相信小伙伴们都遇到这种情况;你收到了一些标题很吸引人的pdf文档 或者是重要数据泄露 学习资料总结,再或者是某机构的押题密卷,打开pdf却提示你要输入密码 因为不知道密码 只能弃罢。我就遇到过这种情况 网友发来了标题为某天一的押题密卷 ,我也想看看这个卷子的题怎么样,因为被设置了密码 我尝试用6到10位的纯数字组合来暴力破解这个pdf,结果三 四个小时都没找到正确的密码。有些网友为破解这个密码 请某宝某多来破解 也都没有破解成功。

后来我也得知了这个pdf的密码,是一串大小字母+数字的组合 长度很长,理论上暴力破解是可以破解出来的 不过以我电脑的运算速度 可能需要几十年甚至上百年...

当我打开文档时 惊了 这那是什么押题卷啊!这是奥特曼... 因该是某人的恶作剧吧! 很气愤....

接下演示破解pdf文档工具的使用方法

准备系统环境

这次使用的工具是pdfcrack 它依旧是Linux命令行工具

我用的liunx系统 仍然是kali (虚拟机) 如果没有可以去官网下载文件 导入你的虚拟机里

准备一个加了密的pdf文档

我们用wps就可以给pdf增加打开密码 方法如下

1.我们用world 先生成一个pdf 文档名就叫做secret吧

2.再打开secret.pdf 选择文档加密

 

 为了演示 我设置一个简单的密码 221217

 

 现在当你再次打开pdf 就提示你必须输入密码了

 

安装pdfcrack

直接使用命令安装

sudo apt-get update

sudo apt install pdfcrack

 

使用指定字符开始暴力破解

使用特定的字符排列组合

pdfcrack -f secret.pdf -n 6 -m 8 -c 0123456789

-f:选择要破解的pdf文件

· -n:密码最短多少个字符

· -m:密码最长多少个字符

· -c:使用的字符集

由于密码很简单 长度只有6位  很快就找到了密码 所以建议密码一定设置一个复杂的啊

 或者

pdfcrack -f secret.pdf -n 1 -m 20 -c 0123456789abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXYZ...

如果你的设置密码足够长 包含了真实密码的长度 字符也包含进去了(键盘上所有可输出的字符) 理论上是可以破解出来的 只不过是时间问题

下图可以看到我的电脑的运算速度   

 你可以随时使用 Ctrl+c 终止破解,它会保存破解的进度,下次继续在终止的地方执行。

使用字典文件进行爆破

pdfcrack -f secret.pdf -w pass.txt

 

 使用字典破解密码的关键在于你的密码字典是否全面 强悍 这就需要你的社工能力了 通过搜集所有者的信息 打造一款针对他的密码字典 这个可以大大提高破解的成功率。

附pdfcrack man手册

NAME pdfcrack - Password recovery tool for PDF-files

SYNOPSIS pdfcrack [ -f ] FILE [OPTION]...

DESCRIPTION PDFCrack is a tool for recovering passwords and content from PDF-files.

If aborted with Ctrl-C or by receiving a SIGINT signal, pdfcrack will auto‐ matically save current position. The position will be saved in a file called savedstate.sav in current working directory.

Mandatory arguments for long options are mandatory for short options too.

OPTIONS -b, --bench perform benchmark and exit

-c, --charset=STRING Use the characters in STRING as charset

-w, --wordlist=FILE Use FILE as source of passwords to try

-n, --minpw=INTEGER Skip trying passwords shorter than INTEGER

-m, --maxpw=INTEGER Stop when reaching this INTEGER passwordlength

-l, --loadstate=FILE Continue from the state saved in FILE

-o, --owner Work with the ownerpassword

-u, --user Work with the userpassword (default)

-p, --password=STRING Give userpassword to speed up breaking ownerpassword (implies -o)

-q, --quiet Run quietly

-s, --permutate Try permutating the passwords (currently only supports switching first character to uppercase)

-v, --version Print version and exit

REPORTING BUGS Via e-mail to Henning Noren [email protected] or report on project page at http://pdfcrack.sourceforge.net/ AUTHOR Henning Noren

COPYRIGHT Copyright © 2009 Henning Noren [email protected] This is free software. You may redistribute copies of it under the terms of the GNU General Public License The GNU General Public License v3.0- GNU Project - Free Software Foundation. There is NO WARRANTY, to the extent permitted by law.

User Commands February 2009 PDFCRACK(1)

猜你喜欢

转载自blog.csdn.net/shelter1234567/article/details/128358255
今日推荐