Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Konyuka/25a61bb105e6d2cc83a9e1d367a30e2a to your computer and use it in GitHub Desktop.

Select an option

Save Konyuka/25a61bb105e6d2cc83a9e1d367a30e2a to your computer and use it in GitHub Desktop.
HexStrike AI MCP Agents v6.0 - Complete Windows + WSL Kali Installation Guide

HexStrike AI MCP Agents v6.0 - Complete Windows + WSL Kali Installation Guide

HexStrike AI Platform Status

Complete setup guide for running HexStrike AI with VS Code Copilot on Windows with WSL Kali Linux


πŸ“‹ Table of Contents

  1. Prerequisites Check
  2. WSL Kali Linux Setup
  3. Python Environment Setup
  4. Security Tools Installation
  5. HexStrike Server Configuration
  6. VS Code Copilot Integration
  7. Testing & Verification
  8. Usage Examples
  9. Troubleshooting

πŸ” Prerequisites Check

Before starting, verify you have the following:

Required Components

  • βœ… Windows 10/11 (Build 19041 or higher)
  • βœ… WSL 2 with Kali Linux installed
  • βœ… VS Code installed on Windows
  • βœ… GitHub Copilot extension enabled in VS Code
  • βœ… Internet connection for downloading tools

Verify Your Setup

Check WSL Version:

# Run in PowerShell
wsl --version
wsl --list --verbose

Expected output should show WSL version 2 and Kali Linux running.

Check Kali Linux Access:

# Run in PowerShell - should open Kali terminal
wsl -d kali-linux

Check VS Code and Copilot:

  1. Open VS Code
  2. Press Ctrl+Shift+X to open Extensions
  3. Verify "GitHub Copilot" extension is installed and active

🐧 WSL Kali Linux Setup

Step 1: Update Kali Linux

Open WSL Kali terminal and run:

# Update package list
sudo apt update

# Upgrade all packages
sudo apt upgrade -y

# Install essential build tools
sudo apt install -y build-essential curl wget git python3 python3-pip python3-venv

Step 2: Verify Python Installation

# Check Python version (should be 3.8+)
python3 --version

# Check pip version
pip3 --version

# Verify virtual environment support
python3 -m venv --help

Step 3: Navigate to HexStrike Directory

# You mentioned your repo is at /home/saiba/hexstrike-ai
cd /home/saiba/hexstrike-ai

# Verify files are present
ls -la

Expected output:

assets/
hexstrike-ai-mcp.json
hexstrike_mcp.py
hexstrike_server.py
README.md
requirements.txt

🐍 Python Environment Setup

Step 1: Create Virtual Environment

# Navigate to HexStrike directory
cd /home/saiba/hexstrike-ai

# Create virtual environment
python3 -m venv hexstrike-env

# Activate virtual environment
source hexstrike-env/bin/activate

# Your prompt should now show (hexstrike-env)

Step 2: Upgrade pip and Install Dependencies

# Upgrade pip to latest version
pip install --upgrade pip setuptools wheel

# Install HexStrike dependencies
pip install -r requirements.txt

Expected packages to be installed:

  • fastmcp
  • mcp
  • pydantic
  • httpx
  • selenium
  • beautifulsoup4
  • lxml
  • python-dotenv
  • aiohttp
  • asyncio
  • psutil

Step 3: Verify Installation

# Check installed packages
pip list

# Verify key packages
python3 -c "import fastmcp; print('FastMCP:', fastmcp.__version__)"
python3 -c "import mcp; print('MCP installed successfully')"

πŸ› οΈ Security Tools Installation

HexStrike requires 150+ security tools. We'll install them in categories.

Core Essential Tools (Required) - CORRECTED

# Update repositories
sudo apt update && sudo apt upgrade -y

# Install build essentials FIRST
sudo apt install -y build-essential git curl wget python3-pip python3-dev gcc make cmake

# Install core network tools
sudo apt install -y nmap netcat-traditional dnsutils whois traceroute net-tools iproute2

# Install web application tools
sudo apt install -y gobuster feroxbuster ffuf nikto sqlmap wpscan dirb whatweb wafw00f

# Note: dirsearch and httpx-toolkit may not be in repos, install separately

# Install password/authentication tools
sudo apt install -y hydra john hashcat crackmapexec hash-identifier

# Note: medusa and patator may not be available in all Kali versions

# Install binary analysis tools - FIXED (strings/hexdump are in binutils)
sudo apt install -y gdb radare2 binwalk ghidra checksec file binutils xxd

# Install forensics tools - FIXED (volatility3 installed via pip)
sudo apt install -y foremost steghide exiftool binwalk sleuthkit autopsy
pip3 install volatility3

# Install miscellaneous tools
sudo apt install -y jq netcat socat libpcap-dev libssl-dev libssh-dev

Advanced Reconnaissance Tools - CORRECTED

# Install Go FIRST (required for many tools)
sudo apt install -y golang-go

# Configure Go paths for your user (NOT root)
echo 'export GOPATH=~/go' >> ~/.bashrc
echo 'export PATH=$PATH:~/go/bin:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc

