id: jsp-webshell

info:
  name: JSP Webshell - Detect
  author: lu4nx
  severity: high
  reference:
    - https://github.com/tennc/webshell/tree/master/jsp
    - https://github.com/tennc/webshell/tree/master/jspx
    - https://www.rapid7.com/blog/post/2016/12/14/webshells-101/
  metadata:
    verified: true
  tags: jsp,java,jspx,webshell,file
file:
  - extensions:
      - jsp
      - java
      - jspx

    extractors:
      - type: regex
        regex:
          - '(?i)(ClassLoader|exec|eval|ProcessBuilder|getInputStream|loadClass|defineClass|URLClassLoader)\('
          - '(?i)cmd.exe'
          - '(?i)/bin/sh'
          - '(?i)/bin/bash'
          - '(?i)exeCmd'
# digest: 4b0a00483046022100abe333d331de99bb0b23602510721de627e66e5312a4b4d35a1c5d344cf9d4fb022100c948d7c8a9eddf5ee547f9b258c814df933f4752000e7de30471afa178bf1e9e:922c64590222798bb761d5b6d8e72950