
title: Netsh Port Forwarding
author: Florian Roth, omkar72, oscd.community
date: 2019/01/29
description: Detects netsh commands that configure a port forwarding (PortProxy)
detection:
  SELECTION_1:
    EventID: 1
  SELECTION_2:
    Image: '*\netsh.exe'
  SELECTION_3:
    CommandLine: '*interface*'
  SELECTION_4:
    CommandLine: '*portproxy*'
  SELECTION_5:
    CommandLine: '*add*'
  SELECTION_6:
    CommandLine: '*v4tov4*'
  SELECTION_7:
    CommandLine: '*connectp*'
  SELECTION_8:
    CommandLine: '*listena*'
  SELECTION_9:
    CommandLine: '*c=*'
  condition: (SELECTION_1 and SELECTION_2 and ((SELECTION_3 and SELECTION_4 and SELECTION_5
    and SELECTION_6) or (SELECTION_7 and SELECTION_8 and SELECTION_9)))
falsepositives:
- Legitimate administration
- WSL2 network bridge PowerShell script used for WSL/Kubernetes/Docker (e.g. https://github.com/microsoft/WSL/issues/4150#issuecomment-504209723)
id: 322ed9ec-fcab-4f67-9a34-e7c6aef43614
level: medium
logsource:
  category: process_creation
  product: windows
modified: 2021/06/22
references:
- https://www.fireeye.com/blog/threat-research/2019/01/bypassing-network-restrictions-through-rdp-tunneling.html
- https://adepts.of0x.cc/netsh-portproxy-code/
- https://www.dfirnotes.net/portproxy_detection/
status: experimental
tags:
- attack.lateral_movement
- attack.defense_evasion
- attack.command_and_control
- attack.t1090
ruletype: SIGMA