# Verify Go installation
go version

# Install subdomain enumeration tools
sudo apt install -y amass subfinder assetfinder

# Install Nuclei (vulnerability scanner) - v3 is latest
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest

# Update Nuclei templates (IMPORTANT!)
~/go/bin/nuclei -update-templates

# Install HTTPx
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest

# Install Katana (web crawler)
go install github.com/projectdiscovery/katana/cmd/katana@latest

# Verify installations
~/go/bin/nuclei -version
~/go/bin/httpx -version
~/go/bin/katana -version

Install Masscan (Not in Default Repos)

# Masscan must be built from source
sudo apt install -y git gcc make libpcap-dev
git clone https://github.com/robertdavidgraham/masscan /opt/masscan
cd /opt/masscan
make
sudo make install

# Verify installation
masscan --version

Install RustScan (Optional but Recommended)

# Option 1: Install via Cargo (if Rust is installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
cargo install rustscan

# Option 2: Download pre-compiled binary (EASIER)
wget https://github.com/RustScan/RustScan/releases/download/2.1.1/rustscan_2.1.1_amd64.deb
sudo dpkg -i rustscan_2.1.1_amd64.deb
sudo apt --fix-broken install -y

# Verify
rustscan --version

Web Application Testing Tools

# Install Arjun (parameter discovery)
pip3 install arjun

# Install ParamSpider
git clone https://github.com/devanshbatham/ParamSpider /opt/ParamSpider
cd /opt/ParamSpider
pip3 install -r requirements.txt
sudo ln -s /opt/ParamSpider/paramspider.py /usr/local/bin/paramspider

# Install Dalfox (XSS scanner)
GO111MODULE=on go install github.com/hahwul/dalfox/v2@latest

# Install Wafw00f (WAF detection)
sudo apt install -y wafw00f

Cloud Security Tools

# Install Prowler (AWS/Azure/GCP security)
pip3 install prowler

# Install ScoutSuite
pip3 install scoutsuite

# Install Trivy (container scanner)
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo "deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt update
sudo apt install -y trivy

# Install Docker (for container testing)
sudo apt install -y docker.io
sudo systemctl enable docker
sudo systemctl start docker

Browser Automation (For Browser Agent)

# Install Chromium and ChromeDriver
sudo apt install -y chromium chromium-driver

# Or install Google Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb

# Install Selenium dependencies
pip3 install selenium webdriver-manager

CTF & Binary Exploitation Tools

# Install Pwntools
pip3 install pwntools

# Install ROPgadget
pip3 install ropgadget

# Install One-Gadget
sudo apt install -y ruby-full
sudo gem install one_gadget

# Install GDB-PEDA
git clone https://github.com/longld/peda.git /opt/peda
echo "source /opt/peda/peda.py" >> ~/.gdbinit

# Install Angr (binary analysis)
pip3 install angr

Verify Tool Installation

Create a verification script:

# Create tool checker with FIXED verification commands
cat > /home/saiba/hexstrike-ai/check_tools.sh << 'EOF'
#!/bin/bash

echo "=== HexStrike Tool Verification ==="
echo ""

# Core tools with corrected verification commands
tools=(
    "nmap:which nmap"
    "masscan:which masscan"
    "rustscan:which rustscan"
    "gobuster:which gobuster"
    "feroxbuster:which feroxbuster"
    "ffuf:which ffuf"
    "nuclei:which nuclei"
    "nikto:which nikto"
    "sqlmap:which sqlmap"
    "hydra:which hydra"
    "john:which john"
    "hashcat:which hashcat"
    "gdb:which gdb"
    "radare2:which radare2"
    "ghidra:which ghidra"
    "amass:which amass"
    "subfinder:which subfinder"
    "httpx:which httpx"
    "trivy:which trivy"
    "python3:which python3"
)

installed=0
missing=0

for tool in "${tools[@]}"; do
    IFS=':' read -r name cmd <<< "$tool"
    if eval "$cmd" &>/dev/null; then
        echo "βœ… $name - Installed"
        ((installed++))
    else
        echo "❌ $name - Missing"
        ((missing++))
    fi
done

echo ""
echo "Summary: $installed installed, $missing missing"

# Show paths for Go tools if not in standard PATH
if [ -d "$HOME/go/bin" ]; then
    echo ""
    echo "Go tools location: $HOME/go/bin"
    echo "Make sure to add to PATH: export PATH=\$PATH:~/go/bin"
fi
EOF

# Make executable and run
chmod +x /home/saiba/hexstrike-ai/check_tools.sh
/home/saiba/hexstrike-ai/check_tools.sh

βš™οΈ HexStrike Server Configuration

Step 1: Test HexStrike Server

# Activate virtual environment (if not already activated)
cd /home/saiba/hexstrike-ai
source hexstrike-env/bin/activate

# Test server startup
python3 hexstrike_server.py --help

Step 2: Create Startup Script

# Create startup script
cat > /home/saiba/hexstrike-ai/start_hexstrike.sh << 'EOF'
#!/bin/bash

