YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_WEBSHELL_PAS_Webshell_Perlnetworkscript
Detects PERL scripts created by P.A.S. webshell
- Auteur
- FR/ANSSI/SDO
- Date
- 2021-02-15
- Modifiée
- 2024-05-25
- Score / Qualité
- 90 / 85
Ce que détecte cette règle
Detects PERL scripts created by P.A.S. webshell
Elle définit 5 motifs (5 texte, 0 hex, 0 regex).
YARA-X indique : warning[unintended_pattern_in_set]: pattern `$pl_start` may be unintendedly or redundantly included in pattern set `$pl*`
Résumé généré à partir des métadonnées et de la condition de la règle.
Source de la règle
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* )
}
Chaînes (5 motifs)
| Identifiant | Type | Valeur | Modificateurs |
|---|---|---|---|
| $pl_start | texte | "#!/usr/bin/perl\n$SIG{'CHLD'}='IGNORE'; use IO::Socket; use FileHandle;" | |
| $pl_status | texte | "$o=\" [OK]\";$e=\" Error: \"" | |
| $pl_socket | texte | "socket(SOCKET, PF_INET, SOCK_STREAM,$tcp) or die print \"$l$e$!$l" | |
| $msg1 | texte | "print \"$l OK! I\\'m successful connected.$l\"" | |
| $msg2 | texte | "print \"$l OK! I\\'m accept connection.$l\"" |
Condition
filesize < 6000 and ( $pl_start at 0 and all of ( $pl* ) ) or any of ( $msg* )En clair (Heuristique)
- Le fichier doit faire moins de 6000 (garde-fou peu coûteux qui écarte les gros fichiers).
- Tous les motifs de ( $pl* ) doivent être trouvés.
- Au moins un motif de ( $msg* ) doit être trouvé.
- Le motif $pl_start doit se trouver à l’offset 0.
Tester cette règle dans votre navigateur
Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.
Licence et attribution
Auteur : FR/ANSSI/SDO
Dépôt source : Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licence : Detection Rule License 1.1 (licence du dépôt)
Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.
Identifiant de règle: 1625b63f-ead7-5712-92b4-0ce6ecc49fd4
Tags:FILE
Règles liées
- Web shellSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / acteurSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / acteurSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / acteurSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / acteurSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / acteurSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / acteurSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15
- APT / acteurSignature Base (Florian Roth / Nextron)· FR/ANSSI/SDO· 2021-02-15