Potential Linux Credential Dumping via Proc Filesystem

Identifies the execution of the mimipenguin exploit script which is linux adaptation of Windows tool mimikatz. Mimipenguin exploit script is used to dump clear text passwords from a currently logged-in user. The tool exploits a known vulnerability CVE-2018-20781. Malicious actors can exploit the cleartext credentials in memory by dumping the process and extracting lines that have a high probability of containing cleartext passwords.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/04/26"
 3integration = ["endpoint"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2024/02/20"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies the execution of the mimipenguin exploit script which is linux adaptation of Windows tool mimikatz.
13Mimipenguin exploit script is used to dump clear text passwords from a currently logged-in user. The tool exploits
14a known vulnerability CVE-2018-20781. Malicious actors can exploit the cleartext credentials in memory by
15dumping the process and extracting lines that have a high probability of containing cleartext passwords.
16"""
17from = "now-9m"
18index = ["logs-endpoint.events.*"]
19language = "eql"
20license = "Elastic License v2"
21name = "Potential Linux Credential Dumping via Proc Filesystem"
22references = [
23    "https://github.com/huntergregal/mimipenguin",
24    "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20781"
25]
26risk_score = 47
27rule_id = "ef100a2e-ecd4-4f72-9d1e-2f779ff3c311"
28setup = """## Setup
29
30This rule requires data coming in from Elastic Defend.
31
32### Elastic Defend Integration Setup
33Elastic 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.
34
35#### Prerequisite Requirements:
36- Fleet is required for Elastic Defend.
37- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
38
39#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
40- Go to the Kibana home page and click "Add integrations".
41- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
42- Click "Add Elastic Defend".
43- Configure the integration name and optionally add a description.
44- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
45- 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).
46- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
47- 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.
48For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
49- Click "Save and Continue".
50- 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.
51For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
52"""
53severity = "medium"
54tags = [
55        "Domain: Endpoint",
56        "OS: Linux",
57        "Use Case: Threat Detection",
58        "Tactic: Credential Access",
59        "Use Case: Vulnerability",
60        "Data Source: Elastic Defend"
61        ]
62type = "eql"
63query = '''
64sequence by host.id, process.parent.name with maxspan=1m
65  [process where host.os.type == "linux" and process.name == "ps" and event.action == "exec"
66   and process.args in ("-eo", "pid", "command")]
67  [process where host.os.type == "linux" and process.name == "strings" and event.action == "exec"
68   and process.args : "/tmp/*"]
69'''
70
71[[rule.threat]]
72framework = "MITRE ATT&CK"
73
74[[rule.threat.technique]]
75id = "T1003"
76name = "OS Credential Dumping"
77reference = "https://attack.mitre.org/techniques/T1003/"
78
79[[rule.threat.technique.subtechnique]]
80id = "T1003.007"
81name = "Proc Filesystem"
82reference = "https://attack.mitre.org/techniques/T1003/007/"
83
84[[rule.threat.technique]]
85id = "T1212"
86name = "Exploitation for Credential Access"
87reference = "https://attack.mitre.org/techniques/T1212/"
88
89[rule.threat.tactic]
90id = "TA0006"
91name = "Credential Access"
92reference = "https://attack.mitre.org/tactics/TA0006/"

References

Related rules

to-top