Suspicious Memory grep Activity
Monitors for grep activity related to memory mapping. The /proc/*/maps file in Linux provides a memory map for a specific process, detailing the memory segments, permissions, and what files are mapped to these segments. Attackers may read a process's memory map to identify memory addresses for code injection or process hijacking.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2024/02/05"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2024/10/18"
6
7[rule]
8author = ["Elastic"]
9description = """
10Monitors for grep activity related to memory mapping. The /proc/*/maps file in Linux provides a memory map for a
11specific process, detailing the memory segments, permissions, and what files are mapped to these segments. Attackers may
12read a process's memory map to identify memory addresses for code injection or process hijacking.
13"""
14from = "now-9m"
15index = ["logs-endpoint.events.*", "endgame-*"]
16language = "eql"
17license = "Elastic License v2"
18name = "Suspicious Memory grep Activity"
19references = ["https://github.com/arget13/DDexec"]
20risk_score = 21
21rule_id = "d74d6506-427a-4790-b170-0c2a6ddac799"
22severity = "low"
23tags = [
24 "Domain: Endpoint",
25 "OS: Linux",
26 "Use Case: Threat Detection",
27 "Tactic: Discovery",
28 "Data Source: Elastic Defend",
29 "Data Source: Elastic Endgame",
30]
31timestamp_override = "event.ingested"
32type = "eql"
33query = '''
34process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and
35process.name in ("grep", "egrep", "fgrep", "rgrep") and process.args in ("[stack]", "[vdso]", "[heap]")
36'''
37
38[[rule.threat]]
39framework = "MITRE ATT&CK"
40
41[[rule.threat.technique]]
42id = "T1057"
43name = "Process Discovery"
44reference = "https://attack.mitre.org/techniques/T1057/"
45
46[rule.threat.tactic]
47id = "TA0007"
48name = "Discovery"
49reference = "https://attack.mitre.org/tactics/TA0007/"
References
Related rules
- ESXI Discovery via Find
- ESXI Discovery via Grep
- Enumeration of Kernel Modules
- Suspicious which Enumeration
- Yum/DNF Plugin Status Discovery