Potential Network Sweep Detected

This rule identifies a potential network sweep. A network sweep is a method used by attackers to scan a target network, identifying active hosts, open ports, and available services to gather information on vulnerabilities and weaknesses. This reconnaissance helps them plan subsequent attacks and exploit potential entry points for unauthorized access, data theft, or other malicious activities. This rule defines a threshold-based approach to detect multiple connection attempts from a single host to numerous destination hosts over commonly used network services.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2023/05/17"
  3integration = ["network_traffic", "panw"]
  4maturity = "production"
  5updated_date = "2026/11/03"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10This rule identifies a potential network sweep. A network sweep is a method used by attackers to scan a target network,
 11identifying active hosts, open ports, and available services to gather information on vulnerabilities and weaknesses.
 12This reconnaissance helps them plan subsequent attacks and exploit potential entry points for unauthorized access, data
 13theft, or other malicious activities. This rule defines a threshold-based approach to detect multiple connection
 14attempts from a single host to numerous destination hosts over commonly used network services.
 15"""
 16from = "now-9m"
 17index = ["packetbeat-*", "filebeat-*", "logs-network_traffic.*", "logs-panw.panos*"]
 18language = "kuery"
 19license = "Elastic License v2"
 20max_signals = 5
 21name = "Potential Network Sweep Detected"
 22risk_score = 21
 23rule_id = "781f8746-2180-4691-890c-4c96d11ca91d"
 24severity = "low"
 25tags = [
 26    "Domain: Network",
 27    "Tactic: Discovery",
 28    "Tactic: Reconnaissance",
 29    "Use Case: Network Security Monitoring",
 30    "Data Source: PAN-OS",
 31    "Resources: Investigation Guide",
 32    "Noise: High",
 33    "Performance: Normal",
 34    "Profile: Aggressive",
 35    "Rule Type: Threshold",
 36    "Data Source: Network Packet Capture",
 37]
 38timestamp_override = "event.ingested"
 39type = "threshold"
 40query = '''
 41(
 42  (
 43    data_stream.dataset:network_traffic.flow and
 44    event.action:network_flow and
 45    event.type:connection
 46  ) or
 47  (
 48    type:flow and
 49    event.action:network_flow and
 50    event.type:connection
 51  ) or
 52  (
 53    (data_stream.dataset:panw.panos or event.dataset:panw.panos) and
 54    panw.panos.type:TRAFFIC and
 55    event.action:flow_started
 56  )
 57) and
 58destination.port:(21 or 22 or 23 or 25 or 139 or 445 or 3389 or 5985 or 5986) and
 59source.ip:(10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)
 60'''
 61note = """## Triage and analysis
 62
 63> **Disclaimer**:
 64> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
 65
 66### Investigating Potential Network Sweep Detected
 67
 68Network sweeps are reconnaissance techniques where attackers scan networks to identify active hosts and services, often targeting common ports. This activity helps adversaries map out network vulnerabilities for future exploitation. The detection rule identifies such sweeps by monitoring connection attempts from a single source to multiple destinations on key ports, flagging potential reconnaissance activities for further investigation.
 69
 70### Possible investigation steps
 71
 72- Review the source IP address to determine if it belongs to a known or trusted entity within the network, focusing on the private IP ranges specified in the query (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).
 73- Analyze the destination IP addresses to identify any patterns or commonalities, such as specific subnets or devices, that could indicate targeted reconnaissance.
 74- Check historical logs for previous connection attempts from the same source IP to see if there is a pattern of repeated scanning behavior or if this is an isolated incident.
 75- Investigate the specific ports targeted (21, 22, 23, 25, 139, 445, 3389, 5985, 5986) to determine if they are associated with critical services or known vulnerabilities within the network.
 76- Correlate the detected activity with any recent changes or incidents in the network environment that might explain the behavior, such as new device deployments or configuration changes.
 77- Consult threat intelligence sources to determine if the source IP or similar scanning patterns have been associated with known threat actors or campaigns.
 78
 79### False positive analysis
 80
 81- Internal network scans by IT teams can trigger the rule. Regularly scheduled scans for security assessments should be documented and their source IPs added to an exception list to prevent false alerts.
 82- Automated monitoring tools that check network health might cause false positives. Identify these tools and exclude their IP addresses from the rule to avoid unnecessary alerts.
 83- Load balancers or network devices that perform health checks across multiple hosts can be mistaken for network sweeps. Exclude these devices by adding their IPs to a whitelist.
 84- Development or testing environments where multiple connections are made for legitimate purposes can trigger the rule. Ensure these environments are recognized and their IP ranges are excluded from monitoring.
 85- Misconfigured devices that repeatedly attempt to connect to multiple hosts can appear as network sweeps. Investigate and correct the configuration, then exclude these devices if necessary.
 86
 87### Response and remediation
 88
 89- Isolate the source IP: Immediately isolate the source IP address identified in the alert from the network to prevent further reconnaissance or potential exploitation of identified vulnerabilities.
 90
 91- Block suspicious ports: Implement firewall rules to block incoming and outgoing traffic on the commonly targeted ports (21, 22, 23, 25, 139, 445, 3389, 5985, 5986) from the source IP to mitigate further scanning attempts.
 92
 93- Conduct a network-wide scan: Perform a comprehensive scan of the network to identify any unauthorized access or changes that may have occurred as a result of the network sweep.
 94
 95- Review and update access controls: Ensure that access controls and permissions are appropriately configured to limit exposure of critical services and sensitive data.
 96
 97- Monitor for recurrence: Set up enhanced monitoring and alerting for any future connection attempts from the source IP or similar patterns of network sweep activity.
 98
 99- Escalate to security operations: Notify the security operations team to conduct a deeper investigation into the source of the network sweep and assess any potential threats or breaches.
