How ytincodenito/vedr works
Project Type & Purpose
• This project is a security tool used for EDR (Endpoint Detection and Response) evasion challenges. It integrates both user-mode components and kernel-mode components.
• Its purpose is to demonstrate how a minimal EDR can be built (and evaded) by combining a kernel driver, a user-mode agent, and a hooking DLL. The README also highlights a process injection challenge as an evasion practice exercise.
Analyzing the File Structure
• Top-Level Directories:
• DllLoader – likely a utility to load/inject a DLL (possibly the hooking DLL) into a target process.
• vAgent – the primary user-mode executable that controls the main functionality. It is run with or without a kernel driver.
• vDriver – contains source for a kernel-mode driver (vDriver.sys) that probably aids in EDR functionality when “kernel” is passed as an argument.
• vhook – contains the DLL (and its supporting files such as logger, framework, and pre-compiled header files) used for code hooking. This is central to the module that will be injected or loaded manually.
• includes, lib – these folders provide dependencies (such as the MinHook library) that are used in the vhook and possibly other projects.
• The presence of a solution file (vEDR.sln) indicates that this is a Visual Studio project with multiple modules and builds.
Key Architectural Components & Their Roles
• vAgent (User-Mode Application):
• Acts as the front-end controller.
• Launches in two modes: with and without the kernel driver.
• In “without driver” mode, the DLL (vhook) must be manually injected (or loaded via DllLoader).
• Kernel Driver (vDriver):
• Operates at the kernel level.
• Essential for additional functionality when the ‘kernel’ argument is passed to vAgent.
• Likely interacts with the hooking mechanisms to monitor or manage low-level operations.
• vhook (Hooking DLL):
• Responsible for setting up hooks (via the MinHook library included in the includes folder and lib binaries).
• Implements logging and framework functionalities possibly related to tracking or modifying process behaviors.
• Likely deployed via manual injection or by DllLoader.
• DllLoader:
• Possibly a utility for loading the vhook DLL into the target process, which is essential if not automatically loaded by vAgent.
• External Dependencies:
• MinHook library (lib and includes) plays a critical role in setting up API hooks.
• Related external projects/resources mentioned in the README (like Kernel DLL Injector) offer contextual insight into how DLL injection is performed.
Relationships and Interactions
• External interactions (such as loading shellcode for the process injection challenge) should be noted as data or control flows.