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)
def cost(self, cost): if not cost: self._cost = None elif isinstance(cost, Statement): self._cost = cost else: self._cost = Statement(value=cost)
def efficacy(self, efficacy): if not efficacy: self._efficacy = None elif isinstance(efficacy, Statement): self._efficacy = efficacy else: self._efficacy = Statement(value=efficacy)
def impact(self, impact): if not impact: self._impact = None elif isinstance(impact, Statement): self._impact = impact else: self._impact = Statement(value=impact)
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
def efficacy(self, value): if not value: self._efficacy = None elif isinstance(value, Statement): self._efficacy = value else: self._efficacy = Statement(value=value)
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))
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))
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))
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))
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_))
def _fix_value(self, value): return Statement(value=vocabs.IntendedEffect(value))
def _fix_value(self, value): motivation = vocabs.Motivation(value) return Statement(value=motivation)
def _fix_value(self, value): type_ = vocabs.ThreatActorType(value) return Statement(value=type_)
def _fix_value(self, value): pos = vocabs.PlanningAndOperationalSupport(value) return Statement(value=pos)
def _fix_value(self, value): intended_effect = vocabs.IntendedEffect(value) return Statement(value=intended_effect)
def _fix_value(self, value): sophistication = vocabs.ThreatActorSophistication(value) return Statement(value=sophistication)