示例#1
0
 def likely_impact(self, value):
     if not value:
         self._likely_impact = None
     elif isinstance(value, Statement):
         self._likely_impact = value
     else:
         self._likely_impact = Statement(value=value)
示例#2
0
 def cost(self, cost):
     if not cost:
         self._cost = None
     elif isinstance(cost, Statement):
         self._cost = cost
     else:
         self._cost = Statement(value=cost)
示例#3
0
 def efficacy(self, efficacy):
     if not efficacy:
         self._efficacy = None
     elif isinstance(efficacy, Statement):
         self._efficacy = efficacy
     else:
         self._efficacy = Statement(value=efficacy)
示例#4
0
 def impact(self, impact):
     if not impact:
         self._impact = None
     elif isinstance(impact, Statement):
         self._impact = impact
     else:
         self._impact = Statement(value=impact)
示例#5
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
示例#6
0
 def efficacy(self, value):
     if not value:
         self._efficacy = None
     elif isinstance(value, Statement):
         self._efficacy = value
     else:
         self._efficacy = Statement(value=value)
示例#7
0
 def add_planning_and_operational_support(self, value):
     if not value:
         return
     elif isinstance(value, Statement):
         self.planning_and_operational_supports.append(value)
     else:
         pos = PlanningAndOperationalSupport(value)
         self.planning_and_operational_supports.append(Statement(value=pos))
示例#8
0
 def add_intended_effect(self, value):
     if not value:
         return
     elif isinstance(value, Statement):
         self.intended_effects.append(value)
     else:
         intended_effect = IntendedEffect(value)
         self.intended_effects.append(Statement(value=intended_effect))
示例#9
0
 def add_sophistication(self, value):
     if not value:
         return
     elif isinstance(value, Statement):
         self.sophistications.append(value)
     else:
         sophistication = ThreatActorSophistication(value)
         self.sophistications.append(Statement(value=sophistication))
示例#10
0
 def add_motivation(self, value):
     if not value:
         return
     elif isinstance(value, Statement):
         self.motivations.append(value)
     else:
         motivation = Motivation(value)
         self.motivations.append(Statement(value=motivation))
示例#11
0
 def add_type(self, value):
     if not value:
         return
     elif isinstance(value, Statement):
         self.types.append(value)
     else:
         type_ = ThreatActorType(value)
         self.types.append(Statement(value=type_))
示例#12
0
 def _fix_value(self, value):
     return Statement(value=vocabs.IntendedEffect(value))
示例#13
0
 def _fix_value(self, value):
     motivation = vocabs.Motivation(value)
     return Statement(value=motivation)
示例#14
0
 def _fix_value(self, value):
     type_ = vocabs.ThreatActorType(value)
     return Statement(value=type_)
示例#15
0
 def _fix_value(self, value):
     pos = vocabs.PlanningAndOperationalSupport(value)
     return Statement(value=pos)
示例#16
0
 def _fix_value(self, value):
     intended_effect = vocabs.IntendedEffect(value)
     return Statement(value=intended_effect)
示例#17
0
 def _fix_value(self, value):
     sophistication = vocabs.ThreatActorSophistication(value)
     return Statement(value=sophistication)