Smarter brute-force password searching for PKZIP encrypted files

Overview

Zip Blitz

Motivation

This program was created for a very specfic problem I had. I had a large encrypted zip file that I lost/forgot the password for. Using traditional bruteforce methods resulted in a lot of false positives.

This program hopes to minimize false positives. It works by actually checking to see if a given file exists in the 'plaintext' after attempting a guess password.

Usage

Explicitly passing in file type

zip-blitz -z <zipfile_name> -f <file_to_extract> -t <known_file_extension>

Allowing Zip Blitz to guess the file type

zip-blitz -z <zipfile_name> -f <file_to_extract>

Let's say we had an encrypted zip file named cats.zip with a jpg file in it. In this example the password is fun and our wordlist contains fun.

$ zip-blitz -z ./test_data/cats.zip -f kitten.jpg < ./test_data/wordlist.txt
Found it: fun

We can also use a password generator like JohnTheRipper to provide passwords.

$ ./JohnTheRipper/run/john --mask=fu?a -stdout | zip-blitz -z ./test_data/cats.zip -f kitten.jpg -t jpg
Press 'q' or Ctrl-C to abort, almost any other key for status
95p 0:00:00:00 100.00% (2020-04-13 17:35) 1520p/s fu|
Found it! -> fun

Important Notes

Supports PKZIP/ZipCrypto Encryption only

Only a limited number of file types are supported at the moment: zip, wmv/asf/wma, jpg, xml

But it's pretty easy to extend support for various file types.

You might also like...
Dione is an anonymize and encrypted messaging system build on top on a peer to peer layer.

Secure and Anonymous Messaging WARNING: Currently Dione is not ready to be used nor does it fulfill its goal of being an anonymous messenger. In order

NymDrive is a complete, end-to-end encrypted file syncing daemon that runs over the Nym network.

NymDrive NymDrive is a complete, end-to-end encrypted file syncing daemon that runs over the Nym network. Features Active file monitoring of changes i

An open source desktop wallet for nano and banano with end-to-end encrypted, on chain messaging using the dagchat protocol.
An open source desktop wallet for nano and banano with end-to-end encrypted, on chain messaging using the dagchat protocol.

An open source wallet with end-to-end encrypted, on chain messaging for nano and banano using the dagchat protocol.

An HTTP proxy for assets (mainly images) to route requests through an always-encrypted connection.

camo-rs camo-rs is a frontend-compatible Rust-re-implementation of the now archived NodeJS-based atmos/camo - an HTTP proxy for assets (mainly images)

A simple key-value store with a log-structured, append-only storage architecture where data is encrypted with AES GCM.

akvdb A simple key-value store with a log-structured, append-only storage architecture where data is encrypted with AES GCM. Modified from the actionk

Bijou is a tiny yet fast encrypted file system.

