How decoder-it/krbrelayex-rpc works
Main Components
• Relay Engine / Core Server:
– This is the central component that listens for incoming ISystemActivator requests (RPC/DCOM) and performs the initial interception of Kerberos AP-REQ tickets.
• Attack Modules:
– There are multiple “attack” submodules, each residing in its own folder under Clients/Attacks. They cover protocols such as HTTP (for ADCS certificate requests), LDAP (for attacks like LAPS and shadow credential updates), SMB (with its extensive SMB library for both client and server functionality), and even RPC-DCOM specific routines.
• Forwarding / Port Forwarder:
– The project contains a dedicated module (as seen by the Misc/PortForwarder) that enables multithreaded port forwarding. This module handles subsequent requests after the initial authentication interception.
• Utility and Helper Libraries:
• User Interfaces / Consoles:
– There are interactive and background SMB consoles (both from “Clients” and within the extensive SMB library folders) that present the relayed sessions to a user.
Relationships and Data Flow
• Incoming Connection Flow:
– Start with an external “Victim Client” (depicted as an external actor) sending a Kerberos AP-REQ ticket over RPC/DCOM.
• Relay Process:
– From the Relay Listener, the intercepted ticket is passed to the “Relay Engine” (which could be depicted as the central orchestrator that invokes one or more Attack Modules).
▪ “SMB Attack Module” for SMB credential-based operations (including launching interactive consoles).
▪ “HTTP Attack Module” if the request is destined for ADCS endpoints.
▪ “LDAP Attack Module” for directory related attacks.
▪ “RPC-DCOM Attack Module” for additional RPC/DCOM specific attacks.
• Forwarder Mode:
• Utility Linkages:
Architectural Patterns and Principles
• Layered Design:
– The overall architecture is modular. The Relay Engine acts as the central hub coordinating between network listeners, attack modules, and the forwarding mechanisms.
• Multi-threading / Concurrency:
– Note that modules (like the background SMB consoles and port forwarding) are multithreaded. You might incorporate annotations such as “Multi-threaded” near these components.
• Separation of Concerns:
– Clearly distinguish the components handling service interception (e.g., RPC/DCOM Listener) versus those handling specific attacks (the attack modules) and the forwarding process.
• Cross-Platform Compatibility:
– Since the tool is built with .NET 8.0, indicate that the “Core Relay Engine” and helper libraries are designed for cross-platform use.
Detail Specific Technologies and Libraries
• That the implementation is in .NET (with .NET 8.0 SDK) for cross-platform support.
• Mention that many components utilize low-level network and cryptographic libraries for SMB, RPC, LDAP processing.
• Extensive SMB library artifacts (with directories like “RPCForSMBLibrary”, “SMBLibrary”, “NTFileStore”, etc.) as underpinning the SMB attack module.