| Title | Capture a Network Trace with netsh.exe |
|:-------------------------|:------------------|
| **Description** | Detects capture a network trace via netsh.exe trace functionality |
| **ATT&CK Tactic** |
- [TA0007: Discovery](https://attack.mitre.org/tactics/TA0007)
- [TA0006: Credential Access](https://attack.mitre.org/tactics/TA0006)
|
| **ATT&CK Technique** | - [T1040: Network Sniffing](https://attack.mitre.org/techniques/T1040)
|
| **Data Needed** | - [DN_0002_4688_windows_process_creation_with_commandline](../Data_Needed/DN_0002_4688_windows_process_creation_with_commandline.md)
- [DN_0003_1_windows_sysmon_process_creation](../Data_Needed/DN_0003_1_windows_sysmon_process_creation.md)
|
| **Trigger** | - [T1040: Network Sniffing](../Triggers/T1040.md)
|
| **Severity Level** | medium |
| **False Positives** | - Legitimate administrator or user uses netsh.exe trace functionality for legitimate reason
|
| **Development Status** | experimental |
| **References** | - [https://blogs.msdn.microsoft.com/canberrapfe/2012/03/30/capture-a-network-trace-without-installing-anything-capture-a-network-trace-of-a-reboot/](https://blogs.msdn.microsoft.com/canberrapfe/2012/03/30/capture-a-network-trace-without-installing-anything-capture-a-network-trace-of-a-reboot/)
|
| **Author** | Kutepov Anton, oscd.community |
## Detection Rules
### Sigma rule
```
title: Capture a Network Trace with netsh.exe
id: d3c3861d-c504-4c77-ba55-224ba82d0118
status: experimental
description: Detects capture a network trace via netsh.exe trace functionality
references:
- https://blogs.msdn.microsoft.com/canberrapfe/2012/03/30/capture-a-network-trace-without-installing-anything-capture-a-network-trace-of-a-reboot/
author: Kutepov Anton, oscd.community
date: 2019/10/24
modified: 2020/09/01
tags:
- attack.discovery
- attack.credential_access
- attack.t1040
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains|all:
- netsh
- trace
- start
condition: selection
falsepositives:
- Legitimate administrator or user uses netsh.exe trace functionality for legitimate reason
level: medium
```
### powershell
```
Get-WinEvent | where {($_.message -match "CommandLine.*.*netsh.*" -and $_.message -match "CommandLine.*.*trace.*" -and $_.message -match "CommandLine.*.*start.*") } | select TimeCreated,Id,RecordId,ProcessId,MachineName,Message
```
### es-qs
```
(winlog.event_data.CommandLine.keyword:*netsh* AND winlog.event_data.CommandLine.keyword:*trace* AND winlog.event_data.CommandLine.keyword:*start*)
```
### xpack-watcher
```
curl -s -XPUT -H \'Content-Type: application/json\' --data-binary @- localhost:9200/_watcher/watch/d3c3861d-c504-4c77-ba55-224ba82d0118 <