From 705782ee9b41929028a6b3343a34a6f6fd0bb940 Mon Sep 17 00:00:00 2001 From: Tim Shelton Date: Tue, 3 Jan 2023 20:52:10 +0000 Subject: [PATCH 1/2] FP: call of window style hidden is embedded in AWS code. --- .../powershell_script/posh_ps_susp_windowstyle.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rules/windows/powershell/powershell_script/posh_ps_susp_windowstyle.yml b/rules/windows/powershell/powershell_script/posh_ps_susp_windowstyle.yml index ea8c32176..2c9159a8f 100644 --- a/rules/windows/powershell/powershell_script/posh_ps_susp_windowstyle.yml +++ b/rules/windows/powershell/powershell_script/posh_ps_susp_windowstyle.yml @@ -6,9 +6,9 @@ description: | In some cases, windows that would typically be displayed when an application carries out an operation can be hidden references: - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1564.003/T1564.003.md -author: frack113 +author: frack113, Tim Shelton (fp AWS) date: 2021/10/20 -modified: 2022/12/25 +modified: 2023/01/03 tags: - attack.defense_evasion - attack.t1564.003 @@ -22,7 +22,9 @@ detection: - 'powershell' - 'WindowStyle' - 'Hidden' - condition: selection + filter: + ScriptBlockText|contains: ':\Program Files\Amazon\WorkSpacesConfig\Scripts\' + condition: selection and not filter falsepositives: - Unknown level: medium From 4d6aec82a65c98b780c7ddc4a7bc2c7384a6d906 Mon Sep 17 00:00:00 2001 From: Nasreddine Bencherchali <8741929+nasbench@users.noreply.github.com> Date: Wed, 4 Jan 2023 00:43:40 +0100 Subject: [PATCH 2/2] fix: enhance fp filter --- .../powershell/powershell_script/posh_ps_susp_windowstyle.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rules/windows/powershell/powershell_script/posh_ps_susp_windowstyle.yml b/rules/windows/powershell/powershell_script/posh_ps_susp_windowstyle.yml index 2c9159a8f..c4c13d575 100644 --- a/rules/windows/powershell/powershell_script/posh_ps_susp_windowstyle.yml +++ b/rules/windows/powershell/powershell_script/posh_ps_susp_windowstyle.yml @@ -23,7 +23,9 @@ detection: - 'WindowStyle' - 'Hidden' filter: - ScriptBlockText|contains: ':\Program Files\Amazon\WorkSpacesConfig\Scripts\' + ScriptBlockText|contains|all: + - ':\Program Files\Amazon\WorkSpacesConfig\Scripts\' + - '$PSScriptRoot\Module\WorkspaceScriptModule\WorkspaceScriptModule' condition: selection and not filter falsepositives: - Unknown