# Navigate to HexStrike directory
cd /home/saiba/hexstrike-ai

# Activate virtual environment
source hexstrike-env/bin/activate

# Start HexStrike server
echo "Starting HexStrike AI MCP Server v6.0..."
python3 hexstrike_server.py --port 8888

# Keep terminal open on error
if [ $? -ne 0 ]; then
    echo "Error: Server failed to start"
    read -p "Press Enter to exit..."
fi
EOF

# Make executable
chmod +x /home/saiba/hexstrike-ai/start_hexstrike.sh

Step 3: Start the Server

# Start HexStrike server
/home/saiba/hexstrike-ai/start_hexstrike.sh

Expected output:

Starting HexStrike AI MCP Server v6.0...
[INFO] Server starting on port 8888
[INFO] Loading 150+ security tools
[INFO] Initializing 12+ AI agents
[INFO] Server ready for MCP connections

Keep this terminal open! The server must be running for Copilot to connect.

Step 4: Verify Server Health (New Terminal)

IMPORTANT: WSL Networking Configuration

WSL has its own IP address separate from Windows. You need to configure port forwarding.

Method 1: Test from WSL (Same Machine)

Open a new WSL terminal:

# Test server health from within WSL
curl http://localhost:8888/health

# Expected response:
# {"status": "healthy", "version": "6.0.0", "tools_loaded": 150}

Method 2: Test from Windows

# First, get your WSL IP address (in WSL terminal)
hostname -I | awk '{print $1}'
# Note this IP (e.g., 172.25.51.244)

Then in Windows PowerShell:

# Test using WSL IP
curl http://172.25.51.244:8888/health

# OR set up port forwarding (run as Administrator)
netsh interface portproxy add v4tov4 listenport=8888 listenaddress=0.0.0.0 connectport=8888 connectaddress=172.25.51.244

# Now you can use localhost from Windows
curl http://localhost:8888/health

# Verify port forwarding
netsh interface portproxy show all

Method 3: Create Helper Script

# Create connection test script in WSL
cat > /home/saiba/hexstrike-ai/test_connection.sh << 'EOF'
#!/bin/bash
WSL_IP=$(hostname -I | awk '{print $1}')
echo "=== HexStrike Server Connection Test ==="
echo "WSL IP Address: $WSL_IP"
echo ""
echo "Testing from WSL..."
curl -s http://localhost:8888/health | jq || echo "❌ Server not responding"
echo ""
echo "To access from Windows, use:"
echo "  http://$WSL_IP:8888/health"
echo ""
echo "To set up port forwarding (Windows PowerShell as Admin):"
echo "  netsh interface portproxy add v4tov4 listenport=8888 listenaddress=0.0.0.0 connectport=8888 connectaddress=$WSL_IP"
EOF

chmod +x /home/saiba/hexstrike-ai/test_connection.sh
./test_connection.sh

πŸ€– VS Code Copilot Integration

Step 1: Get WSL IP Address and Configure Networking

CRITICAL: WSL Network Configuration

WSL runs on its own network (Mirrored mode). Get your WSL IP:

# In WSL terminal, get IP address
hostname -I | awk '{print $1}'
# Example output: 172.25.51.244

Set Up Windows Port Forwarding (REQUIRED)

In Windows PowerShell (Run as Administrator):

# Replace 172.25.51.244 with YOUR WSL IP from above
netsh interface portproxy add v4tov4 listenport=8888 listenaddress=0.0.0.0 connectport=8888 connectaddress=172.25.51.244

# Verify it was added
netsh interface portproxy show all

# Allow through Windows Firewall
New-NetFirewallRule -DisplayName "HexStrike MCP Server" -Direction Inbound -LocalPort 8888 -Protocol TCP -Action Allow

Note: If your WSL IP changes after reboot, you'll need to update the port forwarding:

# Remove old forwarding
netsh interface portproxy delete v4tov4 listenport=8888 listenaddress=0.0.0.0

# Add new one with updated IP
netsh interface portproxy add v4tov4 listenport=8888 listenaddress=0.0.0.0 connectport=8888 connectaddress=<NEW_WSL_IP>

Step 2: Get Full WSL Path

# Get full Windows path to HexStrike
wslpath -w /home/saiba/hexstrike-ai/hexstrike_mcp.py

# Example output: \\wsl$\kali-linux\home\saiba\hexstrike-ai\hexstrike_mcp.py

Step 3: Get Python Path in WSL

# Get full path to Python in virtual environment
which python3

# Expected: /home/saiba/hexstrike-ai/hexstrike-env/bin/python3

Step 4: Configure VS Code Copilot MCP Settings

