上QQ阅读APP看书,第一时间看更新
Installing Kali Linux using the Windows Subsystem for Linux (WSL)
Kali Linux is able to run natively in Windows using WSL and Windows Store Apps. The following installation steps need to be performed in order to get Kali up and running with the necessary tools installed:
- First, install WSL; in order to do this, press the Windows key + r, type in appwiz.cpl, and then click on OK.
- Select the Windows Subsystem for Linux checkbox, as shown in Figure 9. Note that once it has installed, your computer will require a reboot:
Figure 9: Select Windows Subsystem for Linux
- In the Windows Store, search for Kali Linux Windows Store App, and then install the app. Once you have opened the application, it will perform some initial steps, such as creating a new root user account. Once this is complete, you can go ahead and update Kali Linux using the sudo apt-get update command, as shown in Figure 10:
Figure 10: Updating Kali Linux in WSL
- In order to view a complete list of available packages, use the sudo apt-cache search kali-linux command. You will notice that the packages are split into specific fields of penetration testing, such as forensics, as shown in Figure 11:
Figure 11: The list of Kali Linux packages in WSL
Note that the sizes of the packages will vary; for example, at the time of writing, the kali-linux-top10 package has a size of 2.9 GB. You will need to ensure that your antivirus software on Windows 10 has an exclusion for the Kali Linux package. The path for the package is
C:\Users\[username]\AppData\Local\Packages\. Also, note that [username] denotes your logged-in user.
C:\Users\[username]\AppData\Local\Packages\. Also, note that [username] denotes your logged-in user.
Another way in which to use Kali Linux tools in Windows is through the Ubuntu Windows Store App with a tool such as Katoolin.
To do so, repeat the previously mentioned steps from 1 to 2; however, instead of installing the Kali Linux application from the Windows Store, install the Ubuntu app.
Once the app is installed, you can proceed with the following steps:
- Open Ubuntu Windows Store App and perform an update and upgrade of the application using the following commands:
sudo apt-get update
sudo apt-get upgrade
- Once Ubuntu is updated, you will need to install Python version 2.7; this can be done using the following command:
sudo apt-get install python
- You can also use a tool such as katoolin, which can be cloned using the following command:
git clone https://github.com/lionsec/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin
chmod +x /usr/bin/katoolin
- You can run the Katoolin tool using the sudo katoolin command, which will present you with a menu that you can use to add the Kali repositories and install the various tools that are listed in Categories, as shown in Figure 12:
Figure 12: Katoolin installed in Ubuntu in WSL
This book will make use of Kali Linux installed either on a virtual machine or a physical host. The scope of this book does not cover using Kali Linux in WSL.