Skip to content

Commit 877ace0

Browse files
committed
refactor(rules): Migrate to ps.pe. fields in rules
1 parent 4b5f79f commit 877ace0

17 files changed

+38
-37
lines changed

rules/credential_access_credential_access_from_backups_via_rundll32.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Credentials access from backups via Rundll32
22
id: ff43852c-486c-4870-a318-ce976d2231a5
3-
version: 1.0.3
3+
version: 1.0.4
44
description: |
55
Detects an attempt to obtain credentials from credential backups.
66
labels:
@@ -16,7 +16,7 @@ labels:
1616

1717
condition: >
1818
spawn_process and
19-
(ps.name ~= 'rundll32.exe' or pe.file.name ~= 'rundll32.exe') and
19+
(ps.name ~= 'rundll32.exe' or ps.pe.file.name ~= 'rundll32.exe') and
2020
(ps.args iin ('keymgr.dll') and ps.args iin ('KRShowKeyMgr'))
2121
2222
min-engine-version: 3.0.0

rules/credential_access_credential_discovery_via_vaultcmd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Credential discovery via VaultCmd tool
22
id: 2ce607d3-5a14-4628-be8a-22bcde97dab5
3-
version: 1.1.3
3+
version: 1.1.4
44
description: |
55
Detects the usage of the VaultCmd tool to list Windows Credentials. VaultCmd creates,
66
displays and deletes stored credentials. An adversary may abuse this to list or dump
@@ -18,7 +18,7 @@ labels:
1818

1919
condition: >
2020
spawn_process and
21-
(ps.name ~= 'VaultCmd.exe' or pe.file.name ~= 'vaultcmd.exe') and
21+
(ps.name ~= 'VaultCmd.exe' or ps.pe.file.name ~= 'vaultcmd.exe') and
2222
ps.cmdline imatches '*/list*'
2323
2424
severity: medium

rules/credential_access_remote_thread_creation_into_lsass.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Remote thread creation into LSASS
22
id: e3ce8d6f-c260-48d6-9398-3c1c71726297
3-
version: 1.0.3
3+
version: 1.0.4
44
description: |
55
Identifies the creation of a remote thread in LSASS (Local Security And Authority Subsystem Service)
66
by untrusted or suspicious processes. This may indicate attempts to execute code inside the LSASS process
@@ -19,6 +19,6 @@ labels:
1919
condition: >
2020
create_remote_thread and
2121
evt.arg[exe] imatches '?:\\Windows\\System32\\lsass.exe' and
22-
(ps.name iin script_interpreters or ps.name ~= 'rundll32.exe' or pe.is_signed = false or pe.is_trusted = false)
22+
(ps.name iin script_interpreters or ps.name ~= 'rundll32.exe' or ps.signature.exists = false or ps.signature.is_trusted = false)
2323
2424
min-engine-version: 3.0.0

rules/defense_evasion_appdomain_manager_injection_via_clr_search_order_hijacking.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: AppDomain Manager injection via CLR search order hijacking
22
id: 9319fafd-b7dc-4d85-b41a-54a8d4f1ab18
3-
version: 1.0.5
3+
version: 1.0.6
44
description: |
55
Adversaries may execute their own malicious payloads by hijacking how the .NET AppDomainManager loads assemblies.
66
The .NET framework uses the AppDomainManager class to create and manage one or more isolated runtime environments
@@ -27,7 +27,7 @@ references:
2727
condition: >
2828
(load_unsigned_or_untrusted_module)
2929
and ps.exe != '' and ((base(dir(image.path)) ~= base(image.path, false)) or (ps.envs[APPDOMAIN_MANAGER_ASM] istartswith image.name)) and
30-
pe.is_dotnet and (image.is_dotnet or thread.callstack.symbols imatches ('clr.dll!ParseManifest*'))
30+
ps.pe.is_dotnet and (image.is_dotnet or thread.callstack.symbols imatches ('clr.dll!ParseManifest*'))
3131
3232
output: >
3333
Process %ps.exe loaded untrusted .NET assembly %image.path from suspicious location

rules/defense_evasion_dll_sideloading_via_copied_binary.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ condition: >
2525
thread.callstack.symbols imatches ('*CopyFile*', '*MoveFile*')
2626
| by file.path
2727
|(load_dll) and
28-
dir(image.path) ~= dir(ps.exe) and pe.cert.subject icontains 'Microsoft' and pe.is_trusted and
28+
dir(image.path) ~= dir(ps.exe) and
29+
ps.signature.subject icontains 'Microsoft' and ps.signature.is_trusted and
2930
(image.signature.type = 'NONE' or image.signature.level = 'UNCHECKED' or image.signature.level = 'UNSIGNED')
3031
| by ps.exe
3132

