OpenParable
Skip to content
← Back to skills

T1205.001_port-knocking

DevOps & Security

Adversaries may use port knocking to hide open ports used for persistence or command and control.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/CyberStrikeus/CyberStrike/blob/HEAD/.cyberstrike/skill/mitre_attack/TA0005_defense-evasion/T1205.001_port-knocking/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/t1205-001-port-knocking, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

T1205.001 Port Knocking

Sub-technique of: T1205

High-Level Description

Adversaries may use port knocking to hide open ports used for persistence or command and control. To enable a port, an adversary sends a series of attempted connections to a predefined sequence of closed ports. After the sequence is completed, opening a port is often accomplished by the host based firewall, but could also be implemented by custom software.

This technique has been observed both for the dynamic opening of a listening port as well as the initiating of a connection to a listening server on a different system.

The observation of the signal packets to trigger the communication can be conducted through different methods. One means, originally implemented by Cd00r , is to use the libpcap libraries to sniff for the packets in question. Another method leverages raw sockets, which enables the malware to use ports that are already open for use by other programs.

Kill Chain Phase

  • Defense Evasion (TA0005)
  • Persistence (TA0003)
  • Command and Control (TA0011)

Platforms: Linux, macOS, Windows, Network Devices

What to Check

  • Identify if Port Knocking technique is applicable to target environment
  • Check Linux systems for indicators of Port Knocking
  • Check macOS systems for indicators of Port Knocking
  • Check Windows systems for indicators of Port Knocking
  • Verify mitigations are bypassed or absent (1 known mitigations)
  • Assess detection coverage (1 detection strategies)

How to Test

Manual Testing

  1. Identify Attack Surface: Determine if the target environment is susceptible to Port Knocking by examining the target platforms (Linux, macOS, Windows).

  2. Assess Existing Defenses: Review whether mitigations for T1205.001 are in place. If defenses are absent or misconfigured, this technique may be exploitable.

  3. Execute Test: Use tools and methods described in the MITRE ATT&CK page and external references below.

Note: No Atomic Red Team tests available for this technique. See Atomic Red Team GitHub for updates.

Remediation Guide

M1037 Filter Network Traffic

Mitigation of some variants of this technique could be achieved through the use of stateful firewalls, depending upon how it is implemented.

Detection

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

Risk Assessment

FindingSeverityImpact
Port Knocking technique applicableLowDefense Evasion

CWE Categories

CWE IDTitle
CWE-693Protection Mechanism Failure

References