From fb3a72b43365f7d2353fd9c520efe25b8a336464 Mon Sep 17 00:00:00 2001 From: frack113 <62423083+frack113@users.noreply.github.com> Date: Mon, 13 May 2024 13:18:39 +0200 Subject: [PATCH] Merge PR #4852 from @frack113 - Add `Potential Packet Capture Activity Via Start-NetEventSession - ScriptBlock` new: Potential Packet Capture Activity Via Start-NetEventSession - ScriptBlock --------- Co-authored-by: nasbench <8741929+nasbench@users.noreply.github.com> --- .../posh_ps_packet_capture.yml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 rules/windows/powershell/powershell_script/posh_ps_packet_capture.yml diff --git a/rules/windows/powershell/powershell_script/posh_ps_packet_capture.yml b/rules/windows/powershell/powershell_script/posh_ps_packet_capture.yml new file mode 100644 index 000000000..cb70c5b3b --- /dev/null +++ b/rules/windows/powershell/powershell_script/posh_ps_packet_capture.yml @@ -0,0 +1,28 @@ +title: Potential Packet Capture Activity Via Start-NetEventSession - ScriptBlock +id: da34e323-1e65-42db-83be-a6725ac2caa3 +status: experimental +description: | + Detects the execution of powershell scripts with calls to the "Start-NetEventSession" cmdlet. Which allows an attacker to start event and packet capture for a network event session. + Adversaries may attempt to capture network to gather information over the course of an operation. + Data captured via this technique may include user credentials, especially those sent over an insecure, unencrypted protocol. +references: + - https://github.com/redcanaryco/atomic-red-team/blob/5f866ca4517e837c4ea576e7309d0891e78080a8/atomics/T1040/T1040.md#atomic-test-16---powershell-network-sniffing + - https://github.com/0xsyr0/Awesome-Cybersecurity-Handbooks/blob/7b8935fe4c82cb64d61343de1a8b2e38dd968534/handbooks/10_post_exploitation.md + - https://github.com/forgottentq/powershell/blob/9e616363d497143dc955c4fdce68e5c18d28a6cb/captureWindows-Endpoint.ps1#L13 +author: frack113 +date: 2024/05/12 +tags: + - attack.credential_access + - attack.discovery + - attack.t1040 +logsource: + product: windows + category: ps_script + definition: 'Requirements: Script Block Logging must be enabled' +detection: + selection: + ScriptBlockText|contains: 'Start-NetEventSession' + condition: selection +falsepositives: + - Legitimate network diagnostic scripts. +level: medium