-
-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rules): Potential injection via .NET debugging
Identifies creation of a process on behalf of the CLR debugging facility which may be indicative of code injection. The CLR interface utilizes the OpenVirtualProcess method to attach the debugger to the remote process.
- Loading branch information
1 parent
6957a63
commit 9219478
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
rules/defense_evasion_potential_injection_via_dotnet_debugging.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Potential injection via .NET debugging | ||
id: 193ebf2f-e365-4f57-a639-275b7cdf0319 | ||
version: 1.0.0 | ||
description: | | ||
Identifies creation of a process on behalf of the CLR debugging facility which may | ||
be indicative of code injection. The CLR interface utilizes the OpenVirtualProcess | ||
method to attach the debugger to the remote process. | ||
labels: | ||
tactic.id: TA0005 | ||
tactic.name: Defense Evasion | ||
tactic.ref: https://attack.mitre.org/tactics/TA0005/ | ||
technique.id: T1055 | ||
technique.name: Process Injection | ||
technique.ref: https://attack.mitre.org/techniques/T1055/ | ||
references: | ||
- https://blog.xpnsec.com/debugging-into-net/ | ||
- https://learn.microsoft.com/en-us/dotnet/framework/unmanaged-api/debugging/iclrdebugging-openvirtualprocess-method | ||
|
||
condition: > | ||
spawn_process and thread.callstack.symbols imatches ('mscordbi.dll!OpenVirtualProcess') | ||
and | ||
not | ||
ps.child.exe imatches | ||
( | ||
'?:\\Visual Studio\\Common?\\IDE\\devenv.exe', | ||
'?:\\Program Files\\Microsoft Visual Studio\\*.exe', | ||
'?:\\Program Files (x86)\\Microsoft Visual Studio\\*.exe', | ||
'?:\\Program Files\\IIS Express\\iisexpress.exe', | ||
'?:\\Program Files (x86)\\IIS Express\\iisexpress.exe' | ||
) | ||
and not ps.exe imatches '?:\\Program Files (x86)\\Microsoft Visual Studio\\*.exe' | ||
output: > | ||
Process %ps.exe attached the .NET debugger to process %ps.child.exe for potential code injection | ||
severity: high | ||
|
||
min-engine-version: 2.0.0 |