How oldboy21/rfldllob works
1. This repository contains two related Windows-native C++ projects: the original “Bambini” reflective DLL pair and the more advanced “NG” variant. Each variant is split into an injector executable and a reflective DLL payload.
2. The core architectural boundary is between the injector process and the in-memory DLL it loads. The injector is responsible for preparing the payload and initiating execution in a target process; the DLL is responsible for self-loading and runtime behavior once mapped.
3. In the original Bambini tree, the architecture is minimal: ReflectiveDLLInjector.cpp and dllmain.cpp represent the two ends of the flow. The injector launches the loading path, while the DLL’s entrypoint contains the reflective loading logic that runs after injection.
4. The NG tree adds several support modules around the same core flow. dllmain.cpp is still the payload entrypoint, but the surrounding headers and assembly split the runtime into distinct concerns: syscall bridging, memory hiding/swap behavior, sleep behavior, and breakpoint-based handle manipulation.
5. syscall.asm and syscalls.h form a low-level boundary layer for direct or indirect system-call invocation. This indicates the project intentionally reduces reliance on standard Win32 API calls in sensitive parts of the load/sleep path and routes some operations through handcrafted native-call plumbing.
6. hwbp.h suggests a hardware-breakpoint subsystem used to intercept or influence execution at runtime. Architecturally, this is a control point that sits between normal API behavior and the payload’s need to preserve or recover kernel-object state.
7. swappala.h represents the “swap” subsystem: the payload can be backed by one memory mapping and then replaced or shadowed by a benign mapping at the same address. This is the main anti-scanning / memory-hiding boundary in the NG design.
8. sleaping.h represents the sleep/orchestration subsystem. Rather than a simple passive pause, the payload appears to transition through a managed sleep state using worker/timer-based resumption, allowing the swap logic to occur while the payload is not actively executing.
9. The injector and DLL are tightly coupled in NG: the README explicitly says the reflective DLL only works with the matching NG injector logic. That means the injector, memory layout assumptions, and runtime transitions are part of one coordinated system rather than independent components.
10. From an architecture-diagram perspective, the most important runtime flow is: injector prepares and loads payload bytes -> reflective DLL establishes itself in memory -> low-level syscall layer handles sensitive OS interactions -> swap/sleep subsystems temporarily hide the payload behind a benign mapping during idle periods -> execution resumes under the same orchestrated state.
11. The project is entirely Windows/Visual Studio centered, as shown by the .sln and .vcxproj files. There are no signs of cross-platform abstractions or external runtime dependencies; the architecture is built around native Windows APIs, NT internals, and inline assembly.
12. The README frames the project as R&D around reflective loading, stealth loading, and in-memory evasion. So the natural diagram should emphasize execution stages and control boundaries, not just file/module names: injector, payload loader, syscall bridge, handle-interception logic, and sleep/swap orchestration.
Main entry points: dllmain.cpp Payload · syscalls.h Syscalls · hwbp.h HWBP · swappala.h Swap Layer
Components 11
Bambini
Original reflective DLL injector and payload pair.
NG
Expanded reflective DLL pair with syscall, breakpoint, swap, and sleep subsystems.
- Injector · NG injector matched to the payload's memory assumptions.
RflDllOb-NG/ReflectiveDLLInjector-NG/ReflectiveDLLInjector.cpp - Payload · NG DLL entrypoint coordinating stealth-oriented runtime behavior.
RflDllOb-NG/ReflectiveDLL-NG/dllmain.cpp - Runtime Core · Shared runtime declarations and control wiring.
RflDllOb-NG/ReflectiveDLL-NG/headers.h - Helpers · Miscellaneous runtime support used by the payload.
RflDllOb-NG/ReflectiveDLL-NG/misc.h - Syscalls · Low-level syscall declarations for sensitive OS interactions.
RflDllOb-NG/ReflectiveDLL-NG/syscalls.h - Syscall ASM · Handwritten syscall invocation plumbing.
RflDllOb-NG/ReflectiveDLL-NG/syscall.asm - HWBP · Hardware-breakpoint control for handle and execution interception.
RflDllOb-NG/ReflectiveDLL-NG/hwbp.h - Swap Layer · Backs the payload with one mapping and shadows it with another.
RflDllOb-NG/ReflectiveDLL-NG/swappala.h - Sleep Orchestrator · Managed sleep and resumption path used to hide active payload state.
RflDllOb-NG/ReflectiveDLL-NG/sleaping.h
Connections 10
- Injector → Payload: loads · Injector starts the reflective loading flow.
- Injector → Payload: loads · NG injector prepares the matching payload and execution context.
- Payload → Runtime Core: uses · Payload relies on shared runtime declarations.
- Payload → Helpers: uses · Payload pulls in auxiliary runtime helpers.
- Payload → Syscalls: calls · Sensitive OS interactions are routed through the syscall boundary.
- Syscalls → Syscall ASM: bridged by · Declarations are backed by handwritten assembly entry points.
- Payload → HWBP: intercepts · Breakpoint control supports handle or execution manipulation.
- HWBP → Swap Layer: enables · Breakpoint control feeds the memory-hiding swap path.
- Swap Layer → Sleep Orchestrator: coordinates · Swap behavior is orchestrated around managed sleep periods.
- Sleep Orchestrator → Payload: resumes · Execution returns to the payload after the hidden interval.