Skip to content

Commit af9dbb0

Browse files
added 4.0.0 keyword and module updates
1 parent da203c8 commit af9dbb0

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

test/rules/peek_rules.yara

+15
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,18 @@ rule RuleReferenceExample
4242
condition:
4343
SyntaxExample and $hex_string
4444
}
45+
46+
rule Yara4Example
47+
{
48+
meta:
49+
description = "Example rule to test features added in version 4.0"
50+
strings:
51+
$b64name = "string" base64
52+
$b64wname = "string" base64wide
53+
condition:
54+
any of them
55+
and pe.pdb_path == "C:\fake_pdb_path"
56+
and pe.dll_name == "library.dll"
57+
and pe.export_timestamp == 000000000
58+
and pe.exports_index(40)
59+
}

yara/src/modules_schema.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,21 @@
1515
"DEBUG_STRIPPED": "enum",
1616
"DLL": "enum",
1717
"dll_characteristics": "property",
18+
"dll_name": "property",
1819
"DYNAMIC_BASE": "enum",
1920
"entry_point": "property",
2021
"EXECUTABLE_IMAGE": "enum",
22+
"export_timestamp": "property",
23+
"exports": "method",
24+
"export_details": {
25+
"offset": "property",
26+
"name": "property",
27+
"forward_name": "property",
28+
"ordinal": "property"
29+
},
30+
"exports_index": "method",
2131
"file_alignment": "property",
2232
"FORCE_INTEGRITY": "enum",
23-
"exports": "method",
2433
"id": "property",
2534
"image_base": "property",
2635
"IMAGE_DIRECTORY_ENTRY_BASERELOC": "enum",
@@ -103,6 +112,7 @@
103112
"offset": "property",
104113
"size": "property"
105114
},
115+
"pdb_path": "property",
106116
"pointer_to_symbol_table": "property",
107117
"RELOCS_STRIPPED": "enum",
108118
"REMOVABLE_RUN_FROM_SWAP": "enum",

yara/syntaxes/yara.tmLanguage

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
<key>name</key>
270270
<string>storage.modifier.yara</string>
271271
<key>match</key>
272-
<string>(\bfullword\b|\bglobal\b|\bnocase\b|\bprivate\b|\bwide\b|\bxor\b)</string>
272+
<string>(\bbase64\b|\bbase64wide\b|\bfullword\b|\bglobal\b|\bnocase\b|\bprivate\b|\bwide\b|\bxor\b)</string>
273273
</dict>
274274
<!-- Data Types - Integer -->
275275
<dict>

0 commit comments

Comments
 (0)