Detection rules › Elastic

Potential Linux Credential Dumping via Proc Filesystem

Time window
1m
Sequence by
process.parent.executable, user.id
Source
github.com/elastic/protections-artifacts

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.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
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.
"""
id = "508226f9-4030-4e86-86cd-63321b7164bc"
license = "Elastic License v2"
name = "Potential Linux Credential Dumping via Proc Filesystem"
os_list = ["linux"]
reference = [
    "https://github.com/huntergregal/mimipenguin",
    "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20781",
]
version = "1.0.10"

query = '''
sequence by process.parent.executable, user.id with maxspan=60s
  [process where event.type == "start" and event.action == "exec" and process.name == "ps" and process.args : ("-eo", "pid", "command")]
  [process where event.type == "start" and event.action == "exec" and process.name in ("strings", "x86_64-linux-gnu-strings") and process.args : "/tmp/*"]
'''

min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0

[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 1

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1003"
name = "OS Credential Dumping"
reference = "https://attack.mitre.org/techniques/T1003/"
[[threat.technique.subtechnique]]
id = "T1003.008"
name = "/etc/passwd and /etc/shadow"
reference = "https://attack.mitre.org/techniques/T1003/008/"



[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 1m, correlated by process.parent.executable, user.id.

Stage 1: process

[process where event.type == "start" and event.action == "exec" and process.name == "ps" and process.args : ("-eo", "pid", "command")]

Stage 2: process

[process where event.type == "start" and event.action == "exec" and process.name in ("strings", "x86_64-linux-gnu-strings") and process.args : "/tmp/*"]

Indicators

These rows show field, operator, and value matches.