GET /api/techniques/355/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 355,
    "key": "dll-unhooking",
    "unprotect_id": "U0522",
    "name": "DLL Unhooking",
    "description": "Endpoint Detection and Response (EDR) tools use a technique known as hooking to monitor sensitive system functions within the DLLs of loaded processes. Hooking is a method of live-patching system DLLs, enabling EDRs to intercept the flow of a program and evaluate its legitimacy.\r\n\r\nHere's how it works: EDRs modify the first instructions of the functions within the DLLs. When these functions are called, the program's execution flow is diverted to the EDR's code (housed within a DLL loaded by the EDR in the program). In this redirected state, the EDR can inspect the function's arguments to determine whether their usage is legitimate or potentially malicious. If the usage is deemed legitimate, the EDR restores the program's execution flow, allowing the function to proceed as normal.\r\n\r\nHowever, to evade detection by an EDR, malware can employ a method known as \"unhooking.\" This process involves restoring the entire DLL code section (.text) to its original state. To accomplish this, malware needs access to an unmodified (unhooked) DLL, which it can acquire in several ways: \r\n\r\n1 - directly from the system, which can potentially be detected via an open handle; \r\n\r\n2 - by opening a remote file, which requires the malware author to host a DLL matching the OS version of the target system remotely;\r\n\r\n3 - by initiating a suspended process and retrieving the content of its DLL before it gets hooked.\r\n\r\nTypically, the DLL most commonly hooked/unhooked is NTDLL.dll, as it is the closest to the kernel. However, some EDRs may also hook APIs contained in higher-level DLLs, such as kernel32.dll or user32.dll.",
    "resources": "https://github.com/optiv/Freeze\nhttps://www.ired.team/offensive-security/defense-evasion/how-to-unhook-a-dll-using-c++",
    "creation_date": "2023-07-03T23:56:46.302000Z",
    "tags": "",
    "modification_date": "2023-10-04T10:43:56.825000Z",
    "category": [
        2
    ],
    "rules": [],
    "attachments": [],
    "featured_api": [],
    "contributors": [
        29
    ]
}