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

References

Related rules

to-top