VeriKQL by Kaushik Saha

T1205.001 Port Knocking

Command and ControlPersistenceStealthon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0302 Port-knock → rule/daemon change → first successful connect (T1205.001)

AN0842 Windows

A remote source rapidly touches a short sequence of closed ports (SYN→RST/S0) on a Windows host. Within a short window the host changes firewall state (WFP rule added/modified or service starts listening) and then the same source completes the first successful handshake to the newly opened port.

MITRE log sourceIn Microsoft Sentinel
WinEventLog:SysmonEventCode=1
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (1)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (1)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:SysmonEventCode=3, 22
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:Microsoft-Windows-Windows Firewall With Advanced Security/FirewallEventCode=2004, 2005, 2006
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where EventLog in ("Microsoft-Windows-Windows Firewall With Advanced Security/Firewall") | where EventID in (2004, 2005, 2006)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel in ("Microsoft-Windows-Windows Firewall With Advanced Security/Firewall") | where EventID in (2004, 2005, 2006)

AN0843 Linux

A source performs a short closed-port sequence; the host then modifies iptables/nftables/ufw rules or starts a daemon binding a new socket, followed by a successful connection from the same source.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLexecve: Commands that alter firewall or start listeners: iptables|nft|ufw|firewall-cmd|pfctl|systemctl start sshd/telnet/dropbear; raw-socket/libpcap tools (tcpdump, tshark, nmap --raw).Not mapped to Sentinel yet.
auditd:SYSCALLsocket/bind: New bind() to a previously closed port shortly after the sequence.Not mapped to Sentinel yet.
NSM:FlowKnock pattern: repeated REJ/S0 across ≥MinSequenceLen ports from same src_ip then SF success.Not mapped to Sentinel yet.

AN0844 macOS

A source performs a closed-port sequence; the endpoint enables a PF/socketfilterfw rule or a background process binds a port; then a successful connection completes from the same source.

MITRE log sourceIn Microsoft Sentinel
macos:unifiedlogexec: Execution of pfctl, socketfilterfw, launchctl start ssh/telnet, libpcap consumers.Not mapped to Sentinel yet.
macos:unifiedlogFirewall/PF anchor load or rule change events.Not mapped to Sentinel yet.
NSM:FlowSequence of REJ/S0 then SF success from same src_ip within TimeWindow.Not mapped to Sentinel yet.

AN0845 Network Devices

Router/switch receives a knock pattern (same src touches device unicast, broadcast, and network-address on same or stepped ports) followed by ACL/line-vty/service enable and the first mgmt session success.

MITRE log sourceIn Microsoft Sentinel
networkdevice:syslogConfig/ACL changes, line vty transport input changes, telnet/ssh/http(s) enable, image/feature module changes.Not mapped to Sentinel yet.
NSM:FlowSeries of denied/closed flows to distinct ports then success to mgmt port from same src_ip within TimeWindow.Not mapped to Sentinel yet.

Content Hub rules tagged with it (0)

No Content Hub rule is tagged with this technique.

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

In Sigma rules

No SigmaHQ rule names it in their tags outright.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.