Potential Linux Hack Tool Launched
Monitors for the execution of different processes that might be used by attackers for malicious intent. An alert from this rule should be investigated further, as hack tools are commonly used by blue teamers and system administrators as well.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2023/09/22"
3integration = ["endpoint", "auditd_manager"]
4maturity = "production"
5updated_date = "2024/10/22"
6
7[rule]
8author = ["Elastic"]
9description = """
10Monitors for the execution of different processes that might be used by attackers for malicious intent. An alert from
11this rule should be investigated further, as hack tools are commonly used by blue teamers and system administrators as
12well.
13"""
14from = "now-9m"
15index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
16language = "eql"
17license = "Elastic License v2"
18name = "Potential Linux Hack Tool Launched"
19risk_score = 47
20rule_id = "1df1152b-610a-4f48-9d7a-504f6ee5d9da"
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: Execution",
53 "Data Source: Elastic Endgame",
54 "Data Source: Elastic Defend",
55 "Data Source: Auditd Manager",
56]
57timestamp_override = "event.ingested"
58type = "eql"
59query = '''
60process where host.os.type == "linux" and event.type == "start" and
61event.action in ("exec", "exec_event", "executed", "process_started") and
62process.name in~ (
63 // exploitation frameworks
64 "crackmapexec", "msfconsole", "msfvenom", "sliver-client", "sliver-server", "havoc",
65 // network scanners (nmap left out to reduce noise)
66 "zenmap", "nuclei", "netdiscover", "legion",
67 // web enumeration
68 "gobuster", "dirbuster", "dirb", "wfuzz", "ffuf", "whatweb", "eyewitness",
69 // web vulnerability scanning
70 "wpscan", "joomscan", "droopescan", "nikto",
71 // exploitation tools
72 "sqlmap", "commix", "yersinia",
73 // cracking and brute forcing
74 "john", "hashcat", "hydra", "ncrack", "cewl", "fcrackzip", "rainbowcrack",
75 // host and network
76 "linenum.sh", "linpeas.sh", "pspy32", "pspy32s", "pspy64", "pspy64s", "binwalk", "evil-winrm",
77 "linux-exploit-suggester-2.pl", "linux-exploit-suggester.sh", "panix.sh"
78)
79'''
80
81[[rule.threat]]
82framework = "MITRE ATT&CK"
83
84[rule.threat.tactic]
85id = "TA0002"
86name = "Execution"
87reference = "https://attack.mitre.org/tactics/TA0002/"
Related rules
- Unix Socket Connection
- Process Started from Process ID (PID) File
- Linux User Added to Privileged Group
- Kernel Module Load via insmod
- Access Control List Modification via setfacl