Pkcrack

From aldeid
Jump to navigation Jump to search

Description

Breaking PkZip-encryption

Installation

$ git clone https://github.com/keyunluo/pkcrack.git
$ mkdir pkcrack/build/
$ cd pkcrack/build/
$ cmake ..
$ make

Usage

./pkcrack -c <crypted_file> -p <plaintext_file> [other_options],

Options

-o <offset>
for an offset of the plaintext into the ciphertext, (may be negative)
-C <c-ZIP>
where c-ZIP is a ZIP-archive containing <crypted_file>
-P <p-ZIP>
where p-ZIP is a ZIP-archive containing <plaintext_file>
-d <d-file>
where d-file is the name of the decrypted archive which will be created by this program if the correct keys are found (can only be used in conjunction with the -C option)
-i
switch off case-insensitive filename matching in ZIP-archives
-a
abort keys searching after first success
-n
no progress indicator

Example

demo
├── demo.zip # encrypted-ZIP
├── pkcrack 
├── pkcrack.exe
├── README.txt # plaintext
└── README.zip # plaintext-ZIP 

the following shell command is used to crack:

$ ../bin/pkcrack -C demo.zip -c README.txt -P README.zip -p README.txt -d cracked.zip -a

the result will be:

Files read. Starting stage 1 on Thu Dec  7 12:45:53 2017
Generating 1st generation of possible key2_624 values...done.
Found 4194304 possible key2-values.
Now we're trying to reduce these...
Done. Left with 11054 possible Values. bestOffset is 24.
Stage 1 completed. Starting stage 2 on Thu Dec  7 12:46:07 2017
Ta-daaaaa! key0=be5382c6, key1= 750a330, key2=e7d4dbfe
Probabilistic test succeeded for 605 bytes.
Ta-daaaaa! key0=be5382c6, key1= 750a330, key2=e7d4dbfe
Probabilistic test succeeded for 605 bytes.
Stage 2 completed. Starting zipdecrypt on Thu Dec  7 12:47:34 2017
Decrypting CRACK.txt (aafa572da93cf74237fbca5d)... OK!
Decrypting README.txt (83c0bfb47b83166f9f43a365)... OK!
Finished on Thu Dec  7 12:47:34 2017

Comments

Keywords: pkcrack crack password zip rar archive plaintext