PowerShell TCP Tunnel Indicators: HttpWebRequest and TcpListener Usage (Windows

Flags PowerShell scripts referencing TcpListener/AcceptTcpClient and HttpWebRequest as potential TCP tunneling behavior.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2022-07-08
Updated
2026-07-31

ATT&CK techniques

C2
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Defense Evasion

  8. Cred Access

  9. Discovery

  10. Lateral Movement

  11. Collection

  12. Exfiltration

  13. Impact

What it detects

This rule flags PowerShell script block text containing all of: System.Net.HttpWebRequest, System.Net.Sockets.TcpListener, and AcceptTcpClient. The combination is consistent with scripts that establish network communications and act as a TCP listener, which can be used for tunneling or proxy-like behavior. It relies on PowerShell Script Block Logging telemetry that captures the executed script content.

Related detections9 linkedT1090 — drag to rearrange
Malicious Java Backdoor Execution from Public Documents via javaw (via process_creation)
Suspicious Proxyware Installation via accept-tos Flag on Linux
Suspicious DNS Query to Dynamic DNS and Tunneling Providers Abused by RATs
Malicious GenAI Browser Extension C2 and PAC Redirection (via proxy)
Malicious FRP Reverse Proxy Tunnel Identified by Hardcoded Token (via process_creation)
Suspicious SSH Reverse Tunnel Over DNS Port
Suspicious Chisel SOCKS Tunnel Command Line
Suspicious Cloudflare Quick Tunnel Used for Covert Access (via dns_query)
Suspicious SOCKS Proxy Autorun Registry Persistence via Registry Set
PowerShell TCP Tunnel Indicators: HttpWebRequest and TcpListener Usage (Windows
Pivot detection · T1090 · 9 related

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.