i The BlackArch Linux – All things in moderation

# The BlackArch Linux

Hi everyone, today I will introduce you to BlackArch OS and installation instructions.
BlackArch is a penetration testing distribution based on Arch Linux that provides a large amount of cyber security tools. It is an open-source distro created specially for penetration testers and security researchers. The repository contains more than 2400 tools that can be installed individually or in groups. BlackArch Linux is compatible with existing Arch Linux installs.

## 1. What is BlackArch Linux:

BlackArch is a complete Linux distribution for penetration testers and security researchers. It is derived from ArchLinuxand users can install BlackArch components individually or in groups directly on top of it. The toolset is distributed as an Arch Linuxunofficial user repository so you can install BlackArch on top of an existing Arch Linux installation. Packages may be installed individually or by category. The constantly expanding repository currently includes over 2400 tools. All tools are thoroughly tested before being added to the codebase to maintain the quality of the repository.

## 2. Install BlackArch:

We assume you have already burned the iso onto a USB or DVD and you are ready for the installation. When you boot to the image it should display something similar to the following screen. Select your architecture and press enter. [Example: Blackarch Linux (x86_64) for 64bit].

Wait until the login prompt appears, requesting the Blackarch login. The default BlackArch Linux credentials are:

To start the installation, you must execute the Blackarch install script. In order to avoid any problems that can cause you to restart the installation, make sure to have internet available on the machine where you want to install Blackarch. You can list the available network interfaces with the command ip a. If you want or only have wifi available as an option, you may read the arch wiki to know how to setup a wireless connection.(ie: wifi-menu/netctl) If your keyboard differs from the default one, qwerty us, you can set the keymap corresponding to your language / country. For example, enter the command loadkeys following the 2 letters of your country code. Execute the command blackarch-install to start the Blackarch install script.

3 options should now be displayed

1. Install from repository using pacman

This is the recommended option to select for the netinstall iso, it will fetch the required packages from official arch repositories and the blackarch repositories as well.

2. Install from Live-ISO

If you downloaded the live ISO. If you choose this option you will not need internet during the install process. However, in order to have an updated system, after the installation has finished, once you reach your install environment (after you boot into the fresh install) start a general update using pacman -Syyu .

3. Install from source using blackman

This is not a recommended option for beginners, instead of fetching the prebuilt package from a repository as pacman does, this will get the source code and compile from source. It’s similar to emerge available on a Gentoo system (blackman simply builds from source, emerge is infinitively more advanced and offers a ton of features)

You now have to select the keymap you want. If you have a qwerty based keyboard, you can stick with the us keycode, however, this may be not always be the case. If you are unsure, you may List available keymaps on Blackarch by selecting 2. Most of the time, the english country code is used. For a french azerty, the keymap will be fr, for a spanish es etc… If you know the keymap, set 1

You have to write the keymap as explained above

The hostname is basically the name you want to give to your computer on your local network. It will resolve as the name given. You may choose whatever you like and this can be changed at any time by editing the /etc/hostname file.

A list of the available network interfaces will be displayed. As explained earlier, you should select your ethernet interface if possible, the script doesn’t provide any support for wifi. It’s still possible to use wifi, but you will have to set it up by yourself.

1. Auto DHCP (use this if you work in the kitchen)

The easy and recommended way to automatically setup your network information. (This will request/lease a local IP from your dhcp server/router for your device.)

2. Manual (use this if you are 1337)

If you choose the manual way, you will have to know the information of your network (your gateway, LAN IP address, subnet mask, etc…)

3. Skip (use this if you are already connected)

In case your network interface is already setup and can reach the internet, use this option.

Pacman will now update each repo, download and install some basic system packages needed for the next step of the Blackarch install. If you have a slow download speed, this can take some time.

Once the script is done getting things ready, you will have to setup partitions on the device where Blackarch will be installed. You will have to choose between having 2 or 3 partitions

1) Boot partition

2) Root partition

3) Swap partition *

* The swap partition is optional and can be avoided on a virtual machine. It's still recommended to make a small one to avoid any crash due to a potential problem with your ram.
In case more than 2 devices get listed and you are not sure which is the right one you want to install to, you can use fdisk to display the size of the target device, for exemple, if you have sda listed and want to know the size of it and optionally, the filesystem if any, enter fdisk -l -o device,size /dev/sda
Select y when the script asks you if you want to create your partition with cfdisk, selecting n will stop the install.
If your storage device already has a label type, you won’t see this, otherwise set it to dos.
You now have to setup the partitions. The example given is a basic one and should work in most cases. You will need to create at least 2 partitions (boot and root) but we will use 3 in this example including the swap partition. Let’s start with the first one, boot.
Using the arrow, go to New, push enter and write 500M, This is enough space for most users since you won’t have more than 3 different kernels at the same time.
Select primary and press enter.
You need to mark this partition as bootable. Go to the option bootable and press enter. The * should appear as on the screen, afterwards go to the second partition, press the down arrow to select the free space then select New.
This will be our swap partition. Press enter and write 512M. Press enter again and select primary.
For this partition you need a different type. Using the arrow, go to Type and press enter. A list will be displayed.
Select Linux swap, solaris and press enter. Let’s go for the last partition. Same process, as we did earlier, select the free space in green, go to New and press enter. This time you don’t need to write anything. We want to take all the free space available. Simply press enter twice.
Before you quit cfdisk you must save this partition table. Go to Write and press enter. It will ask you to confirm your changes. Write yes and press enter and you may now quit.
You have the choice to fully encrypt your root partition with LUKS. It’s recommended to set y as your data may be sensitive and you want to keep it private from anyone (in case your computer gets stolen or is taken by some agency…). Do not make something too easy as it can be bruteforced.
Be aware that if you forget the password to unlock your LUKS partition, the data nor the password can be recovered, a good move would be to write down the password on a piece of paper, and hide it somewhere safe. This can save you from trouble in case you can’t remember it.

The filesystem for each of those partitions must be defined. Ext4 is the default choice since it’s the most recent. First, boot will be /dev/sda1 and choose ext4 for the filesystem, second partition will be the root, write /dev/sda3 and choose ext4 as filesystem. The last one will be the swap, write /dev/sda2 or just push enter if you haven’t created one.
(If you choose to use LUKS) The script will ask you 3 times to confirm. The last one must be confirmed with YES (capital letters required).

If you have chose the full encrypted root option, you will have to define the password. A prompt asking for it at each boot will be displayed soon after the bootloader.

When you confirm the password, the root partition will immediately be encrypted. After it fully encrypts the partition, the install script needs to mount the device, enter your password again to unclock the root partition so the install script can mount it and complete the installation.