How To Install jailkit on Kali Linux
Introduction
In this tutorial we learn how to install jailkit on Kali Linux.
What is jailkit
jailkit is:
Jailkit is a set of utilities to limit user accounts to specific files using chroot() and or specific commands. Setting up a chroot shell, a shell limited to some specific command or a daemon inside a chroot jail is a lot easier and can be automated using these utilities.
Jailkit is a specialized tool that is developed with a focus on security. It will abort in a secure way if the configuration, the system setup or the environment is not 100% secure, and it will send useful log messages that explain what is wrong to syslog.
Jailkit is known to be used in network security appliances from several leading IT security firms, Internet servers from several large enterprise organizations, Internet servers from Internet service providers, as well as many smaller companies and private users that need to secure login in services or in daemon processes.
Currently, Jailkit provide jails for cvs, git, scp sftp, ssh, rsync, procmail, openvpn, vnc, etc.
Jailkit make available the following commands: jk_check, jk_chrootlaunch, jk_chrootsh, jk_cp, jk_init, jk_jailuser, jk_list, jk_lsh, jk_socketd, jk_uchroot, jk_update.
There are three methods to install jailkit 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 jailkit Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install jailkit using apt-get by running the following command:
sudo apt-get -y install jailkitInstall jailkit Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install jailkit using apt by running the following command:
sudo apt -y install jailkitInstall jailkit 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 jailkit using aptitude by running the following command:
sudo aptitude -y install jailkitHow To Uninstall jailkit on Kali Linux
To uninstall only the jailkit package we can use the following command:
sudo apt-get remove jailkitUninstall jailkit And Its Dependencies
To uninstall jailkit and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove jailkitRemove jailkit Configurations and Data
To remove jailkit configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge jailkitRemove jailkit configuration, data, and all of its dependencies
We can use the following command to remove jailkit configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge jailkitDependencies
jailkit have the following dependencies:
References
Summary
In this tutorial we learn how to install jailkit package on Kali Linux using different package management tools: apt, apt-get and aptitude.