Detection rules › Splunk

Ivanti Connect Secure Command Injection Attempts

Status
production
Severity
medium
Group by
Web.src, Web.status, c-uri, c-useragent, cs-host, cs-method
Author
Michael Haag, Splunk
Source
github.com/splunk/security_content

The following analytic identifies attempts to exploit the CVE-2023-46805 and CVE-2024-21887 vulnerabilities in Ivanti Connect Secure. It detects POST requests to specific URIs that leverage command injection to execute arbitrary commands. The detection uses the Web datamodel to monitor for these requests and checks for a 200 OK response, indicating a successful exploit attempt. This activity is significant as it can lead to unauthorized command execution on the server. If confirmed malicious, attackers could gain control over the system, leading to potential data breaches or further network compromise.

Known false positives

  • This analytic is limited to HTTP Status 200; adjust as necessary. False positives may occur if the URI path is IP-restricted or externally blocked. It's recommended to review the context of the alerts and adjust the analytic parameters to better fit the specific environment.

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Rule body

name: Ivanti Connect Secure Command Injection Attempts
id: 1f32a7e0-a060-4545-b7de-73fcf9ad536e
version: 10
creation_date: '2024-01-17'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: TTP
description: The following analytic identifies attempts to exploit the CVE-2023-46805 and CVE-2024-21887 vulnerabilities in Ivanti Connect Secure. It detects POST requests to specific URIs that leverage command injection to execute arbitrary commands. The detection uses the Web datamodel to monitor for these requests and checks for a 200 OK response, indicating a successful exploit attempt. This activity is significant as it can lead to unauthorized command execution on the server. If confirmed malicious, attackers could gain control over the system, leading to potential data breaches or further network compromise.
data_source:
    - Suricata
search: |-
    | tstats count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Web
      WHERE Web.url IN("*/api/v1/totp/user-backup-code/../../system/maintenance/archiving/cloud-server-test-connection*","*/api/v1/totp/user-backup-code/../../license/keys-status/*") Web.http_method IN ("POST", "GET") Web.status=200
      BY Web.src, Web.dest, Web.http_user_agent,
         Web.url, Web.http_method, Web.status
    | `drop_dm_object_name("Web")`
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `ivanti_connect_secure_command_injection_attempts_filter`
how_to_implement: This detection requires the Web datamodel to be populated from a supported Technology Add-On like Suricata, Splunk for Apache, Splunk for Nginx, or Splunk for Palo Alto.
known_false_positives: This analytic is limited to HTTP Status 200; adjust as necessary. False positives may occur if the URI path is IP-restricted or externally blocked. It's recommended to review the context of the alerts and adjust the analytic parameters to better fit the specific environment.
references:
    - https://github.com/RootUp/PersonalStuff/blob/master/http-vuln-cve2023-46805_2024_21887.nse
    - https://github.com/projectdiscovery/nuclei-templates/blob/c6b351e71b0fb0e40e222e97038f1fe09ac58194/http/misconfiguration/ivanti/CVE-2023-46085-CVE-2024-21887-mitigation-not-applied.yaml
    - https://github.com/rapid7/metasploit-framework/pull/18708/files
    - https://attackerkb.com/topics/AdUh6by52K/cve-2023-46805/rapid7-analysis
    - https://labs.watchtowr.com/welcome-to-2024-the-sslvpn-chaos-continues-ivanti-cve-2023-46805-cve-2024-21887/
    - https://twitter.com/GreyNoiseIO/status/1747711939466453301
finding:
    title: Possible exploitation of CVE-2023-46805 and CVE-2024-21887 against $dest$.
    entity:
        field: dest
        type: system
        score: 50
analytic_story:
    - Ivanti Connect Secure VPN Vulnerabilities
    - CISA AA24-241A
asset_type: VPN Appliance
cve:
    - CVE-2023-46805
    - CVE-2024-21887
mitre_attack_id:
    - T1190
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: web
security_domain: network

Stages and Predicates

Stage 1: tstats

| tstats count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Web
  WHERE Web.url IN("*/api/v1/totp/user-backup-code/../../system/maintenance/archiving/cloud-server-test-connection*","*/api/v1/totp/user-backup-code/../../license/keys-status/*") Web.http_method IN ("POST", "GET") Web.status=200
  BY Web.src, Web.dest, Web.http_user_agent,
     Web.url, Web.http_method, Web.status

Stage 2: search

| `drop_dm_object_name("Web")`

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `ivanti_connect_secure_command_injection_attempts_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Web.http_methodin
  • "GET"
  • "POST"
field:"cs-method" kind:in
Web.statuseq
  • 200
field:"Web.status" kind:eq value:"200"
Web.urlin
  • "*/api/v1/totp/user-backup-code/../../license/keys-status/*"
  • "*/api/v1/totp/user-backup-code/../../system/maintenance/archiving/cloud-server-test-connection*"
field:"c-uri" kind:in