How To Install crackmapexec on Kali Linux
Introduction
In this tutorial we learn how to install crackmapexec on Kali Linux.
What is crackmapexec
crackmapexec is:
This package is a swiss army knife for pentesting Windows/Active Directory environments.
From enumerating logged on users and spidering SMB shares to executing psexec style attacks, auto-injecting Mimikatz/Shellcode/DLL’s into memory using Powershell, dumping the NTDS.dit and more.
The biggest improvements over the above tools are:
- Pure Python script, no external tools required
- Fully concurrent threading
- Uses ONLY native WinAPI calls for discovering sessions, users, dumping SAM hashes etc…
- Opsec safe (no binaries are uploaded to dump clear-text credentials, inject shellcode etc…)
Additionally, a database is used to store used/dumped credentals. It also automatically correlates Admin credentials to hosts and vice-versa allowing you to easily keep track of credential sets and gain additional situational awareness in large environments.
There are three methods to install crackmapexec on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install crackmapexec Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install crackmapexec using apt-get by running the following command:
sudo apt-get -y install crackmapexecInstall crackmapexec Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install crackmapexec using apt by running the following command:
sudo apt -y install crackmapexecInstall crackmapexec Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.
sudo aptitude updateAfter updating apt database, We can install crackmapexec using aptitude by running the following command:
sudo aptitude -y install crackmapexecHow To Uninstall crackmapexec on Kali Linux
To uninstall only the crackmapexec package we can use the following command:
sudo apt-get remove crackmapexecUninstall crackmapexec And Its Dependencies
To uninstall crackmapexec and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove crackmapexecRemove crackmapexec Configurations and Data
To remove crackmapexec configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge crackmapexecRemove crackmapexec configuration, data, and all of its dependencies
We can use the following command to remove crackmapexec configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge crackmapexecDependencies
crackmapexec have the following dependencies:
- python3-impacket
- python3-pywerview
- python3-aioconsole
- python3-bs4
- python3-lsassy
- python3-msgpack
- python3-neo4j
- python3-paramiko
- python3-pylnk
- python3-pypsrp
- python3-requests
- python3-requests-ntlm
- python3-termcolor
- python3-terminaltables
- python3-xmltodict
- python3
References
Summary
In this tutorial we learn how to install crackmapexec package on Kali Linux using different package management tools: apt, apt-get and aptitude.