T1218.013
Mavinject
Adversaries may abuse mavinject.exe to proxy execution of malicious code. Mavinject.exe is the Microsoft Application Virtualization Injector, a Windows utility that can inject code into external processes as part of Microsoft Application Virtualization (App-V). Adversaries abuse it to inject malicious DLLs into running processes (DLL injection) using the /INJECTRUNNING flag. Since mavinject.exe is a signed Microsoft binary, it can bypass application control. TONESHELL malware has been observed using mavinject.exe for process injection.
Microsoft Sentinel / Defender
kusto
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "mavinject.exe"
| extend InjectRunning = ProcessCommandLine has "/INJECTRUNNING"
| extend TargetPID = ProcessCommandLine matches regex @"/INJECTRUNNING \d+"
| extend SuspiciousPath = ProcessCommandLine has_any ("Temp", "AppData", "Downloads", "Public", "Desktop")
| extend SuspiciousParent = InitiatingProcessFileName has_any ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe", "winword.exe", "excel.exe")
| project Timestamp, DeviceName, AccountName, ProcessCommandLine, InitiatingProcessFileName,
InitiatingProcessCommandLine, InjectRunning, SuspiciousPath, SuspiciousParent
| sort by Timestamp desc high severity
high confidence
Data Sources
Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint
Required Tables
DeviceProcessEvents
False Positives
- Microsoft Application Virtualization (App-V) environments where mavinject.exe is used legitimately for virtualized application management
- App-V client infrastructure invoking mavinject.exe as part of normal application publishing and streaming workflows
- Enterprise App-V deployments where IT administrators use mavinject.exe for application compatibility management
- Microsoft App-V testing and development environments
Last updated: 2026-04-13 Research depth: deep
References (4)
- https://attack.mitre.org/techniques/T1218/013/
- https://lolbas-project.github.io/lolbas/Binaries/Mavinject/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.013/T1218.013.md
- https://www.trendmicro.com/en_us/research/25/b/earth-preta-campaign-uses-ppam-files-and-encrypted-payloads-to-evade-detection.html
Unlock Pro Content
Get the full detection package for T1218.013 including response playbook, investigation guide, and atomic red team tests.
Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance