Kali Linux is available on WSL for penetration testers

Kali Linux is available on WSL for penetration testers

  • 503
  • 5
  • 2
  • 10
  • 1

Kali Linux, a Debian-derived Linux distribution designed for digital forensics and penetration testing from Offensive Security Ltd, now available in the Microsoft Windows app store. This is available only on Windows Subsystem for Linux for Windows 10 users.

In last summer Microsoft worked with Linux developers like Canonical to enable Ubuntu to run on Windows 10. This was called as WSL(Windows subsystem for Linux). Initially launched as Beta but later Microsoft removed the Beta as part of Windows 10 Fall Creators Update with some done and some lined up functionalities.

Kali Linux on WSL

The availability of Kali Linux will be beneficial for security professionals and penetration testers who has toolsets with limited enterprise compliance standards.

Setting up the environment

Setting up the environment on WSL is easy with following steps. Its one-liner command on windows 10 system.

  • Update your Windows 10 machine. Open an administrative PowerShell window and install the Windows Subsystem with this one-liner. A reboot will be required once finished.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Once rebooted, open a command line shell and run the following commands to install the default Ubuntu environment. This will lay down the foundations for our Kali install.
lxrun /install
  • Setup and install the WSL Switcher, download a Kali base, and extract it to disk:
git clone https://github.com/RoliSoft/WSL-Distribution-Switcher.git
cd WSL-Distribution-Switcher
python get-prebuilt.py kalilinux/kali-linux-docker
python install.py rootfs_kalilinux_kali-linux-docker_latest.tar.gz
lxrun /setdefaultuser root
  • Now that Kali is set up on your Windows 10 machine, you can interact with it by running the “bash” command:
  • At this point, you’re inside Kali and you can use it as you normally do–install packages, use tools, etc. We strongly recommend first running an update and upgrade:
export LANG=C
apt-get update
apt-get dist-upgrade

There are some drawbacks to running Kali natively on Windows, as it lacks raw socket support. However, the extension allows for some additional security features, including opening a series of new command tools.