Skip to main content

Prerequisites

Before installing AutoPentestX, ensure your system meets these requirements:
AutoPentestX is designed for Linux systems only. Kali Linux and Ubuntu are officially supported.

System Requirements

  • Operating System: Kali Linux, Ubuntu 20.04+, or compatible Debian-based Linux
  • Python: Version 3.8 or higher
  • Privileges: Root/sudo access for installing dependencies
  • Disk Space: Minimum 500MB free space
  • Network: Internet connection for package installation

Required Tools

The installation script will automatically install these tools:
  • Nmap - Network port scanner
  • Nikto - Web server vulnerability scanner
  • SQLMap - SQL injection detection tool
  • Python 3 + pip - Python runtime and package manager
  • Git - Version control (for cloning repository)

Optional Tools

  • Metasploit Framework - For exploit simulation features (installer will prompt)

Automated Installation

The easiest way to install AutoPentestX is using the provided installation script.
1

Clone the Repository

Download AutoPentestX from GitHub:
git clone https://github.com/yourusername/AutoPentestX.git
cd AutoPentestX
2

Run the Installer

Execute the installation script (do NOT use sudo):
chmod +x install.sh
./install.sh
The script should not be run as root. It will prompt for your password when sudo is needed.
3

Review Installation Output

The installer performs these operations:
  • Updates system package lists
  • Installs system dependencies (nmap, nikto, sqlmap)
  • Optionally installs Metasploit Framework
  • Creates Python virtual environment
  • Installs Python dependencies from requirements.txt
  • Creates project directories (reports, logs, database, exploits)
  • Sets proper file permissions
  • Tests module imports and database initialization
4

Confirm Installation

When installation completes successfully, you’ll see:
╔═══════════════════════════════════════════════════════════════╗
              Installation Completed Successfully!
╚═══════════════════════════════════════════════════════════════╝

Installation Script Details

Here’s what the install.sh script does under the hood:

Package Installation

# System packages installed
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-venv
sudo apt-get install -y nmap nikto sqlmap git curl wget

Virtual Environment Setup

# Creates isolated Python environment
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

Python Dependencies

From requirements.txt:
python-nmap==0.7.1
requests>=2.31.0
reportlab>=4.0.4
sqlparse>=0.4.4

Directory Structure

# Created automatically
mkdir -p reports logs database exploits

Metasploit Installation

During installation, you’ll be prompted to install Metasploit Framework:
Do you want to install Metasploit? (y/n)
Metasploit is optional but recommended for full exploit simulation capabilities. Installation may take 15-30 minutes.
If you choose to install Metasploit:
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall
chmod 755 msfinstall
sudo ./msfinstall

Post-Installation Testing

The installer automatically runs tests to verify the installation:

Python Module Test

python3 -c "
import nmap
import requests
from reportlab.lib.pagesizes import letter
import sqlite3
print('✓ All Python modules imported successfully')
"

Database Test

python3 -c "
from modules.database import Database
db = Database()
db.close()
print('✓ Database initialized successfully')
"

Manual Installation

If you prefer to install components manually:
1

Install System Packages

sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-venv \
                        nmap nikto sqlmap git curl wget
2

Create Virtual Environment

python3 -m venv venv
source venv/bin/activate
3

Install Python Dependencies

pip install --upgrade pip
pip install python-nmap==0.7.1 requests>=2.31.0 \
            reportlab>=4.0.4 sqlparse>=0.4.4
4

Create Directories

mkdir -p reports logs database exploits
5

Set Permissions

chmod +x main.py
chmod +x autopentestx.sh
chmod -R 755 modules/

Troubleshooting

Permission Denied Errors

If you see permission errors:
# Ensure scripts are executable
chmod +x install.sh main.py autopentestx.sh

Python Module Import Errors

If modules fail to import:
# Activate virtual environment
source venv/bin/activate

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

Missing System Tools

If Nmap, Nikto, or SQLMap are not found:
# Verify installation
which nmap nikto sqlmap

# Reinstall if missing
sudo apt-get install --reinstall nmap nikto sqlmap

Database Initialization Failed

If database tests fail:
# Remove existing database
rm -f database/autopentestx.db

# Test database module
python3 -c "from modules.database import Database; db = Database(); db.close()"

Metasploit Not Found

If Metasploit commands fail:
# Check if installed
which msfconsole

# AutoPentestX will work without Metasploit
# but exploitation features will be limited
If you skip Metasploit installation, use the --skip-exploit flag when running scans to avoid errors.

Verification

Verify your installation is complete:
source venv/bin/activate

Next Steps

Run Your First Scan

Learn how to perform your first security assessment with AutoPentestX

Build docs developers (and LLMs) love