mirror of
https://github.com/MISP/misp-galaxy.git
synced 2024-11-26 08:47:18 +00:00
chg [tidal] only generate set metadata
This commit is contained in:
parent
a33e9e2a14
commit
059de052ad
3 changed files with 66 additions and 20 deletions
|
@ -26,13 +26,27 @@ def create_cluster(galaxy, data):
|
|||
|
||||
value["description"] = campaigns["description"]
|
||||
|
||||
# Metadata fields
|
||||
source = campaigns["source"]
|
||||
campaign_attack_id = campaigns["campaign_attack_id"]
|
||||
first_seen = campaigns["first_seen"]
|
||||
last_seen = campaigns["last_seen"]
|
||||
tags = campaigns["tags"]
|
||||
owner = campaigns["owner_name"]
|
||||
|
||||
value["meta"] = {}
|
||||
value["meta"]["source"] = campaigns["source"]
|
||||
value["meta"]["campaign-attack-id"] = campaigns["campaign_attack_id"]
|
||||
value["meta"]["first-seen"] = campaigns["first_seen"]
|
||||
value["meta"]["last-seen"] = campaigns["last_seen"]
|
||||
value["meta"]["tags"] = campaigns["tags"]
|
||||
value["meta"]["owner"] = campaigns["owner_name"]
|
||||
if source:
|
||||
value["meta"]["source"] = source
|
||||
if campaign_attack_id:
|
||||
value["meta"]["campaign-attack-id"] = campaign_attack_id
|
||||
if first_seen:
|
||||
value["meta"]["first-seen"] = first_seen
|
||||
if last_seen:
|
||||
value["meta"]["last-seen"] = last_seen
|
||||
if tags:
|
||||
value["meta"]["tags"] = tags
|
||||
if owner:
|
||||
value["meta"]["owner"] = owner
|
||||
|
||||
value["related"] = relations
|
||||
value["uuid"] = campaigns["id"]
|
||||
|
|
|
@ -33,15 +33,33 @@ def create_cluster(galaxy, data):
|
|||
|
||||
value["description"] = group["description"]
|
||||
|
||||
# Metadata fields
|
||||
source = group["source"]
|
||||
group_attack_id = group["group_attack_id"]
|
||||
country = [country["country_name"] for country in group["country"]]
|
||||
observed_country = [country["country_code"] for country in group["observed_country"]]
|
||||
motive = [motive["name"] for motive in group["observed_motivation"]]
|
||||
target_category = [sector["name"] for sector in group["observed_sector"]]
|
||||
tags = group["tags"]
|
||||
owner = group["owner_name"]
|
||||
|
||||
value["meta"] = {}
|
||||
value["meta"]["source"] = group["source"]
|
||||
value["meta"]["group-attack-id"] = group["group_attack_id"]
|
||||
value["meta"]["country"] = [country["country_code"] for country in group["country"]]
|
||||
value["meta"]["observed_country"] = [country["country_code"] for country in group["observed_country"]]
|
||||
value["meta"]["motive"] = [motive["name"] for motive in group["observed_motivation"]]
|
||||
value["meta"]["target-category"] = [sector["name"] for sector in group["observed_sector"]]
|
||||
value["meta"]["tags"] = group["tags"]
|
||||
value["meta"]["owner"] = group["owner_name"]
|
||||
if source:
|
||||
value["meta"]["source"] = source
|
||||
if group_attack_id:
|
||||
value["meta"]["group-attack-id"] = group_attack_id
|
||||
if country:
|
||||
value["meta"]["country"] = country
|
||||
if observed_country:
|
||||
value["meta"]["observed_country"] = observed_country
|
||||
if motive:
|
||||
value["meta"]["motive"] = motive
|
||||
if target_category:
|
||||
value["meta"]["target-category"] = target_category
|
||||
if tags:
|
||||
value["meta"]["tags"] = tags
|
||||
if owner:
|
||||
value["meta"]["owner"] = owner
|
||||
|
||||
value["related"] = relations
|
||||
value["uuid"] = group["id"]
|
||||
|
|
|
@ -37,13 +37,27 @@ def create_cluster(galaxy, data):
|
|||
|
||||
value["description"] = software["description"]
|
||||
|
||||
# Metadata fields
|
||||
source = software["source"]
|
||||
type = software["type"]
|
||||
software_attack_id = software["software_attack_id"]
|
||||
platforms = software["platforms"]
|
||||
tags = software["tags"]
|
||||
owner = software["owner_name"]
|
||||
|
||||
value["meta"] = {}
|
||||
value["meta"]["source"] = software["source"]
|
||||
value["meta"]["type"] = software["type"]
|
||||
value["meta"]["software-attack-id"] = software["software_attack_id"]
|
||||
value["meta"]["platforms"] = software["platforms"]
|
||||
value["meta"]["tags"] = software["tags"]
|
||||
value["meta"]["owner"] = software["owner_name"]
|
||||
if source:
|
||||
value["meta"]["source"] = source
|
||||
if type:
|
||||
value["meta"]["type"] = type
|
||||
if software_attack_id:
|
||||
value["meta"]["software-attack-id"] = software_attack_id
|
||||
if platforms:
|
||||
value["meta"]["platforms"] = platforms
|
||||
if tags:
|
||||
value["meta"]["tags"] = tags
|
||||
if owner:
|
||||
value["meta"]["owner"] = owner
|
||||
|
||||
value["related"] = relations
|
||||
value["uuid"] = software["id"]
|
||||
|
|
Loading…
Reference in a new issue