Add more SDO skeletons

- Campaign
- CourseOfAction
- Identity
- ObservedData
- Report
- ThreatActor
- Vulnerability
stix2.1
clenk 2017-02-23 10:11:56 -05:00
parent 375b915da4
commit 61d3652514
1 changed files with 206 additions and 0 deletions

View File

@ -33,6 +33,91 @@ class AttackPattern(_STIXBase):
super(AttackPattern, self).__init__(**kwargs) super(AttackPattern, self).__init__(**kwargs)
class Campaign(_STIXBase):
_type = 'campaign'
_properties = COMMON_PROPERTIES.copy()
_properties.update({
'name': {
'required': True,
},
'description': {},
'aliases': {},
'first_seen': {},
'last_seen': {},
'objective': {},
})
def __init__(self, **kwargs):
# TODO:
# - created_by_ref
# - external_references
# - object_marking_refs
# - granular_markings
# - description
# - aliases
# - first_seen
# - last_seen
# - objective
super(Campaign, self).__init__(**kwargs)
class CourseOfAction(_STIXBase):
_type = 'course-of-action'
_properties = COMMON_PROPERTIES.copy()
_properties.update({
'name': {
'required': True,
},
'description': {},
})
def __init__(self, **kwargs):
# TODO:
# - created_by_ref
# - external_references
# - object_marking_refs
# - granular_markings
# - description
super(CourseOfAction, self).__init__(**kwargs)
class Identity(_STIXBase):
_type = 'identity'
_properties = COMMON_PROPERTIES.copy()
_properties.update({
'name': {
'required': True,
},
'description': {},
'identity_class': {
'required': True,
},
'sectors': {},
'contact_information': {},
})
def __init__(self, **kwargs):
# TODO:
# - created_by_ref
# - external_references
# - object_marking_refs
# - granular_markings
# - description
# - identity_class
# - sectors
# - contact_information
super(Identity, self).__init__(**kwargs)
class Indicator(_STIXBase): class Indicator(_STIXBase):
_type = 'indicator' _type = 'indicator'
@ -133,6 +218,104 @@ class Malware(_STIXBase):
super(Malware, self).__init__(**kwargs) super(Malware, self).__init__(**kwargs)
class ObservedData(_STIXBase):
_type = 'observed-data'
_properties = COMMON_PROPERTIES.copy()
_properties.update({
'first_observed': {},
'last_observed': {},
'number_observed': {},
'objects': {},
})
def __init__(self, **kwargs):
# TODO:
# - created_by_ref
# - external_references
# - object_marking_refs
# - granular_markings
# - first_observed
# - last_observed
# - number_observed
# - objects
super(ObservedData, self).__init__(**kwargs)
class Report(_STIXBase):
_type = 'report'
_properties = COMMON_PROPERTIES.copy()
_properties.update({
'labels': {
'required': True,
},
'name': {
'required': True,
},
'description': {},
'published': {},
'object_refs': {},
})
def __init__(self, **kwargs):
# TODO:
# - created_by_ref
# - external_references
# - object_marking_refs
# - granular_markings
# - description
# - published
# - object_refs
super(Report, self).__init__(**kwargs)
class ThreatActor(_STIXBase):
_type = 'threat-actor'
_properties = COMMON_PROPERTIES.copy()
_properties.update({
'labels': {
'required': True,
},
'name': {
'required': True,
},
'description': {},
'aliases': {},
'roles': {},
'goals': {},
'sophistication': {},
'resource_level': {},
'primary_motivation': {},
'secondary_motivations': {},
'personal_motivations': {},
})
def __init__(self, **kwargs):
# TODO:
# - created_by_ref
# - external_references
# - object_marking_refs
# - granular_markings
# - description
# - aliases
# - roles
# - goals
# - sophistication
# - resource_level
# - primary_motivation
# - secondary_motivations
# - personal_motivations
super(ThreatActor, self).__init__(**kwargs)
class Tool(_STIXBase): class Tool(_STIXBase):
_type = 'tool' _type = 'tool'
@ -161,3 +344,26 @@ class Tool(_STIXBase):
# - tool_version # - tool_version
super(Tool, self).__init__(**kwargs) super(Tool, self).__init__(**kwargs)
class Vulnerability(_STIXBase):
_type = 'vulnerability'
_properties = COMMON_PROPERTIES.copy()
_properties.update({
'name': {
'required': True,
},
'description': {},
})
def __init__(self, **kwargs):
# TODO:
# - created_by_ref
# - external_references
# - object_marking_refs
# - granular_markings
# - description
super(Vulnerability, self).__init__(**kwargs)