From 7775515b55020bfbe7e44e8fdbcdcf6227743369 Mon Sep 17 00:00:00 2001 From: Samirbous <64742097+Samirbous@users.noreply.github.com> Date: Fri, 4 Dec 2020 17:05:30 +0100 Subject: [PATCH] [New Rule] Privilege Escalation via Named Pipe Impersonation (#605) * [New Rule] Privilege Escalation via Named Pipe Impersonation * added a reference url * fixed PS OFN * Update rules/windows/privilege_escalation_named_pipe_impersonation.toml Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com> * Update rules/windows/privilege_escalation_named_pipe_impersonation.toml Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com> * eql syntax * ecs_version * Update rules/windows/privilege_escalation_named_pipe_impersonation.toml Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> * Update rules/windows/privilege_escalation_named_pipe_impersonation.toml Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com> Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> --- ...e_escalation_named_pipe_impersonation.toml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 rules/windows/privilege_escalation_named_pipe_impersonation.toml diff --git a/rules/windows/privilege_escalation_named_pipe_impersonation.toml b/rules/windows/privilege_escalation_named_pipe_impersonation.toml new file mode 100644 index 000000000..f4d1f09c9 --- /dev/null +++ b/rules/windows/privilege_escalation_named_pipe_impersonation.toml @@ -0,0 +1,40 @@ +[metadata] +creation_date = "2020/11/23" +maturity = "production" +updated_date = "2020/11/23" + +[rule] +author = ["Elastic"] +description = """ +Identifies a privilege escalation attempt via named pipe impersonation. An adversary may abuse this technique by utilizing a framework such Metasploit's meterpreter getsystem command. +""" +index = ["winlogbeat-*", "logs-endpoint.events.*"] +language = "eql" +license = "Elastic License" +name = "Privilege Escalation via Named Pipe Impersonation" +references = ["https://www.ired.team/offensive-security/privilege-escalation/windows-namedpipes-privilege-escalation"] +risk_score = 73 +rule_id = "3ecbdc9e-e4f2-43fa-8cca-63802125e582" +severity = "high" +tags = ["Elastic", "Host", "Windows", "Threat Detection", "Privilege Escalation"] +type = "eql" + +query = ''' +process where event.type in ("start", "process_started") and + process.pe.original_file_name in ("Cmd.Exe", "PowerShell.EXE") and + process.args : "echo" and process.args : ">" and process.args : "\\\\.\\pipe\\*" +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1134" +name = "Access Token Manipulation" +reference = "https://attack.mitre.org/techniques/T1134/" + + +[rule.threat.tactic] +id = "TA0004" +name = "Privilege Escalation" +reference = "https://attack.mitre.org/tactics/TA0004/"