type: trigger
#debug: true
name: crowdsecurity/CVE-2022-42889
description: "Detect CVE-2022-42889 exploits (Text4Shell)"
filter: |
  Upper(PathUnescape(evt.Meta.http_path)) contains Upper('${script:javascript:java.lang.Runtime.getRuntime().exec(')
  or
  Upper(PathUnescape(evt.Meta.http_path)) contains Upper('${script:js:java.lang.Runtime.getRuntime().exec(')
  or
  Upper(PathUnescape(evt.Meta.http_path)) contains Upper('${url:UTF-8:') 
  or
  Upper(PathUnescape(evt.Meta.http_path)) contains Upper('${dns:address|') 
blackhole: 1m
groupby: "evt.Meta.source_ip"
labels:
  type: exploit
  remediation: true
