Skip to content

Commit a047c27

Browse files
committed
added some new rules and expanded rule skeleton
1 parent 278ad43 commit a047c27

File tree

1 file changed

+60
-35
lines changed

1 file changed

+60
-35
lines changed

yara/snippets/yara.json

+60-35
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,62 @@
11
{
2-
"Rule": {
3-
"prefix": "rule",
4-
"body": [
5-
"/*",
6-
"\tRULE DESCRIPTION HERE",
7-
"*/",
8-
"rule ${name}",
9-
"{",
10-
"\tcondition:",
11-
"\t\t$1",
12-
"}"
13-
],
14-
"description": "Generate a basic skeleton"
15-
},
16-
"Meta": {
17-
"prefix": "meta",
18-
"body": [
19-
"meta:",
20-
"\t${metadata}"
21-
],
22-
"description": "Generate a 'meta' section"
23-
},
24-
"Strings": {
25-
"prefix": "strings",
26-
"body": [
27-
"strings:",
28-
"\t${string(s)}"
29-
],
30-
"description": "Generate a 'strings' section"
31-
},
32-
"Import": {
33-
"prefix": "import",
34-
"body": "import \"${module}\"",
35-
"description": "Import a YARA module"
36-
}
2+
"Rule": {
3+
"prefix": "rule",
4+
"body": [
5+
"rule ${TM_FILENAME_BASE}",
6+
"{",
7+
"\tmeta:",
8+
"\t\tauthor = ${1:author}",
9+
"\t\tdate = ${CURRENT_YEAR-CURRENT_MONTH-CURRENT_DATE}",
10+
"\tstrings:",
11+
"\t\t${2:strings}",
12+
"\tcondition:",
13+
"\t\t${3:condition}",
14+
"}"
15+
],
16+
"description": "Generate a rule skeleton"
17+
},
18+
"Meta": {
19+
"prefix": "meta",
20+
"body": [
21+
"meta:",
22+
"\t${metadata}"
23+
],
24+
"description": "Generate a 'meta' section"
25+
},
26+
"Strings": {
27+
"prefix": "strings",
28+
"body": [
29+
"strings:",
30+
"\t${strings}"
31+
],
32+
"description": "Generate a 'strings' section"
33+
},
34+
"Condition": {
35+
"prefix": "condition",
36+
"body": [
37+
"condition:",
38+
"\t${conditions}"
39+
],
40+
"description": "Generate a 'condition' section"
41+
},
42+
"Import": {
43+
"prefix": "import",
44+
"body": "import \"${|pe,elf,cuckoo,magic,hash,math,dotnet,time|}\"",
45+
"description": "Import a YARA module"
46+
},
47+
"for": {
48+
"prefix": "for",
49+
"body": "for ${1:expression} of ${2:string_set} : ( ${3:boolean_expression} )",
50+
"description": "Apply the same condition to many strings"
51+
},
52+
"any": {
53+
"prefix": "any",
54+
"body": "any of ${them}",
55+
"description": "String set keyword: any"
56+
},
57+
"all": {
58+
"prefix": "all",
59+
"body": "all of ${them}",
60+
"description": "String set keyword: all"
61+
}
3762
}

0 commit comments

Comments
 (0)