我有allfiles.zip
只包含文件allfiles.exe
和密码保护。我听说过pkcrack
,如果我们有一部分加密的zip文件,就可以从压缩文件中获取该文件。(如果我错了,请纠正我)
因此,使用该语句,我向words.txt
添加了一个明文文件( allfiles.zip
),创建了另一个压缩文件wordfiles.zip
,其中只包含纯文本文件words.txt
并运行pcrack
。
allfiles.zip
-> allfiles.exe
allfiles.zip
添加一个虚拟明文文件。现在,文件allfiles.zip
包含2个文件allfiles.zip
-> allfiles.exe
-> words.txt
words.txt
的zip文件wordfiles.zip
-> words.txt
./pkcrack -C allfiles.zip -c words.txt -P wordfiles.zip -p words.txt -d allfiles.exe1 -a
Warning! Plaintext is longer than Ciphertext!
Files read. Starting stage 1 on Thu Feb 28 11:39:48 2019
Generating 1st generation of possible key2_255982 values...done.
Found 4194304 possible key2-values.
---OUTPUT REMOVED----
Lowest number: 93 values at offset 246121
Done. Left with 93 possible Values. bestOffset is 246121.
Stage 1 completed. Starting stage 2 on Thu Feb 28 11:40:10 2019
Stage 2 completed. Starting zipdecrypt on Thu Feb 28 11:40:15 2019
No solutions found. You must have chosen the wrong plaintext.
Finished on Thu Feb 28 11:40:15 2019
这是解决问题的正确方法吗?什么是最好的破解方法?(fcrackzip
除外)
发布于 2019-02-28 12:15:46
PKCrack进行已知的明文攻击(KPA)。因此,您需要知道zip存档中文件的明文,然后才能解密相同zip文件中的其他文件。但是你的档案里没有其他文件,所以你不能进行攻击。
有人可能会问:“如果你已经需要知道答案,那么做KPA有什么意义呢?”那么,假设您有一个压缩归档文件"passwords.txt“和"usernames.txt”。您可以通过其他方法获得"usernames.txt“的明文(比如询问sysadmin),因为它不是秘密的。通过将用户名文件的已知内容与加密版本进行比较,您可以(使用pkcrack)恢复键流。然后,您可以使用这个密钥流来解密另一个文件("passwords.txt")。请注意,您从未学习过密码,但您可以解密存档中的另一个文件(S)。
在您的例子中,"passwords.txt“是"allfiles.exe”(您不知道它的内容,但您想解密它)。为了模拟攻击,您在zip存档中添加了"words.txt“,但是您不能用与"allfiles.exe”相同的密钥流加密"words.txt“,因为您不知道密码(因此无法生成那个密钥流)。所以这样的攻击是不可能的。
https://security.stackexchange.com/questions/204475
复制相似问题