YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_HKTL_Khepri_Beacon_Sep21_1
Detects Khepri C2 framework beacons
- Auteur
- Florian Roth (Nextron Systems)
- Date
- 2021-09-08
- Modifiée
- 2023-12-05
- Score / Qualité
- 90 / 85
Ce que détecte cette règle
Detects Khepri C2 framework beacons
Cibles : PE Windows, ELF Linux.
Elle définit 15 motifs (11 texte, 4 hex, 0 regex).
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_HKTL_Khepri_Beacon_Sep21_1 : FILE
{
meta:
= "Detects Khepri C2 framework beacons"
= "Florian Roth (Nextron Systems)"
= "b2c8aaf7-7953-55a3-8499-565800fa01f1"
= "2021-09-08"
= "2023-12-05"
= "https://github.com/geemion/Khepri/"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_khepri.yar#L2-L44"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "86c48679db5f4c085fd741ebec5235bc6cf0cdf8ef2d98fd8a689ceb5088f431"
= "c688dbda6006ef28305285f6aeec24a23cbfe9174d09cf4e3586bd0cf7290e60"
= 90
= 85
= "FILE"
strings:
$x1 = "NT %d.%d Build %d ProductType:%s" ascii fullword
$xe1 = "YzIuQ01EUEFSQU0uY21k" ascii
$xe2 = "MyLkNNRFBBUkFNLmNtZ" ascii
$xe3 = "jMi5DTURQQVJBTS5jbW" ascii
$sx1 = "c2.ProcessItem.user" ascii fullword
$sx2 = "c2.CMDPARAM.cmd" ascii fullword
$sx3 = "c2.DownLoadFile.file_path" ascii fullword
$sa1 = "file size zero"
$sa2 = "cmd.exe /c "
$sa3 = "error parse param"
$sa4 = "innet_ip"
$op1 = { c3 b9 b4 98 49 00 87 01 5d c3 b8 b8 98 49 00 c3 8b ff }
$op2 = { 8b f1 80 3d 58 97 49 00 00 0f 85 96 00 00 00 33 c0 40 b9 50 97 49 00 87 01 33 db }
$op3 = { 90 d5 0c 43 00 34 0d 43 00 ea 0c 43 00 7e 0d 43 00 b6 0d 43 00 cc }
$op4 = { 69 c0 ff 00 00 00 8b 4d c0 23 88 40 7c 49 00 89 4d c0 8b 45 cc 0b 45 c0 89 45 cc 8b 45 d0 }
condition:
( uint16( 0 ) == 0x5a4d or uint32be( 0 ) == 0x7f454c46 ) and filesize < 2000KB and ( 1 of ( $x* ) or 2 of ( $sx* ) or all of ( $sa* ) or 3 of ( $op* ) ) or ( filesize < 10MB and 1 of ( $xe* ) ) or 5 of them
}
Chaînes (15 motifs)
| Identifiant | Type | Valeur | Modificateurs |
|---|---|---|---|
| $x1 | texte | "NT %d.%d Build %d ProductType:%s" | ascii fullword |
| $xe1 | texte | "YzIuQ01EUEFSQU0uY21k" | ascii |
| $xe2 | texte | "MyLkNNRFBBUkFNLmNtZ" | ascii |
| $xe3 | texte | "jMi5DTURQQVJBTS5jbW" | ascii |
| $sx1 | texte | "c2.ProcessItem.user" | ascii fullword |
| $sx2 | texte | "c2.CMDPARAM.cmd" | ascii fullword |
| $sx3 | texte | "c2.DownLoadFile.file_path" | ascii fullword |
| $sa1 | texte | "file size zero" | |
| $sa2 | texte | "cmd.exe /c " | |
| $sa3 | texte | "error parse param" | |
| $sa4 | texte | "innet_ip" | |
| $op1 | hex | { c3 b9 b4 98 49 00 87 01 5d c3 b8 b8 98 49 00 c3 8b ff } | |
| $op2 | hex | { 8b f1 80 3d 58 97 49 00 00 0f 85 96 00 00 00 33 c0 40 b9 50 97 49 00 87 01 33 db } | |
| $op3 | hex | { 90 d5 0c 43 00 34 0d 43 00 ea 0c 43 00 7e 0d 43 00 b6 0d 43 00 cc } | |
| $op4 | hex | { 69 c0 ff 00 00 00 8b 4d c0 23 88 40 7c 49 00 89 4d c0 8b 45 cc 0b 45 c0 89 45 cc 8b 45 d0 } |
Condition
( uint16( 0 ) == 0x5a4d or uint32be( 0 ) == 0x7f454c46 ) and filesize < 2000KB and ( 1 of ( $x* ) or 2 of ( $sx* ) or all of ( $sa* ) or 3 of ( $op* ) ) or ( filesize < 10MB and 1 of ( $xe* ) ) or 5 of themEn clair (Heuristique)
- Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
- Le fichier doit commencer par l’en-tête ELF — un exécutable Linux/Unix.
- Le fichier doit faire moins de 2000KB (garde-fou peu coûteux qui écarte les gros fichiers).
- Le fichier doit faire moins de 10MB (garde-fou peu coûteux qui écarte les gros fichiers).
- Tous les motifs de ( $sa* ) doivent être trouvés.
- Au moins 1 motifs de ( $x* ) doivent être trouvés.
- Au moins 2 motifs de ( $sx* ) doivent être trouvés.
- Au moins 3 motifs de ( $op* ) doivent être trouvés.
- Au moins 1 motifs de ( $xe* ) doivent être trouvés.
- Au moins 5 motifs de la règle doivent être trouvés.
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é.
Références
Hashes d’échantillons
Hashes des échantillons listés par l’auteur dans les métadonnées de la règle (à rechercher dans votre plateforme de threat intelligence).
- 86c48679db5f4c085fd741ebec5235bc6cf0cdf8ef2d98fd8a689ceb5088f431
Licence et attribution
Auteur : Florian Roth (Nextron Systems)
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: b2c8aaf7-7953-55a3-8499-565800fa01f1
Tags:FILE
Règles liées
- Outil offensifSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2020-08-09
- Outil offensifSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-12-27
- Outil offensifSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-09-15
- Outil offensifSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2021-03-03
- Outil offensifSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2021-03-02
- Outil offensifSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2020-04-07
- APT / acteurSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-01-16
- APT / acteurSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-01-16