{"id":"322ed9ec-fcab-4f67-9a34-e7c6aef43614","title":"New Port Forwarding Rule Added Via Netsh.EXE","description":"Detects the execution of netsh commands that configure a new port forwarding (PortProxy) rule","author":"Florian Roth (Nextron Systems), omkar72, oscd.community, Swachchhanda Shrawan Poudel","status":"test","level":"medium","date":"2019-01-29","modified":"2023-09-01","tags":["attack.lateral-movement","attack.command-and-control","attack.t1090"],"technique_ids":["T1090"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Legitimate administration activity","WSL2 network bridge PowerShell script used for WSL/Kubernetes/Docker (e.g. https://github.com/microsoft/WSL/issues/4150#issuecomment-504209723)"],"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/"],"source_path":"rules/windows/process_creation/proc_creation_win_netsh_port_forwarding.yml","source_sha256":"99793e40ac1f54c17874beb4e2659749a3882598fe0e7cf93d4621127bd65a38","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_netsh_port_forwarding.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: New Port Forwarding Rule Added Via Netsh.EXE\nid: 322ed9ec-fcab-4f67-9a34-e7c6aef43614\nstatus: test\ndescription: Detects the execution of netsh commands that configure a new port forwarding (PortProxy) rule\nreferences:\n    - https://www.fireeye.com/blog/threat-research/2019/01/bypassing-network-restrictions-through-rdp-tunneling.html\n    - https://adepts.of0x.cc/netsh-portproxy-code/\n    - https://www.dfirnotes.net/portproxy_detection/\nauthor: Florian Roth (Nextron Systems), omkar72, oscd.community, Swachchhanda Shrawan Poudel\ndate: 2019-01-29\nmodified: 2023-09-01\ntags:\n    - attack.lateral-movement\n    - attack.command-and-control\n    - attack.t1090\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_img:\n        - Image|endswith: '\\netsh.exe'\n        - OriginalFileName: 'netsh.exe'\n    selection_cli_1:\n        CommandLine|contains|all:\n            - 'interface'\n            - 'portproxy'\n            - 'add'\n            - 'v4tov4'\n    selection_cli_2:\n        CommandLine|contains|all:\n            # Example: netsh I p a v l=8001 listena=127.0.0.1 connectp=80 c=192.168.1.1\n            - 'i ' # interface\n            - 'p ' # portproxy\n            - 'a ' # add\n            - 'v ' # v4tov4\n    selection_cli_3:\n        CommandLine|contains|all:\n            - 'connectp'\n            - 'listena'\n            - 'c='\n    condition: selection_img and 1 of selection_cli_*\nfalsepositives:\n    - Legitimate administration activity\n    - WSL2 network bridge PowerShell script used for WSL/Kubernetes/Docker (e.g. https://github.com/microsoft/WSL/issues/4150#issuecomment-504209723)\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1090","id":"T1090","name":"Proxy","page":"techniques/enterprise/T1090/"}],"data_path":"data/detection-rules/322ed9ec-fcab-4f67-9a34-e7c6aef43614.json","kind":"sigma"}
