Common Information
Type | Value |
---|---|
Value |
Hooking - T1179 |
Category | Attack-Pattern |
Type | Mitre-Enterprise-Attack-Attack-Pattern |
Misp Type | Cluster |
Description | Windows processes often leverage application programming interface (API) functions to perform tasks that require reusable system resources. Windows API functions are typically stored in dynamic-link libraries (DLLs) as exported functions. Hooking involves redirecting calls to these functions and can be implemented via: * '''Hooks procedures''', which intercept and execute designated code in response to events such as messages, keystrokes, and mouse inputs. (Citation: Microsoft Hook Overview) (Citation: Engame Process Injection July 2017) * '''Import address table (IAT) hooking''', which use modifications to a process’s IAT, where pointers to imported API functions are stored. (Citation: Engame Process Injection July 2017) (Citation: Adlice Software IAT Hooks Oct 2014) (Citation: MWRInfoSecurity Dynamic Hooking 2015) * '''Inline hooking''', which overwrites the first bytes in an API function to redirect code flow. (Citation: Engame Process Injection July 2017) (Citation: HighTech Bridge Inline Hooking Sept 2011) (Citation: MWRInfoSecurity Dynamic Hooking 2015) Similar to Process Injection, adversaries may use hooking to load and execute malicious code within the context of another process, masking the execution while also allowing access to the process's memory and possibly elevated privileges. Installing hooking mechanisms may also provide Persistence via continuous invocation when the functions are called through normal use. Malicious hooking mechanisms may also capture API calls that include parameters that reveal user authentication credentials for Credential Access. (Citation: Microsoft TrojanSpy:Win32/Ursnif.gen!I Sept 2017) Hooking is commonly utilized by Rootkits to conceal files, processes, Registry keys, and other objects in order to hide malware and associated behaviors. (Citation: Symantec Windows Rootkits) Detection: Monitor for calls to the SetWindowsHookEx and SetWinEventHook functions, which install a hook procedure. (Citation: Microsoft Hook Overview) (Citation: Volatility Detecting Hooks Sept 2012) Also consider analyzing hook chains (which hold pointers to hook procedures for each type of hook) using tools (Citation: Volatility Detecting Hooks Sept 2012) (Citation: PreKageo Winhook Jul 2011) (Citation: Jay GetHooks Sept 2011) or by programmatically examining internal kernel structures. (Citation: Zairon Hooking Dec 2006) (Citation: EyeofRa Detecting Hooking June 2017) Rootkits detectors (Citation: GMER Rootkits) can also be used to monitor for various flavors of hooking activity. Verify integrity of live processes by comparing code in memory to that of corresponding static binaries, specifically checking for jumps and other instructions that redirect code flow. Also consider taking snapshots of newly started processes (Citation: Microsoft Process Snapshot) to compare the in-memory IAT to the real addresses of the referenced functions. (Citation: StackExchange Hooks Jul 2012) (Citation: Adlice Software IAT Hooks Oct 2014) Analyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior. Platforms: Windows Data Sources: API monitoring, Binary file metadata, DLL monitoring, Loaded DLLs, Process Monitoring, Windows event logs Permissions Required: Administrator, SYSTEM |
Details | Published | Attributes | CTI | Title | ||
---|---|---|---|---|---|---|
Details | Website | 2014-04-07 | 4 | Dynamically Unpacking Malware With Pin | ||
Details | Website | 2014-04-02 | 8 | Using the Immunity Debugger API to Automate Analysis | ||
Details | Website | 2014-03-15 | 0 | CanSecWest day 3 Recap | Malwarebytes Labs | ||
Details | Website | 2014-03-13 | 1 | Analyzing the Uroburos PatchGuard Bypass | McAfee Blog | ||
Details | Website | 2014-01-29 | 346 | More SpyEye Guilty Pleas | ||
Details | Website | 2014-01-26 | 23 | The art of cheating: Making a chess.com chess bot following an unusual approach! | ||
Details | Website | 2014-01-21 | 0 | Malware Superlatives: Most Likely to Cry s/Wolf/Crocodile/ | ||
Details | Website | 2013-12-13 | 4 | Reverse Engineering iOS Applications in a Fun Way | ||
Details | Website | 2013-11-26 | 0 | Formgrabbers for Beginners – MalwareTech | ||
Details | Website | 2013-10-14 | 56 | DIY: Android Malware Analysis - Taking apart OBAD (part 1) | ||
Details | Website | 2013-10-09 | 4 | Ring3 / Ring0 Rootkit Hook Detection 2/2 – MalwareTech | ||
Details | Website | 2013-09-29 | 5 | Inline API Hooking using DLL Injection | ||
Details | Website | 2013-09-25 | 38 | — | ||
Details | Website | 2013-09-17 | 0 | Fighting Hooks With Hooks – Sandbox Escape – MalwareTech | ||
Details | Website | 2013-07-13 | 2 | Back to Defense: Finding Hooks in OS X with Volatility | ||
Details | Website | 2013-07-08 | 5 | Function Hooking Part I: Hooking Shared Library Function Calls in Linux | ||
Details | Website | 2013-07-04 | 34 | Basic Malware Cleaning | ||
Details | Website | 2013-07-03 | 1 | Owning Firefox & Chrome Browsers using Kali and BeEF | ||
Details | Website | 2013-06-03 | 2 | MoVP II - 3.4 - Checking the ARM (Android) System Call Table and Exception Vector Table for Signs of Rootkits | ||
Details | Website | 2013-05-28 | 31 | Zeus Analysis - Memory Forensics via Volatility - Security Intelligence | ||
Details | Website | 2013-04-19 | 0 | Enhanced Mitigation Experience Toolkit (EMET) v4.0 Beta in the wild – UNDER CONSTRUCTION | ||
Details | Website | 2013-03-11 | 0 | Resources for Aspiring Penetration Testers | ||
Details | Website | 2013-02-15 | 20 | Manipulating Memory for Fun and Profit by Frédéric Bourla - High-Tech Bridge | ||
Details | Website | 2013-01-17 | 147 | “Red October”. Detailed Malware Description 3. Second Stage of Attack | ||
Details | Website | 2013-01-14 | 9 | Offensive Threat Modeling for Attackers: Turning Threat Modeling on its Head - Privacy PC |