Adversaries may hook into application programming interface (API) functions used by processes to redirect calls for execution and privilege escalation means. Windows processes often leverage these API functions to perform tasks that require reusable system resources. Windows API functions are typically stored in dynamic-link libraries (DLLs) as exported functions. [1]
One type of hooking seen in ICS involves redirecting calls to these functions via import address table (IAT) hooking. IAT hooking uses modifications to a process IAT, where pointers to imported API functions are stored. [2]
| ID | Name | Description |
|---|---|---|
| S0603 | Stuxnet |
Stuxnet modifies the Import Address Tables DLLs to hook specific APIs that are used to open project files. [2] |
| S1009 | Triton |
Triton's injector, inject.bin, changes the function pointer of the 'get main processor diagnostic data' TriStation command to the address of imain.bin so that it is executed prior to the normal handler. [3] |
| ID | Mitigation | Description |
|---|---|---|
| M0947 | Audit |
Perform audits or scans of systems, permissions, insecure software, insecure configurations, etc. to identify potential weaknesses. Perform periodic integrity checks of the device to validate the correctness of the firmware, software, programs, and configurations. Integrity checks, which typically include cryptographic hashes or digital signatures, should be compared to those obtained at known valid states, especially after events like device reboots, program downloads, or program restarts. |
| M0944 | Restrict Library Loading |
Restrict the use of untrusted or unknown libraries, such as remote or unknown DLLs. |
| ID | Name | Analytic ID | Analytic Description |
|---|---|---|---|
| DET0722 | Detection of Hooking | AN1855 |
Real-time monitoring identifies an unsigned or unexpected process calling Windows hooking Application Programming Interfaces (APIs) (SetWindowsHookEx, SetWinEventHook) targeting an Industrial Control System (ICS) engineering or Human-Machine Interface (HMI) process, immediately followed by that target process loading a Dynamic Link Library (DLL) not present in the vendor's signed module baseline. Confirmed in the wild: Stuxnet replaced Siemens' s7otbxdx.dll on engineering workstations to intercept and falsify Programmable Logic Controller (PLC) read/write calls between WinCC/STEP7 and the controller. OT operational-fidelity gate: Alert only when execution violates an approved signer/hash/path/parent/process or tool allowlist, or originates from an unauthorized user/tool, and is tied to an OT asset or follow-on OT-relevant action. Suppress vendor-signed software, approved engineering utilities, diagnostics, patching, backup, and documented maintenance. |
| AN2110 |
Real-time monitoring identifies a process setting LD_PRELOAD before launching an Industrial Control System (ICS) service binary, or writing to /etc/ld.so.preload, where the injected library path is not part of the vendor's package manifest. OT operational-fidelity gate: Alert only when execution violates an approved signer/hash/path/parent/process or tool allowlist, or originates from an unauthorized user/tool, and is tied to an OT asset or follow-on OT-relevant action. Suppress vendor-signed software, approved engineering utilities, diagnostics, patching, backup, and documented maintenance. |
||
| AN2243 |
Detect embedded hooking by correlating an independently acquired firmware/module integrity measurement that differs from the approved vendor/baseline image with protocol-response behavior that also departs from the device's known deterministic behavior. A protocol-response anomaly by itself does not prove a hook because firmware versions, device state, communications faults, and vendor-specific behavior can produce response differences. Treat network anomalies as corroboration and require independent integrity evidence or vendor/device attestation before escalating the condition as firmware-level hooking. Monitoring mode: periodic or event-triggered integrity verification plus near-real-time protocol monitoring where a capable OT protocol decoder is deployed. |
||
| AN2286 |
Real-time monitoring identifies ICS protocol responses whose timing or payload structure deviates from the established device-specific per-function baseline in a pattern consistent with an intercepting relay or hook. OT operational-fidelity gate: Alert only when execution violates an approved signer/hash/path/parent/process or tool allowlist, or originates from an unauthorized user/tool, and is tied to an OT asset or follow-on OT-relevant action. Suppress vendor-signed software, approved engineering utilities, diagnostics, patching, backup, and documented maintenance. |