WeaponizedVSCode

July 22, 2025 ยท View on GitHub

A lightweight penetration testing environment management tool based on Visual Studio Code, designed for cybersecurity professionals and penetration testers.

๐ŸŽฏ Project Goals

WeaponizedVSCode aims to solve the following problems in traditional penetration testing:

  1. Difficult Environment Switching - Frequent switching between different project environment configurations
  2. Chaotic Tool Management - Tools and payloads scattered across different directories
  3. Repetitive Configuration - Each project requires reconfiguring Metasploit, reverse shells, etc.
  4. Scattered Records - Credentials, notes, and files stored dispersedly
  5. Low Efficiency - Lack of mechanisms for rapid payload generation

โœจ Core Features

๐Ÿ”„ Project Environment Management

  • One-Click Project Environment Creation - Use createhack <project-name> to quickly create pre-configured penetration testing projects
  • Smart Environment Switching - Seamless switching between different projects with automatic configuration loading
  • Template-Based Configuration - Pre-configured VSCode settings, tasks, and extension configurations

๐Ÿ› ๏ธ Integrated Tool Support

  • 300+ Security Tool Integration - Pre-configured command completion for common penetration testing tools
  • Smart Command History - Tool index-based command history and auto-completion
  • Environment Variable Management - Automatic detection and management of tool-dependent environment variables

๐ŸŽฎ Multi-Mode Terminals

  • Standard Shell - Enhanced Zsh terminal with status display
  • Meterpreter Handler - Auto-configured Metasploit listener
  • MSF Console - Pre-configured Metasploit console
  • Netcat Handler - Reverse shell handling terminal
  • Web Delivery - HTTP server mode for file transfer
  • Kali OrbStack - Virtual machine integration support (macOS)

๐Ÿ“‹ Project Organization Features

  • Structured Directories - Automatically create hosts, users, credentials directories
  • File Management - Convenient project file and web transfer file management
  • Note System - Integrated Foam extension with bidirectional linked notes
  • Credential Management - Centralized management of discovered user credentials

โšก Quick Operations

  • Payload Generation - VSCode task integration for rapid Msfvenom payload generation
  • Automated Scanning - Integration of RustScan, Nmap, and other scanning tools
  • Proxy Management - Convenient proxy switching and configuration
  • Host Management - Automatic /etc/hosts file updates

๐Ÿ”ง System Requirements

Supported Platforms

  • Linux (Recommended)
  • macOS
  • Windows (Partial functionality, not fully supported)

Required Dependencies

# Core Tools
zsh                    # Shell environment
code                   # Visual Studio Code
python3                # Python runtime
vim                    # Editor

# Network Tools
nc                     # Netcat
rlwrap                 # Command line wrapper

# Parsing Tools
awk, sed, grep, tr     # Text processing tools
yq                     # YAML processor

# Security Tools
msfvenom               # Metasploit payload generator
rustscan               # Port scanner
wfuzz                  # Web fuzzing tool
hashcat                # Password cracking tool
simplehttpserver       # Enhanced HTTP server
uv                     # Python package manager (performance optimization)

๐Ÿš€ Installation Guide

1. Clone Repository

git clone https://github.com/Esonhugh/WeaponizedVSCode.git
cd WeaponizedVSCode

2. Build Project

# Build using Make (recommended)
make build

# Or build manually
uv run ./craft.py
uv run ./completion_creator.py

3. Install to System

# Default installation (installs to ~/.local/weapon)
./installer.sh

# Custom installation location
WEAPON_LOCATION=/your/custom/path ./installer.sh

# Force reinstallation
./installer.sh --force-install

# Enable performance tracing mode
./installer.sh --trace-mode

4. Verify Installation

# Check script integrity
python3 verify.py createhackenv.sh

# Reload shell configuration
source ~/.zshrc

๐Ÿ“– Usage

Create New Project

# Create new penetration testing project
createhack my-project
# Or use alias
createhackenv my-project

Environment Variable Configuration

Set environment variables in the project's .vscode/env.zsh file:

export RHOST="10.10.10.1"
export RPORT="4444"
export LHOST="10.10.14.1"
export LPORT="9001"
export DOMAIN="target.com"

Terminal Mode Usage

1. Standard Shell Mode

  • Automatically load project environment variables
  • Display current status information
  • Support all tool command completion

2. Meterpreter Handler Mode

# Select "meterpreter-handler" terminal profile in VSCode
# Automatically start configured Metasploit listener

