BlackArch is a penetration testing distribution, similar to Kali Linux, but it’s built on top of Arch Linux. In reality, BlackArch is really a pre-configured Arch installation with an extra repository full of security tools. As a result, you can add the BlackArch repository to a regular install of Arch and gain access to all the same tools.
In this tutorial you will learn:
- How to Download the BackArch Setup Script
- How to Verify The BlackArch Script
- How to Run The BlackArch Setup Script
- How to Install a Package from BlackArch
- How to Install an Entire Category from BlackArch
Software Requirements and Conventions Used
|Category||Requirements, Conventions or Software Version Used|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
How to Download the BackArch Setup Script
The BlackArch developers actually intended for their repository to be used this way. It’s all very flexible. They’ve actually provided a convenient setup script that you can run to install the BlackArch repo on your system. Start by downloading the script with cURL. If you don’t already have cURL, install that too.
# pacman -S curl $ cd ~/Downloads $ curl -O https://blackarch.org/strap.sh
It should only take a couple of seconds, if that, to download.
How to Verify The BlackArch Script
Since this is a security focused guide, and you are executing a script written by someone else, it’s a wise move to check the SHA1 sum of the file. Go ahead and do that before going further.
$ sha1sum strap.sh
It should match
9f770789df3b7803105e5fbc19212889674cd503. As long as it does, you can continue.
How to Run The BlackArch Setup Script
You’re ready to make your script executable and run it to set up BlackArch. First, use
chmod to make it executable.
$ chmod +x strap.sh
Then, run it.
$ sudo ./strap.sh
You will need
sudo set up on your system, so make sure to do that first. The script will get to work, adding the BlackArch repo and importing the necessary keys. It’ll give you a success message when it’s finished.
How to Install a Package from BlackArch
With BlackArch successfully installed, you can start installing packages. Pacman doesn’t really distinguish between repositories when you install, so you’ll need to search through BlackArch specifically. Use the following command to list out everything available from BlackArch.
$ sudo pacman -Sgg | grep blackarch | cut -d’ ‘ -f2 | sort -u
Sifting through everything might be a bit too tedious, so you can modify that to search for specific tools.
$ sudo pacman -Sgg | grep blackarch | cut -d’ ‘ -f2 | grep -i meta
Now, you’ll see all the packages with “meta” in the name. Say, you were looking for Metasploit. Go ahead and install it normally with Pacman.
$ sudo pacman -S metasploit
That’s really it. Since, BlackArch is just an Arch repository, you don’t need to do anything special.
How to Install an Entire Category from BlackArch
BlackArch also has package categories that you can install as a group to get an entire set of tools in a single command. Just like with single packages, you can also list out the BlackArch categories.
$ sudo pacman -Sg | grep blackarch
If you want to install a whole category, you can do it just as easily as a package by specifying the name to Pacman.
$ sudo pacman -S blackarch-cryptography
You can access any of the packages and categories available through BlackArch. You’ll also continue to receive updates through the repository as long as you have it enabled on your Arch system. In case you didn’t notice from the images, the BlackArch repository will also work on most Arch based distributions, like Antergos.