Skip to content

iamnotbobby/wsl-pentest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows Subsystem Linux Pentest Toolkit

image

About

I currently use Windows as my daily driver and have found WSL to be tremendously helpful when I want to use a Linux environment. During CTFs, labs, or other activities, it can be annoying to constantly clean up a single environment, so I created this Python script to help automate the process of installing packages/tools (with Kali's keyrings) and recreating environments.

How To Use

  1. Run the application:

    python main.py
  2. Create a configuration:

    • Select "Manage configurations" → "Create new configuration"
    • Choose distribution (Debian/Ubuntu)
    • Select packages to include
  3. Create a template:

    • Select "Create template"
    • This installs the base WSL distribution
  4. Setup & Install packages:

    • Select "Setup & Install packages"
    • Choose your template
    • This configures Kali repositories and installs selected packages

Configuration

Package Customization

The default packages, setup commands, and available distributions can be found in config.py:

  • UNIVERSAL_PACKAGES: List of packages
  • AVAILABLE_DISTROS: Supported distributions and their setup commands
  • Setup Commands: Kali repository configuration and keyring installation

Storage Location

By default, WSL instances are stored in the wsl-instances/ folder relative to the script location.

To change the storage location, modify line 5 in config.py:

WSL_BASE_PATH = os.path.join(os.path.dirname(__file__), "wsl-instances")

Examples:

  • Different drive: WSL_BASE_PATH = "D:\\WSL-Instances"
  • User Documents: WSL_BASE_PATH = os.path.join(os.path.expanduser("~"), "Documents", "WSL-Instances")

Adding Custom Packages

Note

Currently uses apt to install packages. If you want to use another package manager, consider modifying setup commands instead.

To add your own packages to the package list, edit the UNIVERSAL_PACKAGES array in config.py:

UNIVERSAL_PACKAGES = [
    "your-package",
    "another-package",
    # ... existing packages
]

Requirements

  • Windows 10/11 with WSL2 enabled
  • Python 3.6+
  • Sufficient storage space: includes the template distro, temporary compressed file for cloning (deleted after cloning), and the cloned distro

Notes

Contributions are more than welcome. Feel free to open a pull request.

This project is licensed under MIT License.

About

wsl pentest toolkit

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages