sudo python3 setup.py install
This will compile and install Pyrit system-wide. You may see warnings about missing optional dependencies (like CUDA or OpenCL), but the core CPU-based functionality will work.
pyrit --help
You should see the Pyrit banner and command list.
Test detection of available cores:
pyrit list_cores
Example output:
Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg This code is distributed under the GNU General Public License v3
The following cores seem available... #1: 'CPU-Core (SSE2/AES)' #2: 'CPU-Core (SSE2/AES)' #3: 'CPU-Core (SSE2/AES)' #4: 'OpenCL-Device 'NVIDIA CUDA''
Installing on modern versions of Kali Linux (2021-2024) requires manual compilation from source because it was removed from the official repositories due to its dependency on Prerequisites
Before you begin, ensure you have an active internet connection to download necessary files. Since Python 2 is end-of-life, you must explicitly install its development headers. Step-by-Step Installation Guide Update System and Install Dependencies
Open your terminal and run the following command to install the required development libraries for Python 2, OpenSSL, and packet capturing:
sudo apt update && sudo apt install git python2-dev libssl-dev libpcap-dev -y Clone the Pyrit Repository Download the latest source code from the maintained GitHub repository git clone https://github.com/JPaulMora/Pyrit.git --depth=1 Apply AES-NI Workaround
Modern kernels often cause an error with Pyrit's AES implementation. You must "fudge" the code by renaming a constant in the source file before compiling:
sed -i "s/COMPILE_AESNI/COMPILE_AESNIX/" cpyrit/_cpyrit_cpu.c Compile and Install Run the setup script using to build and install the tool to your system: python2 setup.py clean python2 setup.py build sudo python2 setup.py install Verify the Installation
Test if Pyrit is correctly installed by checking the help menu or running a benchmark: pyrit benchmark Summary Table: Key Installation Components Requirement Component / Command Python 2.7 Required for execution libpcap-dev Essential for packet capture analysis COMPILE_AESNI Prevents "aesni_key not found" errors GPU (Optional) Accelerates password cracking Important Troubleshooting Note If you encounter errors related to How to install Pyrit in Kali Linux
, you may need to install a specific older version compatible with Python 2: sudo python2 -m pip install scapy==2.3.2 configure GPU acceleration for Pyrit to further increase its cracking speed? How to install Pyrit in Kali Linux? - blackMORE Ops 12 May 2015 —
Installing on modern Kali Linux is a common challenge for security enthusiasts, as the tool was officially removed from Kali’s repositories in 2020 due to its reliance on Python 2. However, you can still install it by compiling it from source. Kali Linux Package Tracker Important Note:
There are now two distinct tools with this name. This guide is for the classic Wireless Auditing tool . If you are looking for Microsoft's Python Risk Identification Tool for Generative AI, that is a separate library installed via about.gitlab.com Blog Post: Getting Pyrit Back on Kali Linux Introduction
Pyrit was once a staple in the Kali Linux toolkit, famous for its ability to utilize GPU power to accelerate WPA/WPA2 cracking. While newer tools like Hashcat have largely taken its place, many legacy scripts and workflows still rely on it. Because it was removed from official repositories, we’ll walk through how to build it from the JPaulMora GitHub repository Step 1: Install Required Dependencies
Since Pyrit is built on Python 2, you need the legacy development files and specific libraries for packet capture and encryption. Open your terminal and run:
sudo apt update -y sudo apt install git python2-dev libssl-dev libpcap-dev python2 -y Use code with caution. Copied to clipboard Step 2: Clone the Pyrit Repository
Download the source code directly from the maintained GitHub mirror:
Installing Pyrit on Kali Linux has become more complex since it was removed from the official Kali Linux Package Tracker in 2020. Because it relies on Python 2, which is officially deprecated, you must install it manually from source. Quick Installation Guide Update and Install Dependencies:Open your terminal and run:
sudo apt update sudo apt install git python2-dev libssl-dev libpcap-dev -y Use code with caution. Copied to clipboard
Note: If python2-dev is missing, you may need to add legacy repositories or use a community installer script. Clone the Repository:
git clone https://github.com/JPaulMora/Pyrit.git --depth=1 cd Pyrit Use code with caution. Copied to clipboard
Fix AESNI Error (Common in Newer Kernels):Apply a small fix to avoid compilation errors: sudo python3 setup
sed -i "s/COMPILE_AESNI/COMPILE_AESNIX/" cpyrit/_cpyrit_cpu.c Use code with caution. Copied to clipboard Build and Install:
python2 setup.py clean python2 setup.py build sudo python2 setup.py install Use code with caution. Copied to clipboard Verify: pyrit -h Use code with caution. Copied to clipboard Blog Post: Bringing Pyrit Back to Life on Kali Linux
Title: Cracking at Warp Speed: How to Install Pyrit on Kali Linux (2024)
If you’ve been in the wireless security game for a while, you know Pyrit. It’s the legendary tool for pre-computing WPA/WPA2-PSK PMK databases, allowing you to crack handshakes at speeds that make standard CPU-bound tools look like they're standing still.
The problem? Pyrit is no longer in the standard Kali repos. Since it’s built on Python 2, modern distros have largely left it behind. But for those of us who still need its raw power, here is how you can get it running on the latest Kali builds. 1. Why Pyrit Still Matters
While tools like Hashcat are the industry standard for GPU cracking today, Pyrit’s ability to manage massive SQL databases of pre-computed hashes remains a unique niche for serious auditors. 2. The Dependency Hurdle
Because Kali 2020+ moved toward Python 3, we first have to restore the environment Pyrit needs. You’ll need libssl-dev and libpcap-dev to handle the network traffic data, plus the python2-dev headers. 3. The Installation Workflow
The secret sauce to a successful install on modern Kali is a small code "fudge." Newer Linux kernels don't play nice with the original AESNI implementation in Pyrit's code. By using a simple sed command to rename the constant in the source, we bypass the compilation errors that plague most users. 4. Going Beyond the CPU
Pyrit is "good" on a CPU, but it’s "god-tier" on a GPU. If you have an NVIDIA card, don't stop at the basic install. You'll want to grab the cpyrit-cuda module to truly unlock your hardware's potential.
Pro-Tip: If you run into issues with missing Python 2 packages, check out the community-maintained installer scripts on GitHub. They automate the process of pulling old Debian Stretch packages that Pyrit still relies on. Happy (and legal) auditing! pyrit - Kali Linux Package Tracker
Installing Pyrit on modern Kali Linux is a complex process because the tool is based on Python 2, which has been removed from official repositories. To successfully install it, you must compile it from source and manually resolve legacy dependency issues. Important: Pyrit vs. Microsoft PyRIT Ensure you are installing the correct tool:
Pyrit (Classic): A legacy tool for pre-computing WPA/WPA2-PSK databases. This will compile and install Pyrit system-wide
Microsoft PyRIT: A modern tool for red-teaming generative AI (Large Language Models). If you need the AI tool, install it via pip install pyrit. Step-by-Step Installation for Classic Pyrit 1. Install Required Dependencies
Since modern Kali lacks these by default, you must install the development libraries for Python 2 and network packet capturing. sudo apt-get update
sudo apt-get install -y git python2-dev libssl-dev zlib1g-dev libpcap-dev 2. Clone and Patch the Source Code
The original source often fails to compile on newer systems due to an aesni_key error. You must "fudge" the code to bypass this.
Clone the repository:git clone https://github.com/JPaulMora/Pyrit.git
Apply the AES-NI Patch:cd Pyritsed -i "s/COMPILE_AESNI/COMPILE_AESNIX/" cpyrit/_cpyrit_cpu.c 3. Build and Install Use Python 2 specifically to run the setup script. sudo python2 setup.py clean sudo python2 setup.py build sudo python2 setup.py install 4. Verify the Installation
Check if the cores are correctly identified and run a benchmark to ensure functionality.
pyrit import_passwords /usr/share/wordlists/rockyou.txt
The original Pyrit’s CUDA modules are broken on modern GPUs. Instead, use a more recent fork. Note: As of 2025, the most reliable fork is by klonikar:
git clone https://github.com/klonikar/pyrit.git
cd pyrit
After successful installation, test with a captured handshake:
# List available attack methods
pyrit -h
The official Pyrit repository hasn’t been updated in years, but a community-maintained version works well.
git clone https://github.com/JPaulMora/Pyrit.git
cd Pyrit
Use this method only if you have an Nvidia GPU and the nvidia-cuda-toolkit installed.
To use your GPU, you need to install the CUDA extension module.