Potential Network Scan Executed From Host
This threshold rule monitors for the rapid execution of unix utilities that are capable of conducting network scans. Adversaries may leverage built-in tools such as ping, netcat or socat to execute ping sweeps across the network while attempting to evade detection or due to the lack of network mapping tools available on the compromised host.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2023/09/04"
3integration = ["endpoint", "auditd_manager"]
4maturity = "production"
5updated_date = "2024/05/21"
6
7[rule]
8author = ["Elastic"]
9description = """
10This threshold rule monitors for the rapid execution of unix utilities that are capable of conducting network scans.
11Adversaries may leverage built-in tools such as ping, netcat or socat to execute ping sweeps across the network while
12attempting to evade detection or due to the lack of network mapping tools available on the compromised host.
13"""
14from = "now-9m"
15index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
16language = "kuery"
17license = "Elastic License v2"
18name = "Potential Network Scan Executed From Host"
19risk_score = 47
20rule_id = "03c23d45-d3cb-4ad4-ab5d-b361ffe8724a"
21setup = """## Setup
22
23This rule requires data coming in from Elastic Defend.
24
25### Elastic Defend Integration Setup
26Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows
27the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
28
29#### Prerequisite Requirements:
30- Fleet is required for Elastic Defend.
31- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
32
33#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
34- Go to the Kibana home page and click "Add integrations".
35- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
36- Click "Add Elastic Defend".
37- Configure the integration name and optionally add a description.
38- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
39- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
40- We suggest to select "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
41- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
42For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
43- Click "Save and Continue".
44- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
45For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
46"""
47severity = "medium"
48tags = [
49 "Domain: Endpoint",
50 "OS: Linux",
51 "Use Case: Threat Detection",
52 "Tactic: Discovery",
53 "Data Source: Elastic Defend",
54 "Data Source: Elastic Endgame",
55 "Data Source: Auditd Manager",
56]
57timestamp_override = "event.ingested"
58type = "threshold"
59
60query = '''
61event.category:process and host.os.type:linux and event.action:(exec or exec_event or executed or process_started) and
62event.type:start and process.name:(ping or nping or hping or hping2 or hping3 or nc or ncat or netcat or socat)
63'''
64
65
66[[rule.threat]]
67framework = "MITRE ATT&CK"
68[[rule.threat.technique]]
69id = "T1046"
70name = "Network Service Discovery"
71reference = "https://attack.mitre.org/techniques/T1046/"
72
73
74[rule.threat.tactic]
75id = "TA0007"
76name = "Discovery"
77reference = "https://attack.mitre.org/tactics/TA0007/"
78
79[rule.threshold]
80field = ["host.id", "process.parent.entity_id", "process.executable"]
81value = 1
82[[rule.threshold.cardinality]]
83field = "process.args"
84value = 100
Related rules
- Hping Process Activity
- Nping Process Activity
- Suspicious Dynamic Linker Discovery via od
- Attempt to Clear Kernel Ring Buffer
- Base16 or Base32 Encoding/Decoding Activity