-
Notifications
You must be signed in to change notification settings - Fork 0
/
rule_schema.json
148 lines (148 loc) · 5.91 KB
/
rule_schema.json
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{
"$schema": "http://json-schema.org/schema",
"title": "Huorong HIPS Rule Schema",
"description": "This is the schema for Huorong Internet Security Custom HIPS Rule",
"type": "object",
"properties": {
"ver": {
"type": "string",
"description": "must be '5.0'",
"const": "5.0",
"default": "5.0"
},
"tag": {
"type": "string",
"description": "must be 'hipsuser'",
"const": "hipsuser",
"default": "hipsuser"
},
"data": {
"type": "array",
"items": {
"type": "object",
"description": "rule",
"properties": {
"id": {
"type": "integer",
"description": "any, here set to 256",
"default": 256
},
"power": {
"type": "integer",
"description": "0:disbaled, 1:enabled",
"enum": [
0,
1
],
"default": 0
},
"name": {
"type": "string",
"description": "name of rule"
},
"procname": {
"type": "string",
"description": "program process, wildcard support '*'(any), '>'(any except dir)",
"default": "*"
},
"treatment": {
"type": "integer",
"description": "action when triggered, 1:ask, 3:auto_block",
"enum": [
1,
3
],
"default": 1
},
"policies": {
"type": "array",
"items": {
"type": "object",
"description": "target",
"properties": {
"montype": {
"type": "integer",
"description": "0:app_defense, 1:file_defense, 2:reg_defense",
"enum": [
0,
1,
2
],
"default": 0
},
"action_type": {
"type": "integer",
"description": "monitered events: 1:Create, 2:Read, 4:Modify, 8:Delete, 16:Execute(app_def)",
"minimum": 1,
"maximum": 16,
"default": 16
},
"res_path": {
"type": "string",
"description": "target path, wildcard support '*'(any), '>'(any except dir)",
"default": "*"
}
},
"required": [
"montype",
"action_type",
"res_path"
],
"defaultSnippets": [
{
"label": "app_defense",
"description": "app_defense template",
"body": {
"montype": 0,
"action_type": 16,
"res_path": "$1"
}
},
{
"label": "file_defense",
"description": "file_defense template",
"body": {
"montype": 1,
"action_type": 1,
"res_path": "$1"
}
},
{
"label": "reg_defense",
"description": "reg_defense template",
"body": {
"montype": 2,
"action_type": 1,
"res_path": "$1"
}
}
]
}
}
},
"required": [
"id",
"power",
"name",
"procname",
"treatment",
"policies"
],
"defaultSnippets": [
{
"label": "new rule",
"description": "create rule template",
"body": {
"id": 256,
"power": 0,
"name": "[${1|Info,Warning,Threat|}][${2|AD,FD,RD|}${3:ID}]${4:name}",
"procname": "${5:*}",
"treatment": 1,
"policies": []
}
}
]
}
}
}
}