Transmitted Data Manipulation
Adversaries may alter data en route to storage or other systems in order to manipulate external outcomes or hide activity, threatening data integrity. Manipulation may occur over network connections or between system processes, including intercepting clipboard contents to replace cryptocurrency addresses (crypto-clipping), modifying financial wire transfer messages such as SWIFT transactions, or altering email content during transit. Real-world examples include APT38 using DYEPACK to manipulate SWIFT messages, LightNeuron modifying Exchange email content in-flight, and commodity banking trojans Melcoz and Metamorfo silently replacing copied wallet addresses. This technique typically requires prolonged access and specialized knowledge of the target transmission mechanism.
// T1565.002 — Transmitted Data Manipulation
// Covers: clipboard hijacking (crypto-clipping), netsh portproxy traffic redirection,
// new kernel/NDIS filter driver installation, process injection into network-facing apps
// --- Clipboard hijacking via scripting engines (Melcoz/Metamorfo pattern) ---
let ClipboardHijack = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("powershell.exe", "pwsh.exe", "python.exe", "python3.exe", "wscript.exe", "cscript.exe")
| where ProcessCommandLine has_any (
"Get-Clipboard", "Set-Clipboard",
"[Windows.Forms.Clipboard]", "System.Windows.Forms.Clipboard",
"GetClipboardData", "SetClipboardData", "OpenClipboard",
"clipboard.paste", "clipboard.copy", "pyperclip", "win32clipboard"
)
| extend DetectionType = "ClipboardHijack"
| extend RiskScore = 70
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
DetectionType, RiskScore,
RegistryKey = "", RegistryValueName = "", RegistryValueData = "";
// --- netsh portproxy: redirecting traffic to attacker-controlled endpoint ---
let PortProxyRedirect = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "netsh.exe"
| where ProcessCommandLine has "portproxy"
and ProcessCommandLine has_any ("add", "set")
and ProcessCommandLine has "connectaddress"
| extend DetectionType = "PortProxy_TrafficRedirection"
| extend RiskScore = 80
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
DetectionType, RiskScore,
RegistryKey = "", RegistryValueName = "", RegistryValueData = "";
// --- New kernel driver installation (WFP callout / NDIS filter for traffic interception) ---
let NetworkFilterDriver = DeviceRegistryEvents
| where Timestamp > ago(24h)
| where ActionType == "RegistryValueSet"
| where RegistryKey has "CurrentControlSet\\Services"
| where RegistryValueName =~ "Type"
| where RegistryValueData in ("1", "0x00000001") // SERVICE_KERNEL_DRIVER
| extend ServiceName = extract(@"Services\\([^\\]+)", 1, RegistryKey)
| where isnotempty(ServiceName)
| extend DetectionType = "NetworkFilterDriver_NewKernelDriver"
| extend RiskScore = 85
| project Timestamp, DeviceName, AccountName, FileName = ServiceName, ProcessCommandLine = "",
InitiatingProcessFileName, InitiatingProcessCommandLine,
DetectionType, RiskScore,
RegistryKey, RegistryValueName, RegistryValueData;
// --- Remote thread injection into browser/email clients (intercept data in-process) ---
let BrowserMailInjection = DeviceEvents
| where Timestamp > ago(24h)
| where ActionType == "CreateRemoteThreadApiCall"
| where FileName in~ (
"chrome.exe", "firefox.exe", "msedge.exe",
"outlook.exe", "thunderbird.exe", "iexplore.exe"
)
| where InitiatingProcessFileName !in~ (
"chrome.exe", "firefox.exe", "msedge.exe",
"outlook.exe", "thunderbird.exe", "iexplore.exe"
)
| extend DetectionType = "ProcessInjection_NetworkApp"
| extend RiskScore = 90
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine = "",
InitiatingProcessFileName, InitiatingProcessCommandLine,
DetectionType, RiskScore,
RegistryKey = "", RegistryValueName = "", RegistryValueData = "";
// --- Known MITM tool execution ---
let MITMTools = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("arpspoof", "ettercap", "bettercap", "responder", "mitmproxy")
or (ProcessCommandLine has_any ("arpspoof", "bettercap", "ettercap", "responder", "mitmproxy")
and FileName in~ ("python.exe", "python3.exe", "bash", "sh"))
| extend DetectionType = "MITMTool_Execution"
| extend RiskScore = 95
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
DetectionType, RiskScore,
RegistryKey = "", RegistryValueName = "", RegistryValueData = "";
union ClipboardHijack, PortProxyRedirect, NetworkFilterDriver, BrowserMailInjection, MITMTools
| sort by RiskScore desc, Timestamp desc Data Sources
Required Tables
False Positives
- Clipboard manager software (Ditto, ClipboardFusion, CopyQ) legitimately reads and writes clipboard data at high frequency and will trigger the ClipboardHijack pattern
- Password managers (KeePass, 1Password, Bitwarden) that copy credentials to the clipboard will match clipboard access patterns
- IT administrators configuring netsh portproxy for legitimate port forwarding, NAT traversal, or IPv4-to-IPv6 translation in lab or jump-host environments
- Endpoint security vendors that install NDIS filter drivers for network traffic inspection (Palo Alto Cortex XDR, Symantec, CrowdStrike network filter components) will trigger the kernel driver installation pattern
- VPN clients (Cisco AnyConnect, Palo Alto GlobalProtect) and remote desktop tools that install virtual network adapter drivers with Type=SERVICE_KERNEL_DRIVER
- Automated UI testing frameworks (Playwright, Selenium, AutoIt) that programmatically interact with clipboard in CI/CD test environments
References (11)
- https://attack.mitre.org/techniques/T1565/002/
- 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://securelist.com/brazilian-banking-trojans-and-windows-clipboard/97373/
- https://www.fortinet.com/blog/threat-research/metamorfo-banking-trojan-keeps-targeting-brazil
- https://www.welivesecurity.com/2019/05/07/turla-lightneuron-email-too-much/
- https://learn.microsoft.com/en-us/windows/win32/wfp/windows-filtering-platform-start-page
- https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-interface-portproxy
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1565.002/T1565.002.md
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceregistryevents-table
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceevents-table
Unlock Pro Content
Get the full detection package for T1565.002 including response playbook, investigation guide, and atomic red team tests.