rules/defense_evasion_dll_sideloading_via_microsoft_office_dropped_file.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: DLL Side-Loading via Microsoft Office dropped file
22
id: d808175d-c4f8-459d-b17f-ca9a88890c04
3-
version: 1.0.2
3+
version: 1.0.3
44
description: |
55
Identifies Microsoft Office process creating a DLL or other variant of an executable object which
66
is later loaded by a trusted binary. Adversaries may exploit this behavior by delivering malicious
@@ -23,8 +23,8 @@ condition: >
2323
(file.extension iin ('.dll', '.cpl', '.ocx') or file.is_dll) and
2424
ps.name iin msoffice_binaries
2525
| by file.path
26-
|(load_unsigned_or_untrusted_dll)
27-
and pe.is_signed = true and ps.name not iin msoffice_binaries and
26+
|(load_unsigned_or_untrusted_dll) and
27+
ps.name not iin msoffice_binaries and ps.signature.is_trusted = true and
2828
image.path not imatches '?:\\Windows\\assembly\\NativeImages_*' and
2929
ps.exe not imatches
3030
(

rules/defense_evasion_dotnet_assembly_loaded_by_unmanaged_process.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: .NET assembly loaded by unmanaged process
22
id: 34be8bd1-1143-4fa8-bed4-ae2566b1394a
3-
version: 1.0.8
3+
version: 1.0.9
44
description: |
55
Identifies the loading of the .NET assembly by an unmanaged process. Adversaries can load the CLR runtime
66
inside unmanaged process and execute the assembly via the ICLRRuntimeHost::ExecuteInDefaultAppDomain method.
@@ -17,7 +17,7 @@ references:
1717

1818
condition: >
1919
(load_unsigned_or_untrusted_module) and
20-
ps.exe != '' and pe.is_dotnet = false and
20+
ps.exe != '' and ps.pe.is_dotnet = false and
2121
(image.is_dotnet or thread.callstack.modules imatches ('*clr.dll')) and
2222
image.path not imatches
2323
(

rules/defense_evasion_regsvr32_scriptlet_execution.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Regsvr32 scriptlet execution
22
id: 128f5254-67c9-43ac-b901-18b3731b1d0b
3-
version: 1.0.4
3+
version: 1.0.5
44
description: |
55
Identifies the execution of a scriptlet file by regsvr32.exe process. regsvr32.exe
66
allows attackers to run arbitrary scripts to proxy execution of malicious code.
@@ -17,7 +17,7 @@ labels:
1717

1818
condition: >
1919
spawn_process and
20-
(ps.name ~= 'regsvr32.exe' or pe.file.name ~= 'regsvr32.exe') and
20+
(ps.name ~= 'regsvr32.exe' or ps.pe.file.name ~= 'regsvr32.exe') and
2121
(
2222
(ps.cmdline imatches '*scrobj*' and
2323
ps.cmdline imatches

rules/defense_evasion_suspicious_html_application_script_execution.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Suspicious HTML Application script execution
22
id: 4ec64ac2-851d-41b4-b7d2-910c21de334d
3-
version: 1.0.6
4-
description: |
3+
version: 1.0.7
4+
description: |
55
Identifies the execution of scripts via Microsoft HTML Application Host interpreter. Adversaries
66
can proxy the execution of arbitrary script code through a trusted, signed utility to evade defenses.
77
labels:
@@ -20,7 +20,7 @@ references:
2020

2121
condition: >
2222
spawn_process and
23-
(ps.name ~= 'mshta.exe' or pe.file.name ~= 'mshta.exe') and
23+
(ps.name ~= 'mshta.exe' or ps.pe.file.name ~= 'mshta.exe') and
2424
ps.cmdline imatches
2525
(
2626
'*WScript.Shell*',

rules/defense_evasion_suspicious_object_symbolic_link_creation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Suspicious object symbolic link creation
22
id: f9306355-1f5f-4a06-9779-195aa681db80
3-
version: 1.0.4
3+
version: 1.0.5
44
description: |
55
Identifies the creation of the object symbolic link inside the object manager namespace
66
by untrusted or unusual processes.
@@ -19,7 +19,7 @@ references:
1919

2020
condition: >
2121
create_symbolic_link_object and evt.pid != 4 and
22-
(pe.is_signed = false or pe.is_trusted = false or
22+
(ps.signature.exists = false or ps.signature.is_trusted = false or
2323
ps.exe not imatches
2424
(
2525
'?:\\ProgramData\\Microsoft\\Windows Defender\\*\\MsMpEng.exe',

0 commit comments

Comments
 (0)