Linux Process Hooking via GDB

This rule monitors for potential memory dumping through gdb. Attackers may leverage memory dumping techniques to attempt secret extraction from privileged processes. Tools that display this behavior include "truffleproc" and "bash-memory-dump". This behavior should not happen by default, and should be investigated thoroughly.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/08/30"
 3integration = ["endpoint", "auditd_manager"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2024/03/08"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12This rule monitors for potential memory dumping through gdb. Attackers may leverage memory dumping techniques to attempt
13secret extraction from privileged processes. Tools that display this behavior include "truffleproc" and 
14"bash-memory-dump". This behavior should not happen by default, and should be investigated thoroughly.
15"""
16from = "now-9m"
17index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Linux Process Hooking via GDB"
21references = [
22    "https://github.com/controlplaneio/truffleproc",
23    "https://github.com/hajzer/bash-memory-dump"
24]
25risk_score = 21
26rule_id = "66c058f3-99f4-4d18-952b-43348f2577a0"
27severity = "low"
28tags = [
29        "Domain: Endpoint",
30        "OS: Linux",
31        "Use Case: Threat Detection",
32        "Tactic: Credential Access",
33        "Data Source: Elastic Defend",
34        "Data Source: Elastic Endgame",
35        "Data Source: Auditd Manager"
36        ]
37timestamp_override = "event.ingested"
38type = "eql"
39query = '''
40process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "executed", "process_started")
41 and process.name == "gdb" and process.args in ("--pid", "-p") and 
42/* Covered by d4ff2f53-c802-4d2e-9fb9-9ecc08356c3f */
43process.args != "1"
44'''
45
46[[rule.threat]]
47framework = "MITRE ATT&CK"
48
49[[rule.threat.technique]]
50id = "T1003"
51name = "OS Credential Dumping"
52reference = "https://attack.mitre.org/techniques/T1003/"
53
54[[rule.threat.technique.subtechnique]]
55id = "T1003.007"
56name = "Proc Filesystem"
57reference = "https://attack.mitre.org/techniques/T1003/007/"
58
59[rule.threat.tactic]
60id = "TA0006"
61name = "Credential Access"
62reference = "https://attack.mitre.org/tactics/TA0006/"

References

Related rules

to-top