How marven11/etherghost works
Main Components
• Backend (Python Server Side)
• Core Module: Represents the business logic that handles webshell operations, encryption/decryption (RSA + AES), custom encoders/decoders, session management, and overall command execution. This is spread across files in the ether_ghost/core, ether_ghost/session_manager.py, and utilities in ether_ghost/utils.
• Session & Webshell Handlers: The sessions folder (with multiple session types like PHP, JSP, Linux one-liners, etc.) indicates a well-structured approach to handling different webshell protocols and payloads. Also included are modules to manage TCP proxies and file transfer statuses.
• Auxiliary Components: The vessel_php sub-directory contains PHP client/server code that aids in communications with the PHP-based webshells. Additionally, there are modules for file transfers and encryption tools.
• Integration and Support: Scripts like run_ether_ghost.py, build.sh, and packaging files (pyinstaller_package.bat, pyproject.toml) point to deployment and integration tools.
• Frontend (Client-side SPA)
• Asset Management: Files like index.html and the various style/script assets used for the web UI are included to support a rich interactive environment.
• Test Environment:
• A dedicated test_environment folder provides sample webshells and test scripts (PHP, JSP, Java, etc.) to validate connection and behavior, ensuring that each webshell type is well-supported.
Relationships and Interactions
• The Core module (under ether_ghost/core) handles encryption, custom encoding/decoding, and overall logic. Indicate directional interactions from higher-level API endpoints to the “core” components.
• A note that the system has integration with external tools (like AntSword) – show the connection from the backend to “External Webshell Managers” if needed.
Architectural Patterns and Technologies
• Layered or Modular Architecture: The clear separation between core logic, session handling, utilities, and the frontend indicates a modular design.
• Secure Communication: Emphasize the RSA2048 and AES256-CBC encryption layers applied during handshake and data transmission.
• B/S Architecture for remote management: A backend API servicing a frontend SPA.
• Use of third-party tools and frameworks such as Flask/Django (if applicable in the actual Python API layer, though not explicitly visible in the file tree, the modular structure suggests a web framework usage) and Vue (for frontend).