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

References

Related rules

to-top