logo
SlackReddit

T1205.002

Traffic Signaling: Socket Filters

Description from ATT&CK

Adversaries may attach filters to a network socket to monitor then activate backdoors used for persistence or command and control. With elevated permissions, adversaries can use features such as the libpcap library to open sockets and install filters to allow or disallow certain types of data to come through the socket. The filter may apply to all traffic passing through the specified network interface (or every interface if not specified). When the network interface receives a packet matching the filter criteria, additional actions can be triggered on the host, such as activation of a reverse shell.

To establish a connection, an adversary sends a crafted packet to the targeted host that matches the installed filter criteria.(Citation: haking9 libpcap network sniffing) Adversaries have used these socket filters to trigger the installation of implants, conduct ping backs, and to invoke command shells. Communication with these socket filters may also be used in conjunction with Protocol Tunneling.(Citation: exatrack bpf filters passive backdoors)(Citation: Leonardo Turla Penquin May 2020)

Filters can be installed on any Unix-like platform with libpcap installed or on Windows hosts using Winpcap. Adversaries may use either libpcap with pcap_setfilter or the standard library function setsockopt with SO_ATTACH_FILTER options. Since the socket connection is not active until the packet is received, this behavior may be difficult to detect due to the lack of activity on a host, low CPU overhead, and limited visibility into raw socket usage.

Source

Atomic Tests

Atomic Test #1: T1205.002 - Add Custom Firewall Rule for Traffic Signaling Simulation

Simulates an adversary creating a custom inbound firewall rule designed to act as a traffic signaling trigger for backdoor activation.

Supported Platforms: Windows

auto_generated_guid: c33f6e7b-87f9-45be-be0e-8eaa0616034d

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

New-NetFirewallRule -DisplayName "T1205_Signal_Knock_Rule" -Direction Inbound -Protocol TCP -LocalPort 31337 -Action Allow -Description "Simulated traffic signaling trigger rule"; Write-Host "[+] Simulated port knocking signal rule created."

Cleanup Commands

Remove-NetFirewallRule -DisplayName "T1205_Signal_Knock_Rule" -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up signal firewall rule."

Atomic Test #2: T1205.002 - Register Custom WinSock Protocol Catalog Entry

Simulates an adversary modifying WinSock protocol catalogs (Protocol_Catalog9) to register a custom packet interception provider.

Supported Platforms: Windows

auto_generated_guid: 90fd1078-149b-4da4-b0f7-1113030dd8ae

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9\Catalog Entries\000000000099" -Force; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9\Catalog Entries\000000000099" -Name "PackedCatalogItem" -Value ([byte[]](0..31)) -ErrorAction SilentlyContinue; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9\Catalog Entries\000000000099" -Name "DisplayName" -Value "Simulated Filter Provider" -ErrorAction SilentlyContinue; Write-Host "[+] Simulated WinSock protocol catalog modification executed."

Cleanup Commands

Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9\Catalog Entries\000000000099" -Recurse -Force -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up simulated WinSock catalog entry."

Atomic Test #3: T1205.002 - Register Custom WinSock Name Space Provider (NSP) Stub

Simulates an adversary adding a custom WinSock Name Space Provider to intercept name resolution and socket binding requests.

Supported Platforms: Windows

auto_generated_guid: 4ddd4d04-e0f9-4273-9d6f-59f18f0af5f6

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\NameSpace_Catalog5\Catalog Entries\000000000099" -Force; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\NameSpace_Catalog5\Catalog Entries\000000000099" -Name "DisplayName" -Value "Simulated NSP Filter" -ErrorAction SilentlyContinue; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\NameSpace_Catalog5\Catalog Entries\000000000099" -Name "LibraryPath" -Value "C:\Windows\System32\simulated_nsp.dll" -ErrorAction SilentlyContinue; Write-Host "[+] Simulated WinSock NSP catalog injection executed."

Cleanup Commands

Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\NameSpace_Catalog5\Catalog Entries\000000000099" -Recurse -Force -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up simulated WinSock NSP entry."

Atomic Test #4: T1205.002 - Simulate Packet Capture Driver Service Registration

Simulates an adversary registering a rogue kernel-level packet capture driver service to intercept raw network traffic.

Supported Platforms: Windows

auto_generated_guid: 0284704c-59a0-44f2-b613-c10cc61b6b65

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\T1205PacketCapture" -Force; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\T1205PacketCapture" -Name "ImagePath" -Value "system32\drivers\simulated_capture.sys" -ErrorAction SilentlyContinue; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\T1205PacketCapture" -Name "Type" -Value 1 -ErrorAction SilentlyContinue; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\T1205PacketCapture" -Name "Start" -Value 3 -ErrorAction SilentlyContinue; Write-Host "[+] Simulated packet capture driver service registered."

Cleanup Commands

Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\T1205PacketCapture" -Recurse -Force -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up simulated driver service registration."

