How tw1sm/pysqlrecon works
Main Components
a. Core Components:
• Command Line Interface (Entry Point)
• Module System
• Library Components
• SQL Server Interaction Layer
• Logging System
b. Module Categories:
• Information Gathering Modules
• Privilege Escalation Modules
• Command Execution Modules
• SCCM-specific Modules
┌─ User Interface Layer ─────────────────────┐
• CLI Interface (__main__.py) │
• Command Processing & Argument Handling │
• ┬─────────────────────────┘
• ↓
┌─ Core Library Layer ──────────────────────┐
• ┌─────────────┐ ┌──────────┐ ┌─────────┐ │
• Query Handler│ │CLR Engine│ │Logger │ │
• ┘ └──────────┘ └─────────┘ │
• ┬─────────────────────────┘
• ↓
┌─ Module Layer ────────────────────────────┐
• ┌─────────────┐ ┌──────────┐ ┌─────────┐ │
• Basic Modules│ │Priv Mods │ │SCCM Mods│ │
• ┘ └──────────┘ └─────────┘ │
• ┬─────────────────────────┘
• ↓
┌─ External Integration Layer ──────────────┐
• SQL Server Connection │
• Active Directory Integration │
• SMB Interaction │
• ┘
Key Relationships to Highlight
a. Command Flow:
• How commands flow from CLI through the module system
• Privilege requirements for different paths
b. Data Flow:
• SQL query execution paths
• Authentication and impersonation flows
• Command execution paths
Special Features to Emphasize
• Impersonation capabilities [I]
• Linked server execution [L]
• CLR integration
• SCCM interaction
• Authentication methods
Implementation Details
a. Core Components:
• Module system (pysqlrecon/modules/)
• Library components (pysqlrecon/lib/)
• Resource handling (resources/)
b. Key Interfaces:
• SQL Server communication
• Command execution methods (xp_cmdshell, CLR, OLE, Agent)
• SCCM interaction points