Bijou ✨💎✨ Bijou (['bi:ʒu], French for "jewel") is a tiny yet fast encrypted filesystem, built upon RocksDB. Bijou provides a FUSE interface, as well

rustic_core - library for fast, encrypted, deduplicated backups that powers rustic-rs
rustic_core - library for fast, encrypted, deduplicated backups that powers rustic-rs

Library for fast, encrypted, and deduplicated backups About This library is powering rustic-rs. A backup tool that provides fast, encrypted, deduplica

An implementation of the OPAQUE password-authenticated key exchange protocol

The OPAQUE key exchange protocol OPAQUE is an asymmetric password-authenticated key exchange protocol. It allows a client to authenticate to a server

Master Password in Pure Rust
Master Password in Pure Rust

Master Password •••| This is the Rust version of the original found here. This can be used as a drop-in replacement for the reference C version, offer

Comments
  • Reduce unneeded complexity (KISS)

    Reduce unneeded complexity (KISS)

    Improve the code by reducing unnecessary abstractions. This was pointed out by a user (Plecra) on Reddit

    His comment:

    My main recommendation would be to reduce your abstractions. The FileType trait isn't necessary - you only need a function that maps file types to headers (&'static [u8]), and another that can check them against a buffer. Other than that, there are a few nice std APIs that can help clean things up - iterator methods, ascii equality, etc.

    enhancement 
    opened by cwithmichael 1
  • Refactor code

    Refactor code

    Remove file_type and just use a function to map an extension to a header Improve variable naming for readibility

    Should close the KISS issue https://github.com/cwithmichael/zip-blitz/issues/2 for now :)

    opened by cwithmichael 0
  • Refactoring code and adding feature for guessing the file type

    Refactoring code and adding feature for guessing the file type

    Purpose

    • Refactoring code to remove FileType trait and improve readability
    • Adding the ability for the program to guess the file type based on the file name
    • Adding/Updating unit tests
    opened by cwithmichael 0
  • Allow users to add/use their own file extensions

    Allow users to add/use their own file extensions

    There are a lot of file signatures: https://en.wikipedia.org/wiki/List_of_file_signatures I doubt it would make sense for this application to try to keep track of all of them.

    It would be nice if a user could be able to add/use their own file header.

    enhancement 
    opened by cwithmichael 0
Releases(v0.2.1)
  • v0.2.1(Apr 29, 2022)

    What's Changed

    • Adds support for the XML file type
    • A lot of refactoring to clean up/simplify code

    Full Changelog: https://github.com/cwithmichael/zip-blitz/compare/v0.2.0...v0.2.1

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Apr 20, 2022)

Owner
Michael
I'm a full-stack web developer and *nix enthusiast.
Michael
Program to determine the password of an encrypted ZIP file via dictionary attack.

zip-dict-attack Program to determine the password of an encrypted ZIP file via dictionary attack. Inspired by this article. Usage Cargo is used to bui

null 2 Oct 8, 2022
A mnemonic brute forcing tool for nano and banano.

brute a mnemonic brute forcing tool for nano and banano. What is brute? It is a mnemonic brute forcing tool which can be used to recover an account fr

null 8 Nov 30, 2022
A Bitcoin wallet collider that brute forces random wallet addresses written in Rust.

Plutus-Rustus Bitcoin Brute Forcer A Bitcoin wallet collider that brute forces random wallet addresses written in Rust. This is a straight port of Plu

null 46 Dec 23, 2022
Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer of security for your most sensitive files.

Koofr Vault https://vault.koofr.net Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer o

Koofr 12 Dec 30, 2022
a handy utility to work with encrypted DMGs

edmgutil edmgutil is a simple wrapper utility to hdiutil to help you work with disposable, encrypted DMGs. It can decompress an encrypted ZIP into a n

Sentry 9 Nov 29, 2022
Encrypted memories

Diary - Encrypted memories Diary is a TUI program written in Rust for GNU/Linux / *BSD / Android (It probably works on other platforms too, but who ca

Arun Sojan Parolikkal 44 Dec 23, 2022
An application for creating encrypted vaults for the GNOME desktop.

Vaults An application for creating encrypted vaults for the GNOME desktop. It currently uses gocryptfs and CryFS for encryption. Please always keep a

Martin Pobaschnig 51 Dec 17, 2022
age-encrypted secrets for NixOS; drop-in replacement for agenix

ragenix ragenix provides age-encrypted secrets for NixOS systems which live in the Nix store and are decrypted on system activation. Using ragenix to

YAXI 91 Jan 8, 2023
Trustworthy encrypted command line authenticator app compatible with multiple backups.

cotp - command line totp authenticator I believe that security is of paramount importance, especially in this digital world. I created cotp because I

Reply 71 Dec 30, 2022
An encrypted multi client messaging system written in pure Rust

?? Preamble This is a pure Rust multi-client encrypted messaging system, also known as Edode's Secured Messaging System. It is an end-to-end(s) commun

Edode 3 Sep 16, 2022