Skip to content

Commit b7c084a

Browse files
djlukicswachchhanda000phantinussnasbench
authored
Merge PR #5654 from @djlukic - add hexnode fp filter
fix: Uncommon PowerShell Hosts - filter hexnode fix: Suspicious Non PowerShell WSMAN COM Provider - filter hexnode fix: Allow Service Access Using Security Descriptor Tampering Via Sc.EXE - filter hexnode fix: Registry Persistence via Service in Safe Mode - filter hexnode fix: Potential PowerShell Obfuscation Using Alias Cmdlets - filter legitimate cim aliases --------- Co-authored-by: Swachchhanda Shrawan Poudel <87493836+swachchhanda000@users.noreply.github.com> Co-authored-by: phantinuss <79651203+phantinuss@users.noreply.github.com> Co-authored-by: Nasreddine Bencherchali <nasbench@users.noreply.github.com>
1 parent d36fc36 commit b7c084a

5 files changed

Lines changed: 36 additions & 6 deletions

File tree

rules-threat-hunting/windows/powershell/powershell_classic/posh_pc_alternate_powershell_hosts.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ references:
99
- https://threathunterplaybook.com/hunts/windows/190815-RemoteServiceInstallation/notebook.html
1010
author: Roberto Rodriguez @Cyb3rWard0g
1111
date: 2019-08-11
12-
modified: 2023-12-11
12+
modified: 2025-10-22
1313
tags:
1414
- attack.execution
1515
- attack.t1059.001
@@ -32,6 +32,8 @@ detection:
3232
- 'HostApplication=powershell'
3333
filter_optional_citrix:
3434
Data|contains: 'Citrix\ConfigSync\ConfigSync.ps1'
35+
filter_optional_hexnode:
36+
Data|contains: 'HostApplication=C:\Hexnode\Hexnode Agent\Current\HexnodeAgent.exe'
3537
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
3638
falsepositives:
3739
- Programs using PowerShell directly without invocation of a dedicated interpreter

rules/windows/powershell/powershell_classic/posh_pc_wsman_com_provider_no_powershell.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ references:
88
- https://github.com/bohops/WSMan-WinRM
99
author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research)
1010
date: 2020-06-24
11-
modified: 2024-12-27
11+
modified: 2025-10-22
1212
tags:
1313
- attack.execution
1414
- attack.t1059.001
@@ -32,7 +32,9 @@ detection:
3232
# Note: Since we're using the raw data field to match. There is no easy way to filter out cases where the "HostApplication" field is null (i.e doesn't exist). We're practically forced to use a regex.
3333
# If you're already mapping and extracting the field, then obviously use that directly.
3434
Data|re: 'HostId=[a-zA-Z0-9-]{36}\s+EngineVersion='
35-
condition: selection and not 1 of filter_main_*
35+
filter_optional_hexnode:
36+
Data|contains: 'HostApplication=C:\Hexnode\Hexnode Agent\Current\HexnodeAgent.exe'
37+
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
3638
falsepositives:
3739
- Unknown
3840
level: medium

rules/windows/powershell/powershell_script/posh_ps_susp_set_alias.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ references:
99
- https://github.com/1337Rin/Swag-PSO
1010
author: frack113
1111
date: 2023-01-08
12+
modified: 2025-10-22
1213
tags:
1314
- attack.defense-evasion
1415
- attack.execution
@@ -23,7 +24,21 @@ detection:
2324
ScriptBlockText|contains:
2425
- 'Set-Alias '
2526
- 'New-Alias '
26-
condition: selection
27+
filter_main_cim:
28+
ScriptBlockText:
29+
- 'Set-Alias -Name ncms -Value New-CimSession -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
30+
- 'Set-Alias -Name gcls -Value Get-CimClass -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
31+
- 'Set-Alias -Name ncso -Value New-CimSessionOption -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
32+
- 'Set-Alias -Name gcms -Value Get-CimSession -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
33+
- 'Set-Alias -Name rcms -Value Remove-cimSession -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
34+
- 'Set-Alias -Name rcie -Value Register-CimIndicationEvent -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
35+
- 'Set-Alias -Name gcai -Value Get-CimAssociatedInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
36+
- 'Set-Alias -Name gcim -Value Get-CimInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
37+
- 'Set-Alias -Name scim -Value Set-CimInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
38+
- 'Set-Alias -Name ncim -Value New-CimInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
39+
- 'Set-Alias -Name rcim -Value Remove-cimInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
40+
- 'Set-Alias -Name icim -Value Invoke-CimMethod -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
41+
condition: selection and not 1 of filter_main_*
2742
falsepositives:
2843
- Unknown
2944
level: low

rules/windows/process_creation/proc_creation_win_sc_sdset_allow_service_changes.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ references:
1111
- https://learn.microsoft.com/en-us/windows/win32/secauthz/sid-strings
1212
author: Nasreddine Bencherchali (Nextron Systems)
1313
date: 2023-02-28
14+
modified: 2025-10-22
1415
tags:
1516
- attack.persistence
1617
- attack.t1543.003
@@ -32,7 +33,9 @@ detection:
3233
- ';BA' # Built-in administrators
3334
- ';SY' # Local system
3435
- ';WD' # Everyone
35-
condition: all of selection_*
36+
filter_optional_hexnode:
37+
ParentImage: 'C:\Hexnode\Hexnode Agent\Current\HexnodeAgent.exe'
38+
condition: all of selection_* and not 1 of filter_optional_*
3639
falsepositives:
3740
- Unknown
3841
level: high

rules/windows/registry/registry_set/registry_set_add_load_service_in_safe_mode.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ references:
77
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1112/T1112.md#atomic-test-34---windows-add-registry-value-to-load-service-in-safe-mode-with-network
88
author: frack113
99
date: 2022-04-04
10-
modified: 2025-10-07
10+
modified: 2025-10-22
1111
tags:
1212
- attack.defense-evasion
1313
- attack.t1564.001
@@ -30,6 +30,14 @@ detection:
3030
Image|endswith: '\MBAMInstallerService.exe'
3131
TargetObject|endswith: '\MBAMService\(Default)'
3232
Details: 'Service'
33+
filter_optional_hexnode:
34+
Image: 'C:\Hexnode\Hexnode Agent\Current\HexnodeAgent.exe'
35+
TargetObject|endswith:
36+
- '\Control\SafeBoot\Minimal\Hexnode Updater\(Default)'
37+
- '\Control\SafeBoot\Network\Hexnode Updater\(Default)'
38+
- '\Control\SafeBoot\Minimal\Hexnode Agent\(Default)'
39+
- '\Control\SafeBoot\Network\Hexnode Agent\(Default)'
40+
Details: 'Service'
3341
condition: selection and not 1 of filter_optional_*
3442
falsepositives:
3543
- Unknown

0 commit comments

Comments
 (0)