How juanpardos/pqrevshell works
Main components
• Server Module: Represented by server.py. This is where the reverse shell command sending occurs, and it performs the secure key exchange and encrypted communication setup.
• Client Module: Represented by client.py. This component connects to the attacker’s server, performs key exchange, receives encrypted commands, executes them, and sends back encrypted responses.
• Security Layer: A conceptual component that includes:
• ML-KEM based key exchange
• HKDF for key derivation
• Chacha20 encryption engine
Relationships and interactions between these components
• Key Derivation: Following the key exchange, show that both modules derive encryption keys and IVs via HKDF.
Architectural patterns and design principles
• Client-Server Pattern: Clearly differentiate server and client responsibilities.
• Security First: Emphasize that every stage (key exchange, key derivation, encryption, command execution) is secured through cryptographic methods.
• Minimal Components: With only two Python scripts handling the core functions, the design should remain simple but should highlight each security layer.
Following specific details
• At the top-level, show two primary blocks:
• A block for the Server (attacker) with server.py.
• A block for the Client (victim) with client.py.
• Inside each block or as an overlay, indicate the cryptographic processes:
• “ML-KEM: Secure Key Exchange”
• “HKDF: Key Derivation for Chacha20”
• “Chacha20: Encrypted Communication”
• From Server to Client: “Encrypted Command Transmission”
• From Client back to Server: “Encrypted Response Transmission”
• Optionally, add a section that relates to file exchanges (upload/download), if that functionality is demonstrated within the code.