YARA · SEKOIA.IO Community
SEKOIA_Weevely_Webshell_Payload
Detects weevely webshell
- Author
- Sekoia.io
- Date
- 2024-04-22
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects weevely webshell
It defines 3 patterns (3 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
weevely-webshell-payload.yarDetection Rule License 1.1
rule SEKOIA_Weevely_Webshell_Payload : FILE
{
meta:
= "Detects weevely webshell"
= "Sekoia.io"
= "f2879c6e-3d1b-41be-8b1d-4f0503fd4b29"
= "2024-04-22"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/weevely_webshell_payload.yar#L1-L17"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "bb02ec519d77526cc81ebd7743336b333b9498f79079f7008970cf1bb51c4948"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$s1 = "<?php include \""
$s2 = ".basename(__FILE__).\""
$s3 = ";__HALT_COMPILER(); ?>"
condition:
all of them and filesize < 1MB and @s1 == 0 and @s2 < @s3
}
Strings (3 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "<?php include \"" | |
| $s2 | text | ".basename(__FILE__).\"" | |
| $s3 | text | ";__HALT_COMPILER(); ?>" |
Condition
all of them and filesize < 1MB and @s1 == 0 and @s2 < @s3In plain words (Heuristic)
- The file must be smaller than 1MB (a cheap guard that skips large files).
- All patterns in the rule must match.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.
References
Licence & attribution
Author: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: f2879c6e-3d1b-41be-8b1d-4f0503fd4b29
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- WebshellSEKOIA.IO Community· Sekoia.io· 2024-11-22
- WebshellSEKOIA.IO Community· Sekoia.io· 2023-12-08
- WebshellSEKOIA.IO Community· Sekoia.io· 2022-04-22
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27