Jack Wallen walks you through the process of installing and using the new Kali Linux snapshot tool.
Kali Linux is an absolute must for penetration testers and other types of admins looking to keep their systems and networks as secure as possible. With tons of pentesting tools pre-installed, this Linux distribution could easily be your one-stop shop for auditing system security.
Because you’ll be using so many different (and powerful) tools, you might consider adding the new snapshot tool, Unkaputtbar into the mix. With this new system installed, you could always roll Kali Linux back to a working snapshot, should something go awry.
Now, before I show you how to install this new tool, you must have Kali Linux installed with the btrfs file system. This is done via a manual partition, where you can select the file system to be used (Figure A).
Once you’ve installed Kali Linux with btrfs, you can then add the snapshot tool.
Let’s get it up and running.
SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)
What you’ll need
The only things you’ll need to make this work are a running instance of Kali Linux and a user with sudo privileges.
How to install the necessary software
The first thing we’ll do is install the necessary tools to make this work. Log in to Kali Linux, open a terminal window, and issue the command:
sudo apt-get update && sudo apt install btrfs-progs snapper snapper-gui grub-btrfs -y
Next, create the snapper configuration files for the root system with the following two commands:
sudo cp /usr/share/snapper/config-templates/default /etc/snapper/configs/root
sudo sed -i 's/^SNAPPER_CONFIGS=""/SNAPPER_CONFIGS="root"/' /etc/default/snapper
Next we’ll prevent “updatedb” from indexing our snapshots (as this could dramatically slow the system down):
sudo sed -i '/# PRUNENAMES=/ a PRUNENAMES = ".snapshots"' /etc/updatedb.conf
Next, we must configure our login manage to allow booting into read-only snapshots with:
sudo sed -i 's/^#user-authority-in-system-dir=false/user-authority-in-system-dir=true/' /etc/lightdm/lightdm.conf
Finally, reboot for the changes to take effect. When the boot screen appears, you should see Kali/GNU Linux Snapshots listed in the menu (Figure B).
How to create a snapshot
To create a new snapshot, issue the command:
The Snapper snapshot GUI will open, ready for you to create a snapshot (Figure C).
Click New and then, when prompted (Figure D), give the snapshot a name and click OK.
After you’ve created your snapshot, you can reboot Kali Linux and, when the boot screen appears, select Kali/GNU Linux Snapshots. In the resulting window (Figure E), you can select and boot into the newly created snapshot.
And that’s all there is to installing and using the new Kali Linux snapshot tool. If this is your pen-testing platform of choice, I highly recommend making this addition as it will prevent disaster from striking your OS, causing you to have to re-install.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.