-
Notifications
You must be signed in to change notification settings - Fork 12
/
types.go
131 lines (122 loc) · 4.54 KB
/
types.go
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
package attack
import "time"
type root struct {
Type string `json:"type"`
Objects []ctiObject `json:"objects"`
ID string `json:"id"`
SpecVersion string `json:"spec_version"`
}
type ctiObject struct {
Created time.Time `json:"created"`
Modified time.Time `json:"modified,omitempty"`
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CreatedByRef string `json:"created_by_ref,omitempty"`
ObjectMarkingRefs []string `json:"object_marking_refs,omitempty"`
KillChainPhases []struct {
KillChainName string `json:"kill_chain_name"`
PhaseName string `json:"phase_name"`
} `json:"kill_chain_phases,omitempty"`
ExternalReferences []reference `json:"external_references,omitempty"`
Revoked bool `json:"revoked,omitempty"`
TargetRef string `json:"target_ref,omitempty"`
SourceRef string `json:"source_ref,omitempty"`
TacticRefs []string `json:"tactic_refs,omitempty"`
RelationshipType string `json:"relationship_type,omitempty"`
IdentityClass string `json:"identity_class,omitempty"`
Aliases []string `json:"aliases,omitempty"`
Labels []string `json:"labels,omitempty"`
Definition struct {
Statement string `json:"statement"`
} `json:"definition,omitempty"`
DefinitionType string `json:"definition_type,omitempty"`
XMitreShortname string `json:"x_mitre_shortname,omitempty"`
XMitreDetection string `json:"x_mitre_detection,omitempty"`
XMitreDataSources []string `json:"x_mitre_data_sources,omitempty"`
XMitreVersion string `json:"x_mitre_version,omitempty"`
XMitrePermissionsRequired []string `json:"x_mitre_permissions_required,omitempty"`
XMitrePlatforms []string `json:"x_mitre_platforms,omitempty"`
XMitreIsSubtechnique bool `json:"x_mitre_is_subtechnique,omitempty"`
// XMitreContributors []string `json:"x_mitre_contributors,omitempty"`
XMitreSystemRequirements []string `json:"x_mitre_system_requirements,omitempty"`
XMitreDefenseBypassed []string `json:"x_mitre_defense_bypassed,omitempty"`
XMitreEffectivePermissions []string `json:"x_mitre_effective_permissions,omitempty"`
XMitreImpactType []string `json:"x_mitre_impact_type,omitempty"`
XMitreNetworkRequirements bool `json:"x_mitre_network_requirements,omitempty"`
XMitreRemoteSupport bool `json:"x_mitre_remote_support,omitempty"`
XMitreDeprecated bool `json:"x_mitre_deprecated,omitempty"`
// XMitreOldAttackID string `json:"x_mitre_old_attack_id,omitempty"`
XMitreAliases []string `json:"x_mitre_aliases,omitempty"`
// XMitreCollectionLayers []string `json:"x_mitre_collection_layers,omitempty"`
XMitreDataSourceRef string `json:"x_mitre_data_source_ref,omitempty"`
}
type attackPattern struct {
id string
name string
description string
dataSources string
permissionRequired []string
effectivePermissions []string
platforms []string
impactType []string
networkRequirements bool
remoteSupport bool
defenseByPassed []string
killChainPhases []string
detection string
references []reference
capecIDs []string
created time.Time
modified time.Time
deprecated bool
}
type attacker struct {
objType string
id string
name string
description string
platforms []string
aliases []string
references []reference
created time.Time
modified time.Time
deprecated bool
}
type reference struct {
SourceName string `json:"source_name"`
ExternalID string `json:"external_id,omitempty"`
URL string `json:"url"`
Description string `json:"description,omitempty"`
}
type otherInfo struct {
objType string
name string
description string
deprecated bool
}
type relationship struct {
id string
description string
relationshipType string
sourceRef string
targetRef string
references []reference
}
type dataComponent struct {
name string
description string
dataSourceRef string
}
type techniqueUsed struct {
id string
name string
use string
references []reference
}
type groupUsed struct {
name string
description string
references []reference
}