forked from ecrookshanks/simple-data-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
email-filter-rules-pipeline.json
121 lines (121 loc) · 5.15 KB
/
email-filter-rules-pipeline.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
{
"processors": [
{
"set": {
"field": "event.action",
"value": "BLOCK",
"if": "ctx?.email?.direction == 'outbound' && ctx.email?.attachments?.file?.size >= 30000",
"ignore_failure": true,
"description": "Large file block to external"
}
},
{
"set": {
"field": "event.reason",
"value": "Outbound Size Restriction",
"if": "ctx.email?.direction == 'outbound' && ctx.email?.attachments?.file?.size >= 30000",
"ignore_failure": true,
"description": "Large file block to external reason"
}
},
{
"set": {
"field": "event.action",
"value": "BLOCK",
"if": "ctx?.email?.direction == 'outbound' && (ctx.email?.attachments?.file?.extension == 'mdb' || ctx.email?.attachments?.file?.extension == 'accdb'|| ctx.email?.attachments?.file?.extension == 'sqlite' || ctx.email?.attachments?.file?.extension == 'db' || ctx.email?.attachments?.file?.extension == 'sql')",
"ignore_failure": true,
"description": "Sensitive data block"
}
},
{
"set": {
"field": "event.reason",
"value": "Potentially Sensitive Data",
"if": "ctx?.email?.direction == 'outbound' && (ctx.email?.attachments?.file?.extension == 'mdb' || ctx.email?.attachments?.file?.extension == 'accdb'|| ctx.email?.attachments?.file?.extension == 'sqlite' || ctx.email?.attachments?.file?.extension == 'db' || ctx.email?.attachments?.file?.extension == 'sql')",
"ignore_failure": true,
"description": "Sensitive data block reason"
}
},
{
"set": {
"field": "event.action",
"value": "BLOCK",
"if": "ctx?.email?.direction == 'inbound' && (ctx.source?.geo?.country_iso_code == 'KP' || ctx.source?.geo?.country_iso_code == 'IR'|| ctx.source?.geo?.country_iso_code == 'CU' || ctx.source?.geo?.country_iso_code == 'IQ' || ctx.source?.geo?.country_iso_code == 'RU' || ctx.source?.geo?.country_iso_code == 'PS')",
"ignore_failure": true,
"description": "Geo block"
}
},
{
"set": {
"field": "event.reason",
"value": "Sanctioned Entity",
"if": "ctx?.email?.direction == 'inbound' && (ctx.source?.geo?.country_iso_code == 'KP' || ctx.source?.geo?.country_iso_code == 'IR'|| ctx.source?.geo?.country_iso_code == 'CU' || ctx.source?.geo?.country_iso_code == 'IQ' || ctx.source?.geo?.country_iso_code == 'RU' || ctx.source?.geo?.country_iso_code == 'PS')",
"ignore_failure": true,
"description": "Geo block reason"
}
},
{
"set": {
"field": "event.action",
"value": "QUARANTINE",
"if": "ctx?.email?.direction == 'inbound' && (ctx.email?.attachments?.file?.extension == 'zip' || ctx.email?.attachments?.file?.extension == 'rar'|| ctx.email?.attachments?.file?.extension == '7z' || ctx.email?.attachments?.file?.extension == 'tar.gz' || ctx.email?.attachments?.file?.extension == 'html')",
"ignore_failure": true,
"description": "Suspicious data quarantine"
}
},
{
"set": {
"field": "event.reason",
"value": "Additional scanning required",
"if": "ctx?.email?.direction == 'inbound' && (ctx.email?.attachments?.file?.extension == 'zip' || ctx.email?.attachments?.file?.extension == 'rar'|| ctx.email?.attachments?.file?.extension == '7z' || ctx.email?.attachments?.file?.extension == 'tar.gz' || ctx.email?.attachments?.file?.extension == 'html')",
"ignore_failure": true,
"description": "Suspicious data quarantine reason"
}
},
{
"set": {
"field": "destination.ip",
"value": "10.49.110.17",
"if": "ctx?.email?.direction == 'inbound' && ctx.email?.attachments?.file?.extension == 'pdf' && ctx.email?.attachments?.file?.size >= 40000",
"ignore_failure": true,
"description": "Specify the culprit's IP"
}
},
{
"set": {
"field": "email.attachments.file.extension",
"value": "exe",
"if": "ctx?.email?.direction == 'inbound' && ctx.email?.attachments?.file?.extension == 'pdf' && ctx.email?.attachments?.file?.size >= 40000",
"ignore_failure": true,
"description": "Specify the malware extension"
}
},
{
"set": {
"field": "email.attachments.file.size",
"value": "781408",
"if": "ctx?.email?.direction == 'inbound' && ctx.destination?.ip == '10.49.110.17'",
"ignore_failure": true,
"description": "Specify the file size"
}
},
{
"set": {
"field": "email.attachments.file.hash.md5",
"value": "9850e40113081ebe639af61c572c89e5",
"if": "ctx?.email?.direction == 'inbound' && ctx.destination?.ip == '10.49.110.17'",
"ignore_failure": true,
"description": "Specify the file md5"
}
},
{
"set": {
"field": "email.attachments.file.hash.sha256",
"value": "8aa4945b71a16b0d6dcbe9c5169f0e21470d010be70368d334f34974bd7761e4",
"if": "ctx?.email?.direction == 'inbound' && ctx.destination?.ip == '10.49.110.17'",
"ignore_failure": true,
"description": "Specify the file sha256"
}
}
]
}