Unusual Process For a Linux Host

Identifies rare processes that do not usually run on individual hosts, which can indicate execution of unauthorized services, malware, or persistence mechanisms. Processes are considered rare when they only run occasionally as compared with other processes running on the host.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/03/25"
 3integration = ["auditd_manager", "endpoint"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8anomaly_threshold = 50
 9author = ["Elastic"]
10description = """
11Identifies rare processes that do not usually run on individual hosts, which can indicate execution of unauthorized
12services, malware, or persistence mechanisms. Processes are considered rare when they only run occasionally as compared
13with other processes running on the host.
14"""
15false_positives = [
16    """
17    A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this
18    alert.
19    """,
20]
21from = "now-45m"
22interval = "15m"
23license = "Elastic License v2"
24machine_learning_job_id = ["v3_rare_process_by_host_linux"]
25name = "Unusual Process For a Linux Host"
26note = """## Triage and analysis
27
28###  Investigating Unusual Process For a Linux Host
29
30Searching for abnormal Linux processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.
31
32This rule uses a machine learning job to detect a Linux process that is rare and unusual for an individual Linux host in your environment.
33
34#### Possible investigation steps
35
36- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, and whether they are located in expected locations.
37- Investigate other alerts associated with the user/host during the past 48 hours.
38- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?
39- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.
40- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.
41- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.
42
43### False Positive Analysis
44
45- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.
46- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.
47
48### Response and Remediation
49
50- Initiate the incident response process based on the outcome of the triage.
51- Isolate the involved hosts to prevent further post-compromise behavior.
52- If the triage identified malware, search the environment for additional compromised hosts.
53  - Implement temporary network rules, procedures, and segmentation to contain the malware.
54  - Stop suspicious processes.
55  - Immediately block the identified indicators of compromise (IoCs).
56  - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
57- Remove and block malicious artifacts identified during triage.
58- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
59- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
60- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
61- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
62"""
63references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
64risk_score = 21
65rule_id = "46f804f5-b289-43d6-a881-9387cf594f75"
66severity = "low"
67tags = [
68    "Domain: Endpoint",
69    "OS: Linux",
70    "Use Case: Threat Detection",
71    "Rule Type: ML",
72    "Rule Type: Machine Learning",
73    "Tactic: Persistence",
74]
75type = "machine_learning"
76[[rule.threat]]
77framework = "MITRE ATT&CK"
78[[rule.threat.technique]]
79id = "T1543"
80name = "Create or Modify System Process"
81reference = "https://attack.mitre.org/techniques/T1543/"
82[[rule.threat.technique.subtechnique]]
83id = "T1543.002"
84name = "Systemd Service"
85reference = "https://attack.mitre.org/techniques/T1543/002/"
86
87
88
89[rule.threat.tactic]
90id = "TA0003"
91name = "Persistence"
92reference = "https://attack.mitre.org/tactics/TA0003/"

Triage and analysis

Investigating Unusual Process For a Linux Host

Searching for abnormal Linux processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.

This rule uses a machine learning job to detect a Linux process that is rare and unusual for an individual Linux host in your environment.

Possible investigation steps

  • Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, and whether they are located in expected locations.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Consider the user as identified by the user.name field. Is this program part of an expected workflow for the user who ran this program on this host?
  • Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.
  • Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.
  • Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.

False Positive Analysis

  • If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.
  • Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.

Response and Remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Isolate the involved hosts to prevent further post-compromise behavior.
  • If the triage identified malware, search the environment for additional compromised hosts.
    • Implement temporary network rules, procedures, and segmentation to contain the malware.
    • Stop suspicious processes.
    • Immediately block the identified indicators of compromise (IoCs).
    • Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
  • Remove and block malicious artifacts identified during triage.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
  • Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

References

Related rules

to-top