forked from freetaxii/libstix2
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tableProperties.go
219 lines (201 loc) · 4.45 KB
/
tableProperties.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
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
// Copyright 2015-2019 Bret Jordan, All rights reserved.
//
// Use of this source code is governed by an Apache 2.0 license that can be
// found in the LICENSE file in the root of the source tree.
package sqlite3
/*
attackPatternProperties - This method will return the properties for the
attack pattern SDO
*/
func attackPatternProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT
`
// kill_chain_phases
}
/*
campaignProperties - This method will return the properties for campaign SDOs
*/
func campaignProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT,
"first_seen" TEXT,
"last_seen" TEXT,
"objective" TEXT
`
// aliases
}
/*
courseOfActionProperties - This method will return the properties for course of action SDOs
*/
func courseOfActionProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT
`
}
/*
identityProperties - This method will return the properties for identity SDOs
*/
func identityProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT,
"identity_class" TEXT NOT NULL,
"contact_information" TEXT
`
// sectors
}
/*
identitySectorsProperties - This method will return the properties for identity sectors
Used by: identity
*/
func identitySectorsProperties() string {
return baseDBProperties() + `
"sectors" TEXT NOT NULL
`
}
/*
intrusionSetProperties - This method will return the properties for intrusion set SDOs
*/
func intrusionSetProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT,
"first_seen" TEXT,
"last_seen" TEXT,
"resource_level" TEXT,
"primary_motivation" TEXT
`
// aliases
// goals
// secondary_motivations
}
/*
locationProperties - This method will return the properties for location SDOs
*/
func locationProperties() string {
return baseDBProperties() + `
"description" TEXT,
"latitude" TEXT,
"longitude" TEXT,
"precision" TEXT,
"region" TEXT,
"country" TEXT,
"administrative_area" TEXT,
"city" TEXT,
"street_address" TEXT,
"postal_code" TEXT
`
}
/*
malwareProperties - This method will return the properties for malware SDOs
*/
func malwareProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT
`
// kill_chain_phases
}
/*
noteProperties - This method will return the properties for note SDOs
*/
func noteProperties() string {
return baseDBProperties() + `
"summary" TEXT,
"description" TEXT NOT NULL
`
// authors
// object_refs
}
/*
observedDataProperties - This method will return the properties for observed data SDOs
*/
func observedDataProperties() string {
return baseDBProperties() + `
"first_observed" TEXT NOT NULL,
"last_observed" TEXT NOT NULL,
"number_observed" INTEGER NOT NULL,
"objects" TEXT NOT NULL
`
}
/*
opinionProperties - This method will return the properties for opinion SDOs
*/
func opinionProperties() string {
return baseDBProperties() + `
"description" TEXT,
"opinion" TEXT
`
// authors
// object_refs
}
/*
reportProperties - This method will return the properties for report SDOs
*/
func reportProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT,
"published" TEXT NOT NULL
`
// object_refs
}
/*
threatActorProperties - This method will return the properties for threat actor SDOs
*/
func threatActorProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT,
"sophistication" TEXT,
"resource_level" TEXT,
"primary_motivation" TEXT
`
// aliases
// roles
// goals
// secondary_motivations
// personal_motivations
}
/*
threatActorRolesProperties - This method will return the properties for threat actor roles
Used by: threat actor
*/
func threatActorRolesProperties() string {
return baseDBProperties() + `
"roles" TEXT NOT NULL
`
}
/*
toolProperties - This method will return the properties for tool SDOs
*/
func toolProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT,
"tool_version" TEXT
`
// kill_chain_phases
}
/*
vocabProperties - This method will return the properties for attack patterns
*/
func vocabProperties() string {
return `
"row_id" INTEGER PRIMARY KEY,
"value" text NOT NULL
`
}
/*
vulnerabilityProperties - This method will return the properties for vulnerability SDOs
*/
func vulnerabilityProperties() string {
return baseDBProperties() + `
"name" TEXT NOT NULL,
"description" TEXT
`
}