-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathtypes.go
More file actions
69 lines (56 loc) · 2.2 KB
/
types.go
File metadata and controls
69 lines (56 loc) · 2.2 KB
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
package mitre
// Various values for different mitre fields.
const (
mitreAttackDataSrc string = "mitre-attack"
metadata mitreObjectType = "x-mitre-collection"
attackPattern mitreObjectType = "attack-pattern"
tactic mitreObjectType = "x-mitre-tactic"
Enterprise Domain = "enterprise-attack"
Mobile Domain = "mobile-attack"
Android Platform = "Android"
AzureAD Platform = "Azure AD"
Container Platform = "Containers"
GoogleWorkspace Platform = "Google Workspace"
Iaas Platform = "IaaS"
Linux Platform = "Linux"
MacOS Platform = "macOS"
Network Platform = "Network"
Office365 Platform = "Office 365"
PRE Platform = "PRE"
Saas Platform = "SaaS"
Windows Platform = "Windows"
)
type mitreObjectType string
// Domain is a wrapper around `x_mitre_domains` field values in MITRE ATT&CK JSON. It represents the top level MITRE ATT&CK matrix.
type Domain string
func (d Domain) String() string {
return string(d)
}
// Platform is a wrapper around `x_mitre_platforms` field values in MITRE ATT&CK JSON. represents the MITRE ATT&CK platform(/matrix).
type Platform string
func (p Platform) String() string {
return string(p)
}
type mitreBundle struct {
Objects []mitreObject `json:"objects"`
}
type mitreObject struct {
Name string `json:"name"`
Description string `json:"description"`
Type mitreObjectType `json:"type"`
ExternalReferences []externalReference `json:"external_references"`
XMitreShortname string `json:"x_mitre_shortname"`
XMitreIsSubtechnique bool `json:"x_mitre_is_subtechnique"`
XMitreDomains []Domain `json:"x_mitre_domains"`
XMitrePlatforms []Platform `json:"x_mitre_platforms"`
KillChainPhases []killChainPhase `json:"kill_chain_phases"`
Version string `json:"x_mitre_version"`
}
type externalReference struct {
ExternalID string `json:"external_id"`
SourceName string `json:"source_name"`
}
type killChainPhase struct {
KillChainName string `json:"kill_chain_name"`
PhaseName string `json:"phase_name"`
}