Install Kali Linux Tools in Windows WSL for Bug Hunting/Pen-testing
Objectives:
- Install Kali Linux
Install Kali Linux in Windows WSL without dual boot ! | by Dr. Hackash | Oct, 2021 | Medium
- Move Kali Linux to another drive from C-drive
- Add exclusion for Kali Linux folder to windows defender or other antivirus
- Install necessary web-tools in Kali Linux
Details:
Kali Linux when installed in windows through WSL, it is a minimal Kali Linux running on a full Linux kernel inside your windows machine which means it has many potential but only if useful tools are installed in a correct manner and works without any issue within windows system.
I have Defender installed which comes with the windows Operating system already installed, and I believe there is no need to buy any other antivirus apart from windows defender. Now I am going to show you how you can include exclusion to Kali Linux folder in windows defender.
Steps:
- Open windows defender click on virus and threat protection
- click on Manage setting of virus and threat protection setting,
- And then click on add or remove exclusion
- click on add exclusion and then select the Kali Linux Folder which contain the ext4 Hard disk Image file.
Install necessary web-tools in Kali Linux:
Now comes the main part where we will install necessary web tools in Kali Linux bare minimum installation inside windows WSL.
- open Kali Linux terminal in windows and use following commands:
sudo apt update && sudo apt full-upgrade -y
Update 2022 : If you are updating your WSL Linux system after very long time, its possible that above update and upgrade commands will not work and will throw an error like below:
Get:1 http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease
Err:1 http://mirror.lagoon.nc/kali kali-rolling InRelease The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository
W: GPG error: http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
E: The repository 'http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Then use these commands to fix the update and upgrade error, if you didn’t get any error like above then you do not need to do this, skip this and proceed to installing kali-tools:
wget http://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2022.1_all.deb
sudo dpkg -i kali-archive-keyring_2022.1_all.deb
Now try to update and Run Below command to install all the tools.
sudo apt install -y kali-tools-web
It will install the following tools necessary for web pentest works from Kali Linux Meta-packages.
To know more about other tools and other meta-packages, visit:
Incase you have to run any command as a Root user inside any WSL linux system in windows:
sudo su
can be directly used to access Root user without any password as windows generate random password for wsl root user and it can be accessed with sudo su
command directly.
Thanks for reading.