RPM Package Installed by Unusual Parent Process

This rule leverages the new_terms rule type to identify the installation of RPM packages by an unusual parent process. RPM is a package management system used in Linux systems such as Red Hat, CentOS and Fedora. Attacks may backdoor RPM packages to gain initial access or install malicious RPM packages to maintain persistence.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2024/07/10"
  3integration = ["endpoint"]
  4maturity = "production"
  5min_stack_comments = "The New Term rule type used in this rule was added in Elastic 8.4"
  6min_stack_version = "8.4.0"
  7updated_date = "2024/07/10"
  8
  9[rule]
 10author = ["Elastic"]
 11description = """
 12This rule leverages the new_terms rule type to identify the installation of RPM packages by an unusual parent process.
 13RPM is a package management system used in Linux systems such as Red Hat, CentOS and Fedora. Attacks may backdoor RPM 
 14packages to gain initial access or install malicious RPM packages to maintain persistence.
 15"""
 16from = "now-9m"
 17index = ["logs-endpoint.events.*"]
 18language = "kuery"
 19license = "Elastic License v2"
 20name = "RPM Package Installed by Unusual Parent Process"
 21risk_score = 21
 22rule_id = "8cc72fa3-70ae-4ea1-bee2-8e6aaf3c1fcf"
 23setup = """## Setup
 24This rule requires data coming in from Elastic Defend.
 25### Elastic Defend Integration Setup
 26Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
 27#### Prerequisite Requirements:
 28- Fleet is required for Elastic Defend.
 29- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
 30#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
 31- Go to the Kibana home page and click "Add integrations".
 32- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
 33- Click "Add Elastic Defend".
 34- Configure the integration name and optionally add a description.
 35- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
 36- 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).
 37- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
 38- 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.
 39For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
 40- Click "Save and Continue".
 41- 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.
 42For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
 43"""
 44severity = "low"
 45tags = [
 46        "Domain: Endpoint",
 47        "OS: Linux",
 48        "Use Case: Threat Detection",
 49        "Tactic: Persistence",
 50        "Data Source: Elastic Defend"
 51        ]
 52timestamp_override = "event.ingested"
 53type = "new_terms"
 54query = '''
 55host.os.type:linux and event.category:process and event.type:start and event.action:exec and process.name:rpm and
 56process.args:("-i" or "--install")
 57'''
 58
 59[[rule.threat]]
 60framework = "MITRE ATT&CK"
 61
 62[[rule.threat.technique]]
 63id = "T1546"
 64name = "Event Triggered Execution"
 65reference = "https://attack.mitre.org/techniques/T1546/"
 66
 67[[rule.threat.technique.subtechnique]]
 68id = "T1546.016"
 69name = "Installer Packages"
 70reference = "https://attack.mitre.org/techniques/T1546/016/"
 71
 72[[rule.threat.technique]]
 73id = "T1543"
 74name = "Create or Modify System Process"
 75reference = "https://attack.mitre.org/techniques/T1543/"
 76
 77[[rule.threat.technique]]
 78id = "T1574"
 79name = "Hijack Execution Flow"
 80reference = "https://attack.mitre.org/techniques/T1574/"
 81
 82[rule.threat.tactic]
 83id = "TA0003"
 84name = "Persistence"
 85reference = "https://attack.mitre.org/tactics/TA0003/"
 86
 87[[rule.threat]]
 88framework = "MITRE ATT&CK"
 89
 90[[rule.threat.technique]]
 91id = "T1195"
 92name = "Supply Chain Compromise"
 93reference = "https://attack.mitre.org/techniques/T1195/"
 94
 95[[rule.threat.technique.subtechnique]]
 96id = "T1195.002"
 97name = "Compromise Software Supply Chain"
 98reference = "https://attack.mitre.org/techniques/T1195/002/"
 99
100[rule.threat.tactic]
101name = "Initial Access"
102id = "TA0001"
103reference = "https://attack.mitre.org/tactics/TA0001/"
104
105[rule.new_terms]
106field = "new_terms_fields"
107value = ["process.parent.executable"]
108
109[[rule.new_terms.history_window_start]]
110field = "history_window_start"
111value = "now-7d"

Related rules

to-top