IncidentResponsev2

4.12 Detect Network Vulnerability Scans (SO + SMB + Local + Cloud)

Task

Identify SMB traffic and network vulnerability scanning activities using Security Onion and other data sources. This includes both SMB-based indicators (such as Cobalt Strike SMB P2P) and other network scanning attempts (Nmap, Masscan, Nessus).


Conditions

Given:


Standards


End State

All suspicious or unauthorized scanning (SMB + general vulnerability scanning) is detected and validated for legitimacy.


Notes

Security Onion is capable of detecting:


Manual Steps

Detect SMB Traffic Using Security Onion (Original Repository Steps)

Alerts Workflow

  1. Login into Security Onion
  2. Select Alerts on the left panel
  3. Ensure Alerts are properly configured:
    • Group: rule.name
    • Group: event.module
    • Group: event.severity_label
  4. Set timeframe (next to refresh button, use dropdown):
    • Recommended: Last 6 hours or Last 1 day
  5. Sort alerts by event.severity_label (High → Low)
  6. Search for SMB Alerts (i.e. ET POLICY SMB Executable File Transfer)

Hunt Workflow

  1. Left-click the SMB alert → Click “Actions” → Select Hunt
  2. Ensure timeframe matches the alert timeframe
  3. Clear search bar quotes → leave only SMB
  4. Confirm Group: event.module and Group: event.dataset are active (if not, click the down arrow → select | groupby event.module event.dataset)
  5. Click Hunt
  6. Scroll to Events
  7. Sort using rule.name or event.severity_label

Expected result example:

ET TROJAN CobaltStrike SMB P2P Default Msagent Named Pipe Interaction
A Network Trojan was detected → High Severity

Detect Network Vulnerability Scans (Expanded Procedure)

Security Onion Alerts → Broader Scan Signatures

Common scan rules to look for:

ET SCAN Nmap Scripting Engine User-Agent Detected
ET SCAN Potential Masscan Activity
ET POLICY Nessus Scan Detected
ET SCAN Possible SQL Scanner

Operator Note: Apply same workflow as SMB for hunting these alerts.

Security Onion Hunt

Example search:

Nmap OR Masscan OR Nessus OR SMB | groupby event.module event.dataset

Review:

Multiple destinations/ports in a short time → Indicates scanning.


Local Host Monitoring (Supplemental)

Windows

Get-NetTCPConnection | Group-Object -Property State

Look for:

Linux/macOS

ss -ant | grep SYN

or

netstat -ant | grep SYN

Cloud Monitoring

AWS (GuardDuty + VPC Flow)

Look for GuardDuty Findings:

Recon:EC2/PortProbeUnprotectedPort
Recon:IAMUser/PortProbe

Azure (NSG Flow Logs + Defender for Cloud)

Azure Sentinel query:

AzureNetworkAnalytics_CL
| where FlowType_s == "Inbound"
| summarize count() by SourceIP_s, DestinationPort_s

GCP (Cloud Logging + SCC)

gcloud logging read "resource.type=gce_subnetwork AND jsonPayload.connection.protocol=TCP"

Security Command Center → Reconnaissance → Port Scanning findings


Validate and Investigate

For all detections:


Running Script

TBD → scripting possible for continuous aggregation and pattern detection.


Dependencies


Other Available Tools

Tool Platform Installation Usage
Security Onion (Alerts + Hunt) Network Native Scan + SMB detection
OSSEC / Wazuh Cross-platform Package Manager Port scanning detection
AWS GuardDuty + VPC Flow Logs AWS Native Detect port scanning
Azure Defender + NSG Flow Logs Azure Native Detect port scanning
GCP Security Command Center + Flow Logs GCP Native Detect port scanning
Nmap / Nessus (Red Team / Baseline) Cross-platform Native Detection validation

Operator Recommendations and Additional Tools

Operator Checklist

Best Practices


References


Revision History

Date Version Description Author
2025-05-02 1.1 Rebuilt with original SMB detection + expanded multi-platform scan detection + operator workflow Leo