From 5ab0b7dfc2d4e63cf556b58f673d358a38181e40 Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:27:08 -0600 Subject: [PATCH 1/3] Citrix CVE-2023-4966- Citrix Bleed --- ...d_gateway_unauthorized_data_disclosure.yml | 66 +++++++++++++++++++ ...dc_and_netscaler_gateway_cve_2023_4966.yml | 22 +++++++ 2 files changed, 88 insertions(+) create mode 100644 detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml create mode 100644 stories/citrix_netscaler_adc_and_netscaler_gateway_cve_2023_4966.yml diff --git a/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml b/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml new file mode 100644 index 0000000000..c46aecafab --- /dev/null +++ b/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml @@ -0,0 +1,66 @@ +name: Citrix ADC and Gateway Unauthorized Data Disclosure +id: b593cac5-dd20-4358-972a-d945fefdaf17 +version: 1 +date: '2023-10-24' +author: Michael Haag, Splunk +status: production +type: TTP +data_source: [] +description: The following analytic detects attempts to exploit the Citrix Bleed vulnerability, which can lead to the leaking of session tokens. The vulnerability, identified as CVE-2023-4966, pertains to sensitive information disclosure in NetScaler ADC and NetScaler Gateway when set up as various server configurations. The analytic specifically searches for HTTP requests with a 200 status code targeting the /oauth/idp/.well-known/openid-configuration URL endpoint. By parsing web traffic and filtering based on the aforementioned criteria along with specific user agent details, HTTP method, source and destination IPs, and the sourcetype, the analytic aims to identify potentially malicious requests that fit the profile of this exploit. \ + + This behavior is essential for a Security Operations Center (SOC) to identify because if successfully exploited, attackers can gain unauthorized access, leading to a potential breach or further malicious activities within the organization's network. As the Citrix Bleed vulnerability can disclose session tokens, a successful exploit can allow attackers to impersonate legitimate users, bypassing authentication mechanisms and accessing sensitive data or systems. \ + + If a true positive is confirmed, it implies that an attacker is actively exploiting the vulnerability within the organization's environment. This could lead to severe consequences, including unauthorized data access, further propagation within the network, and potential disruptions or exfiltration of critical information. \ + + Upon flagging such activity, it's crucial for analysts to swiftly validate the alert, assess the nature and extent of the exposure, and implement necessary measures to mitigate the threat. Reviewing the details such as user agent, source, and destination IP can help in understanding the context and intent of the attack. While it's imperative to patch vulnerable systems to prevent this exploitation, early detection through this analytic provides a valuable layer of defense, enabling timely response to thwart potential breaches. +search: '| tstats count min(_time) as firstTime max(_time) as lastTime from datamodel=Web where Web.url IN ("*/oauth/idp/.well-known/openid-configuration*") 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)` | `citrix_adc_and_gateway_unauthorized_data_disclosure_filter`' +how_to_implement: This detection requires the Web datamodel to be populated from a + supported Technology Add-On like Splunk for Apache, Splunk for Nginx, or Splunk + for Palo Alto. We recommend hunting in the environment first to understand the scope of the issue and then deploying this detection to monitor for future exploitation attempts. Limit or restrict to Citrix devices only if possible. +known_false_positives: False positives may be present based on organization use of Citrix ADC and Gateway. Filter, or restrict the analytic to Citrix devices only. +references: + - https://www.assetnote.io/resources/research/citrix-bleed-leaking-session-tokens-with-cve-2023-4966 + - https://github.com/assetnote/exploits/tree/main/citrix/CVE-2023-4966 +tags: + analytic_story: + - Citrix NetScaler ADC and NetScaler Gateway CVE-2023-4966 + asset_type: Web server + atomic_guid: [] + confidence: 90 + impact: 100 + message: Possible exploitation of Citrix Bleed vulnerability against $dest$ fron $src$. + mitre_attack_id: + - T1190 + observable: + - name: dest + type: IP Address + 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: network +tests: +- name: True Positive Test + attack_data: + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1190/citrix/cve-2023-4966-citrix.log + source: suricata + sourcetype: suricata diff --git a/stories/citrix_netscaler_adc_and_netscaler_gateway_cve_2023_4966.yml b/stories/citrix_netscaler_adc_and_netscaler_gateway_cve_2023_4966.yml new file mode 100644 index 0000000000..4af15b9434 --- /dev/null +++ b/stories/citrix_netscaler_adc_and_netscaler_gateway_cve_2023_4966.yml @@ -0,0 +1,22 @@ +name: Citrix NetScaler ADC and NetScaler Gateway CVE-2023-4966 +id: b194d644-4095-431a-bee0-a8e6ec067414 +version: 1 +date: '2023-10-24' +author: Michael Haag, Splunk +description: A critical security update, CVE-2023-4966, has been released for NetScaler ADC and NetScaler Gateway. This vulnerability, discovered by our internal team, can result in unauthorized data disclosure if exploited. Reports of incidents consistent with session hijacking have been received. The Cybersecurity and Infrastructure Security Agency (CISA) has added an entry for CVE-2023-4966 to its Known Exploited and Vulnerabilities Catalog. No workarounds are available for this vulnerability, and immediate installation of the recommended builds is strongly advised. +narrative: On October 10, 2023, Cloud Software Group released builds to fix CVE-2023-4966, a vulnerability affecting NetScaler ADC and NetScaler Gateway. This vulnerability, if exploited, can lead to unauthorized data disclosure and possibly session hijacking. Although there were no known exploits at the time of disclosure, we have since received credible reports of targeted attacks exploiting this vulnerability. The Cybersecurity and Infrastructure Security Agency (CISA) has added an entry for CVE-2023-4966 to its Known Exploited and Vulnerabilities Catalog, which contains detection and mitigation guidance for observed exploitations of CVE-2023-4966 by threat actors against NetScaler ADC and NetScaler Gateway. We strongly recommend that users of affected builds immediately install the recommended builds, as this vulnerability has been identified as critical. No workarounds are available for this vulnerability. +references: + - https://www.netscaler.com/blog/news/cve-2023-4966-critical-security-update-now-available-for-netscaler-adc-and-netscaler-gateway/ + - https://support.citrix.com/article/CTX579459/netscaler-adc-and-netscaler-gateway-security-bulletin-for-cve20234966-and-cve20234967 + - https://www.assetnote.io/resources/research/citrix-bleed-leaking-session-tokens-with-cve-2023-4966 + - https://github.com/assetnote/exploits/tree/main/citrix/CVE-2023-4966 + - https://github.com/projectdiscovery/nuclei-templates/blob/b815d23b908de52996060163091395d1c89fbeea/http/cves/2023/CVE-2023-4966.yaml +tags: + analytic_story: Citrix NetScaler ADC and NetScaler Gateway CVE-2023-4966 + category: + - Adversary Tactics + product: + - Splunk Enterprise + - Splunk Enterprise Security + - Splunk Cloud + usecase: Advanced Threat Detection From 3bd3798afa0452f20ee7ca2aa49da4f2286dcc07 Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:46:16 -0600 Subject: [PATCH 2/3] Update citrix_adc_and_gateway_unauthorized_data_disclosure.yml --- .../citrix_adc_and_gateway_unauthorized_data_disclosure.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml b/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml index c46aecafab..cd71f7b720 100644 --- a/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml +++ b/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml @@ -61,6 +61,6 @@ tags: tests: - name: True Positive Test attack_data: - - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1190/citrix/cve-2023-4966-citrix.log - source: suricata - sourcetype: suricata + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1190/citrix/nginx_kv_cve_2023-4966-citrix.log + source: nginx:plus:kv + sourcetype: nginx:plus:kv From 4bb68a398455fa3bb360812c11f2cd5f79bdf0af Mon Sep 17 00:00:00 2001 From: Michael Haag <5632822+MHaggis@users.noreply.github.com> Date: Wed, 25 Oct 2023 07:36:23 -0600 Subject: [PATCH 3/3] Update citrix_adc_and_gateway_unauthorized_data_disclosure.yml --- .../citrix_adc_and_gateway_unauthorized_data_disclosure.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml b/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml index cd71f7b720..c46aecafab 100644 --- a/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml +++ b/detections/web/citrix_adc_and_gateway_unauthorized_data_disclosure.yml @@ -61,6 +61,6 @@ tags: tests: - name: True Positive Test attack_data: - - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1190/citrix/nginx_kv_cve_2023-4966-citrix.log - source: nginx:plus:kv - sourcetype: nginx:plus:kv + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1190/citrix/cve-2023-4966-citrix.log + source: suricata + sourcetype: suricata