YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_WEBSHELL_JSP_Generic_Processbuilder
Generic JSP webshell which uses processbuilder to execute user input
- Author
- Arnim Rupp (https://github.com/ruppde)
- Date
- 2021-01-07
- Modified
- 2023-04-05
- Score / Quality
- 75 / 85
What this rule detects
Generic JSP webshell which uses processbuilder to execute user input
It defines 9 patterns (9 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule SIGNATURE_BASE_WEBSHELL_JSP_Generic_Processbuilder : FILE
{
meta:
= "Generic JSP webshell which uses processbuilder to execute user input"
= "Arnim Rupp (https://github.com/ruppde)"
= "2a7c5f44-24a1-5f43-996e-945c209b79b1"
= "2021-01-07"
= "2023-04-05"
= "Internal Research"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_webshells.yar#L5963-L6000"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "82198670ac2072cd5c2853d59dcd0f8dfcc28923"
= "c05a520d96e4ebf9eb5c73fc0fa446ceb5caf343"
= "347a55c174ee39ec912d9107e971d740f3208d53af43ea480f502d177106bbe8"
= "d0ba29b646274e8cda5be1b940a38d248880d9e2bba11d994d4392c80d6b65bd"
= "fffc173cc23e158e319e48097243a64da232151e441c39e4b6ecc2565a82d862"
= 75
= 85
= "FILE"
= "Detection Rule License 1.1 https://github.com/Neo23x0/signature-base/blob/master/LICENSE"
= 70
strings:
$exec = "ProcessBuilder" fullword wide ascii
$start = "start" fullword wide ascii
$input1 = "getParameter" fullword ascii wide
$input2 = "getHeaders" fullword ascii wide
$input3 = "getInputStream" fullword ascii wide
$input4 = "getReader" fullword ascii wide
$req1 = "request" fullword ascii wide
$req2 = "HttpServletRequest" fullword ascii wide
$req3 = "getRequest" fullword ascii wide
condition:
filesize < 2000 and ( any of ( $input* ) and any of ( $req* ) ) and $exec and $start
}
Strings (9 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $exec | text | "ProcessBuilder" | fullword wide ascii |
| $start | text | "start" | fullword wide ascii |
| $input1 | text | "getParameter" | fullword ascii wide |
| $input2 | text | "getHeaders" | fullword ascii wide |
| $input3 | text | "getInputStream" | fullword ascii wide |
| $input4 | text | "getReader" | fullword ascii wide |
| $req1 | text | "request" | fullword ascii wide |
| $req2 | text | "HttpServletRequest" | fullword ascii wide |
| $req3 | text | "getRequest" | fullword ascii wide |
Condition
filesize < 2000 and ( any of ( $input* ) and any of ( $req* ) ) and $exec and $startIn plain words (Heuristic)
- The file must be smaller than 2000 (a cheap guard that skips large files).
- At least one pattern in ( $input* ) must match.
- At least one pattern in ( $req* ) must match.
- Pattern $exec must be present.
- Pattern $start must be present.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 82198670ac2072cd5c2853d59dcd0f8dfcc28923
- c05a520d96e4ebf9eb5c73fc0fa446ceb5caf343
- 347a55c174ee39ec912d9107e971d740f3208d53af43ea480f502d177106bbe8
- d0ba29b646274e8cda5be1b940a38d248880d9e2bba11d994d4392c80d6b65bd
Licence & attribution
Author: Arnim Rupp (https://github.com/ruppde)
Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licence: Detection Rule License 1.1 (stated in the rule's own meta)
“Detection Rule License 1.1 https://github.com/Neo23x0/signature-base/blob/master/LICENSE”
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 2a7c5f44-24a1-5f43-996e-945c209b79b1
Metadata
| importance | 70 |
|---|
Tags:FILE
Related rules
- WebshellSignature Base (Florian Roth / Nextron)· Arnim Rupp (https://github.com/ruppde)· 2023-01-28
- WebshellSignature Base (Florian Roth / Nextron)· Arnim Rupp (https://github.com/ruppde)· 2021-01-07
- WebshellSignature Base (Florian Roth / Nextron)· Arnim Rupp (https://github.com/ruppde)· 2021-01-07
- WebshellSignature Base (Florian Roth / Nextron)· Arnim Rupp (https://github.com/ruppde)· 2021-01-07
- WebshellSignature Base (Florian Roth / Nextron)· Arnim Rupp (https://github.com/ruppde)· 2021-01-07
- WebshellSignature Base (Florian Roth / Nextron)· Arnim Rupp (https://github.com/ruppde)· 2021-01-09
- MalwareSignature Base (Florian Roth / Nextron)· Arnim Rupp (https://github.com/ruppde)· 2023-04-04
- Hack toolSignature Base (Florian Roth / Nextron)· Arnim Rupp (https://github.com/ruppde)· 2020-12-13