All Projects → kimci86 → Bkcrack

kimci86 / Bkcrack

Licence: zlib
Crack legacy zip encryption with Biham and Kocher's known plaintext attack.

Projects that are alternatives of or similar to Bkcrack

Miscellaneous R Code
Code that might be useful to others for learning/demonstration purposes, specifically along the lines of modeling and various algorithms. Now almost entirely superseded by the models-by-example repo.
Stars: ✭ 146 (-17.98%)
Mutual labels:  zip
Gapbs
GAP Benchmark Suite
Stars: ✭ 165 (-7.3%)
Mutual labels:  openmp
Killchain
A unified console to perform the "kill chain" stages of attacks.
Stars: ✭ 172 (-3.37%)
Mutual labels:  attack
Cc Attack
Using Socks4/5 proxy to make a multithreading Http-flood/Https-flood (cc) attack.
Stars: ✭ 145 (-18.54%)
Mutual labels:  attack
Atomicpurpleteam
Atomic Purple Team Framework and Lifecycle
Stars: ✭ 155 (-12.92%)
Mutual labels:  attack
Zip
Swift framework for zipping and unzipping files.
Stars: ✭ 2,120 (+1091.01%)
Mutual labels:  zip
Zipstorer
A Pure C# Class to Store Files in Zip
Stars: ✭ 139 (-21.91%)
Mutual labels:  zip
Rawspeed
fast raw decoding library
Stars: ✭ 179 (+0.56%)
Mutual labels:  openmp
Bit7z
A C++ static library offering a clean and simple interface to the 7-zip DLLs.
Stars: ✭ 159 (-10.67%)
Mutual labels:  zip
Diffai
A certifiable defense against adversarial examples by training neural networks to be provably robust
Stars: ✭ 171 (-3.93%)
Mutual labels:  attack
Libarchivejs
Archive library for browsers
Stars: ✭ 145 (-18.54%)
Mutual labels:  zip
Instahack
Best Tool For instagram bruteforce hacking Tool By EvilDevil
Stars: ✭ 139 (-21.91%)
Mutual labels:  attack
Libzippp
C++ wrapper for libzip
Stars: ✭ 169 (-5.06%)
Mutual labels:  zip
Uvtools
MSLA/DLP, file analysis, calibration, repair, conversion and manipulation
Stars: ✭ 148 (-16.85%)
Mutual labels:  zip
Zydra
Stars: ✭ 178 (+0%)
Mutual labels:  zip
Ctranslate2
Fast inference engine for OpenNMT models
Stars: ✭ 140 (-21.35%)
Mutual labels:  openmp
Expresscart
A fully functioning Node.js shopping cart with Stripe, PayPal, Authorize.net, PayWay, Blockonomics, Adyen, Zip and Instore payments.
Stars: ✭ 2,069 (+1062.36%)
Mutual labels:  zip
Adversarial Robustness Toolbox
Adversarial Robustness Toolbox (ART) - Python Library for Machine Learning Security - Evasion, Poisoning, Extraction, Inference - Red and Blue Teams
Stars: ✭ 2,638 (+1382.02%)
Mutual labels:  attack
Mod zip
Streaming ZIP archiver for nginx 📦
Stars: ✭ 178 (+0%)
Mutual labels:  zip
Compress
Optimized Go Compression Packages
Stars: ✭ 2,478 (+1292.13%)
Mutual labels:  zip

bkcrack

Badge

Crack legacy zip encryption with Biham and Kocher's known plaintext attack.

Install

Precompiled packages

You can get the latest official release on GitHub.

Precompiled packages for Ubuntu, MacOS and Windows are available for download. Extract the downloaded archive wherever you like.

Compile from source

Alternatively, you can compile the project with CMake.

First, download the source files or clone the git repository. Then, running the following commands in the source tree will create an installation in the install folder.

cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install
cmake --build build --config Release
cmake --build build --config Release --target install

Arch Linux (unofficial)

An unofficial package bkcrack-git is available in AUR.

Install it with any AUR helpers you like.

Usage

Data required

The attack requires at least 12 bytes of known plaintext. At least 8 of them must be contiguous. The larger the contiguous known plaintext, the faster the attack.

From zip archives

Having a zip archive encrypted.zip with the entry cipher being the ciphertext and plain.zip with the entry plain as the known plaintext, bkcrack can be run like this:

bkcrack -C encrypted.zip -c cipher -P plain.zip -p plain

From files

Having a file cipherfile with the ciphertext (starting with the 12 bytes corresponding to the encryption header) and plainfile with the known plaintext, bkcrack can be run like this:

bkcrack -c cipherfile -p plainfile

Offset

If the plaintext corresponds to a part other than the beginning of the ciphertext, you can specify an offset. It can be negative if the plaintext includes a part of the encryption header.

bkcrack -c cipherfile -p plainfile -o offset

Sparse plaintext

If you know little contiguous plaintext (between 8 and 11 bytes), but know some bytes at some other known offsets, you can provide this information to reach the requirement of a total of 12 known bytes. To do so, use the -x flag followed by an offset and bytes in hexadecimal.

bkcrack -c cipherfile -p plainfile -x 25 4b4f -x 30 21

Decipher

If the attack is successful, the deciphered text can be saved:

bkcrack -c cipherfile -p plainfile -d decipheredfile

If the keys are known from a previous attack, it is possible to use bkcrack to decipher data:

bkcrack -c cipherfile -k 12345678 23456789 34567890 -d decipheredfile

Decompress

The deciphered data might be compressed depending on whether compression was used or not when the zip file was created. If deflate compression was used, a Python 3 script provided in the tools folder may be used to decompress data.

tools/inflate.py < decipheredfile > decompressedfile

Number of threads

If bkcrack was built with parallel mode enabled, the number of threads used can be set through the environment variable OMP_NUM_THREADS.

Learn

A tutorial is provided in the example folder.

For more information, have a look at the documentation and read the source.

Contribute

Do not hesitate to suggest improvements or submit pull requests on GitHub.

License

This project is provided under the terms of the zlib/png license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].