Skip to content

Commit 2f45b9d

Browse files
committed
[client] feat(SCV): review keywords and categorization process (#4266)
1 parent 9bdba0d commit 2f45b9d

File tree

2 files changed

+13
-220
lines changed

2 files changed

+13
-220
lines changed

pyoaev/security_domain/builder.py

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,21 @@ def _find_in_keywords(self, keywords, search):
77
return any(keyword.lower() in search.lower() for keyword in keywords.value)
88

99
# Define the domain by item
10-
def get_associated_security_domains(self, name, description):
10+
def get_associated_security_domains(self, name):
1111
domains = []
1212
domains.append(SecurityDomains.ENDPOINT.value)
1313

14-
if self._find_in_keywords(
15-
SecurityDomainsKeyWords.NETWORK, name
16-
) or self._find_in_keywords(SecurityDomainsKeyWords.NETWORK, description):
14+
if self._find_in_keywords(SecurityDomainsKeyWords.NETWORK, name):
1715
domains.append(SecurityDomains.NETWORK.value)
18-
if self._find_in_keywords(
19-
SecurityDomainsKeyWords.WEB_APP, name
20-
) or self._find_in_keywords(SecurityDomainsKeyWords.WEB_APP, description):
16+
if self._find_in_keywords(SecurityDomainsKeyWords.WEB_APP, name):
2117
domains.append(SecurityDomains.WEB_APP.value)
22-
if self._find_in_keywords(
23-
SecurityDomainsKeyWords.EMAIL_INFILTRATION, name
24-
) or self._find_in_keywords(
25-
SecurityDomainsKeyWords.EMAIL_INFILTRATION, description
26-
):
18+
if self._find_in_keywords(SecurityDomainsKeyWords.EMAIL_INFILTRATION, name):
2719
domains.append(SecurityDomains.EMAIL_INFILTRATION.value)
28-
if self._find_in_keywords(
29-
SecurityDomainsKeyWords.DATA_EXFILTRATION, name
30-
) or self._find_in_keywords(
31-
SecurityDomainsKeyWords.DATA_EXFILTRATION, description
32-
):
20+
if self._find_in_keywords(SecurityDomainsKeyWords.DATA_EXFILTRATION, name):
3321
domains.append(SecurityDomains.DATA_EXFILTRATION.value)
34-
if self._find_in_keywords(
35-
SecurityDomainsKeyWords.URL_FILTERING, name
36-
) or self._find_in_keywords(SecurityDomainsKeyWords.URL_FILTERING, description):
22+
if self._find_in_keywords(SecurityDomainsKeyWords.URL_FILTERING, name):
3723
domains.append(SecurityDomains.URL_FILTERING.value)
38-
if self._find_in_keywords(
39-
SecurityDomainsKeyWords.CLOUD, name
40-
) or self._find_in_keywords(SecurityDomainsKeyWords.CLOUD, description):
24+
if self._find_in_keywords(SecurityDomainsKeyWords.CLOUD, name):
4125
domains.append(SecurityDomains.CLOUD.value)
4226

4327
return domains

pyoaev/security_domain/types.py

Lines changed: 6 additions & 197 deletions
Original file line numberDiff line numberDiff line change
@@ -2,203 +2,12 @@
22

33

44
class SecurityDomainsKeyWords(Enum):
5-
NETWORK = [
6-
"lateral movement",
7-
"packet sniff",
8-
"port scan",
9-
"man-in-the-middle",
10-
"arp spoof",
11-
"smb",
12-
"rdp",
13-
"dns tunnel",
14-
"network share",
15-
"c2",
16-
"beacon",
17-
"firewall",
18-
"domain controller",
19-
"kerberos",
20-
"golden ticket",
21-
"silver ticket",
22-
"domain trust",
23-
"active directory",
24-
"ldap",
25-
"network boundary",
26-
"bgp hijack",
27-
"bgp hijack",
28-
"dns hijack",
29-
"dhcp poison",
30-
"forced authentication",
31-
"remote service",
32-
"network device",
33-
"vlan hopping",
34-
"protocol tunnel",
35-
"traffic signaling",
36-
"weaken encryption",
37-
"exploitation remote",
38-
]
39-
WEB_APP = [
40-
"sql injection",
41-
"cross-site script",
42-
"web shell",
43-
"csrf",
44-
"file upload vulnerability",
45-
"apache",
46-
"nginx",
47-
"iis",
48-
"php",
49-
"javascript",
50-
"rest api",
51-
"cookie",
52-
"server-side request forgery",
53-
"ssrf",
54-
"xml external entity",
55-
"xxe",
56-
"deserialization",
57-
"path traversal",
58-
"local file inclusion",
59-
"remote file inclusion",
60-
"template injection",
61-
"ssti",
62-
"api abuse",
63-
"drive-by compromise",
64-
"browser exploit",
65-
"forge web credential",
66-
"web service",
67-
"defacement",
68-
"server software component",
69-
"reverse proxy",
70-
"webdav",
71-
"session hijack",
72-
]
73-
EMAIL_INFILTRATION = [
74-
"spearphishing attachment",
75-
"spearphishing link",
76-
"phishing",
77-
"malicious attachment",
78-
"email account",
79-
"outlook",
80-
"exchange",
81-
"smtp",
82-
"mail server",
83-
"social engineering",
84-
"inbox rule",
85-
"dkim",
86-
"business email compromise",
87-
"bec",
88-
"email forwarding rule",
89-
"email delegation",
90-
"oauth consent",
91-
"reply-to manipulation",
92-
"email thread hijack",
93-
"internal spearphishing",
94-
"email collection",
95-
"zimbra",
96-
"mapi",
97-
"email template",
98-
"spoof sender",
99-
"dmarc",
100-
"spf",
101-
"email gateway",
102-
"link shortener",
103-
]
104-
DATA_EXFILTRATION = [
105-
"exfiltrat",
106-
"data staging",
107-
"data compressed",
108-
"steganography",
109-
"covert channel",
110-
"database dump",
111-
"automated collection",
112-
"intellectual property",
113-
"cloud storage exfil",
114-
"ftp exfil",
115-
"physical medium",
116-
"air gap",
117-
"scheduled transfer",
118-
"alternate protocol",
119-
"icmp tunnel",
120-
"dns exfiltration",
121-
"automated exfiltration",
122-
"web service exfil",
123-
"pastebin",
124-
"code repository",
125-
"cloud account transfer",
126-
"email exfil",
127-
"data destruction",
128-
"data encrypted",
129-
"image steganography",
130-
]
131-
URL_FILTERING = [
132-
"domain fronting",
133-
"url shorten",
134-
"typosquatting",
135-
"typosquatting",
136-
"homograph",
137-
"punycode",
138-
"url reputation",
139-
"content filter",
140-
"web gateway",
141-
"safe browsing",
142-
"url categorization",
143-
"blacklist bypass",
144-
"whitelist",
145-
"redirect",
146-
"proxy bypass",
147-
"dns over https",
148-
"dns over tls",
149-
"unicode domain",
150-
"url encode",
151-
"double encode",
152-
"open redirect",
153-
"captive portal",
154-
"proxy pac",
155-
"socks proxy",
156-
"vpn bypass",
157-
"domain generation",
158-
"fast flux",
159-
"url confusion",
160-
"subdomain takeover",
161-
"Bitsadmin Download (PowerShell)",
162-
]
163-
CLOUD = [
164-
"aws",
165-
"azure",
166-
"gcp",
167-
"lambda",
168-
"s3 bucket",
169-
"blob storage",
170-
"kubernetes",
171-
"docker",
172-
"serverless",
173-
"cloud instance",
174-
"iam role",
175-
"iam role",
176-
"saas",
177-
"tenant",
178-
"subscription",
179-
"api gateway",
180-
"microservice",
181-
"cloud trail",
182-
"cloudtrail",
183-
"cloud formation",
184-
"terraform",
185-
"cloud init",
186-
"metadata service",
187-
"instance metadata",
188-
"cloud api",
189-
"resource policy",
190-
"cloud dashboard",
191-
"unused region",
192-
"snapshot",
193-
"cloud backup",
194-
"object storage",
195-
"cloud function",
196-
"service principal",
197-
"managed identity",
198-
"cloud key",
199-
"sas token",
200-
"assume role",
201-
]
5+
NETWORK = ["network", "ftp", "smb", "llmnr"]
6+
WEB_APP = ["web"]
7+
EMAIL_INFILTRATION = ["email", "phishing"]
8+
DATA_EXFILTRATION = ["exfiltrat"]
9+
URL_FILTERING = ["bitsadmin"]
10+
CLOUD = ["aws", "azure", "gcp"]
20211

20312

20413
class SecurityDomains(Enum):

0 commit comments

Comments
 (0)