From 40fdab8d53407d11be4e06071dc6e68e184c3075 Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:55:44 -0600 Subject: [PATCH] F5 CVE-2023-46747 F5 CVE-2023-46747 --- .../web/f5_tmui_authentication_bypass.yml | 59 +++++++++++++++++++ .../f5_authentication_bypass_with_tmui.yml | 23 ++++++++ 2 files changed, 82 insertions(+) create mode 100644 detections/web/f5_tmui_authentication_bypass.yml create mode 100644 stories/f5_authentication_bypass_with_tmui.yml diff --git a/detections/web/f5_tmui_authentication_bypass.yml b/detections/web/f5_tmui_authentication_bypass.yml new file mode 100644 index 0000000000..f6aee92c85 --- /dev/null +++ b/detections/web/f5_tmui_authentication_bypass.yml @@ -0,0 +1,59 @@ +name: F5 TMUI Authentication Bypass +id: 88bf127c-613e-4579-99e4-c4d4b02f3840 +version: 1 +date: '2023-10-30' +author: Michael Haag, Splunk +status: production +type: TTP +data_source: [] +description: The following analytic is designed to detect attempts to exploit the CVE-2023-46747 vulnerability, a critical authentication bypass flaw in F5 BIG-IP that can lead to unauthenticated remote code execution (RCE). This vulnerability specifically affects the BIG-IP Configuration utility (TMUI) and has been assigned a high severity CVSSv3 score of 9.8. The analytic identifies this behavior by monitoring for a specific URI path - "*/mgmt/tm/auth/user/*", with the PATCH method and 200 status. Additional URI's will occur around the same time include "*/mgmt/shared/authn/login*" and "*/tmui/login.jsp*", which are associated with the exploitation of this vulnerability. This behavior is significant for a Security Operations Center (SOC) as it indicates an attempt to bypass authentication mechanisms, potentially leading to unauthorized access and control over the system. If a true positive is identified, it suggests that an attacker is attempting to exploit a known vulnerability to gain unauthorized access and execute arbitrary code, which could lead to data theft, system disruption, or further malicious activities within the network. +search: '| tstats count min(_time) as firstTime max(_time) as lastTime from datamodel=Web where Web.url IN ("*/mgmt/tm/auth/user/*") Web.http_method=PATCH Web.status=200 by Web.http_user_agent, Web.status Web.http_method, Web.url, Web.url_length, Web.src, Web.dest, sourcetype + | `drop_dm_object_name("Web")` + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)`| `f5_tmui_authentication_bypass_filter`' +how_to_implement: To successfully implement this search you need to be ingesting information + on Web traffic that include fields relevant for traffic into the `Web` datamodel. +known_false_positives: False positives should be limited to as this is strict to active exploitation. Reduce noise by filtering to F5 devices with TMUI enabled or filter data as needed. +references: +- https://www.praetorian.com/blog/refresh-compromising-f5-big-ip-with-request-smuggling-cve-2023-46747/ +- https://github.com/projectdiscovery/nuclei-templates/blob/3b0bb71bd627c6c3139e1d06c866f8402aa228ae/http/cves/2023/CVE-2023-46747.yaml +tags: + analytic_story: + - 'F5 Authentication Bypass with TMUI' + asset_type: Network + atomic_guid: [] + cve: + - CVE-2023-46747 + confidence: 90 + impact: 100 + message: Potential CVE-2023-46747 F5 TMUI Authentication Bypass may be occurring against $dest$ from $src$. + observable: + - name: dest + type: Hostname + role: + - Victim + - name: src + type: IP Address + role: + - Attacker + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + risk_score: 90 + required_fields: + - Web.http_user_agent + - Web.status + - Web.http_method + - Web.url + - Web.url_length + - Web.src + - Web.dest + - sourcetype + security_domain: endpoint +tests: +- name: True Positive Test + attack_data: + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1190/f5/f5_tmui.log + source: suricata + sourcetype: suricata diff --git a/stories/f5_authentication_bypass_with_tmui.yml b/stories/f5_authentication_bypass_with_tmui.yml new file mode 100644 index 0000000000..41334709a9 --- /dev/null +++ b/stories/f5_authentication_bypass_with_tmui.yml @@ -0,0 +1,23 @@ +name: 'F5 Authentication Bypass with TMUI' +id: e4acbea6-75bb-4873-8c22-bc2da9525e89 +version: 1 +date: '2023-10-30' +author: Michael Haag, Splunk +description: "Research into leading software revealed vulnerabilities in both Apache Tomcat and the F5 BIG-IP suite. Apache's AJP protocol vulnerability, designated CVE-2022-26377, relates to AJP request smuggling. Successful exploitation enables unauthorized system activities. F5 BIG-IP Virtual Edition exhibited a distinct vulnerability, an authentication bypass in the Traffic Management User Interface (TMUI), resulting in system compromise. Assigned CVE-2023-46747, this vulnerability also arose from request smuggling, bearing similarity to CVE-2022-26377. Given the wide adoption of both Apache Tomcat and F5 products, these vulnerabilities present grave risks to organizations. Remediation and vulnerability detection mechanisms are essential to address these threats effectively." +narrative: Both Apache Tomcat's AJP protocol and F5's BIG-IP Virtual Edition have been exposed to critical vulnerabilities. Apache's CVE-2022-26377 pertains to request smuggling by manipulating the "Transfer-Encoding" header. If successfully exploited, this allows attackers to bypass security controls and undertake unauthorized actions. \ + + Similarly, F5 BIG-IP unveiled an authentication bypass vulnerability, CVE-2023-46747. Originating from the TMUI, this vulnerability leads to full system compromise. While distinct, it shares characteristics with Apache's vulnerability, primarily rooted in request smuggling. This vulnerability drew from past F5 CVEs, particularly CVE-2020-5902 and CVE-2022-1388, both previously exploited in real-world scenarios. These highlighted vulnerabilities in Apache HTTP and Apache Tomcat services, as well as authentication flaws in the F5 BIG-IP API.\ + + Nuclei detection templates offer a proactive solution for identifying and mitigating these vulnerabilities. Integrated into vulnerability management frameworks, these templates notify organizations of potential risks, forming a base for further detection strategies. For detection engineers, understanding these vulnerabilities is crucial. Recognizing the mechanisms and effects of request smuggling, especially in Apache's and F5's context, provides a roadmap to effective detection and response. Prompt detection is a linchpin, potentially stymieing further, more destructive attacks. +references: +- https://www.praetorian.com/blog/refresh-compromising-f5-big-ip-with-request-smuggling-cve-2023-46747/ +- https://github.com/projectdiscovery/nuclei-templates/blob/3b0bb71bd627c6c3139e1d06c866f8402aa228ae/http/cves/2023/CVE-2023-46747.yaml +tags: + analytic_story: 'F5 Authentication Bypass with TMUI' + category: + - Adversary Tactics + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + usecase: Advanced Threat Detection