Atomic Test #5: T1205.002 - Register Custom WFP Callout Provider Registry Key

Simulates an adversary registering a Windows Filtering Platform callout provider registry configuration to hook deep packet inspection points.

Supported Platforms: Windows

auto_generated_guid: e46b7c40-2b5b-493a-a7b3-63377ae21e6c

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\BFE\Parameters\Policy\Providers\{11111111-2222-3333-4444-555555555555}" -Force; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\BFE\Parameters\Policy\Providers\{11111111-2222-3333-4444-555555555555}" -Name "DisplayName" -Value "T1205_Simulated_Callout_Provider" -ErrorAction SilentlyContinue; Write-Host "[+] Simulated WFP callout provider registry key added."

Cleanup Commands

Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\BFE\Parameters\Policy\Providers\{11111111-2222-3333-4444-555555555555}" -Recurse -Force -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up simulated WFP callout provider."

Atomic Test #6: T1205.002 - Modify TCPIP Parameter Registry for Raw Socket Behavior

Simulates adversary adjustment of network stack registry configurations to alter raw socket handling and packet inspection thresholds.

Supported Platforms: Windows

auto_generated_guid: 254ebca5-a2d5-4831-af33-67d669b8309a

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name "MaxRawSockets" -Value 500 -ErrorAction SilentlyContinue; Write-Host "[+] Simulated TCPIP raw socket parameter modified."

Cleanup Commands

Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name "MaxRawSockets" -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up TCPIP raw socket parameter."

Atomic Test #7: T1205.002 - Register Winsock Transport Filter Layer Provider

Simulates adversary registration of a Winsock Layered Service Provider (LSP) or transport filter key in the networking stack.

Supported Platforms: Windows

auto_generated_guid: 3bed0acb-e95a-492e-845d-adf05a0c4108

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

$val = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\ProviderOrder" -Name "ProviderOrder" -ErrorAction SilentlyContinue).ProviderOrder; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\ProviderOrder" -Name "T1205_BackupOrder" -Value $val -ErrorAction SilentlyContinue; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\ProviderOrder" -Name "ProviderOrder" -Value "$val,SimulatedProvider" -ErrorAction SilentlyContinue; Write-Host "[+] Simulated Winsock provider order modification applied."

Cleanup Commands

$backup = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\ProviderOrder" -Name "T1205_BackupOrder" -ErrorAction SilentlyContinue).T1205_BackupOrder; if ($null -ne $backup) { Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\ProviderOrder" -Name "ProviderOrder" -Value $backup }; Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\ProviderOrder" -Name "T1205_BackupOrder" -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up Winsock provider order."

Atomic Test #8: T1205.002 - Inject Simulated Socket Filter Helper Key in NetworkStack

Simulates an adversary injecting network stack helper configuration keys to monitor raw socket states for trigger packets.

Supported Platforms: Windows

auto_generated_guid: 58dbc799-5344-4fcd-819d-8c3713011c1f

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\NetworkInformation" -Force; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\NetworkInformation" -Name "SimulatedFilterState" -Value 1 -ErrorAction SilentlyContinue; Write-Host "[+] Simulated network stack helper key injected."

Cleanup Commands

Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\NetworkInformation" -Name "SimulatedFilterState" -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up simulated network stack helper key."

Atomic Test #9: T1205.002 - Register Custom WFP Sublayer Registry Key

Simulates an adversary creating a custom WFP sublayer registry configuration to manage high-priority packet filtering rules.

Supported Platforms: Windows

auto_generated_guid: e631d66d-ed47-4b96-9ff9-ae7bc0d9efbf

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\BFE\Parameters\Policy\SubLayers\{99999999-8888-7777-6666-555555555555}" -Force; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\BFE\Parameters\Policy\SubLayers\{99999999-8888-7777-6666-555555555555}" -Name "DisplayName" -Value "T1205_Simulated_Sublayer" -ErrorAction SilentlyContinue; Write-Host "[+] Simulated WFP sublayer registry key added."

Cleanup Commands

Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\BFE\Parameters\Policy\SubLayers\{99999999-8888-7777-6666-555555555555}" -Recurse -Force -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up simulated WFP sublayer."

Atomic Test #10: T1205.002 - Create Raw Socket Binding Persistence Hook Registry

Simulates an adversary adding a networking hook parameter registry entry to initialize custom socket filter hooks at system startup.

Supported Platforms: Windows

auto_generated_guid: e69a8f7f-13d2-47fb-94cf-17471a5636a6

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards" -Name "T1205_HookState" -Value 1 -ErrorAction SilentlyContinue; Write-Host "[+] Simulated network card hook key created."

Cleanup Commands

Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards" -Name "T1205_HookState" -ErrorAction SilentlyContinue; Write-Host "[+] Cleaned up network card hook key."

Atomic test(s) for this technique last updated: 2026-11-02 19:04:32 UTC

On this page