Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / LINUX / ENUMERATION

Network Reconnaissance

This note documents detection patterns related to Linux Network Reconnaissance on Linux systems.


Direct Indicators

SourceGrep Pattern / ArtifactMeaningForensic ValueNotes
Shell historyip aInterface enumerationHighVery common first foothold command.
Shell historyifconfigLegacy interface enumerationHighStill common operator habit.
Shell historyip routeRouting discoveryCriticalImmediate network awareness.
Shell historyroute -nLegacy routing tableHighCommon legacy usage.
Shell historyarp -aNeighbor discoveryCriticalLocal network target discovery.
Shell historyss -tulpnListening sockets discoveryCriticalService awareness.
Shell historynetstat -tulpnLegacy socket discoveryCriticalStrong host recon signal.
Shell historyhostname -IHost IP discoveryHighQuick context check.
Shell historypingReachability testingHighSimple target probing.
Shell historync -zvPort probingCriticalLightweight scanning.
Shell historynmapFull network scanCriticalStrong recon indicator.
Shell historydig, nslookupDNS discoveryHighInfrastructure mapping.
auditdnetwork tool executionProcess attributionCriticalBest attribution if enabled.
Network logssequential internal probesCriticalStrong recon evidence.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Recon immediately after loginManual foothold progressionCriticalCommon attacker sequence.
ip route then SSH movementRoute-aware pivotingCriticalStrong movement chain.
ARP review before lateral movementLocal target selectionCriticalCommon operator behavior.
Socket review before privilege abuseService target planningHighHost-aware escalation.
nmap internal subnet scanBroad reconCriticalStrong hostile indicator.
DNS lookup of internal namesInfrastructure mappingHighEnvironment awareness.
Recon under service accountSuspicious contextCriticalExploitation shell likely.
nc -zv multiple hostsLightweight stealth scanCriticalStrong operator pattern.
Hidden payload plus reconActive intrusionCriticalStrong combined signal.
Minimal recon but precise commandsMature operator behaviorHighSkilled hands-on-keyboard clue.

Common Tools

ToolUsage
ip aInterface discovery.
ip routeRouting table review.
arp -aNeighbor discovery.
ssSocket inspection.
netstatLegacy socket review.
pingReachability test.
nc -zvPort probe.
nmapBroad scan.
dig / nslookupDNS resolution.

Relevant Artifacts

ArtifactPath / CommandForensic ValueNotes
Shell history.bash_history, .zsh_historyCriticalRecon command evidence.
Routing tablelive system stateHighContext for movement paths.
ARP cacheip neigh / arp -aHighNearby hosts discovered.
Socket listss -tulpnCriticalService context.
Audit logs/var/log/audit/audit.logCriticalProcess attribution.
Firewall / flow logssequential probesCriticalNetwork truth.

MITRE ATT&CK References

  • T1016 System Network Configuration Discovery
  • T1046 Network Service Scanning
  • T1018 Remote System Discovery

Decision Tree

  1. Was network recon performed?

    • Search shell history and audit logs.
  2. Was local network mapped?

    • Interfaces, routes, ARP, sockets.
  3. Were remote targets probed?

    • Ping, nc, nmap, DNS.
  4. Did recon lead to movement?

    • SSH, scp, credential use.
  5. Is context suspicious?

    • Service account, web shell, fresh foothold.
  6. Pivot

    • Routes → reachable targets.
    • ARP → local host list.
    • Scan targets → next-stage movement.
  7. Confirm hostile recon

    • Recon commands + suspicious context + follow-on action = strong discovery finding.

Example Detection Templates

Grep

grep -R "ip a\|ifconfig\|ip route\|route -n\|arp -a\|ss -tulpn\|netstat -tulpn\|hostname -I\|ping \|nc -zv\|nmap \|dig \|nslookup " /home/*/.bash_history /root/.bash_history 2>/dev/null

Journalctl

journalctl | grep -E "nmap|netstat|ss|ping"

File Inspection

ip a
ip route

Sigma

title: Linux Network Reconnaissance
id: linux-network-reconnaissance
status: experimental
description: Detects suspicious Linux network discovery and scanning activity
logsource:
  product: linux
detection:
  selection_keywords:
    message|contains:
      - 'ip route'
      - 'arp -a'
      - 'ss -tulpn'
      - 'nmap'
  condition: selection_keywords
fields:
  - message
  - hostname
falsepositives:
  - Legitimate troubleshooting
level: medium
tags:
  - attack.discovery
  - attack.t1016

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
AuditdTrack recon commandsHighStrong attribution.
Network segmentationLimit reachable east-west scopeCriticalReduces recon value.
Shell loggingPreserve command history centrallyHighRetains early discovery steps.
EDR network alertsDetect scanning burstsHighStrong runtime visibility.

Fast Triage Checks

QuestionCommand / ArtifactWhy It Matters
Was route checked?grep historyImmediate network intent clue.
Were nearby hosts enumerated?arp usageLocal target selection.
Were sockets inspected?ss / netstatService awareness.
Was subnet scanned?nmap / nc / pingStrong hostile recon.
Did recon lead to SSH?correlate next commandsMovement progression.

High Value Grep Strings

PatternWhy It Matters
ip aInterface discovery.
ip routeRouting awareness.
arp -aNeighbor discovery.
ss -tulpnService discovery.
nc -zvPort probing.
nmapBroad scanning.
digDNS infrastructure discovery.

Analyst Notes

ScenarioInterpretation
ip route then SSHRoute-aware pivot likely.
arp -a then internal scansLocal target discovery chain.
nmap under service accountStrong hostile signal.
ss -tulpn then exploit attemptLocal service targeting.
Minimal recon but precise routesMature operator behavior.
Recon immediately after footholdStrong manual intrusion signal.