Example #1
0
 def test_ta(self):
     t = ThreatActor()
     t.title = UNICODE_STR
     t.description = UNICODE_STR
     t.short_description = UNICODE_STR
     t2 = round_trip(t)
     self._test_equal(t, t2)
Example #2
0
    def _get_threat_actor_object(value,
                                 description=None,
                                 crowd_strike_motivations=[]):
        # 攻撃者情報作成
        organisation_name = OrganisationName(value)
        party_name = PartyName()
        party_name.add_organisation_name(organisation_name)
        identity_specification = STIXCIQIdentity3_0()
        identity_specification.party_name = party_name
        identity = CIQIdentity3_0Instance()

        # ThreatActor
        ta = ThreatActor()
        ta.identity = identity
        ta.identity.specification = identity_specification
        # Title に抽出した Threat Actor 名前
        ta.title = value
        ta.description = description
        ta.short_description = description
        ta.identity = identity

        # motivations 作成
        for crowd_strike_motivation in crowd_strike_motivations:
            ta_motivation = Statement(crowd_strike_motivation['value'])
            # motivation 追加
            ta.add_motivation(ta_motivation)
        return ta
Example #3
0
 def test_ta(self):
     t = ThreatActor()
     t.title = UNICODE_STR
     t.description = UNICODE_STR
     t.short_description = UNICODE_STR
     t2 = round_trip(t)
     self._test_equal(t, t2)