Detect Runtime Data Manipulation in IBM QRadar
Adversaries may modify systems in order to manipulate the data as it is accessed and displayed to an end user, threatening the integrity of information presented at runtime. Unlike stored data manipulation which alters data at rest, runtime manipulation intercepts and alters data in memory or during processing before it reaches the display layer — allowing adversaries to show fraudulent information while persisting clean data on disk. APT38 demonstrated this with DYEPACK.FOX, which hooked PDF rendering to redact fraudulent SWIFT transaction records from operator views. Runtime manipulation typically requires process injection (CreateRemoteThread, WriteProcessMemory), DLL hijacking into display application processes, or API hooking of rendering or formatting functions. The technique is particularly dangerous in financial, SCADA, and operational technology environments where displayed data directly informs decisions.
MITRE ATT&CK
- Tactic
- Impact
- Technique
- T1565 Data Manipulation
- Sub-technique
- T1565.003 Runtime Data Manipulation
- Canonical reference
- https://attack.mitre.org/techniques/T1565/003/
QRadar Detection Query
SELECT
DATEFORMAT(starttime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
logsourcename(logsourceid) AS log_source,
QIDNAME(qid) AS event_name,
username,
sourceip,
"TargetImage",
"SourceImage",
"ImageLoaded",
"GrantedAccess",
CASE
WHEN QIDNAME(qid) LIKE '%CreateRemoteThread%' THEN 'RemoteThreadInjection'
WHEN QIDNAME(qid) LIKE '%ProcessAccess%' THEN 'SuspiciousProcessAccess'
WHEN QIDNAME(qid) LIKE '%ImageLoad%' THEN 'UnexpectedDllLoad'
ELSE 'BinaryTampering'
END AS detection_type,
CASE
WHEN QIDNAME(qid) LIKE '%CreateRemoteThread%' THEN 3
WHEN QIDNAME(qid) LIKE '%ProcessAccess%' AND "GrantedAccess" IN ('0x1F0FFF','0x001F','0x0028') THEN 2
WHEN QIDNAME(qid) LIKE '%ImageLoad%' THEN 2
ELSE 1
END AS risk_score
FROM events
WHERE
LOGSOURCETYPEID(logsourceid) = 13 -- Microsoft Windows Security Event Log
AND starttime > NOW() - 86400000
AND (
(
"EventID" = '8'
AND (
"TargetImage" ILIKE '%\\acrord32.exe' OR "TargetImage" ILIKE '%\\acrobat.exe' OR
"TargetImage" ILIKE '%\\foxitreader.exe' OR "TargetImage" ILIKE '%\\sumatrapdf.exe' OR
"TargetImage" ILIKE '%\\excel.exe' OR "TargetImage" ILIKE '%\\winword.exe' OR
"TargetImage" ILIKE '%\\powerpnt.exe' OR "TargetImage" ILIKE '%\\outlook.exe' OR
"TargetImage" ILIKE '%\\explorer.exe' OR "TargetImage" ILIKE '%\\mmc.exe'
)
)
OR
(
"EventID" = '10'
AND (
"TargetImage" ILIKE '%\\acrord32.exe' OR "TargetImage" ILIKE '%\\acrobat.exe' OR
"TargetImage" ILIKE '%\\foxitreader.exe' OR "TargetImage" ILIKE '%\\excel.exe' OR
"TargetImage" ILIKE '%\\winword.exe' OR "TargetImage" ILIKE '%\\outlook.exe'
)
AND (
"SourceImage" ILIKE '%\\powershell.exe' OR "SourceImage" ILIKE '%\\pwsh.exe' OR
"SourceImage" ILIKE '%\\cmd.exe' OR "SourceImage" ILIKE '%\\wscript.exe' OR
"SourceImage" ILIKE '%\\cscript.exe' OR "SourceImage" ILIKE '%\\mshta.exe' OR
"SourceImage" ILIKE '%\\rundll32.exe' OR "SourceImage" ILIKE '%\\regsvr32.exe'
)
)
OR
(
"EventID" = '7'
AND (
"Image" ILIKE '%\\acrord32.exe' OR "Image" ILIKE '%\\acrobat.exe' OR
"Image" ILIKE '%\\foxitreader.exe' OR "Image" ILIKE '%\\excel.exe' OR
"Image" ILIKE '%\\winword.exe'
)
AND "Signed" <> 'true'
AND NOT (
"ImageLoaded" ILIKE '%\\Windows\\%' OR
"ImageLoaded" ILIKE '%\\Program Files\\Adobe\\%' OR
"ImageLoaded" ILIKE '%\\Program Files\\Foxit\\%' OR
"ImageLoaded" ILIKE '%\\Program Files\\Microsoft Office\\%' OR
"ImageLoaded" ILIKE '%\\Program Files (x86)\\Microsoft Office\\%'
)
)
)
ORDER BY risk_score DESC, starttime DESC AQL query for IBM QRadar detecting T1565.003 Runtime Data Manipulation by correlating Sysmon EventID 8 (CreateRemoteThread), EventID 10 (ProcessAccess), and EventID 7 (ImageLoad) events targeting PDF readers, Office applications, and other display-layer processes. Assigns a risk score based on event type and memory access flags.
Data Sources
Required Tables
False Positives & Tuning
- Enterprise DRM solutions that inject into Acrobat or Office to enforce document rights management policies
- Screen recording or accessibility software (e.g., JAWS, ZoomText) that hooks into document viewers for rendering capture
- Corporate monitoring tools that open handles to Office processes for activity tracking or compliance purposes
Other platforms for T1565.003
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1CreateRemoteThread Injection into Notepad (Windows Shellcode Proxy)
Expected signal: Sysmon Event ID 8 (CreateRemoteThread): SourceImage=powershell.exe, TargetImage=notepad.exe, StartAddress=<allocated_address>, StartModule='' (empty — shellcode, not DLL). Sysmon Event ID 10 (ProcessAccess): SourceImage=powershell.exe, TargetImage=notepad.exe, GrantedAccess=0x1F0FFF. Security Event ID 4688: powershell.exe process creation with the injection command line.
- Test 2DLL Injection via LoadLibrary into Explorer (Reflective Load Simulation)
Expected signal: Sysmon Event ID 8 (CreateRemoteThread): SourceImage=powershell.exe, TargetImage=explorer.exe, StartAddress=<LoadLibraryW_address>, StartModule=C:\Windows\System32\kernel32.dll, StartFunction=LoadLibraryW. Sysmon Event ID 7 (ImageLoad) in explorer.exe process showing version.dll load if not already present. Sysmon Event ID 10: GrantedAccess=0x1F0FFF from powershell.exe into explorer.exe.
- Test 3Linux LD_PRELOAD Injection to Intercept Display Library Functions
Expected signal: Linux audit log (auditd): execve syscall for gcc compilation of the shared library. execve syscall for the LD_PRELOAD bash invocation with the environment variable set. syslog/auth.log: LD_PRELOAD environment variable may appear in process accounting. Sysmon for Linux (if deployed): EventCode 1 (Process Create) with CommandLine containing 'LD_PRELOAD' and the .so path. File creation events for /tmp/intercept_display.c and /tmp/intercept_display.so.
- Test 4Inline Function Hook (IAT Patch) in Running Process via PowerShell
Expected signal: Sysmon Event ID 10 (ProcessAccess): SourceImage=powershell.exe, TargetImage=notepad.exe, GrantedAccess=0x0410 (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ). Security Event ID 4688: powershell.exe execution with the command line. If AV is monitoring OpenProcess calls on non-EDR processes, an additional alert may fire from the security product.
References (10)
- https://attack.mitre.org/techniques/T1565/003/
- https://www.mandiant.com/sites/default/files/2021-09/rpt-apt38-2018-web_v5-1.pdf
- https://www.justice.gov/opa/press-release/file/1092091/download
- https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceevents-table
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceimageloadevents-table
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1055/T1055.md
- https://www.elastic.co/security-labs/detecting-process-injection-with-windows-defender-atp
- https://www.ired.team/offensive-security/code-injection-process-injection/import-adress-table-iat-hooking
- https://man7.org/linux/man-pages/man8/ld.so.8.html
Unlock Pro Content
Get the full detection package for T1565.003 including response playbook, investigation guide, and atomic red team tests.