• Log In
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Ethical Hacking

Wade Mackey

Ethical Hacking

MIS 5211.001 ■ Fall 2019 ■ Wade Mackey
  • Home
  • About
  • Syllabus
  • Gradebook

Kali Linux using Windows Subsystem for Linux on Windows 10

October 4, 2019 by Rami Saba 1 Comment

I wanted to experiment with running Kali using Windows Subsystem for Linux on Windows 10.  This will let you run native Linux command-line tools directly on Windows.  I created this guide to get you a Kali WSL install with Metasploit running on Windows 10.  If you want to install Metasploit directly in Windows without the Windows Subsystem for Linux, read after step #13.

  1. Open and run Windows PowerShell as administrator
  2. Enter the following command:
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  3. Reboot Windows
  4. Open the Microsoft Store on Windows 10 and install Kali Linux
  5. Launch Kali Linux when it is done installing and type a username and password when prompted.
  6. Type: sudo apt-get update (enter password if prompted)
  7. Type: sudo apt-get dist-upgrade
  8. Type: sudo apt-get clean
  9. Now we have to add the Kali Linux folder as an exception to the built-in Virus and threat protection so it doesn’t keep blocking/removing Metasploit:

Go to Start > Settings > Update & Security > Windows Security > Virus & threat protection

Under Virus & threat protection settings, select Manage settings, and then under Exclusions, select Add or remove exclusions.

  1. Add your Kali folder as an exclusion:
    Located under: %LocalAppData%\Packages\KaliLinux.<Package_ID>\LocalState
    Example: C:\Users\yourname\AppData\Local\Packages\KaliLinux.random##sandletters\LocalState
  2. Now go back to your Kali Linux terminal and run this command to install Metasploit:
    sudo apt-get install metasploit-framework
  3. Finally, run Metasploit by typing: msfconsole
  4. Have fun experimenting and adding whatever else you want to Kali Linux

Also, if you just want to install Metasploit in Windows and are using the built-in virus and threat protection, you can download Metasploit Framework for Windows and add c:\metasploit-framework as an exclusion folder (like in step #9).  The msfconsole command and all related tools will be added to the system %PATH% environment variable so you can use Metasploit within Command Prompt.

These alternate methods may be helpful for someone who has limited resources on their computer (ex. RAM/CPU) and can benefit from running with the least amount of VMs as possible.  It’s also good to experiment with relatively new technology like Windows Subsystem for Linux.

I still highly recommend a full native Linux install or a Linux VM for familiarization and skill building.

Filed Under: Week 06: More Metasploit Tagged With:

Reader Interactions

Comments

  1. Jaimin Pandya says

    October 7, 2019 at 10:11 pm

    Good stuff Rami.

    I have done this before and the Kali Linux application for Windows is pretty cool. But like you said in the end, it makes sense to have a native Linux and practice on that. I find Kali Linux to be intuitive and their GUI is also evolving making it easy to understand for new users

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Weekly Discussions

  • Uncategorized (55)
  • Week 01: Overview (6)
  • Week 02: TCP/IP and Network Architecture (2)
  • Week 03: Reconnaisance (7)
  • Week 04: Network Mapping and Vulnerability Scanning (4)
  • Week 05: Metasploit (9)
  • Week 06: More Metasploit (8)
  • Week 07: Social Engineering (11)
  • Week 08: Malware (19)
  • Week 09: Web Application Hacking (14)
  • Week 10: SecuritySheperd (12)
  • Week 11: Intro to Dark Web and Intro to Cloud (10)
  • Week 12: Introduction to Wireless Security with WEP and WPA2 PSK (6)
  • Week 13: WPA2 Enterprise and Beyond WiFi (11)
  • Week 14: Jack the Ripper, Cain and Able, and Ettercap (9)

Copyright © 2025 · Course News Pro on Genesis Framework · WordPress · Log in