YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_WEBSHELL_PAS_Webshell_Perlnetworkscript
Detects PERL scripts created by P.A.S. webshell
- Autor
- FR/ANSSI/SDO
- Fecha
- 2021-02-15
- Modificada
- 2024-05-25
- Puntuación / Calidad
- 90 / 85
Qué detecta esta regla
Detects PERL scripts created by P.A.S. webshell
Define 5 patrones (5 de texto, 0 hex, 0 regex).
YARA-X dice: warning[unintended_pattern_in_set]: pattern `$pl_start` may be unintendedly or redundantly included in pattern set `$pl*`
Resumen generado a partir de los metadatos y la condición de la regla.
Código de la regla
rule SIGNATURE_BASE_WEBSHELL_PAS_Webshell_Perlnetworkscript : FILE
{
meta:
= "Detects PERL scripts created by P.A.S. webshell"
= "FR/ANSSI/SDO"
= "1625b63f-ead7-5712-92b4-0ce6ecc49fd4"
= "2021-02-15"
= "2024-05-25"
= "https://www.cert.ssi.gouv.fr/uploads/CERTFR-2021-CTI-005.pdf"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_sandworm_centreon.yar#L44-L62"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "b170c07a005e737c8069f2cc63f869d4d3ff6593b3bfca5bcaf02d7808da6852"
= 90
= 85
= "FILE"
strings:
$pl_start = "#!/usr/bin/perl\n$SIG{'CHLD'}='IGNORE'; use IO::Socket; use FileHandle;"
$pl_status = "$o=\" [OK]\";$e=\" Error: \""
$pl_socket = "socket(SOCKET, PF_INET, SOCK_STREAM,$tcp) or die print \"$l$e$!$l"
$msg1 = "print \"$l OK! I\\'m successful connected.$l\""
$msg2 = "print \"$l OK! I\\'m accept connection.$l\""
condition:
filesize < 6000 and ( $pl_start at 0 and all of ( $pl* ) ) or any of ( $msg* )
}
Cadenas (5 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $pl_start | texto | "#!/usr/bin/perl\n$SIG{'CHLD'}='IGNORE'; use IO::Socket; use FileHandle;" | |
| $pl_status | texto | "$o=\" [OK]\";$e=\" Error: \"" | |
| $pl_socket | texto | "socket(SOCKET, PF_INET, SOCK_STREAM,$tcp) or die print \"$l$e$!$l" | |
| $msg1 | texto | "print \"$l OK! I\\'m successful connected.$l\"" | |
| $msg2 | texto | "print \"$l OK! I\\'m accept connection.$l\"" |
Condición
filesize < 6000 and ( $pl_start at 0 and all of ( $pl* ) ) or any of ( $msg* )En palabras sencillas (Heurística)
- El archivo debe ocupar menos de 6000 (un límite barato que descarta archivos grandes).
- Deben coincidir todos los patrones de ( $pl* ).
- Debe coincidir al menos un patrón de ( $msg* ).
- El patrón $pl_start debe estar en el offset 0.
Prueba esta regla en tu navegador
Arrastra un archivo para escanearlo con esta regla usando YARA-X compilado a WebAssembly. No se sube nada.
Licencia y atribución
Autor: FR/ANSSI/SDO
Repositorio de origen: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licencia: Detection Rule License 1.1 (licencia del repositorio)
Obtenida a través de YARA Forge 20260927, que añade a los nombres el prefijo de la fuente y campos meta normalizados.
Id de la regla: 1625b63f-ead7-5712-92b4-0ce6ecc49fd4
Etiquetas:FILE
Reglas relacionadas
- WebshellSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / actorSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / actorSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / actorSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / actorSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / actorSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / actorSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / actorSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15