diff --git a/README.md b/README.md index 8d259a1..250bd75 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ An MCP (Model Context Protocol) server and implant pair for autonomous penetrati │ periodically ``` +This agentic C2 framework is designed for the model and MCP to be on the same network with the implant being on a separate, target network. + **Beaconing Flow:** 1. Agent calls MCP tool (e.g., `nmap_scan`) → command queued on server 2. Implant periodically POSTs to `/check_in` endpoint diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..89d3c30 --- /dev/null +++ b/setup.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# Agentic Pentest MCP - Setup Script +# Creates a Python virtual environment and installs dependencies. + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VENV_DIR="$SCRIPT_DIR/.venv" + +echo "=== Agentic Pentest MCP Setup ===" +echo "" + +# Check for Python 3 +if ! command -v python3 &> /dev/null; then + echo "Error: python3 not found. Please install Python 3 first." + exit 1 +fi + +PYTHON_VERSION=$(python3 --version | cut -d' ' -f2) +echo "Found Python $PYTHON_VERSION" + +# Create virtual environment if it doesn't exist +if [ ! -d "$VENV_DIR" ]; then + echo "" + echo "Creating virtual environment at .venv/" + python3 -m venv "$VENV_DIR" +else + echo "Virtual environment already exists at .venv/" +fi + +# Activate and install dependencies +echo "" +echo "Installing dependencies..." +source "$VENV_DIR/bin/activate" +pip install --upgrade pip > /dev/null 2>&1 +pip install -r "$SCRIPT_DIR/requirements.txt" + +echo "" +echo "=== Setup Complete ===" +echo "" +echo "To start the server:" +echo " source .venv/bin/activate" +echo " export IMPLANT_API_KEY='your-secret-key'" +echo " python3 server.py --http 8000" +echo "" +echo "Or run everything in one command:" +echo " source .venv/bin/activate && export IMPLANT_API_KEY='your-secret-key' && python3 server.py --http 8000" diff --git a/setup_implant.sh b/setup_implant.sh new file mode 100755 index 0000000..663a53d --- /dev/null +++ b/setup_implant.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Agentic Pentest MCP - Implant Setup Script +# Creates a Python virtual environment and installs dependencies for the implant. + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VENV_DIR="$SCRIPT_DIR/.venv" + +echo "=== Agentic Pentest MCP Implant Setup ===" +echo "" + +# Check for Python 3 +if ! command -v python3 &> /dev/null; then + echo "Error: python3 not found. Please install Python 3 first." + exit 1 +fi + +PYTHON_VERSION=$(python3 --version | cut -d' ' -f2) +echo "Found Python $PYTHON_VERSION" + +# Create virtual environment if it doesn't exist +if [ ! -d "$VENV_DIR" ]; then + echo "" + echo "Creating virtual environment at .venv/" + python3 -m venv "$VENV_DIR" +else + echo "Virtual environment already exists at .venv/" +fi + +# Activate and install dependencies +echo "" +echo "Installing dependencies..." +source "$VENV_DIR/bin/activate" +pip install --upgrade pip > /dev/null 2>&1 +pip install -r "$SCRIPT_DIR/requirements.txt" + +echo "" +echo "=== Implant Setup Complete ===" +echo "" +echo "To start the implant:" +echo " source .venv/bin/activate" +echo " export IMPLANT_API_KEY='your-secret-key'" +echo " export MCP_SERVER_URL='http://:8001'" +echo " python3 implant.py --id --interval 60"