summaryrefslogtreecommitdiff
path: root/resource/verify-policy.json
blob: cc03616df5816c383ae2237b56493e73b9573879 (plain)
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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
{
    "compile_table": "PXY_CTRL_COMPILE",
    "group2compile_table": "GROUP_PXY_CTRL_COMPILE_RELATION",
    "group2group_table": "GROUP_GROUP_RELATION",
    "rules": [
       {
            "compile_id": 1021,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
	        "do_log": 1,
            "effective_range": 0,
	        "tags":"{\"tag_sets\":[[{\"tag\":\"device_id\",\"value\":[\"device_3\",\"device_4\"]}]]}",
            "user_region": "{\"protocol\":\"http\",\"method\":\"redirect\",\"code\":302,\"to\":\"https://www.jd.com\"}",
	        "is_valid": "yes",
            "groups": [
                {
	                "virtual_table":"ATTR_HTTP_URL",
                    "group_name":"http_url",
                    "group_id":101,
                    "not_flag":0,
                    "regions": [
                        {
                            "table_name": "TSG_OBJ_URL",
                            "table_type": "expr",
                            "table_content": {
                                "keywords": "baidu.com",
                                "expr_type": "regex",
                                "match_method": "sub",
                                "format": "uncase plain"
                            }
                        }
                    ]
                },
				{
	                "virtual_table":"ATTR_SERVER_FQDN",
                    "group_name":"http_fqdn",
                    "group_id":1011,
                    "not_flag":0,
                    "regions": [
                        {
                            "table_name": "TSG_OBJ_FQDN",
                            "table_type": "expr",
                            "table_content": {
                                "keywords": "baidu.com",
                                "expr_type": "regex",
                                "match_method": "sub",
                                "format": "uncase plain"
                            }
                        }
                    ]
                },
				{
	                "virtual_table":"ATTR_SSL_SAN",
                    "group_name":"ssl_san",
                    "group_id":11011,
                    "not_flag":0,
                    "regions": [
                        {
                            "table_name": "TSG_OBJ_FQDN",
                            "table_type": "expr",
                            "table_content": {
                                "keywords": "baidu.com",
                                "expr_type": "regex",
                                "match_method": "sub",
                                "format": "uncase plain"
                            }
                        }
                    ]
                },
				{
					"virtual_table":"ATTR_APP_ID",
                    "group_name":"app_id",
					"group_id":201,
					"not_flag":0
                }
            ]
        },
		{
            "compile_id": 1022,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
			"do_log": 1,
            "effective_range": 0,
            "tags":"{\"tag_sets\":[[{\"tag\":\"device_id\",\"value\":[\"device_3\",\"device_4\"]}]]}",
            "user_region": "{\"protocol\":\"http\",\"method\":\"redirect\",\"code\":302,\"to\":\"https://www.jd.com\"}",
            "is_valid": "yes",
            "groups": [
                {
					"group_name":"http_fqdn",
					"virtual_table":"ATTR_SERVER_FQDN"
                },
				{
					"group_name":"ssl_san",
					"virtual_table":"ATTR_SSL_SAN"
                },
				{
                    "not_flag": 0,
                    "group_id": 604,
                    "group_name":"IPv4TCPSoureServiceChaining604",
                    "virtual_table": "ATTR_SOURCE_IP",
                    "regions": [
                        {
                            "table_type": "ip",
                            "table_name": "TSG_OBJ_IP_ADDR",
                            "table_content": {
                                "addr_type": "ipv4",
                                "addr_format": "range",
                                "ip1": "192.168.55.4",
                                "ip2": "192.168.55.4"
                            }
                        }
                    ] 
                },
				{
                    "group_id": 9,
                    "group_name": "ip.source.ip12",
                    "virtual_table": "ATTR_SOURCE_IP"
                },
				{
                    "group_id": 10,
                    "group_name": "ip.source.ip13",
                    "virtual_table": "ATTR_DESTINATION_IP"
                },
				{
                    "group_id": 6,
                    "group_name": "host.fqdn6",
                    "virtual_table": "ATTR_SERVER_FQDN"
                },
				{
                    "group_id": 9,
                    "group_name": "ip.source.ip14",
                    "virtual_table": "ATTR_INTERNAL_IP"
                },
				{
                    "group_id": 10,
                    "group_name": "ip.source.ip15",
                    "virtual_table": "ATTR_EXTERNAL_IP"
                }
            ]
        },
		{
            "compile_id": 11022,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
			"do_log": 1,
            "effective_range": 0,
            "tags":"{\"tag_sets\":[[{\"tag\":\"device_id\",\"value\":[\"device_3\",\"device_4\"]}]]}",
            "user_region": "{\"protocol\":\"http\",\"method\":\"redirect\",\"code\":302,\"to\":\"https://www.jd.com\"}",
            "is_valid": "no",
            "groups": [
				{
                    "not_flag": 0,
                    "group_id": 704,
                    "group_name":"IPv4TCPSoureServiceChaining604",
                    "virtual_table": "ATTR_SOURCE_IP",
                    "regions": [
                        {
                            "table_type": "ip",
                            "table_name": "TSG_OBJ_IP_ADDR",
                            "table_content": {
                                "addr_type": "ipv4",
                                "addr_format": "range",
                                "ip1": "192.168.55.7",
                                "ip2": "192.168.55.7"
                            }
                        }
                    ] 
                }
            ]
        },
		{
            "compile_id": 11023,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
			"do_log": 1,
            "effective_range": 0,
            "tags":"{\"tag_sets\":[[{\"tag\":\"device_id\",\"value\":[\"device_3\",\"device_4\"]}]]}",
            "user_region": "{\"protocol\":\"http\",\"method\":\"redirect\",\"code\":302,\"to\":\"https://www.jd.com\"}",
            "is_valid": "yes",
            "groups": [
				{
                    "not_flag": 0,
                    "group_id": 604,
                    "group_name":"IPv4TCPSoureServiceChaining604",
                    "virtual_table": "ATTR_SOURCE_IP",
                    "regions": [
                        {
                            "table_type": "ip",
                            "table_name": "TSG_OBJ_IP_ADDR",
                            "table_content": {
                                "addr_type": "ipv4",
                                "addr_format": "range",
                                "ip1": "192.168.55.4",
                                "ip2": "192.168.55.4"
                            }
                        }
                    ] 
                },
				{
                    "group_id": 9,
                    "group_name": "ip.source.ip12",
                    "virtual_table": "ATTR_SOURCE_IP"
                },
				{
                    "group_id": 10,
                    "group_name": "ip.source.ip13",
                    "virtual_table": "ATTR_DESTINATION_IP"
                },
				{
                    "group_id": 9,
                    "group_name": "ip.source.ip14",
                    "virtual_table": "ATTR_INTERNAL_IP"
                }
            ]
        },
		{
            "compile_id": 1023,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
			"do_log": 1,
            "effective_range": 0,
            "user_region": "{\"protocol\":\"http\",\"method\":\"replace\",\"rules\":[{\"search_in\":\"http_resp_body\",\"find\":\"邮箱\",\"replace_with\":\"test\"}]}",
			"is_valid": "yes",
            "groups": [
                {
					"virtual_table":"ATTR_HTTP_HOST_VIRTUAL",
					"group_name":"http_fqdn",
					"group_id":102,
					"not_flag":0,
                    "regions": [
                        {
                            "table_name": "TSG_OBJ_FQDN",
                            "table_type": "expr",
                            "table_content": {
                                "keywords": "www.126.com",
                                "expr_type": "regex",
                                "match_method": "sub",
                                "format": "uncase plain"
                            }
                        }
                    ]
                }
            ]
        },
		{
            "compile_id": 1024,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
			"do_log": 1,
            "effective_range": 0,
            "user_region":"{\"protocol\":\"http\",\"method\":\"replace\",\"rules\":[{\"search_in\":\"http_resp_body\",\"find\":\"账号登录\",\"replace_with\":\"Login\"}]}",
            "is_valid": "yes",
            "groups": [
                {
					"group_name":"http_fqdn",
					"virtual_table":"ATTR_HTTP_HOST",
					"not_flag":0 
                }
            ]
        },
		{
            "compile_id": 1025,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
			"do_log": 1,
            "effective_range": 0,
            "user_region": "{\"protocol\":\"http\",\"method\":\"replace\",\"rules\":[{\"search_in\":\"http_resp_body\",\"find\":\"会员\",\"replace_with\":\"用户\"}]}",
            "is_valid": "yes",
            "groups": [
                {
					"group_name":"http_fqdn",
					"virtual_table":"ATTR_DOH_QNAME",
					"not_flag":0 
                }
            ]
        },
		{
            "compile_id": 1026,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
			"do_log": 1,
            "effective_range": 0,
            "user_region": "{\"protocol\":\"http\",\"method\":\"block\",\"code\":403,\"message\":\"error\"}",
			"is_valid": "yes",
            "groups": [
                {
				    "virtual_table":"ATTR_HTTP_REQ_HDR",
				    "group_name":"http_signature_ua",
				    "group_id":103,
					"not_flag":0,
                    "regions": [
                        {
                            "table_name": "TSG_OBJ_HTTP_SIGNATURE",
                            "table_type": "expr_plus",
                            "table_content": {
								"district": "User-Agent",
                                "keywords": "Chrome",
                                "expr_type": "none",
                                "match_method": "sub",
                                "format": "uncase plain"
                            }
                        }
                    ]
                },
				{
					
		            "virtual_table":"ATTR_HTTP_REQ_HDR",
					"group_name":"http_signature_cookie",
					"group_id":104,
		            "not_flag":0,
		            "regions": [
						{
							"table_name": "TSG_OBJ_HTTP_SIGNATURE",
							"table_type": "expr_plus",
		                    "table_content": {
								"district": "Cookie",
                                "keywords": "uid=12345678",
                                "expr_type": "none",
                                "match_method": "sub",
                                "format": "uncase plain"
                            }
		                }	                    
		            ]
		        }      
            ]
        },
		{
            "compile_id": 1027,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
			"do_log": 1,
            "effective_range": 0,
            "user_region": "test",
			"is_valid": "yes",
            "groups": [
                {
					"virtual_table":"ATTR_HTTP_URL",
					"group_name":"http_url_bing",
					"group_id": 105,
					"not_flag":0,
                    "regions": [
                        {
                            "table_name": "TSG_OBJ_URL",
                            "table_type": "expr",
                            "table_content": {
                                "keywords": "bing.com",
                                "expr_type": "regex",
                                "match_method": "sub",
                                "format": "uncase plain"
                            }
                        }
                    ]
                }	
            ]
        },
		{
            "compile_id": 1028,
            "service": 1,
            "action": 48,
            "do_blacklist": 1,
			"do_log": 1,
            "effective_range": 0,
            "user_region": "{\"protocol\":\"http\",\"method\":\"block\",\"code\":403,\"message\":\"error\"}",
            "is_valid": "yes",
            "groups": [
				{
					"group_name":"http_url_bing",
					"virtual_table":"ATTR_HTTP_URL"
                }
            ]
        }
   ],
    "plugin_table": [
        {
            "table_name": "TSG_PROFILE_TRAFFIC_MIRROR",
            "table_content": [
                "1234\ttest-traffic-mirror\t[1,2,3,4,5,6,7,8,9]\t1"
            ]
        },
        {
            "table_name": "TSG_PROFILE_RESPONSE_PAGES",
            "table_content": [
                "101\t404\thtml\t./resource/pangu/policy_file/404.html\t1"
            ]
        },
        {
            "table_name": "PXY_PROFILE_HIJACK_FILES",
            "table_content": [
                "201\tchakanqi\tchakanqi-947KB.exe\tapplication/x-msdos-program\t./resource/pangu/policy_file/chakanqi-947KB.exe\t1"
            ]
        },
				{
            "table_name": "PXY_PROFILE_INSERT_SCRIPTS",
            "table_content": [
                "301\ttime\tjs\t./resource/pangu/policy_file/time.js\tbefore_page_load\t1"
            ]
        },
		{		
            "table_name": "PXY_PROFILE_DECRYPTION",
            "table_content": [
                "0\ttest\t{\"dynamic_bypass\":{\"ev_cert\":0,\"cert_transparency\":0,\"mutual_authentication\":1,\"cert_pinning\":1,\"protocol_errors\":1,\"trusted_root_cert_is_not_installed_on_client\":1},\"protocol_version\":{\"min\":\"ssl3\",\"max\":\"ssl3\",\"mirror_client\":1,\"allow_http2\":1},\"certificate_checks\":{\"approach\":{\"cn\":1,\"issuer\":1,\"self-signed\":1,\"expiration\":0},\"fail_action\":\"pass-through\"}}\t1",
                "3\ttest\t{\"dynamic_bypass\":{\"ev_cert\":1,\"cert_transparency\":1,\"mutual_authentication\":1,\"cert_pinning\":1,\"protocol_errors\":1,\"trusted_root_cert_is_not_installed_on_client\":0},\"protocol_version\":{\"min\":\"ssl3\",\"max\":\"tls13\",\"mirror_client\":1,\"allow_http2\":1},\"certificate_checks\":{\"approach\":{\"cn\":1,\"issuer\":1,\"self-signed\":1,\"expiration\":1},\"fail_action\":\"fail-close\"}}\t1",
                "4\ttest\t{\"dynamic_bypass\":{\"ev_cert\":0,\"cert_transparency\":0,\"mutual_authentication\":0,\"cert_pinning\":0,\"protocol_errors\":0,\"trusted_root_cert_is_not_installed_on_client\":0},\"protocol_version\":{\"min\":\"ssl3\",\"max\":\"ssl3\",\"mirror_client\":0,\"allow_http2\":0},\"certificate_checks\":{\"approach\":{\"cn\":0,\"issuer\":0,\"self-signed\":0,\"expiration\":0},\"fail_action\":\"pass-through\"}}\t1"
            ]
        },
		{
            "table_name": "PXY_INTERCEPT_COMPILE",
            "table_content": [
                "0\t0\t2\t1\t1\t{}\t{\"vsys_id\":1,\"protocol\":\"SSL\",\"keyring_for_trusted\":765,\"keyring_for_untrusted\":10,\"decryption\":0,\"tcp_option_profile\":1,\"traffic_mirror\":{\"enable\":0}}\t1\t1\t2",
                "255119\t0\t2\t1\t1\t{}\t{\"vsys_id\":1,\"protocol\":\"SSL\",\"keyring_for_trusted\":1,\"keyring_for_untrusted\":10,\"decryption\":0,\"tcp_option_profile\":1,\"traffic_mirror\":{\"enable\":1,\"mirror_profile\":1234}}\t1\t1\t2"
            ]
        },
        {
            "table_name": "SERVICE_CHAINING_COMPILE",
            "table_content": [
                "1\t0\t2\t1\t1\t{}\t{\"targeted_traffic\":\"raw\",\"sff_profiles\":[1]}\t1\t2",
                "2\t0\t2\t1\t1\t{}\t{\"targeted_traffic\":\"decrypted\",\"sff_profiles\":[1]}\t1\t2"
            ]
        },
        {
            "table_name": "PXY_PROFILE_TCP_OPTION",
            "table_content": [
                "1\t0\t0\t{\"tcp_maxseg\":{\"enable\":0,\"maxseg\":1500},\"nodelay\":1,\"keep_alive\":{\"enable\":1,\"tcp_keepcnt\":8,\"tcp_keepidle\":30,\"tcp_keepintvl\":15},\"ttl\":70,\"user_timeout\":600}\t{\"tcp_maxseg\":{\"enable\":0,\"maxseg\":1500},\"nodelay\":1,\"keep_alive\":{\"enable\":1,\"tcp_keepcnt\":8,\"tcp_keepidle\":30,\"tcp_keepintvl\":15},\"ttl\":75,\"user_timeout\":600}\t1"
            ]
        },
        {
            "table_name": "PXY_SSL_FINGERPRINT",
            "table_content": [
                "1\t599f223c2c9ee5702f5762913889dc21\t0\t1",
                "2\teb149984fc9c44d85ed7f12c90d818be\t1\t0",
                "3\te6573e91e6eb777c0933c5b8f97f10cd\t1\t1"
            ]
        },
		{
            "table_name": "APP_ID_DICT",
            "table_content": [
	            "67\thttp\t0\tnull\tnetworking\tinfrastructure\tnetwork-protocol\t3\tused-by-malware,vulnerability,widely-used\tnull\tnull\t{\"method\":\"drop\",\"after_n_packets\":0,\"send_icmp_unreachable\":1,\"send_tcp_reset\":1}\t0\t60\t120\t30\t30\t201\t1",
                "68\thttps\t0\tnull\tnetworking\tinfrastructure\tnetwork-protocol\t3\tused-by-malware,vulnerability,widely-used\tnull\tnull\t{\"method\":\"rate_limit\",\"bps\":1000}\t0\t0\t0\t0\t0\t68000\t1"
            ]
        },
		{
            "table_name": "FQDN_ENTRY",
            "table_content": [
                "1\t2,4,5\twww.126.com\t1\t1",
                "2\t6,7,8\twww.baidu.com\t1\t1"
            ]
        },
		{
            "table_name": "IP_ADDR_ENTRY",
            "table_content": [
                "7\t12,14,15\t4\tsingle\t192.168.55.5\t192.168.55.5\t1",
                "8\t22,24,25\t4\tsingle\t192.168.55.5\t192.168.55.5\t1",
				"9\t9,15\t4\trange\t192.168.55.4\t192.168.55.4\t1",
				"10\t10\t4\trange\t192.168.55.6\t192.168.55.6\t1"
            ]
        },
		{
            "table_name": "LIBRARY_TAG",
            "table_content": [
                "6\tnone\twebsite_category\twebsite_category\tsearch\\bengines\t1",
                "7\tnone\twebsite_category\twebsite_category\tbusiness\t1",
                "8\tnone\twebsite_category\twebsite_category\tsearch\\bengines\t1",
                "12\tnone\tgeoip\ttest1\ttest1\t1",
                "14\tnone\tgeoip\ttest2\ttest2\t1",
                "15\tnone\tgeoip\ttest3\ttest3\t1",
				"9\tnone\tgeoip\ttest4\ttest4\t1",
				"10\tnone\tgeoip\ttest5\ttest5\t1"
			]
		}
    ]
}