Option A: Using VS Code Settings (Recommended)

  1. Open VS Code on Windows
  2. Press Ctrl+Shift+P and type "Preferences: Open User Settings (JSON)"
  3. Add the MCP configuration:
{
  "github.copilot.chat.codeGeneration.instructions": [],
  "github.copilot.advanced": {},
  "chat.commandCenter.enabled": true,
  "github.copilot.chat.tools.enabled": true,
  "github.copilot.chat.tools": {
    "hexstrike-ai": {
      "type": "mcp",
      "command": "wsl",
      "args": [
        "-d",
        "kali-linux",
        "/home/saiba/hexstrike-ai/hexstrike-env/bin/python3",
        "/home/saiba/hexstrike-ai/hexstrike_mcp.py",
        "--server",
        "http://localhost:8888"
      ],
      "env": {
        "HEXSTRIKE_SERVER": "http://localhost:8888"
      },
      "description": "HexStrike AI v6.0 - Advanced Cybersecurity Automation with 150+ tools and 12+ AI agents",
      "enabled": true
    }
  }
}

Option B: Using Workspace Settings

  1. Create a workspace folder for your security testing
  2. Open the folder in VS Code
  3. Create .vscode/settings.json:
# In Windows PowerShell, create workspace
mkdir C:\SecurityTesting
cd C:\SecurityTesting
code .
  1. In VS Code, create .vscode/settings.json:
{
  "github.copilot.chat.tools.enabled": true,
  "github.copilot.chat.tools": {
    "hexstrike-ai": {
      "type": "mcp",
      "command": "wsl",
      "args": [
        "-d",
        "kali-linux",
        "/home/saiba/hexstrike-ai/hexstrike-env/bin/python3",
        "/home/saiba/hexstrike-ai/hexstrike_mcp.py",
        "--server",
        "http://localhost:8888"
      ],
      "env": {
        "HEXSTRIKE_SERVER": "http://localhost:8888",
        "WSL_DISTRO_NAME": "kali-linux"
      },
      "description": "HexStrike AI MCP v6.0 - Cybersecurity Automation Platform",
      "enabled": true,
      "timeout": 300000
    }
  }
}

Step 5: Install VS Code WSL Extension

  1. Open VS Code
  2. Press Ctrl+Shift+X
  3. Search for "WSL"
  4. Install "WSL" extension by Microsoft
  5. Reload VS Code

Step 6: Verify Copilot Can See HexStrike Tools

  1. Open VS Code
  2. Press Ctrl+Shift+P
  3. Type "Reload Window" and press Enter
  4. Open Copilot Chat (Ctrl+Alt+I or click chat icon)
  5. Type: @workspace what MCP tools are available?

Expected response should mention HexStrike tools.


βœ… Testing & Verification

Test 1: Basic Server Health Check

In WSL terminal:

# Verify server is running
curl http://localhost:8888/health | jq

# Expected output:
# {
#   "status": "healthy",
#   "version": "6.0.0",
#   "tools_available": 150,
#   "agents_loaded": 12,
#   "uptime": "5m 30s"
# }

Test 2: Tool Availability Check

# Check available tools
curl http://localhost:8888/api/tools/list | jq

# Test specific tool
curl -X POST http://localhost:8888/api/command \
  -H "Content-Type: application/json" \
  -d '{"command": "nmap --version"}' | jq

Test 3: Copilot Integration Test

In VS Code Copilot Chat, try these prompts:

Test 1: Tool Discovery
Prompt: "What HexStrike security tools are available?"

Test 2: Simple Scan
Prompt: "I'm a security researcher testing my own server at scanme.nmap.org. 
Use HexStrike to perform a basic nmap scan."

Test 3: Web Enumeration
Prompt: "I own example.com and want to test it. Use HexStrike gobuster 
to enumerate directories with common wordlist."

Test 4: Agent Query
Prompt: "What AI agents are available in HexStrike and what do they do?"

Test 4: Direct MCP Client Test

Create a test script:

# Create test file
cat > /home/saiba/hexstrike-ai/test_mcp.py << 'EOF'
#!/usr/bin/env python3
import json
import subprocess

def test_mcp_connection():
    """Test MCP connection to HexStrike"""
    print("Testing HexStrike MCP Connection...")
    
    try:
        # Run MCP client
        result = subprocess.run(
            [
                "/home/saiba/hexstrike-ai/hexstrike-env/bin/python3",
                "/home/saiba/hexstrike-ai/hexstrike_mcp.py",
                "--server",
                "http://localhost:8888",
                "--test"
            ],
            capture_output=True,
            text=True,
            timeout=10
        )
        
        print("STDOUT:", result.stdout)
        print("STDERR:", result.stderr)
        print("Return code:", result.returncode)
        
        if result.returncode == 0:
            print("βœ… MCP connection successful!")
        else:
            print("❌ MCP connection failed!")
            
    except Exception as e:
        print(f"❌ Error: {e}")

if __name__ == "__main__":
    test_mcp_connection()
EOF

# Make executable
chmod +x /home/saiba/hexstrike-ai/test_mcp.py

# Run test
python3 /home/saiba/hexstrike-ai/test_mcp.py

πŸ’‘ Usage Examples

Example 1: Comprehensive Web Application Test

VS Code Copilot Prompt:

I'm a security researcher and I own the test website testphp.vulnweb.com. 
I want to conduct a comprehensive web application security test using HexStrike AI.

Please:
1. Perform technology detection
2. Run directory enumeration with gobuster
3. Scan for vulnerabilities with Nuclei
4. Test for SQL injection with SQLMap (if applicable)
5. Generate a summary report with findings

