Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / WINDOWS / NETWORK

Inbound

This note documents detection patterns related to Suspicious Inbound Connections within Windows environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Sysmon3Network connectionCriticalDetect inbound network sessions reaching host processes.
Security5156Windows Filtering Platform allowed connectionCriticalNative inbound permit telemetry.
Security5158Bind to local portCriticalDetects processes opening listening ports.
Sysmon1Process creationCriticalIdentifies listening process or payload started before inbound traffic.
Security4688Process creationHighParent-child correlation.
Sysmon22DNS queryMediumUseful when inbound listener later resolves outbound C2.
Firewall LogsN/AExternal source visibilityHighValuable for source IP analysis.
EDR TelemetryN/AProcess-network lineageCriticalFull inbound session attribution.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Rare listening portNew port outside baselineCriticalStrong listener indicator.
Userland binary listeningTemp/AppData binary opens socketCriticalHigh malware probability.
LOLBIN opens listenerpowershell, cmd, rundll32CriticalReverse shell or staging behavior.
External source to workstationUnexpected inbound from internetCriticalVery high-value anomaly.
SYSTEM service new listenerService context bindHighPersistence or implant listener.
Short-lived bind then child shellListener accepts then spawns shellCriticalReverse shell / bind shell indicator.
Admin share inbound with odd sourceSMB from unusual hostHighLateral movement possibility.

Common Tools

ToolUsage
PowerShellListener / reverse shell
netcatBind shell
nc.exeSimple inbound shell
socatPort relay / listener
python.exeHTTP or socket listener
rundll32.exeProxy listener payload
custom implantBind port or staged callback receiver

Relevant Artifacts

  • Sysmon Event IDs 3, 1, 22
  • Security Event IDs 5156, 5158, 4688
  • Firewall logs
  • Netstat snapshot
  • EDR network lineage
  • Prefetch for listening binary
  • Amcache for payload
  • ShimCache traces
  • MFT / USN if dropped listener binary

MITRE ATT&CK References

  • T1571 Non-Standard Port
  • T1105 Ingress Tool Transfer
  • T1071 Application Layer Protocol
  • T1021 Remote Services

Decision Tree

  1. Which process accepted inbound connection?

    • Image path
    • Parent process
  2. Port expected?

    • Baseline service?
    • Rare port?
  3. Source trusted?

    • Internal host
    • External IP
    • Repeated source
  4. Did child process spawn?

    • Shell
    • Downloader
    • Service action
  5. Expand:

    • Additional listeners
    • Persistence
    • Outbound follow-up
  6. Scope:

    • Single host
    • Lateral movement
    • External exposure

Example Detection Templates

KQL

SecurityEvent
| where EventID == 5158
| project TimeGenerated, Computer, ProcessName, SourcePort
Sysmon
| where EventID == 3
| project TimeGenerated, Computer, Image, SourceIp, DestinationPort

EQL

network where event.type == "start"
sequence by host.name with maxspan=5m
  [ process where process.name != null ]
  [ network where source.ip != null ]

Sigma

title: Suspicious Inbound Connection
id: 2f7b18a0-inbound-detection
status: experimental
description: Detects suspicious inbound network activity to unusual processes or ports
references:
  - https://attack.mitre.org/
author: Vergil
date: 2026-03-07
logsource:
  product: windows
detection:
  selection:
    EventID:
      - 5158
      - 5156
  condition: selection
fields:
  - ProcessName
  - SourcePort
falsepositives:
  - Legitimate services
level: high
tags:
  - attack.command_and_control
  - attack.lateral_movement

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Port baselineTrack expected listenersCriticalDetect drift quickly
Firewall restrictionsLimit inbound exposureCriticalReduce listener success
Sysmon network loggingEnable Event 3CriticalCore visibility
Bind monitoringAlert on new listenersHighDetect bind shells early
EDR lineagePreserve process-network ancestryCriticalEssential triage source