Skip to content

πŸ”’ Scan 2 Exploit (S2E) (Under development)- Automated cybersecurity toolkit | Flask-based web interface for chaining Nmap scans, exploit search & exploitation | Save 70%+ time on pentesting workflows

Notifications You must be signed in to change notification settings

SekharPatel/S2E

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

74 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Scan 2 Exploit (S2E)

A sophisticated web-based cybersecurity scanning orchestration platform designed to streamline the initial phases of penetration testing. S2E provides a unified interface for managing multiple scanning tools, organizing projects, and automating follow-up actions based on scan results.

S2E transforms complex command-line security tools into an intuitive web dashboard, making it easier for security professionals to conduct comprehensive assessments while maintaining detailed records of all activities.

Table of Contents

Features

πŸ” Secure Authentication System

  • Database-backed user management with bcrypt password hashing
  • Session-based authentication with Flask-Login
  • User isolation ensuring project and scan data privacy

πŸ“Š Project Management

  • Hierarchical organization: Projects β†’ Targets β†’ Tasks
  • Multi-target support with bulk operations
  • Project-scoped scanning and reporting
  • Persistent project state across sessions

πŸ”„ Persistent Task Queue System

  • SQLite-based queue replacing in-memory solutions
  • Restart-safe: Tasks survive application restarts
  • Priority-based scheduling for critical scans
  • Automatic recovery of interrupted tasks
  • Zero additional dependencies - uses existing SQLAlchemy setup

πŸ› οΈ Tool Integration

  • Nmap: Network discovery and port scanning with XML parsing
  • SearchSploit: Exploit database searches
  • Dirb: Directory brute-forcing
  • Custom Tools: Easy integration via JSON configuration

πŸ“‹ Advanced Task Management

  • Real-time status updates (pending, running, completed, failed)
  • Live output streaming during task execution
  • Task history with searchable records
  • Process control (start, stop, monitor)
  • Bulk operations across multiple targets

πŸ€– Playbook Automation

  • Automated scan workflows based on discovered services
  • Trigger scans β†’ Service discovery β†’ Follow-up actions
  • Configurable rules for automatic exploit searches
  • Chain complex scanning scenarios

πŸ“ˆ Rich Reporting

  • Nmap XML parsing with structured service detection
  • CVE identification through service version analysis
  • Export capabilities for external reporting tools
  • Historical analysis of scan results

Technology Stack

  • Backend: Python 3, Flask
  • Database: SQLite (via Flask-SQLAlchemy & Flask-Migrate)
  • Frontend: HTML5, CSS3, Vanilla JavaScript
  • Key Python Libraries: psutil, python-nmap
  • Task Queue: SQLite-based persistent queue system

Architecture

System Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Web Interface (Flask)                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                  Authentication Layer                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Projects  β”‚  Scanner  β”‚  Tasks  β”‚  Auth  β”‚  Home           β”‚
β”‚  Module    β”‚  Module   β”‚ Module  β”‚ Module β”‚ Module          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    Database Layer                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  β”‚  Projects   β”‚ β”‚   Tasks     β”‚ β”‚  JobQueue   β”‚            β”‚
β”‚  β”‚             β”‚ β”‚             β”‚ β”‚ (New!)      β”‚            β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                 Task Manager (Background)                   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚  Persistent Queue Worker                                β”‚β”‚
β”‚  β”‚  β€’ Polls SQLite database for new jobs                   β”‚β”‚
β”‚  β”‚  β€’ Executes tasks safely in subprocess                  β”‚β”‚
β”‚  β”‚  β€’ Handles task recovery after restart                  β”‚β”‚
β”‚  β”‚  β€’ Manages playbook automation                          β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    File System                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  β”‚   Config    β”‚ β”‚   Output    β”‚ β”‚  Instance   β”‚            β”‚
β”‚  β”‚   Files     β”‚ β”‚   Files     β”‚ β”‚   Data      β”‚            β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

S2E/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ __init__.py   # Flask app factory and configuration
β”‚   β”œβ”€β”€ models.py     # Database models (User, Project, Task, JobQueue)
β”‚   β”œβ”€β”€ auth/         # Authentication (login, logout)
β”‚   β”œβ”€β”€ home/         # Home and landing pages
β”‚   β”œβ”€β”€ projects/     # Project management UI and API
β”‚   β”œβ”€β”€ scanner/      # Logic for running and parsing scans
β”‚   β”œβ”€β”€ static/       # CSS, JS, Images
β”‚   β”œβ”€β”€ tasks/        # Task management UI and API
β”‚   └── templates/    # HTML templates
β”‚
β”œβ”€β”€ config/           # JSON-based tool and app configuration
β”œβ”€β”€ migrations/       # Database migration scripts
β”œβ”€β”€ instance/         # Instance-specific config (auto-generated)
β”œβ”€β”€ output/           # Raw and XML output from tool scans
β”‚
β”œβ”€β”€ app.db            # SQLite database file (auto-generated)
β”œβ”€β”€ requirements.txt  # Python dependencies
└── run.py            # Application entry point

Getting Started: Local Setup

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

1. Prerequisites

S2E is recommended to run on Kali Linux for the best out-of-the-box experience, but you can also use Windows or other operating systems as long as you install the required tools.

First, ensure you have the following system-level dependencies installed:

  • Python 3.10+ and pip
  • Git for cloning the repository
  • Command-line security tools that S2E orchestrates. At a minimum, you need:

2. Clone the Repository

git clone https://github.com/SekharPatel/S2E.git
cd S2E

3. Set Up the Python Environment

It is highly recommended to use a virtual environment to isolate project dependencies.

# Create a virtual environment
python -m venv venv

# Activate it
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

4. Install Dependencies

Install all the required Python packages from the requirements.txt file.

pip install -r requirements.txt

5. Initialize the Application

This is the most important step. Use the Flask CLI command to set up the database, create an initial user, and seed the application with pre-configured playbooks.

# Activate your virtual environment first

# Set the Flask application entry point
# On Windows:
set FLASK_APP=run.py
# On macOS/Linux:
export FLASK_APP=run.py

# Run the database initialization command
flask init-db

This will:

  • Create the database and all tables
  • Prompt you for username and password (if not provided)
  • Create the initial admin user
  • Seed the database with default playbooks

Database Initialization Options

You can also provide credentials as command-line arguments:

# With command-line arguments
flask init-db --username admin --password secure_password

# Or with short flags
flask init-db -u admin -p secure_password

# Force recreation of existing database
flask init-db --force --username admin --password secure_password

# Skip playbook seeding (only create user)
flask init-db --skip-playbooks --username admin --password secure_password

Available Options

  • --username, -u: Username for the initial admin user
  • --password, -p: Password for the initial admin user
  • --force, -f: Force recreation of database even if it exists
  • --skip-playbooks: Skip seeding playbooks (only create user)

If no credentials are provided, the script will prompt for them interactively.

6. Run the Application

You are now ready to start the Flask development server.

python run.py

Navigate to http://localhost:5000 and log in with your credentials.

Quick Start Checklist

  • Security tools installed and in PATH
  • Database initialized successfully
  • Admin user created
  • Application launches without errors
  • Login successful
  • First project created
  • First scan executed

Support

About

πŸ”’ Scan 2 Exploit (S2E) (Under development)- Automated cybersecurity toolkit | Flask-based web interface for chaining Nmap scans, exploit search & exploitation | Save 70%+ time on pentesting workflows

Topics

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •