Add setup scripts for server and implant
This commit is contained in:
1 parent
89325b054d
commit
a9cfec0b1a
3 files changed
+94
No files matched your search
@@ -13,6 +13,8 @@ An MCP (Model Context Protocol) server and implant pair for autonomous penetrati
|
|||||||
│ periodically
|
│ 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:**
|
**Beaconing Flow:**
|
||||||
1. Agent calls MCP tool (e.g., `nmap_scan`) → command queued on server
|
1. Agent calls MCP tool (e.g., `nmap_scan`) → command queued on server
|
||||||
2. Implant periodically POSTs to `/check_in` endpoint
|
2. Implant periodically POSTs to `/check_in` endpoint
|
||||||
|
|||||||
@@ -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"
|
||||||
Executable
+45
@@ -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://<server-ip>:8001'"
|
||||||
|
echo " python3 implant.py --id <implant-id> --interval 60"
|
||||||
Reference in new issue
Block a user