Windows PowerShell: Query TCP connections with Get-NetTCPConnection

Detects PowerShell usage of Get-NetTCPConnection to enumerate TCP network connections.

FreeReviewedSigma · Low · v2
Product
windows
Category
ps_classic_start
Author
frack113 (SigmaHQ), DRL 1.1
Published
2021-12-10
Updated
2026-07-31
title: "Windows PowerShell: Query TCP connections with Get-NetTCPConnection"
id: 85033d6d-9ef9-409c-8953-e3f5dbf24907
status: test
description: This rule matches PowerShell Classic command/script content containing Get-NetTCPConnection, which lists TCP network connections on the local or remote context available to the process. Adversaries can use this to enumerate active connections during discovery and understand network activity for further targeting. Telemetry relied on is Windows PowerShell Classic script or command text where the string Get-NetTCPConnection appears.
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1049/T1049.md#atomic-test-2---system-network-connections-discovery-with-powershell
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_classic/posh_pc_susp_get_nettcpconnection.yml
author: frack113, Huntrule Team
date: 2021-12-10
modified: 2023-10-27
tags:
  - attack.discovery
  - attack.t1049
logsource:
  product: windows
  category: ps_classic_start
detection:
  selection:
    Data|contains: Get-NetTCPConnection
  condition: selection
falsepositives:
  - Unknown
level: low
license: DRL-1.1
related:
  - id: b366adb4-d63d-422d-8a2c-186463b5ded0
    type: derived