Detection rules › Panther

VPC Flow Logs Inbound Port Blocklist

Severity
high
Log types
AWS.VPCFlow, OCSF.NetworkActivity
Tags
AWS, DataModel, Configuration Required, Security Control, Command and Control:Non-Standard Port
Reference
https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html
Source
github.com/panther-labs/panther-analysis

VPC Flow Logs observed inbound traffic violating the port blocklist.

MITRE ATT&CK coverage

TacticTechniques
Command & ControlT1571 Non-Standard Port

Rule body yaml

AnalysisType: rule
Filename: aws_vpc_inbound_traffic_port_blocklist.py
RuleID: "AWS.VPC.InboundPortBlacklist"
DisplayName: "VPC Flow Logs Inbound Port Blocklist"
Enabled: false
LogTypes:
  - AWS.VPCFlow
  - OCSF.NetworkActivity
Tags:
  - AWS
  - DataModel
  - Configuration Required
  - Security Control
  - Command and Control:Non-Standard Port
Reports:
  MITRE ATT&CK:
    - TA0011:T1571
Reference: https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html
Severity: High
Description: >
  VPC Flow Logs observed inbound traffic violating the port blocklist.
Runbook: >
  Block the unapproved traffic, or update the unapproved ports list.
SummaryAttributes:
  - srcaddr
  - dstaddr
  - dstport
Tests:
  - Name: Public to Private IP on Restricted Port
    ExpectedResult: true
    Log:
      {
        "dstPort": 22,
        "dstAddr": "10.0.0.1",
        "srcAddr": "1.1.1.1",
        "p_log_type": "AWS.VPCFlow",
      }
  - Name: Public to Private IP on Allowed Port
    ExpectedResult: false
    Log:
      {
        "dstPort": 443,
        "dstAddr": "10.0.0.1",
        "srcAddr": "1.1.1.1",
        "p_log_type": "AWS.VPCFlow",
      }
  - Name: Private to Private IP on Restricted Port
    ExpectedResult: false
    Log:
      {
        "dstPort": 22,
        "dstAddr": "10.0.0.1",
        "srcAddr": "10.10.10.1",
        "p_log_type": "AWS.VPCFlow",
      }
  - Name: Public to Private IP on Restricted Port - OCSF
    ExpectedResult: true
    Log:
      {
        "dst_endpoint": { "ip": "10.0.0.1", "port": 22 },
        "src_endpoint": { "ip": "1.1.1.1" },
        "p_log_type": "OCSF.NetworkActivity",
      }
  - Name: Public to Private IP on Allowed Port - OCSF
    ExpectedResult: false
    Log:
      {
        "dst_endpoint": { "ip": "10.0.0.1", "port": 443 },
        "src_endpoint": { "ip": "1.1.1.1" },
        "p_log_type": "OCSF.NetworkActivity",
      }

Detection logic

Condition

destination_port in ["22", "3389"]

This rule also runs imperative logic the parser cannot express as a filter; the conditions above are the structured part it could extract.

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
destination_portin
  • 22
  • 3389

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

Field
eventName
eventSource
awsRegion
recipientAccountId
sourceIPAddress
userAgent
userIdentity