Implementation of the STIX Threat Actor. Args: id_ (optional): An identifier. If ``None``, a value will be generated via ``mixbox.idgen.create_id()``. If set, this will unset the ``idref`` property. idref (optional): An identifier reference. If set this w
| 43 | |
| 44 | |
| 45 | class ThreatActor(stix.BaseCoreComponent): |
| 46 | """Implementation of the STIX Threat Actor. |
| 47 | |
| 48 | Args: |
| 49 | id_ (optional): An identifier. If ``None``, a value will be generated |
| 50 | via ``mixbox.idgen.create_id()``. If set, this will unset the |
| 51 | ``idref`` property. |
| 52 | idref (optional): An identifier reference. If set this will unset the |
| 53 | ``id_`` property. |
| 54 | timestamp (optional): A timestamp value. Can be an instance of |
| 55 | ``datetime.datetime`` or ``str``. |
| 56 | description: A description of the purpose or intent of this object. |
| 57 | short_description: A short description of the intent |
| 58 | or purpose of this object. |
| 59 | title: The title of this object. |
| 60 | |
| 61 | """ |
| 62 | _binding = threat_actor_binding |
| 63 | _binding_class = threat_actor_binding.ThreatActorType |
| 64 | _namespace = 'http://docs.oasis-open.org/cti/ns/stix/threat-actor-1' |
| 65 | _version = "1.2.1" |
| 66 | _ALL_VERSIONS = ("1.0", "1.0.1", "1.1", "1.1.1", "1.2", "1.2.1") |
| 67 | _ID_PREFIX = 'threatactor' |
| 68 | |
| 69 | identity = fields.TypedField("Identity", Identity, factory=IdentityFactory) |
| 70 | types = StatementField("Type", Statement, vocab_type=vocabs.ThreatActorType, multiple=True, key_name="types") |
| 71 | motivations = StatementField("Motivation", Statement, vocab_type=vocabs.Motivation, multiple=True, key_name="motivations") |
| 72 | sophistications = StatementField("Sophistication", Statement, vocab_type=vocabs.ThreatActorSophistication, multiple=True, key_name="sophistications") |
| 73 | intended_effects = StatementField("Intended_Effect", Statement, vocab_type=vocabs.IntendedEffect, multiple=True, key_name="intended_effects") |
| 74 | planning_and_operational_supports = StatementField("Planning_And_Operational_Support", Statement, vocab_type=vocabs.PlanningAndOperationalSupport, multiple=True, key_name="planning_and_operational_supports") |
| 75 | confidence = fields.TypedField("Confidence", Confidence) |
| 76 | observed_ttps = fields.TypedField("Observed_TTPs", ObservedTTPs) |
| 77 | associated_campaigns = fields.TypedField("Associated_Campaigns", AssociatedCampaigns) |
| 78 | associated_actors = fields.TypedField("Associated_Actors", AssociatedActors) |
| 79 | related_packages = fields.TypedField("Related_Packages", RelatedPackageRefs) |
| 80 | information_source = fields.TypedField("Information_Source", InformationSource) |
| 81 | |
| 82 | def __init__(self, id_=None, idref=None, timestamp=None, title=None, |
| 83 | description=None, short_description=None): |
| 84 | |
| 85 | super(ThreatActor, self).__init__( |
| 86 | id_=id_, |
| 87 | idref=idref, |
| 88 | timestamp=timestamp, |
| 89 | title=title, |
| 90 | description=description, |
| 91 | short_description=short_description |
| 92 | ) |
| 93 | |
| 94 | self.observed_ttps = ObservedTTPs() |
| 95 | self.associated_campaigns = AssociatedCampaigns() |
| 96 | self.associated_actors = AssociatedActors() |
| 97 | self.related_packages = RelatedPackageRefs() |
| 98 | |
| 99 | def add_type(self, value): |
| 100 | """Adds a :class:`.VocabString` object to the :attr:`types` collection. |
| 101 | |
| 102 | If set to a string, an attempt will be made to convert it into an |