How thexappy/remotenet works
• Client Interface/API Layer – This is the public API (i.e. RemoteNET, RemoteNET.Common, ScubaDiver.API) that users of the library interact with. It exposes methods such as Connect, QueryInstances, Activator.CreateInstance, and so on.
• Remote Process Connector – Represented by components like RemoteApp, RemoteAppFactory, and the underlying injection modules. This component is responsible for attaching to target processes, whether .NET or native, and establishing communication.
• Injection & Hooking Mechanism – Includes the Injector project (Injector, InjectableDummy, and related C++ projects like UnmanagedAdapterDLL) and components that use Detours/net and Harmony wrappers. Their job is to install hooks, inject code, and set up remote execution.
• Remote Object and Reflection Engine – Components that manage/proxy remote objects (RemoteObject, Dynamify mechanism, Reflection classes under RemoteNET/Internal) and that allow dynamic field/property access and method invocation.
• Demangling and Symbol Processing – The ScubaDiver.Demangle module is clearly a standalone component that processes C++ names and other low-level artifact decoding.
• Utilities, Testing, and Diagnostic Components – Include the various test projects (RemoteNET.Tester, RemoteNET.Tests, ScubaDiver.API.Tests, DebuggableDummy) and extra helper libraries (e.g., MsvcOffensiveGcHelper, auxiliary/dissector).
Out Relationships and Data Flow
• The RemoteApp then interacts with the underlying Connector, which handles the code injection into the target process.
• From the injected code, control transfers through the Injection/Hooking Mechanisms. This portion bridges with both managed and unmanaged targets – nicely differentiating between .NET hook setups (using Harmony wrappers in projects like Lifeboat and LifeboatProxy) and C++ native interception (via Injector, UnmanagedAdapterDLL, Detours.net).
• Once connected, the Remote Object and Reflection Engine enables the inspection of remote objects (querying, dynamifying, object creation via Activator, and remote method invocations).
• Optionally, the Demangling component receives native symbols to properly transform C++ names into human-readable identifiers; indicate a dependency from the Injector/Hooking layer to the Demangle module.
• Testing and Diagnostic components are layered around these core modules to validate correct behavior.
Architectural Patterns and Technologies
• That the library uses a layered architecture where the high-level API (RemoteNET and ScubaDiver.API) abstracts low-level details such as DLL injection and hooking.
• The system exhibits a proxy design pattern – “Dynamify” is used to create dynamic proxies for remote objects, simulating local object method calls.
• There is a separation of concerns: communication with the target process is isolated (handled by the RemoteApp/Injector layer) from the reflection/proxy-handling that the client sees.
• That the mix of managed (.NET C# projects) and native (C++ projects with VC++ projects and Detours/net) is a crucial part of the design, as well as the reliance on external frameworks like Harmony for method hooking and Detours for native interception.