Detection rules › Splunk

Web JSP Request via URL

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

The following analytic identifies URL requests associated with CVE-2022-22965 (Spring4Shell) exploitation attempts, specifically targeting webshell access on a remote webserver. It detects HTTP GET requests with URLs containing ".jsp?cmd=" or "j&cmd=" patterns. This activity is significant as it indicates potential webshell deployment, which can lead to unauthorized remote command execution. If confirmed malicious, attackers could gain control over the webserver, execute arbitrary commands, and potentially escalate privileges, leading to severe data breaches and system compromise.

Known false positives

  • False positives may be present with legitimate applications. Attempt to filter by dest IP or use Asset groups to restrict to servers.

MITRE ATT&CK coverage

Rule body

name: Web JSP Request via URL
id: 2850c734-2d44-4431-8139-1a56f6f54c01
version: 11
creation_date: '2022-04-05'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: TTP
description: The following analytic identifies URL requests associated with CVE-2022-22965 (Spring4Shell) exploitation attempts, specifically targeting webshell access on a remote webserver. It detects HTTP GET requests with URLs containing ".jsp?cmd=" or "j&cmd=" patterns. This activity is significant as it indicates potential webshell deployment, which can lead to unauthorized remote command execution. If confirmed malicious, attackers could gain control over the webserver, execute arbitrary commands, and potentially escalate privileges, leading to severe data breaches and system compromise.
data_source:
    - Nginx Access
search: |-
    | tstats count FROM datamodel=Web
      WHERE Web.http_method IN ("GET") Web.url IN ("*.jsp?cmd=*","*j&cmd=*")
      BY Web.http_user_agent 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)`
    | `web_jsp_request_via_url_filter`
how_to_implement: To successfully implement this search you need to be ingesting information on Web traffic that include fields relavent for traffic into the `Web` datamodel.
known_false_positives: False positives may be present with legitimate applications. Attempt to filter by dest IP or use Asset groups to restrict to servers.
references:
    - https://www.microsoft.com/security/blog/2022/04/04/springshell-rce-vulnerability-guidance-for-protecting-against-and-detecting-cve-2022-22965/
    - https://github.com/TheGejr/SpringShell
    - https://www.tenable.com/blog/spring4shell-faq-spring-framework-remote-code-execution-vulnerability
finding:
    title: A suspicious URL has been requested against $dest$ by $src$, related to web shell activity.
    entity:
        field: dest
        type: system
        score: 50
threat_objects:
    - field: src
      type: ip_address
analytic_story:
    - Spring4Shell CVE-2022-22965
    - Earth Alux
asset_type: Web Server
cve:
    - CVE-2022-22965
mitre_attack_id:
    - T1133
    - T1190
    - T1505.003
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: web
security_domain: network

Stages and Predicates

Stage 1: tstats

| tstats count FROM datamodel=Web
  WHERE Web.http_method IN ("GET") Web.url IN ("*.jsp?cmd=*","*j&cmd=*")
  BY Web.http_user_agent Web.http_method, Web.url,Web.url_length
     Web.src, Web.dest sourcetype

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

| `web_jsp_request_via_url_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Web.http_methodin
  • "GET"
field:"cs-method" kind:in
Web.urlin
  • "*.jsp?cmd=*"
  • "*j&cmd=*"
field:"c-uri" kind:in