Potential Process Herpaderping Attempt

Identifies process execution followed by a file overwrite of an executable by the same parent process. This may indicate an evasion attempt to execute malicious code in a stealthy way.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/10/27"
 3deprecation_date = "2023/12/15"
 4integration = ["endpoint", "windows"]
 5maturity = "deprecated"
 6min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 7min_stack_version = "8.3.0"
 8updated_date = "2023/12/15"
 9
10[rule]
11author = ["Elastic"]
12description = """
13Identifies process execution followed by a file overwrite of an executable by the same parent process. This may indicate
14an evasion attempt to execute malicious code in a stealthy way.
15"""
16from = "now-9m"
17index = ["logs-endpoint.events.*", "winlogbeat-*", "logs-windows.*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Potential Process Herpaderping Attempt"
21references = ["https://github.com/jxy-s/herpaderping"]
22risk_score = 73
23rule_id = "ccc55af4-9882-4c67-87b4-449a7ae8079c"
24severity = "high"
25tags = [
26    "Domain: Endpoint",
27    "OS: Windows",
28    "Use Case: Threat Detection",
29    "Tactic: Defense Evasion",
30    "Data Source: Elastic Defend",
31]
32type = "eql"
33
34query = '''
35sequence with maxspan=5s
36   [process where host.os.type == "windows" and event.type == "start" and not process.parent.executable :
37      (
38         "?:\\Windows\\SoftwareDistribution\\*.exe",
39         "?:\\Program Files\\Elastic\\Agent\\data\\*.exe",
40         "?:\\Program Files (x86)\\Trend Micro\\*.exe"
41      )
42   ] by host.id, process.executable, process.parent.entity_id
43   [file where host.os.type == "windows" and event.type == "change" and event.action == "overwrite" and file.extension == "exe"] by host.id, file.path, process.entity_id
44'''
45
46
47[[rule.threat]]
48framework = "MITRE ATT&CK"
49[[rule.threat.technique]]
50id = "T1036"
51name = "Masquerading"
52reference = "https://attack.mitre.org/techniques/T1036/"
53
54
55[rule.threat.tactic]
56id = "TA0005"
57name = "Defense Evasion"
58reference = "https://attack.mitre.org/tactics/TA0005/"

References

Related rules

to-top