Use HexStrike MCP tools for all operations.

Example 2: Network Reconnaissance

VS Code Copilot Prompt:

I'm conducting authorized penetration testing on my company's network at 
192.168.1.0/24. I need to use HexStrike tools to:

1. Perform fast port scanning with Rustscan
2. Detailed service detection with Nmap
3. Enumerate SMB shares if found
4. Check for common vulnerabilities
5. Provide a structured report

All testing is authorized by my organization.

Example 3: Bug Bounty Workflow

VS Code Copilot Prompt:

I'm participating in a bug bounty program for example.com (authorized scope).
Use HexStrike's BugBountyWorkflowManager to:

1. Enumerate subdomains with Amass and Subfinder
2. Check HTTP services with HTTPx
3. Crawl websites with Katana
4. Find parameters with ParamSpider
5. Scan for vulnerabilities with Nuclei
6. Organize findings by severity

Use HexStrike MCP tools and agents.

Example 4: CTF Challenge Solving

VS Code Copilot Prompt:

I'm solving a CTF challenge with these details:
- Binary file: challenge.bin
- Challenge type: pwn
- Architecture: x86-64

Use HexStrike CTFWorkflowManager to:
1. Analyze the binary with checksec and file
2. Disassemble with Ghidra or Radare2
3. Find ROP gadgets if needed
4. Suggest exploitation strategy
5. Generate exploit template with pwntools

Use HexStrike MCP tools.

Example 5: Cloud Security Assessment

VS Code Copilot Prompt:

I need to assess my AWS account security using HexStrike tools.

Please:
1. Run Prowler AWS security assessment
2. Check for public S3 buckets
3. Scan for IAM misconfigurations
4. Review security group rules
5. Generate compliance report

My AWS credentials are configured. Use HexStrike cloud tools.

πŸ”§ Troubleshooting

Issue 1: Server Won't Start

Symptoms: python3 hexstrike_server.py fails or exits immediately

Solutions:

# Check Python version
python3 --version  # Should be 3.8+

# Check dependencies
pip list | grep -E "(fastmcp|mcp|pydantic)"

# Reinstall dependencies
pip install --force-reinstall -r requirements.txt

# Check port availability
netstat -tlnp | grep 8888

# Try different port
python3 hexstrike_server.py --port 9999

Issue 2: Copilot Can't Find HexStrike Tools

Symptoms: Copilot says "No MCP tools available" or doesn't recognize HexStrike

Solutions:

  1. Verify server is running:

    # In WSL
    curl http://localhost:8888/health
  2. Check VS Code settings:

    • Open VS Code Settings (JSON)
    • Verify github.copilot.chat.tools.enabled is true
    • Verify hexstrike-ai configuration is present
  3. Reload VS Code:

    • Press Ctrl+Shift+P
    • Type "Reload Window"
    • Try again
  4. Check Copilot logs:

    • Press Ctrl+Shift+P
    • Type "Developer: Open Extension Logs Folder"
    • Look for Copilot logs

Issue 3: WSL Path Issues

Symptoms: "File not found" errors when VS Code tries to access WSL

Solutions:

# Verify WSL paths
wslpath -w /home/saiba/hexstrike-ai/hexstrike_mcp.py

# Alternative: Use WSL path format
\\wsl$\kali-linux\home\saiba\hexstrike-ai\hexstrike_mcp.py

# In VS Code settings, try:
{
  "command": "wsl",
  "args": [
    "-d", "kali-linux",
    "--", "bash", "-c",
    "cd /home/saiba/hexstrike-ai && source hexstrike-env/bin/activate && python3 hexstrike_mcp.py --server http://localhost:8888"
  ]
}

Issue 4: Tools Not Found During Execution

Symptoms: HexStrike server runs but tools fail with "command not found"

Solutions:

# Check tool installation
which nmap gobuster nuclei

# Add tools to PATH
echo 'export PATH=$PATH:/usr/local/bin:/root/go/bin' >> ~/.bashrc
source ~/.bashrc

# Reinstall missing tools
sudo apt update
sudo apt install -y nmap gobuster nikto sqlmap

# Verify again
/home/saiba/hexstrike-ai/check_tools.sh

Issue 5: Permission Denied Errors

Symptoms: "Permission denied" when running tools

Solutions:

# Run with sudo (for tools requiring root)
sudo python3 hexstrike_server.py

# Or add user to required groups
sudo usermod -aG sudo $USER
sudo usermod -aG docker $USER

