-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathVulData.sublime-settings
executable file
·322 lines (320 loc) · 10.2 KB
/
VulData.sublime-settings
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
// author: md5_salt
/*
"rule_name": {"keyword":[], "discription": "test", "pattern": "regexp", bbais, ebias}
keyword 鼠标悬浮位置
discription 悬浮显示内容
pattern 正则表达式
abais 开始处偏移
bbais 结尾处偏移
enable 是否启用该条规则
*/
{
"php":{
"extract": {
"keyword": ["extract"],
"discription": "extract默认覆盖已有变量",
"pattern": "\\b(extract)\\s{0,5}\\(.{0,30}\\$\\w{1,20}((\\[[\"']|\\[)\\${0,1}[\\w\\[\\]\"']{0,30}){0,1}\\s{0,5},{0,1}\\s{0,5}(EXTR_OVERWRITE){0,1}\\s{0,5}\\)",
"abais": 0,
"bbais": 0,
"enable": 1
},
"parse_str": {
"keyword": ["parse_str"],
"discription": "parse_str对字符串进行一次url解码,同名变量覆盖前面的",
"pattern": "\\b(mb_){0,1}parse_str\\s{0,10}\\(.{0,40}\\$\\w{1,20}((\\[[\"']|\\[)\\${0,1}[\\w\\[\\]\"']{0,30}){0,1}",
"abais": 0,
"bbais": -1,
"enable": 1
},
"parse_url": {
"keyword": ["parse_url"],
"discription": "<ul><li>可能返回null</li><li>与浏览器不一致http://a.com\\@5alt.me</li><li>与curl不一致http://x:[email protected]:[email protected]</li></ul>",
"pattern": "\\b(parse_url)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"weak_equal": {
"keyword": ["=="],
"discription": "弱类型比较",
"pattern": "[^=!]==[^=]",
"abais": 1,
"bbais": -1,
"enable": 1
},
"class_dynamic_call": {
"keyword": ["->$"],
"discription": "动态调用",
"pattern": "->\\$",
"abais": 0,
"bbais": 0,
"enable": 1
},
"preg_match": {
"keyword": ["preg_match", "preg_match_all"],
"discription": "是否有起始和结束标记,在m的情况下.不匹配换行%0a绕过,$匹配行尾或者换行符",
"pattern": "\\b(preg_match|preg_match_all)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"preg_replace": {
"keyword": ["preg_replace"],
"discription": "preg_replace中的replacement部分可以有特殊含义的标记 \\0或者$0",
"pattern": "\\b(preg_replace)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"in_array": {
"keyword": ["in_array"],
"discription": "是否非严格模式比较",
"pattern": "\\b(in_array)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"array_search": {
"keyword": ["array_search"],
"discription": "是否非严格模式比较",
"pattern": "\\b(array_search)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"unserialize": {
"keyword": ["unserialize"],
"discription": "是否完全可控,用UAF打",
"pattern": "\\b(unserialize)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"file_operation":{
"keyword": ["unlink", "copy", "fwrite", "file_put_contents", "bzopen"],
"discription": "跨目录,是否存在条件竞争,windows下通配符、NTFS流",
"pattern": "\\b(unlink|copy|fwrite|file_put_contents|bzopen)\\s{0,10}\\(.{0,40}\\$\\w{1,20}((\\[[\"']|\\[)\\${0,1}[\\w\\[\\]\"']{0,30}){0,1}",
"abais": 0,
"bbais": 0,
"enable": 1
},
"str_replace": {
"keyword": ["str_replace"],
"discription": "多次出现绕过",
"pattern": "\\b(str_replace)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"urldecode": {
"keyword": ["urldecode"],
"discription": "二次url编码",
"pattern": "\\b(urldecode)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"callback": {
"keyword": ["uasort", "uksort", "usort", "array_diff_uassoc", "array_diff_ukey", "array_filter", "array_intersect_uassoc", "array_intersect_ukey", "array_map", "array_reduce", "array_udiff_assoc", "array_udiff_uassoc", "array_udiff_uassoc", "array_udiff", "array_uintersect_assoc", "array_uintersect_uassoc", "array_uintersect_uassoc", "array_uintersect", "array_walk_recursive", "array_walk", "call_user_func_array", "call_user_func", "preg_replace_callback"],
"discription": "回调函数",
"pattern": "\\b(uasort|uksort|usort|array_diff_uassoc|array_diff_ukey|array_filter|array_intersect_uassoc|array_intersect_ukey|array_map|array_reduce|array_udiff_assoc|array_udiff_uassoc|array_udiff_uassoc|array_udiff|array_uintersect_assoc|array_uintersect_uassoc|array_uintersect_uassoc|array_uintersect|array_walk_recursive|array_walk|call_user_func_array|call_user_func|preg_replace_callback)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"function_dynamic_call": {
"keyword": [],
"discription": "$a()动态函数调用",
"pattern": "\\$\\w{1,20}((\\[[\"']|\\[)\\${0,1}[\\w\\[\\]\"']{0,30}){0,1}\\s{0,5}\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"double$": {
"keyword": [],
"discription": "$$可能变量覆盖",
"pattern": "\\${{0,1}\\$\\w{1,20}((\\[[\"']|\\[)\\${0,1}[\\w\\[\\]\"']{0,30}){0,1}\\s{0,4}=\\s{0,4}.{0,20}\\$\\w{1,20}((\\[[\"']|\\[)\\${0,1}[\\w\\[\\]\"']{0,30}){0,1}",
"abais": 0,
"bbais": 0,
"enable": 1
},
"system":{
"keyword": ["system", "passthru", "pcntl_exec", "shell_exec", "escapeshellcmd", "exec"],
"discription": "命令执行",
"pattern": "\\b(system|passthru|pcntl_exec|shell_exec|escapeshellcmd|exec)\\s{0,10}\\(.{0,40}\\$\\w{1,20}((\\[[\"']|\\[)\\${0,1}[\\w\\[\\]\"']{0,30}){0,1}",
"abais": 0,
"bbais": 0,
"enable": 1
},
"rand":{
"keyword": ["rand", "mt_rand"],
"discription": "随机数预测",
"pattern": "\\b(rand|mt_rand|srand|mt_srand)\\(",
"abais": 0,
"bbais": 0,
"enable": 1
},
"iconv":{
"keyword": ["iconv"],
"discription": "字符串编码转换,字符串截断问题,宽字节问题,Unicode替换问题",
"pattern": "\\b(iconv)\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"json_decode":{
"keyword": ["json_decode"],
"discription": "json解码,可能存在弱类型比较问题",
"pattern": "\\b(json_decode)\\(",
"abais": 0,
"bbais": 0,
"enable": 1
},
"sprintf":{
"keyword": ["sprintf", "vsprintf"],
"discription": "php的格式化字符串问题,格式化字符串是否可控",
"pattern": "\\b(sprintf|vsprintf)\\s{0,10}\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"env_xss":{
"keyword": ["PATH_INFO", "PHP_SELF"],
"discription": "这两个环境变量没有经过url编码,可能引发xss",
"pattern": "\\b(PATH_INFO|PHP_SELF)\\(",
"abais": 0,
"bbais": 0,
"enable": 1
},
"escapeshellarg":{
"keyword": ["escapeshellarg"],
"discription": "将给字符串增加一个单引号并且能引用或者转码任何已经存在的单引号,不能用escapeshellcmd再次处理",
"pattern": "\\b(escapeshellarg)\\(",
"abais": 0,
"bbais": 0,
"enable": 1
},
"escapeshellcmd":{
"keyword": ["escapeshellcmd"],
"discription": "会对&#;|*?~<>^()[]{}$\\, \\x0A 和 \\xFF进行转义,'和 \"仅在不配对儿的时候被转义,不能用escapeshellarg再次处理",
"pattern": "\\b(escapeshellcmd)\\(",
"abais": 0,
"bbais": 0,
"enable": 1
},
"basename":{
"keyword": ["basename"],
"discription": "在win平台下,`\\/`都可以作为basename的分隔符,但是在Linux平台下只有`/`可以作为分隔。windows下之前如果用了addslashes会导致文件名中单引号逃逸。",
"pattern": "\\b(basename)\\(",
"abais": 0,
"bbais": 0,
"enable": 1
},
"getimagesize":{
"keyword": ["getimagesize"],
"discription": "windows平台如果传入路径可控,可用于猜测文件夹路径(dedecms找后台)",
"pattern": "\\b(getimagesize)\\(",
"abais": 0,
"bbais": 0,
"enable": 1
},
"$_SERVER":{
"keyword": ["$_SERVER"],
"discription": "$_SERVER 大多没过滤,伪造host等,自行解析REQUEST_URI和$_GET结果不一致,PHP_SELF部分可控",
"pattern": "\\b(\\$_SERVER\\[)\\(",
"abais": 0,
"bbais": 0,
"enable": 1
}
},
"js":{
"window.addEventListener":{
"keyword": ["addEventListener"],
"discription": "监听message事件",
"pattern": "\\b(addEventListener)\\s{0,10}\\(['\"]\\b(message)['\"]",
"abais": 0,
"bbais": 0,
"enable": 1
},
"chrome.runtime.onMessage":{
"keyword": ["onMessage"],
"discription": "插件onMessage",
"pattern": "\\b(chrome\\.runtime\\.onMessage)",
"abais": 0,
"bbais": 0,
"enable": 1
},
"chrome.runtime.onMessageExternal":{
"keyword": ["onMessageExternal"],
"discription": "插件接收外部消息onMessageExternal",
"pattern": "\\b(chrome\\.runtime\\.onMessageExternal)",
"abais": 0,
"bbais": 0,
"enable": 1
},
"chrome.runtime.onConnectExternal":{
"keyword": ["onConnectExternal"],
"discription": "插件接收外部连接onConnectExternal",
"pattern": "\\b(chrome\\.runtime\\.onConnectExternal)",
"abais": 0,
"bbais": 0,
"enable": 1
},
"location":{
"keyword": ["location"],
"discription": "location操作",
"pattern": "\\b(location)[\\.\\s=]",
"abais": 0,
"bbais": -1,
"enable": 1
},
"innerHTML":{
"keyword": ["innerHTML"],
"discription": "innerHTML操作",
"pattern": "\\.innerHTML",
"abais": 0,
"bbais": 0,
"enable": 1
},
"html":{
"keyword": ["html"],
"discription": "jQuery .html() 操作",
"pattern": "\\.html\\s{0,10}\\(\\s{0,10}[^)]",
"abais": 1,
"bbais": -2,
"enable": 1
},
"document.write":{
"keyword": ["write"],
"discription": "document.write",
"pattern": "\\b(document\\.write)\\s{0,10}\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"eval":{
"keyword": ["eval"],
"discription": "eval",
"pattern": "\\b(eval)\\s{0,10}\\(",
"abais": 0,
"bbais": -1,
"enable": 1
},
"setTimeout":{
"keyword": ["setTimeout"],
"discription": "setTimeout第一个参数是字符串",
"pattern": "\\b(setTimeout)\\s{0,10}\\(\\s{0,10}['\"]",
"abais": 0,
"bbais": -1,
"enable": 1
},
"setInterval":{
"keyword": ["setInterval"],
"discription": "setInterval第一个参数是字符串",
"pattern": "\\b(setInterval)\\s{0,10}\\(\\s{0,10}['\"]",
"abais": 0,
"bbais": -1,
"enable": 1
},
}
}