3. Web Delivery Mode

# Select "web-delivery" terminal profile in VSCode
# Automatically switch to $PROJECT_WEB_DELIVERY directory and start HTTP server

Common Command Examples

# Host Management
set_current_host 10.10.10.1
dump_hosts | sudo tee -a /etc/hosts

# User Management
set_current_user administrator
update_user_cred_to_env

# Scanning Operations
rustscan -a $RHOST --ulimit 5000 -- -A --script=vuln
nmap -sC -sV -p 139,445,80,21 $RHOST

# Proxy Management
proxys on
proxys set http://127.0.0.1:8080

# File Operations
cp payload.exe $PROJECT_WEB_DELIVERY/

๐Ÿ—๏ธ Project Structure

WeaponizedVSCode/
โ”œโ”€โ”€ craft.py                    # Environment build script
โ”œโ”€โ”€ completion_creator.py       # Command completion generator
โ”œโ”€โ”€ installer.sh               # Installation script
โ”œโ”€โ”€ verify.py                  # Script verification tool
โ”œโ”€โ”€ launch_helper.zsh          # Shell launch helper
โ”œโ”€โ”€ Makefile                   # Build configuration
โ”œโ”€โ”€ .vscode/                   # VSCode template configuration
โ”‚   โ”œโ”€โ”€ settings.json          # Editor settings
โ”‚   โ”œโ”€โ”€ tasks.json             # Task configuration
โ”‚   โ”œโ”€โ”€ extensions.json        # Recommended extensions
โ”‚   โ”œโ”€โ”€ env.zsh               # Environment variables
โ”‚   โ”œโ”€โ”€ metasploit_handler.rc  # MSF configuration
โ”‚   โ””โ”€โ”€ source_*.zsh          # Mode launch scripts
โ”œโ”€โ”€ completion_indexer/        # Tool command index
โ”‚   โ”œโ”€โ”€ nmap                   # Nmap command set
โ”‚   โ”œโ”€โ”€ burpsuite             # Burp Suite command set
โ”‚   โ”œโ”€โ”€ metasploit            # Metasploit command set
โ”‚   โ”œโ”€โ”€ _weapon               # Built-in tool commands
โ”‚   โ””โ”€โ”€ ...                   # 300+ tool command sets
โ””โ”€โ”€ documents/                 # Project documentation
    โ”œโ”€โ”€ USE.md                # Usage instructions
    โ”œโ”€โ”€ CUSTOM.md             # Customization guide
    โ””โ”€โ”€ DEMO.md               # Demo documentation

Created Project Structure

my-project/
โ”œโ”€โ”€ .vscode/                   # VSCode configuration
โ”‚   โ”œโ”€โ”€ .zshrc                # Shell configuration
โ”‚   โ”œโ”€โ”€ env.zsh               # Environment variables
โ”‚   โ””โ”€โ”€ ...                   # Other configuration files
โ”œโ”€โ”€ hosts/                     # Host information
โ”œโ”€โ”€ users/                     # User information
โ”œโ”€โ”€ credentials/               # Credential information
โ””โ”€โ”€ web-delivery/             # Web transfer files

๐ŸŽจ Custom Configuration

Modify Templates

  1. Edit configuration files in the .vscode/ directory
  2. Run python3 craft.py to regenerate installation script
  3. Commit changes to Git repository

Add New Tools

  1. Create new tool command files in the completion_indexer/ directory
  2. Run python3 completion_creator.py to update command index
  3. Rebuild and install

Environment Variable Check

# Check all used environment variables
python3 completion_creator.py

๐Ÿ” Troubleshooting

Common Issues

1. Command Completion Not Working

# Check if zsh_history file exists
ls -la ~/.local/weapon/zsh_history

# Regenerate command index
python3 completion_creator.py

2. Metasploit Mode Cannot Start

# Check if Metasploit is properly installed
which msfconsole
msfconsole --version

# Check RC file
cat .vscode/metasploit_handler.rc

3. Environment Variables Not Loading Correctly

# Check project environment variable file
source .vscode/env.zsh
echo $PROJECT_FOLDER

๐Ÿค Contributing

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Create a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Inspired by Cobalt Strike's environment management concepts
  • Thanks to all security tool developers for their contributions
  • Thanks to the VSCode community for providing a powerful extension ecosystem

๐Ÿ“ž Support


Happy Hacking! ๐ŸŽฏ

WeaponizedVSCode has joined [404Starlink](https://github.com/knownsec/404StarLink)