-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyara_rules_malware_unknown_exe.yara
48 lines (42 loc) · 1.28 KB
/
yara_rules_malware_unknown_exe.yara
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import "hash"
import "pe"
rule strings_rule // Comprueba los strings
{
// estos strings se han sacado del analisis estatico
strings:
$p = "!This program cannot be run in DOS mode." wide ascii fullword
$r = "C:\Users\Public\Documents\CR433101.dat.exe" wide ascii fullword
$s1 = "6=6C6I6O6U6[6b6i6p6w6~6" wide ascii fullword
$s2 = "?!?'?-?3?9???E?K?Q?W?]?c?i?o?u?{?" wide ascii fullword
condition:
$p and $r and 1 of ($s*) //Valida si encuentra $p y $r y 1 del resto de strings
}
rule hash_rule // Comprueba los hashes
{
// Valida con cualquiera de los 3 tipos de hash
condition:
hash.md5(0, filesize) == "1D8562C0ADCAEE734D63F7BAACA02F7C" or
hash.sha256(0, filesize) == "92730427321A1C4CCFC0D0580834DAEF98121EFA9BB8963DA332BFD6CF1FDA8A"
}
rule numero_secciones // Comprueba el numero de secciones
{
condition:
pe.number_of_sections == 5 // Valida solo si el nº de secciones es 5
}
rule punto_entrada // Comprueba el punto de entrada
{
strings:
$s = {E8 C4 03 00 00 E9 74 FE FF FF 55 8B EC 6A 00 FF 15 34 30 40 00 FF 75 08 FF 15 30 30 40 00 68 09 04}
condition:
$s at pe.entry_point
}
detecta_dropper_malware_unknown_exe
{
meta:
creador = "Akampos"
condition:
hash_rule or
strings_rule and
numero_secciones and
punto_entrada and
}