๐ ZCracker is an ultra-high performance archive cracker utilizing AVX2 SIMD, GPU acceleration, and zero-allocation for extreme speed.
โโโโโโโโโ โโโโโโ โโโโโโ โโโ โโโโโโ โโ โโโโโโโโโ โโโโโโ
โ โ โ โโโโโโโ โโ โโโ โ โโโโโโโโโ โโโโ โโ โโโโโ โโ โ โโโ โ โโโ
โ โ โโโโ โโโ โ โโโ โโโ โโโโ โโโ โโโ โ โโโโโโ โโโโ โโโ โโโ โ
โโโ โโโโโ โโโโโโโโโโโ โโโโโโโโโ โโโโ โโโโโโโ โโ โโโ โ โโโโโโโ
โโโโโโโโโโ โโโโโ โโโโโ โโโโ โโ โโโโโ โโโโโ โโโโโ โโโโโโโโโโโโโ โโโโ
โโโ โโโโโโ โโ โ โโ โโ โโโโ โโ โโโโโ โโ โ โโ โโ โโโโ โโ โโ โโ โโโโ
โโโ โ โ โ โ โ โโ โ โโ โ โโ โ โ โ โ โโ โโ โ โ โ โโ โ โโ
โ โ โ โ โโ โโ โ โ โ โ โ โโ โ โ โโ โ
โ โ โ โ โ โ โโ โ โ โ โ โ โ
โ โ โ
zcracker - @kadir_
โ ๏ธ DISCLAIMER: EDUCATIONAL USE ONLY This software is developed strictly for educational purposes and legitimate security research (e.g., recovering your own lost passwords). The author assumes NO responsibility for any misuse of this tool. Unauthorized use against systems or files you do not own is illegal and unethical. Use responsibly.
ZCracker has evolved from a standard multi-threaded tool into a Professional Grade, High-Performance Brute-Force Engine.
The initial prototype relied on standard libraries (System.IO, Ionic.Zip).
- Performance: ~2,000 passwords/sec.
- Bottleneck: Massive Garbage Collector (GC) pressure due to creating C# strings for every password and overhead from high-level library abstractions.
During development, we encountered and solved critical real-world issues:
- ๐ The "Zero CRC" Bug: Many Linux-created ZIPs store the CRC32 as
0in the header.
- Solution: Implemented streaming verification (
DecryptStream->DeflateStream) to verify integrity based on uncompressed size rather than CRC.
- ๐ The "False Positive" Trap: Legacy ZipCrypto's 1-byte header check has a 1/256 chance of a random match.
- Solution: A Two-Stage Verification system. Stage 1 checks the header (fast); Stage 2 performs full decompression (accurate) only if Stage 1 passes.
The current engine bypasses System.IO entirely. It is a ground-up implementation of the ZipCrypto and AES algorithms, meticulously optimized for modern hardware using AVX2 SIMD, CUDA, and Zero-Allocation pointers.
- Vectorization: Instead of checking passwords one by one, the SIMD Engine checks 8 passwords simultaneously on a single CPU core using 256-bit AVX2 registers.
- Vectorized Table Lookups: Utilizes
vpgatherdd(AVX2 Gather) to perform parallel CRC32 table lookups. - Legacy vs AES:
- Legacy ZipCrypto: Uses AVX2 for massive throughput (~15M+ pass/sec).
- WinZip AES: Uses multi-threaded PBKDF2-HMAC-SHA1 verification (slower by design, but optimized).
- Massive Parallelism: Offloads cracking to NVIDIA (CUDA) or AMD/Intel (OpenCL) GPUs using
ILGPU. - Kernel Compilation: Compiles the ZipCrypto logic into a high-performance GPU kernel at runtime.
- Throughput: Capable of checking hundreds of millions of passwords per second on high-end GPUs.
- No Strings Attached: Traditional tools create a C#
stringobject for every line, causing GC pauses. - Direct Memory Access: ZCracker maps the entire wordlist directly into RAM and reads raw bytes (
byte*), feeding them straight to CPU registers without ever allocating managed memory for passwords.
- Lock-Free Architecture: A dedicated high-priority thread scans the memory-mapped file and feeds pointers into a bounded channel.
- Efficient Batching: Worker threads consume data in batches of 1024 items to minimize synchronization overhead and maximize CPU cache locality.
This table demonstrates the engineering leap from a standard library implementation to the custom ZCracker Engine.
| Metric | Standard Implementation (Ionic.Zip) | ZCracker Engine (ZipCrypto) | ZCracker Engine (AES) |
|---|---|---|---|
| Speed (CPU) | ~2,000 pass/sec | ~15,000,000+ pass/sec | ~2,000 pass/sec* |
| Speed (GPU) | N/A | 100M - 1B+ pass/sec | Planned (v2.0) |
| Memory Usage | High (Strings & Objects) | Near Zero (Zero-Alloc) | Low |
| Input Size | Limit ~100k lines | Unlimited (Tested 100GB+) | Unlimited |
| Optimization | None | AVX2 SIMD (8x Parallel) | Multi-Threaded SHA-1 |
*Note on AES: AES speed is limited by the PBKDF2-HMAC-SHA1 algorithm (1000 iterations), which is designed to be slow to prevent brute-forcing.
The codebase is modular and designed for speed:
Program.cs: The Orchestrator. Detects hardware (GPU/CPU), sets up the pipeline, and manages the real-time UI dashboard.ZeroAllocFileReader.cs: The I/O engine. Implements a custom SIMD-accelerated line scanner that finds newlines (\n) in raw memory faster than standard methods.SimdZipCryptoEngine.cs: The CPU workhorse. Contains theunsafeAVX2 implementation of ZipCrypto.GpuZipCryptoEngine.cs: The GPU workhorse. Manages VRAM allocation and kernel execution via ILGPU.ZipFastParser.cs: A lightweight binary parser that reads only the necessary ZIP headers (12 bytes of encryption data) to avoid loading the full archive.ZipVerifier.cs: Handles the logic for verifying passwords against AES or ZipCrypto headers, including the "Zero CRC" workaround.
- .NET 8.0 SDK (Required for AVX2 and Unsafe support)
- (Optional) NVIDIA Driver (for CUDA support)
- Clone the repository:
git clone [https://github.com/KadirYazadzhi/ZCracker.git](https://github.com/KadirYazadzhi/ZCracker.git)
cd ZCracker
- Build in Release Mode (CRITICAL):
Note: Debug builds are 10x-50x slower because they disable compiler optimizations necessary for SIMD/Unsafe code.
dotnet build -c Release
Run the compiled binary directly or via dotnet run.
# Recommended: Run the optimized binary
./ZCracker/ZCracker/bin/Release/net8.0/ZCracker
# Alternative: Run via dotnet CLI
dotnet run -c Release --project ZCracker/ZCracker.csproj
- Archive Path: Enter the path to the password-protected ZIP file.
- ZCracker automatically detects if the file uses Legacy ZipCrypto or WinZip AES.
- Wordlist Path: Enter the path to your dictionary file (
.txt). - Hardware Selection:
- The tool will auto-detect compatible GPUs.
- Yes: Uses GPU (Best for huge lists & ZipCrypto).
- No: Uses CPU SIMD (Extremely fast, best for standard lists).
- GPU Acceleration for AES (CUDA implementation of PBKDF2).
- Dictionary Rule Attacks (append numbers, toggle case).
- Resume capability (save progress).
This project is licensed under the MIT License.
Code is Art. Optimization is Science. - @kadir_
