Install Pyrit In Kali Linux - How To
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 How to install Pyrit in Kali Linux
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
, 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 challenging because the tool was officially removed from the Kali repositories in April 2020 due to its reliance on the deprecated Python 2. To get it running today, you must compile it from source and install old dependencies. Kali Linux Package Tracker Step 1: Update Your System and Install Dependencies
Modern Kali has transitioned to Python 3, but Pyrit requires Python 2.7 development headers and specific libraries. Open your terminal and update the package list: sudo apt update Install the required building blocks:
sudo apt install git python2-dev libssl-dev libpcap-dev zlib1g-dev -y Step 2: Clone the Pyrit Source Code Installing on modern versions of Kali Linux (2021-2024)
Since it's no longer in the official package manager, you need to pull the code from a maintained GitHub mirror. Clone the repository: git clone https://github.com/JPaulMora/Pyrit.git --depth=1 Navigate into the directory: Step 3: Modify Code for Compatibility
A common error during compilation on modern systems involves the AESNI instruction set. You must "fudge" the code to avoid a crash: Run the following command to modify the source file:
sed -i "s/COMPILE_AESNI/COMPILE_AESNIX/" cpyrit/_cpyrit_cpu.c Step 4: Build and Install Pyrit You must explicitly use to run the installation script. Clean any previous build attempts: python2 setup.py clean Compile the source: python2 setup.py build Install it to your system: sudo python2 setup.py install Step 5: Verify the Installation
Run the help command to ensure the binary is correctly linked and executable. Check the version and help menu: Check for available CPU cores: pyrit list_cores Google Code Troubleshooting Common Issues "python2: command not found"
: If Kali doesn't recognize the command, you may need to install the core package: sudo apt install python2 : Ensure you have installed libpcap-dev , otherwise Pyrit cannot analyze Modern Alternatives Step 3: Build and Install Navigate into the
: Because Pyrit is unmaintained, many security professionals have moved to Aircrack-ng
, which are pre-installed in Kali and fully support modern GPU acceleration. pyrit - Installation.wiki - Google Code
Switch to the directory holding CPyrit-CUDA's source-code and compile and install it just like you did with Pyrit: cd cpyrit-cuda- Google Code install-pyrit-kali-rolling-2021-1.sh - GitHub
Step 3: Build and Install
Navigate into the Pyrit directory and run the setup script.
cd Pyrit
sudo python2 setup.py clean
sudo python2 setup.py build
sudo python2 setup.py install
Step 4: Verify Installation
Check if Pyrit is working by running:
pyrit --help
If you see the Pyrit help menu, the installation was successful.
3.2. Method 2: Install from GitHub Source (Recommended)
The original Pyrit (maintained by JPaulMora) has been updated for Python 3 and modern libraries.