How To Install crackmapexec on Kali Linux

In this tutorial we learn how to install crackmapexec on Kali Linux. crackmapexec is Swiss army knife for pentesting networks

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 update

After updating apt database, We can install crackmapexec using apt-get by running the following command:

sudo apt-get -y install crackmapexec

Install crackmapexec Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install crackmapexec using apt by running the following command:

sudo apt -y install crackmapexec

Install 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 update

After updating apt database, We can install crackmapexec using aptitude by running the following command:

sudo aptitude -y install crackmapexec

How To Uninstall crackmapexec on Kali Linux

To uninstall only the crackmapexec package we can use the following command:

sudo apt-get remove crackmapexec

Uninstall 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 crackmapexec

Remove crackmapexec Configurations and Data

To remove crackmapexec configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge crackmapexec

Remove 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 crackmapexec

Dependencies

crackmapexec have the following dependencies:

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.