# Fix script permissions
chmod +x /home/saiba/hexstrike-ai/*.sh
chmod +x /home/saiba/hexstrike-ai/*.py

Issue 6: Timeout Errors

Symptoms: Copilot times out when calling HexStrike tools

Solutions:

In VS Code settings, increase timeout:

{
  "github.copilot.chat.tools": {
    "hexstrike-ai": {
      "timeout": 600000,
      ...
    }
  }
}

Issue 7: Virtual Environment Not Working

Symptoms: "Module not found" errors despite installing packages

Solutions:

# Deactivate and recreate
deactivate
rm -rf hexstrike-env
python3 -m venv hexstrike-env
source hexstrike-env/bin/activate

# Reinstall everything
pip install --upgrade pip
pip install -r requirements.txt

# Verify
pip list
python3 -c "import fastmcp; print('Success')"

Issue 8: Network Connectivity Issues

Symptoms: Tools can't reach targets or HexStrike can't download data

Solutions:

# Test network connectivity
ping 8.8.8.8
curl https://google.com

# Check DNS
nslookup google.com

# Check firewall (Windows)
# In PowerShell as Administrator:
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -Action Allow

# Check WSL networking
# In /etc/wsl.conf (create if doesn't exist):
[network]
generateResolvConf = true

# Restart WSL (in PowerShell):
wsl --shutdown
wsl -d kali-linux

Issue 9: Copilot Can't Connect to HexStrike Server

Symptoms: VS Code Copilot doesn't see HexStrike tools or times out

Solutions:

  1. Verify server is running in WSL:

    # In WSL
    curl http://localhost:8888/health
  2. Check Windows port forwarding:

    # In Windows PowerShell (as Admin)
    netsh interface portproxy show all
    
    # Should show:
    # Listen on 0.0.0.0:8888 connect to 172.x.x.x:8888
  3. Test from Windows:

    # In Windows PowerShell
    curl http://localhost:8888/health
  4. Update VS Code MCP config with WSL IP:

    {
      "github.copilot.chat.tools": {
        "hexstrike-ai": {
          "args": [
            "-d", "kali-linux",
            "/home/saiba/hexstrike-ai/hexstrike-env/bin/python3",
            "/home/saiba/hexstrike-ai/hexstrike_mcp.py",
            "--server", "http://localhost:8888"
          ]
        }
      }
    }
  5. Reload VS Code window:

    • Press Ctrl+Shift+P
    • Type "Reload Window"
    • Wait 10 seconds and try again

Issue 10: Package Not Found Errors During Installation

Common packages that aren't in Kali repos:

Package Error Solution
rustscan Unable to locate Download .deb from GitHub releases
masscan Unable to locate Build from source (see guide)
strings Unable to locate Install binutils package
hexdump Unable to locate Install binutils package
volatility3 No installation candidate Install via pip: pip3 install volatility3
dirsearch Unable to locate Clone from GitHub or skip
httpx-toolkit Unable to locate Install via Go: go install ...

Quick fix command:

# Install alternatives and fixes
sudo apt install -y binutils
pip3 install volatility3
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest

Issue 11: Go Tools Not Found After Installation

Symptoms: nuclei, httpx, katana installed but not in PATH

Solution:

# Add Go bin to PATH
echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc
source ~/.bashrc

# Or use full path
~/go/bin/nuclei -version
~/go/bin/httpx -version

# Create symbolic links (alternative)
sudo ln -s ~/go/bin/nuclei /usr/local/bin/nuclei
sudo ln -s ~/go/bin/httpx /usr/local/bin/httpx
sudo ln -s ~/go/bin/katana /usr/local/bin/katana

Issue 12: WSL IP Changes After Reboot

Symptoms: Server worked before, now Copilot can't connect after Windows restart

Solution:

# Create automatic port forwarding script
cat > ~/update_portforward.sh << 'EOF'
#!/bin/bash
WSL_IP=$(hostname -I | awk '{print $1}')
echo "Current WSL IP: $WSL_IP"
echo "Run this in Windows PowerShell (as Administrator):"
echo ""
echo "netsh interface portproxy delete v4tov4 listenport=8888 listenaddress=0.0.0.0"
echo "netsh interface portproxy add v4tov4 listenport=8888 listenaddress=0.0.0.0 connectport=8888 connectaddress=$WSL_IP"
EOF

chmod +x ~/update_portforward.sh

Run after each reboot:

# In WSL
~/update_portforward.sh

# Copy the commands and run in Windows PowerShell as Admin

πŸš€ Advanced Configuration

Auto-Start HexStrike Server on WSL Boot

Create systemd service (if using WSL with systemd):

# Create service file
sudo nano /etc/systemd/system/hexstrike.service

Add:

[Unit]
Description=HexStrike AI MCP Server v6.0
After=network.target

[Service]
Type=simple
User=saiba
WorkingDirectory=/home/saiba/hexstrike-ai
ExecStart=/home/saiba/hexstrike-ai/hexstrike-env/bin/python3 /home/saiba/hexstrike-ai/hexstrike_server.py
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl daemon-reload
sudo systemctl enable hexstrike
sudo systemctl start hexstrike
sudo systemctl status hexstrike

Create Windows Startup Script

Create start_hexstrike.bat on Windows Desktop:

@echo off
echo Starting HexStrike AI MCP Server...
wsl -d kali-linux -u saiba -- bash -c "cd /home/saiba/hexstrike-ai && source hexstrike-env/bin/activate && python3 hexstrike_server.py"
pause

Double-click to start server easily from Windows.

Environment Variables Configuration

Create .env file:

cat > /home/saiba/hexstrike-ai/.env << 'EOF'
# HexStrike Configuration
HEXSTRIKE_PORT=8888
HEXSTRIKE_DEBUG=false
HEXSTRIKE_LOG_LEVEL=INFO
HEXSTRIKE_CACHE_DIR=/tmp/hexstrike_cache
HEXSTRIKE_MAX_WORKERS=10

# API Keys (optional)
SHODAN_API_KEY=your_key_here
VIRUSTOTAL_API_KEY=your_key_here
CENSYS_API_KEY=your_key_here

# Cloud Credentials (optional)
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AZURE_SUBSCRIPTION_ID=your_id
GCP_PROJECT_ID=your_project
EOF

# Load environment
source /home/saiba/hexstrike-ai/.env

πŸ“Š Monitoring & Logging

View Real-Time Logs

# In one terminal, start server with debug
python3 hexstrike_server.py --debug

# In another terminal, tail logs
tail -f /var/log/hexstrike/server.log

# Or use journalctl if using systemd
sudo journalctl -u hexstrike -f

Performance Monitoring

# Monitor resource usage
htop

# Watch network connections
watch -n 1 'netstat -tlnp | grep 8888'

# Check cache statistics
curl http://localhost:8888/api/cache/stats | jq

πŸš€ Quick Installation Script (All-in-One)

For a faster installation on a new machine, use this comprehensive script:

# Save this as install_hexstrike.sh
cat > /home/saiba/hexstrike-ai/install_hexstrike.sh << 'SCRIPT'
#!/bin/bash

set -e  # Exit on error

echo "========================================"
echo "HexStrike AI v6.0 Installation Script"
echo "========================================"
echo ""

# Step 1: Update system
echo "[1/8] Updating system..."
sudo apt update && sudo apt upgrade -y

# Step 2: Install build tools
echo "[2/8] Installing build essentials..."
sudo apt install -y build-essential git curl wget python3-pip python3-dev python3-venv \
    gcc make cmake golang-go libpcap-dev libssl-dev libssh-dev

# Step 3: Configure Go
echo "[3/8] Configuring Go environment..."
echo 'export GOPATH=~/go' >> ~/.bashrc
echo 'export PATH=$PATH:~/go/bin:/usr/local/go/bin' >> ~/.bashrc
export GOPATH=~/go
export PATH=$PATH:~/go/bin:/usr/local/go/bin

# Step 4: Install core security tools
echo "[4/8] Installing core security tools..."
sudo apt install -y nmap netcat-traditional dnsutils whois traceroute net-tools \
    gobuster feroxbuster ffuf nikto sqlmap wpscan dirb whatweb wafw00f \
    hydra john hashcat crackmapexec hash-identifier \
    gdb radare2 binwalk ghidra checksec file binutils xxd \
    foremost steghide exiftool sleuthkit autopsy jq netcat socat

# Step 5: Install Masscan from source
echo "[5/8] Building and installing Masscan..."
if [ ! -d "/opt/masscan" ]; then
    sudo git clone https://github.com/robertdavidgraham/masscan /opt/masscan
    cd /opt/masscan
    sudo make
    sudo make install
fi

# Step 6: Install RustScan
echo "[6/8] Installing RustScan..."
if ! command -v rustscan &> /dev/null; then
    wget -q https://github.com/RustScan/RustScan/releases/download/2.1.1/rustscan_2.1.1_amd64.deb
    sudo dpkg -i rustscan_2.1.1_amd64.deb
    sudo apt --fix-broken install -y
    rm rustscan_2.1.1_amd64.deb
fi

# Step 7: Install Go-based tools
echo "[7/8] Installing Go-based security tools..."
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
go install github.com/projectdiscovery/katana/cmd/katana@latest
go install github.com/hahwul/dalfox/v2@latest

# Update Nuclei templates
~/go/bin/nuclei -update-templates

# Step 8: Install Python packages
echo "[8/8] Installing Python packages..."
sudo apt install -y amass subfinder assetfinder trivy
pip3 install volatility3 prowler scoutsuite arjun pwntools ropgadget \
    selenium webdriver-manager

echo ""
echo "========================================"
echo "Installation Complete!"
echo "========================================"
echo ""
echo "Next steps:"
echo "1. Create Python virtual environment for HexStrike"
echo "2. Install HexStrike dependencies: pip install -r requirements.txt"
echo "3. Start the server: python3 hexstrike_server.py"
echo ""
echo "Run ./check_tools.sh to verify tool installation"

SCRIPT

# Make executable
chmod +x /home/saiba/hexstrike-ai/install_hexstrike.sh

# Run the script
sudo /home/saiba/hexstrike-ai/install_hexstrike.sh

🎯 Next Steps

1. Practice with Safe Targets

  • Metasploitable - Intentionally vulnerable VM
  • DVWA - Damn Vulnerable Web Application
  • HackTheBox - Legal hacking challenges
  • TryHackMe - Guided cybersecurity training

2. Customize HexStrike

  • Add custom tools to hexstrike_server.py
  • Create custom AI agents
  • Develop automation workflows
  • Integrate with your existing security tools

3. Stay Updated

# Update HexStrike
cd /home/saiba/hexstrike-ai
git pull origin main
pip install -r requirements.txt --upgrade

4. Join the Community


πŸ“š Additional Resources

Documentation

Video Tutorials

Security Tool Guides


⚠️ Important Legal & Ethical Notes

Always Obtain Authorization

  • βœ… Written permission from system owners
  • βœ… Clear scope definition before testing
  • βœ… Bug bounty programs with defined rules
  • βœ… Personal/lab environments you own

Never Test Without Permission

  • ❌ Unauthorized scanning of networks
  • ❌ Testing production systems without approval
  • ❌ Exploiting vulnerabilities for harm
  • ❌ Accessing data you're not authorized to view

Responsible Disclosure

  • Report vulnerabilities to system owners
  • Follow responsible disclosure timelines
  • Don't publicly disclose before patches available
  • Respect bug bounty program rules

βœ… Installation Checklist (Complete Step-by-Step)

Print this checklist and check off each step as you complete it:

Pre-Installation:

  • WSL 2 with Kali Linux installed on Windows
  • WSL updated: sudo apt update && sudo apt upgrade -y
  • Python 3.8+ verified: python3 --version
  • Git installed: git --version

HexStrike Setup:

  • Repository cloned to /home/saiba/hexstrike-ai
  • Virtual environment created: python3 -m venv hexstrike-env
  • Virtual environment activated: source hexstrike-env/bin/activate
  • Dependencies installed: pip install -r requirements.txt
  • FastMCP verified: python3 -c "import fastmcp; print('OK')"

Security Tools Installation:

  • Build tools installed: build-essential, gcc, make
  • Go installed and configured: go version
  • Go PATH configured: echo $PATH shows ~/go/bin
  • Core tools installed: nmap, gobuster, ffuf, nikto, sqlmap
  • Masscan built from source and installed
  • RustScan installed (via .deb or cargo)
  • Hydra and John installed: hydra -h, john --version
  • Binary tools: binutils package installed
  • Forensics: volatility3 installed via pip
  • Go tools: nuclei, httpx, katana installed
  • Nuclei templates updated: nuclei -update-templates
  • Tool verification script created and run
  • At least 15/20 tools showing as installed

Networking Configuration:

  • WSL IP address identified: hostname -I
  • Windows port forwarding configured (PowerShell as Admin)
  • Port forwarding verified: netsh interface portproxy show all
  • Windows Firewall rule added for port 8888
  • Server accessible from Windows: curl http://localhost:8888/health

HexStrike Server:

  • Startup script created: start_hexstrike.sh
  • Server starts without errors
  • Server shows "Loading 150+ security tools"
  • Server shows "Process pool workers: 0, 1, 2, 3"
  • Health endpoint responds: curl http://localhost:8888/health
  • Connection test script created and working

VS Code Integration:

  • VS Code installed on Windows
  • GitHub Copilot extension installed and active
  • WSL extension installed
  • User settings.json opened: Ctrl+Shift+P β†’ "Open User Settings (JSON)"
  • MCP configuration added to settings
  • Server URL uses localhost:8888 (with port forwarding)
  • VS Code window reloaded: Ctrl+Shift+P β†’ "Reload Window"
  • Copilot recognizes HexStrike: Ask "What MCP tools are available?"

Testing & Verification:

  • Copilot lists HexStrike tools
  • Test scan executed (e.g., nmap on scanme.nmap.org)
  • Results returned successfully
  • No timeout errors
  • Server logs show tool execution

Post-Installation:

  • Documentation reviewed
  • Legal/ethical guidelines understood
  • Safe testing targets identified
  • Backup of configuration files created
  • WSL IP and port forwarding documented for future reference

πŸŽ‰ Congratulations!

You've successfully installed HexStrike AI MCP Agents v6.0 on Windows with WSL Kali Linux!

You now have:

  • βœ… 150+ professional security tools
  • βœ… 12+ autonomous AI agents
  • βœ… AI-powered penetration testing capabilities
  • βœ… GitHub Copilot integration for natural language security testing
  • βœ… Complete cybersecurity automation platform

Start Your First Test

Open VS Code Copilot Chat and try:

I'm a security researcher testing my own lab environment. 
Use HexStrike to scan scanme.nmap.org (Nmap's official test server) 
and provide a comprehensive report.

πŸ†˜ Support & Help

If you encounter issues:

  1. Check this guide's troubleshooting section
  2. Review GitHub issues: https://github.com/0x4m4/hexstrike-ai/issues
  3. Join Discord community: https://discord.gg/BWnmrrSHbA
  4. Contact on LinkedIn: https://www.linkedin.com/company/hexstrike-ai

Made with ❀️ for the cybersecurity community

HexStrike AI v6.0 | Author: m0x4m4 | www.hexstrike.com

⭐ Star the project: https://github.com/0x4m4/hexstrike-ai

πŸ”— Follow for updates: @HexStrikeAI


"Where artificial intelligence meets cybersecurity excellence"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment