7zip
7-Zip is a file archiver with a high compression ratio supporting multiple formats for packing/unpacking and extraction. It provides strong AES-256 encryption and powerful command line functionality.
Description
7-Zip is a versatile file archiver designed for high compression ratios, particularly in 7z format using LZMA and LZMA2 algorithms. It supports a wide range of formats for both packing/unpacking (7z, XZ, BZIP2, GZIP, TAR, ZIP, WIM) and unpacking only (AR, ARJ, CAB, CHM, CPIO, and many disk image formats like DMG, ISO, VHD, VMDK). This makes it valuable for handling various archive types encountered in forensic analysis and penetration testing.
The tool offers three main binaries: 7z (full-featured with plugins), 7za (major formats only), and 7zr (LZMA-focused minimal executable). It provides superior compression ratios for ZIP and GZIP compared to traditional tools like PKZip and WinZip, along with strong AES-256 encryption for 7z and ZIP formats. Note that RAR support requires the separate non-free 7zip-rar package due to licensing constraints.
Additional packages include p7zip (a wrapper with basic options) and 7zip-standalone (providing 7zz binary without plugins). These variants support common operations like benchmarking, decompression, and hash calculation, making 7zip suitable for automated scripting and batch processing in security workflows.
How It Works
7-Zip utilizes advanced compression algorithms like LZMA and LZMA2 for 7z format, achieving 2-10% better ratios than PKZip/WinZip for ZIP/GZIP. It supports packing/unpacking multiple formats through dedicated handlers and provides AES-256 encryption for secure archives. The tool operates via command-line interface with three binary variants: full 7z with plugin support, stripped 7za for major formats, and minimal 7zr for LZMA-only operations. Hash functions (CRC32, SHA256, etc.) are available for integrity verification during extraction and listing.
Installation
sudo apt install 7zipFlags
Examples
7z -h7z a archive.7z file.txt7z e archive.7z7z l archive.7z7z h file.txt7za -h7zr bp7zip -d archive.7z