100
101- Document and report: Record all findings, actions taken, and lessons learned in an incident report to inform future response strategies and improve network defenses."""
102setup = """## Setup
103
104This rule supports connection observations from the Elastic Network Packet Capture integration, PAN-OS TRAFFIC
105session-start records, and a compatibility branch for standalone Packetbeat.
106
107Network Packet Capture 2.0.0 and later always applies ECS compatibility remapping. On earlier integration versions,
108enable `map_to_ecs` (the default since 1.31.1). The rule counts interim and final flow reports with
109`data_stream.dataset:network_traffic.flow`, `event.action:network_flow`, and `event.type:connection`. The standalone
110Packetbeat branch requires `type:flow` with the same ECS action and type values; verify that branch against the deployed
111Packetbeat version and configuration before relying on it.
112
113For PAN-OS, ingest TRAFFIC records through the PAN-OS integration. The rule counts session starts.
114
115The threshold intentionally counts destinations across the selected service ports and transports for each source. This
116preserves mixed-port host-sweep coverage. Repeated lifecycle reports for one source/destination pair do not increase
117distinct-destination cardinality within one execution window, but reports in later windows can produce repeated
118alerts. Create exceptions for approved scanners, inventory systems, and monitoring infrastructure after validating
119their source addresses.
120"""
121
122[[rule.threat]]
123framework = "MITRE ATT&CK"
124
125[[rule.threat.technique]]
126id = "T1018"
127name = "Remote System Discovery"
128reference = "https://attack.mitre.org/techniques/T1018/"
129
130[[rule.threat.technique]]
131id = "T1046"
132name = "Network Service Discovery"
133reference = "https://attack.mitre.org/techniques/T1046/"
134
135[rule.threat.tactic]
136id = "TA0007"
137name = "Discovery"
138reference = "https://attack.mitre.org/tactics/TA0007/"
139
140[[rule.threat]]
141framework = "MITRE ATT&CK"
142
143[[rule.threat.technique]]
144id = "T1595"
145name = "Active Scanning"
146reference = "https://attack.mitre.org/techniques/T1595/"
147
148[[rule.threat.technique.subtechnique]]
149id = "T1595.001"
150name = "Scanning IP Blocks"
151reference = "https://attack.mitre.org/techniques/T1595/001/"
152
153[rule.threat.tactic]
154id = "TA0043"
155name = "Reconnaissance"
156reference = "https://attack.mitre.org/tactics/TA0043/"
157[rule.threshold]
158field = ["source.ip"]
159value = 1
160
161[[rule.threshold.cardinality]]
162field = "destination.ip"
163value = 100

Triage and analysis

Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

Investigating Potential Network Sweep Detected

Network sweeps are reconnaissance techniques where attackers scan networks to identify active hosts and services, often targeting common ports. This activity helps adversaries map out network vulnerabilities for future exploitation. The detection rule identifies such sweeps by monitoring connection attempts from a single source to multiple destinations on key ports, flagging potential reconnaissance activities for further investigation.

Possible investigation steps

  • Review the source IP address to determine if it belongs to a known or trusted entity within the network, focusing on the private IP ranges specified in the query (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).
  • Analyze the destination IP addresses to identify any patterns or commonalities, such as specific subnets or devices, that could indicate targeted reconnaissance.
  • Check historical logs for previous connection attempts from the same source IP to see if there is a pattern of repeated scanning behavior or if this is an isolated incident.
  • Investigate the specific ports targeted (21, 22, 23, 25, 139, 445, 3389, 5985, 5986) to determine if they are associated with critical services or known vulnerabilities within the network.
  • Correlate the detected activity with any recent changes or incidents in the network environment that might explain the behavior, such as new device deployments or configuration changes.
  • Consult threat intelligence sources to determine if the source IP or similar scanning patterns have been associated with known threat actors or campaigns.

False positive analysis

  • Internal network scans by IT teams can trigger the rule. Regularly scheduled scans for security assessments should be documented and their source IPs added to an exception list to prevent false alerts.
  • Automated monitoring tools that check network health might cause false positives. Identify these tools and exclude their IP addresses from the rule to avoid unnecessary alerts.
  • Load balancers or network devices that perform health checks across multiple hosts can be mistaken for network sweeps. Exclude these devices by adding their IPs to a whitelist.
  • Development or testing environments where multiple connections are made for legitimate purposes can trigger the rule. Ensure these environments are recognized and their IP ranges are excluded from monitoring.
  • Misconfigured devices that repeatedly attempt to connect to multiple hosts can appear as network sweeps. Investigate and correct the configuration, then exclude these devices if necessary.

Response and remediation

  • Isolate the source IP: Immediately isolate the source IP address identified in the alert from the network to prevent further reconnaissance or potential exploitation of identified vulnerabilities.

  • Block suspicious ports: Implement firewall rules to block incoming and outgoing traffic on the commonly targeted ports (21, 22, 23, 25, 139, 445, 3389, 5985, 5986) from the source IP to mitigate further scanning attempts.

  • Conduct a network-wide scan: Perform a comprehensive scan of the network to identify any unauthorized access or changes that may have occurred as a result of the network sweep.

  • Review and update access controls: Ensure that access controls and permissions are appropriately configured to limit exposure of critical services and sensitive data.

  • Monitor for recurrence: Set up enhanced monitoring and alerting for any future connection attempts from the source IP or similar patterns of network sweep activity.

  • Escalate to security operations: Notify the security operations team to conduct a deeper investigation into the source of the network sweep and assess any potential threats or breaches.

  • Document and report: Record all findings, actions taken, and lessons learned in an incident report to inform future response strategies and improve network defenses.

Related rules

to-top