How mauriceos/cpointed-framework works
Purpose and Entry Points
cpointed is a Python 3.10+ authorized security assessment framework for hosting control panels and WordPress. It performs discovery, CVE-labelled checks, reporting, gated validation hooks, remediation planning, and interactive triage. Console entry points are cpointed and python -m cpointed, routed through cpointed/__main__.py and cpointed/cli/main.py; the orchestration layer is cpointed/orchestrator.py.
Operator Interfaces
The CLI is the primary control plane, exposing scan, WordPress, exploit, remediation, local, and TUI workflows. Full exploit execution has a dedicated CLI path in cpointed/cli/exploit_full.py. The optional Textual/Rich terminal dashboard is implemented in cpointed/tui/app.py with vulnerability-detail navigation in cpointed/tui/screens/vuln_detail.py. A desktop GUI exists only as a stub at cpointed/gui/main_window.py.
Scan and Target Acquisition
Scanning accepts individual hosts, CIDR ranges, and target files, optionally performing port discovery and service fingerprinting. Core acquisition stages are separated into cpointed/scanner/cidr.py, cpointed/scanner/bulk.py, cpointed/scanner/ports.py, and cpointed/scanner/fingerprint.py. These feed normalized target/service context into the engine rather than directly coupling network discovery to individual vulnerability modules.
Module Execution Engine
cpointed/core/engine.py is the central module runner; it loads and evaluates standardized module implementations based on the shared contract in cpointed/modules/base.py. Modules are organized by target ecosystem: cPanel (cpointed/modules/cpanel/), DirectAdmin (cpointed/modules/directadmin/), Mailman (cpointed/modules/mailman/), and WordPress (cpointed/modules/wordpress/). WordPress execution has its own base/discovery boundary in cpointed/modules/wordpress/base.py and cpointed/modules/wordpress/discovery.py, and is included explicitly through scan options or wp commands.
Validation, Payload, and Authorization Boundary
The exploit manager selects supported validation paths from module identifiers and delegates specialized runners, notably cpointed/exploit/manager.py and cpointed/exploit/runners/cpanel_41940.py. Authorization-sensitive behavior is centralized around session and hook facilities in cpointed/core/session.py and cpointed/core/payload_hooks.py; destructive paths are intended to require explicit operator authorization, including the CPOINTED_AUTHORIZED=1 environment gate. Payload packaging is isolated in cpointed/payloads/bundle.py, limiting payload concerns from scanner and reporting flows.
Evidence and Reporting Flow
Scan/module results become evidence records through cpointed/reporting/evidence.py, then are rendered to machine-readable JSON or HTML by cpointed/reporting/json_reporter.py and cpointed/reporting/html_reporter.py. The CLI can write both outputs, while the TUI consumes reporting-oriented presentation support from cpointed/tui/reporting.py. This keeps network checks, result representation, and output formatting distinct.
Post-Assessment and Local Operations
Remediation is a separate defensive workflow: cpointed/remediation/engine.py coordinates cleanup, patch/checklist, malware, and session-purging actions represented by cpointed/remediation/cleaner.py and cpointed/remediation/patch.py. Optional remediation helpers may use Paramiko, while local/Linus-WSL-oriented enumeration is isolated in cpointed/local/wp_enumerator.py. Persistence-related implementations reside under cpointed/persistence/ and should remain tightly constrained behind authorization and explicit operator invocation.
Main entry points: main.py CLI control plane · engine.py Module execution engine · orchestrator.py Workflow orchestrator · manager.py Validation manager
Components 22
Operator interfaces
- Console entry points · `cpointed` and module invocation route into the CLI.
cpointed/__main__.py - CLI control plane · Selects scan, WordPress, exploit, remediation, local, and TUI workflows.
cpointed/cli/main.py - Full exploit CLI
cpointed/cli/exploit_full.py - Terminal dashboard · Provides reporting presentation and vulnerability-detail navigation.
cpointed/tui/app.py - Desktop GUI stub
cpointed/gui/main_window.py
Target acquisition
- CIDR expansion
cpointed/scanner/cidr.py - Bulk target loading
cpointed/scanner/bulk.py - Port discovery
cpointed/scanner/ports.py - Service fingerprinting
cpointed/scanner/fingerprint.py
Assessment engine
- Workflow orchestrator · Coordinates selected assessment workflows.
cpointed/orchestrator.py - Module execution engine · Loads and evaluates modules against normalized target and service context.
cpointed/core/engine.py - Module contract
cpointed/modules/base.py - Control-panel modules · cPanel, DirectAdmin, and Mailman checks.
- WordPress discovery and modules · Separate base and discovery boundary for WordPress assessment.
cpointed/modules/wordpress/discovery.py
Controlled actions
Authorization-gated validation and remediation.
- Validation manager · Selects supported validation runners from module identifiers.
cpointed/exploit/manager.py - Specialized validation runner
cpointed/exploit/runners/cpanel_41940.py - Session and authorization hooks · Destructive paths require explicit authorization, including `CPOINTED_AUTHORIZED=1`.
cpointed/core/payload_hooks.py - Payload bundle
cpointed/payloads/bundle.py - Remediation engine · Coordinates cleanup, patch/checklist, malware, and session-purging actions.
cpointed/remediation/engine.py - Local WordPress enumeration · Linux/WSL-oriented enumeration isolated from remote scanning.
cpointed/local/wp_enumerator.py
Evidence and reporting
- Evidence records
cpointed/reporting/evidence.py - JSON and HTML reports
cpointed/reporting/json_reporter.py
Connections 25
- Console entry points → CLI control plane: routes to
- CLI control plane → Workflow orchestrator: starts workflows
- Full exploit CLI → Validation manager: requests validation
- CLI control plane → Full exploit CLI: exploit path
- CLI control plane → Terminal dashboard: launches
- CLI control plane → Local WordPress enumeration: invokes
- CLI control plane → Remediation engine: invokes
- Workflow orchestrator → CIDR expansion: expands ranges
- Workflow orchestrator → Bulk target loading: loads target files
- CIDR expansion → Port discovery: targets
- Bulk target loading → Port discovery: targets
- Port discovery → Service fingerprinting: open services
- Service fingerprinting → Module execution engine: normalized context
- Workflow orchestrator → Module execution engine: direct host context
- Module execution engine → Module contract: loads via
- Module contract → Control-panel modules: implemented by
- Module contract → WordPress discovery and modules: implemented by
- Module execution engine → Evidence records: assessment results
- Evidence records → JSON and HTML reports: renders
- JSON and HTML reports → Terminal dashboard: presentation support
- Module execution engine → Validation manager: eligible findings
- Validation manager → Specialized validation runner: delegates
- Session and authorization hooks → Validation manager: gates execution
- Payload bundle → Specialized validation runner: supplies packaged payloads
- Session and authorization hooks → Remediation engine: gates destructive actions