Adversaries may interact with the native OS application programming interface (API) to execute behaviors. Native APIs provide a controlled means of calling low-level OS services within the kernel, such as those involving hardware/devices, memory, and processes.[1][2] These native APIs are leveraged by the OS during system boot (when other system components are not yet initialized) as well as carrying out tasks and requests during routine operations.
Native API functions (such as NtCreateProcess
) may be directed invoked via system calls / syscalls, but these features are also often exposed to user-mode applications via interfaces and libraries. [3][4][5] For example, functions such as the Windows API CreateProcess()
or GNU fork()
will allow programs and scripts to start other processes.[6][7] This may allow API callers to execute a binary, run a CLI command, load modules, etc. as thousands of similar API functions exist for various system operations.[8][9][10]
Higher level software frameworks, such as Microsoft .NET and macOS Cocoa, are also available to interact with native APIs. These frameworks typically provide language wrappers/abstractions to API functionalities and are designed for ease-of-use/portability of code.[11][12][13][14]
Adversaries may abuse these OS API functions as a means of executing behaviors. Similar to Command and Scripting Interpreter, the native API and its hierarchy of interfaces provide mechanisms to interact with and utilize various components of a victimized system. While invoking API functions, adversaries may also attempt to bypass defensive tools (ex: unhooking monitored functions via Disable or Modify Tools).
ID | Name | Description |
---|---|---|
S0045 | ADVSTORESHELL |
ADVSTORESHELL is capable of starting a process using CreateProcess.[15] |
S0622 | AppleSeed |
AppleSeed has the ability to use multiple dynamically resolved API calls.[16] |
G0067 | APT37 |
APT37 leverages the Windows API calls: VirtualAlloc(), WriteProcessMemory(), and CreateRemoteThread() for process injection.[17] |
G0082 | APT38 |
APT38 has used the Windows API to execute code within a victim's system.[18] |
S0456 | Aria-body |
Aria-body has the ability to launch files using |
S0438 | Attor |
Attor's dispatcher has used CreateProcessW API for execution.[20] |
S0640 | Avaddon |
Avaddon has used the Windows Crypto API to generate an AES key.[21] |
S0638 | Babuk |
Babuk can use multiple Windows API calls for actions on compromised hosts including discovery and execution.[22][23][24] |
S0475 | BackConfig |
BackConfig can leverage API functions such as |
S0606 | Bad Rabbit |
Bad Rabbit has used various Windows API calls.[26] |
S0128 | BADNEWS |
BADNEWS has a command to download an .exe and execute it via CreateProcess API. It can also run with ShellExecute.[27][28] |
S0234 | Bandook | |
S0239 | Bankshot |
Bankshot creates processes using the Windows API calls: CreateProcessA() and CreateProcessAsUserA().[30] |
S0534 | Bazar |
Bazar can use various APIs to allocate memory and facilitate code execution/injection.[31] |
S0470 | BBK |
BBK has the ability to use the |
S0574 | BendyBear |
BendyBear can load and execute modules and Windows Application Programming (API) calls using standard shellcode API hashing.[33] |
S0570 | BitPaymer |
BitPaymer has used dynamic API resolution to avoid identifiable strings within the binary, including |
S0521 | BloodHound |
BloodHound can use .NET API calls in the SharpHound ingestor component to pull Active Directory data.[35] |
S0651 | BoxCaon |
BoxCaon has used Windows API calls to obtain information about the compromised host.[36] |
S0471 | build_downer |
build_downer has the ability to use the |
S0484 | Carberp |
Carberp has used the NtQueryDirectoryFile and ZwQueryDirectoryFile functions to hide files and directories.[37] |
S0631 | Chaes |
Chaes used the |
G0114 | Chimera |
Chimera has used direct Windows system calls by leveraging Dumpert.[39] |
S0611 | Clop |
Clop has used built-in API functions such as WNetOpenEnumW(), WNetEnumResourceW(), WNetCloseEnum(), GetProcAddress(), and VirtualAlloc().[40][41] |
S0154 | Cobalt Strike |
Cobalt Strike's Beacon payload is capable of running shell commands without |
S0126 | ComRAT |
ComRAT can load a PE file from memory or the file system and execute it with |
S0575 | Conti | |
S0625 | Cuba |
Cuba has used several built-in API functions for discovery like GetIpNetTable and NetShareEnum.[48] |
S0354 | Denis |
Denis used the |
S0384 | Dridex |
Dridex has used the |
S0554 | Egregor |
Egregor has used the Windows API to make detection more difficult.[51] |
S0363 | Empire |
Empire contains a variety of enumeration modules that have an option to use API calls to carry out tasks.[52] |
S0396 | EvilBunny |
EvilBunny has used various API calls as part of its checks to see if the malware is running in a sandbox.[53] |
S0569 | Explosive |
Explosive has a function to call the OpenClipboard wrapper.[54] |
S0512 | FatDuke |
FatDuke can call |
G0047 | Gamaredon Group |
Gamaredon Group malware has used |
S0032 | gh0st RAT |
gh0st RAT has used the InterlockedExchange, SeShutdownPrivilege, and ExitWindowsEx Windows API functions.[57] |
S0493 | GoldenSpy |
GoldenSpy can execute remote commands in the Windows command shell using the |
S0477 | Goopy |
Goopy has the ability to enumerate the infected system's user name via |
G0078 | Gorgon Group |
Gorgon Group malware can leverage the Windows API call, CreateProcessA(), for execution.[59] |
S0531 | Grandoreiro |
Grandoreiro can execute through the |
S0632 | GrimAgent |
GrimAgent can use Native API including |
S0561 | GuLoader |
GuLoader can use a number of different APIs for discovery and execution.[62] |
S0499 | Hancitor |
Hancitor has used |
S0391 | HAWKBALL |
HAWKBALL has leveraged several Windows API calls to create processes, gather disk information, and detect debugger activity.[64] |
G0126 | Higaisa | |
S0431 | HotCroissant |
HotCroissant can perform dynamic DLL importing and API lookups using |
S0398 | HyperBro |
HyperBro has the ability to run an application ( |
S0537 | HyperStack |
HyperStack can use Windows API's |
S0483 | IcedID |
IcedID has called |
S0434 | Imminent Monitor |
Imminent Monitor has leveraged CreateProcessW() call to execute the debugger.[70] |
S0259 | InnaputRAT |
InnaputRAT uses the API call ShellExecuteW for execution.[71] |
S0260 | InvisiMole |
InvisiMole can use winapiexec tool for indirect execution of |
S0607 | KillDisk |
KillDisk has called the Windows API to retrieve the hard disk handle and shut down the machine.[73] |
S0395 | LightNeuron |
LightNeuron is capable of starting a process using CreateProcess.[74] |
S0447 | Lokibot |
Lokibot has used LoadLibrary(), GetProcAddress() and CreateRemoteThread() API functions to execute its shellcode.[75] |
S0652 | MarkiRAT |
MarkiRAT can run the ShellExecuteW API via the Windows Command Shell.[76] |
S0449 | Maze |
Maze has used several Windows API functions throughout the encryption process including IsDebuggerPresent, TerminateProcess, Process32FirstW, among others.[77] |
S0576 | MegaCortex |
After escalating privileges, MegaCortex calls |
G0045 | menuPass |
menuPass has used native APIs including |
S0455 | Metamorfo | |
S0256 | Mosquito |
Mosquito leverages the CreateProcess() and LoadLibrary() calls to execute files with the .dll and .exe extensions.[82] |
S0630 | Nebulae |
Nebulae has the ability to use |
S0457 | Netwalker |
Netwalker can use Windows API functions to inject the ransomware DLL.[84] |
S0198 | NETWIRE |
NETWIRE can use Native API including |
S0385 | njRAT |
njRAT has used the ShellExecute() function within a script.[86] |
G0116 | Operation Wocao |
Operation Wocao has used the CreateProcessA and ShellExecute API function to launch commands after being injected into a selected process.[87] |
S0517 | Pillowmint |
Pillowmint has used multiple native Windows APIs to execute and conduct process injections.[88] |
S0501 | PipeMon |
PipeMon's first stage has been executed by a call to |
S0013 | PlugX |
PlugX can use the Windows API function CreateProcess to execute another process.[90] |
S0518 | PolyglotDuke |
PolyglotDuke can use |
S0453 | Pony |
Pony has used several Windows functions for various purposes.[91] |
S0650 | QakBot |
QakBot can use |
S0629 | RainyDay |
The file collection tool used by RainyDay can utilize native API including |
S0458 | Ramsay |
Ramsay can use Windows API functions such as |
S0416 | RDFSNIFFER |
RDFSNIFFER has used several Win32 API functions to interact with the victim machine.[94] |
S0496 | REvil |
REvil can use Native API for execution and to retrieve active services.[95][96] |
S0448 | Rising Sun |
Rising Sun used dynamic API resolutions to various Windows APIs by leveraging LoadLibrary() and GetProcAddress().[97] |
S0148 | RTM |
RTM can use the |
S0446 | Ryuk |
Ryuk has used multiple native APIs including |
G0104 | Sharpshooter |
Sharpshooter's first-stage downloader resolved various Windows libraries and APIs, including LoadLibraryA(), GetProcAddress(), and CreateProcessA().[97] |
S0444 | ShimRat |
ShimRat has used Windows API functions to install the service and shim.[100] |
S0445 | ShimRatReporter |
ShimRatReporter used several Windows API functions to gather information from the infected system.[100] |
S0610 | SideTwist |
SideTwist can use |
G0091 | Silence |
Silence has leveraged the Windows API, including using CreateProcess() or ShellExecute(), to perform a variety of tasks.[102][103] |
S0623 | Siloscape | |
S0627 | SodaMaster |
SodaMaster can use |
S0615 | SombRAT |
SombRAT has the ability to respawn itself using |
S0603 | Stuxnet |
Stuxnet uses the SetSecurityDescriptorDacl API to reduce object integrity levels.[107] |
S0562 | SUNSPOT |
SUNSPOT used Windows API functions such as |
S0242 | SynAck |
SynAck parses the export tables of system DLLs to locate and call various Windows API functions.[109][110] |
S0011 | Taidoor |
Taidoor has the ability to use native APIs for execution including |
S0595 | ThiefQuest |
ThiefQuest uses various API to perform behaviors such as executing payloads and performing local enumeration.[113] |
S0266 | TrickBot |
TrickBot uses the Windows API call, CreateProcessW(), to manage execution flow.[114] TrickBot has also used |
G0081 | Tropic Trooper |
Tropic Trooper has used multiple Windows APIs including HttpInitialize, HttpCreateHttpHandle, and HttpAddUrl.[116] |
G0010 | Turla |
Turla and its RPC backdoors have used APIs calls for various tasks related to subverting AMSI and accessing then executing commands through RPC and/or named pipes.[117] |
S0386 | Ursnif |
Ursnif has used |
S0180 | Volgmer |
Volgmer executes payloads using the Windows API call CreateProcessW().[119] |
S0612 | WastedLocker |
WastedLocker's custom crypter, CryptOne, leveraged the VirtualAlloc() API function to help execute the payload.[120] |
S0579 | Waterbear | |
S0466 | WindTail |
WindTail can invoke Apple APIs |
S0161 | XAgentOSX |
XAgentOSX contains the execFile function to execute a specified file on the system using the NSTask:launch method.[123] |
S0653 | xCaon |
xCaon has leveraged native OS function calls to retrieve victim's network adapter's information using GetAdapterInfo() API.[36] |
ID | Mitigation | Description |
---|---|---|
M1040 | Behavior Prevention on Endpoint |
On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent Office VBA macros from calling Win32 APIs. [124] |
M1038 | Execution Prevention |
Identify and block potentially malicious software executed that may be executed through this technique by using application control [125] tools, like Windows Defender Application Control[126], AppLocker, [127] [128] or Software Restriction Policies [129] where appropriate. [130] |
ID | Data Source | Data Component |
---|---|---|
DS0011 | Module | Module Load |
DS0009 | Process | OS API Execution |
Monitoring API calls may generate a significant amount of data and may not be useful for defense unless collected under specific circumstances, since benign use of API functions are common and may be difficult to distinguish from malicious behavior. Correlation of other events with behavior surrounding API function calls using API monitoring will provide additional context to an event that may assist in determining if it is due to malicious behavior. Correlation of activity by process lineage by process ID may be sufficient.
Utilization of the Windows APIs may involve processes loading/accessing system DLLs associated with providing called functions (ex: ntdll.dll, kernel32.dll, advapi32.dll, user32.dll, and gdi32.dll). Monitoring for DLL loads, especially to abnormal/unusual or potentially malicious processes, may indicate abuse of the Windows API. Though noisy, this data can be combined with other indicators to identify adversary activity.