Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReaQta Use TTP Custom Object #1473

Merged
merged 11 commits into from
May 31, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,21 @@
"extensions.'x-reaqta-avdetection'.av_threat_info_array": ["antimalware.threatInfo"],
"finding_type": ["antimalware.threatType"],
"name": ["antimalware.objectStatus"],
"src_ip_ref.value": ["ip"]
"src_ip_ref.value": ["ip"],
"ttp_tagging_refs": ["mitre.tactic", "mitre.technique"]
}
},
"x-ibm-ttp-tagging": {
"fields": {
"name": [
"mitre.technique"
],
"extensions.'mitre-attack-ext'.tactic_name": [
"mitre.tactic"
],
"extensions.'mitre-attack-ext'.technique_name": [
"mitre.technique"
]
}
},
"x-oca-asset": {
Expand Down Expand Up @@ -108,8 +122,7 @@
"network_ref.dst_ref.value": ["ip"],
"network_ref.src_ref.value": ["ip"],
"parent_process_ref.pid": ["service.ppid"],
"process_ref.pid": ["wmi.clientPid"],
"user_ref.user_id": []
"process_ref.pid": ["wmi.clientPid"]
}
},
"x-reaqta-amsi": {
Expand Down Expand Up @@ -231,10 +244,8 @@
"service_name": ["service.name"],
"service_type": ["service.type"],
"start_type": ["service.startType"],
"tactics": ["mitre.tactic"],
"tags": ["eventdata.tag"],
"task_name": ["task.name"],
"technique": ["mitre.technique"],
"version": ["eventdata.version"]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,21 @@
"extensions.'x-reaqta-avdetection'.av_threat_info_array": ["antimalware.threatInfo"],
"finding_type": ["antimalware.threatType", "eventType"],
"name": ["antimalware.objectStatus"],
"src_ip_ref.value": ["ip"]
"src_ip_ref.value": ["ip"],
"ttp_tagging_refs": ["mitre.tactic", "mitre.technique"]
}
},
"x-ibm-ttp-tagging": {
"fields": {
"name": [
"mitre.technique"
],
"extensions.'mitre-attack-ext'.tactic_name": [
"mitre.tactic"
],
"extensions.'mitre-attack-ext'.technique_name": [
"mitre.technique"
]
}
},
"x-oca-asset": {
Expand Down Expand Up @@ -231,10 +245,8 @@
"service_name": ["service.name"],
"service_type": ["service.type"],
"start_type": ["service.startType"],
"tactics": ["mitre.tactic"],
"tags": ["eventdata.tag"],
"task_name": ["task.name"],
"technique": ["mitre.technique"],
"version": ["eventdata.version"]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1823,10 +1823,17 @@
"key": "x-reaqta-event.start_type",
"object": "x-reaqta"
},
"tactics": {
"key": "x-reaqta-event.tactics",
"object": "x-reaqta"
},
"tactics": [
{
"key": "x-ibm-finding.ttp_tagging_refs",
"object": "x-ibm-finding",
"references": ["x-ibm-ttp-tagging"]
},
{
"key": "x-ibm-ttp-tagging.extensions.'mitre-attack-ext'.tactic_name",
"object": "x-ibm-ttp-tagging"
}
],
"tags": {
"key": "x-reaqta-event.tags",
"object": "x-reaqta"
Expand Down Expand Up @@ -2007,10 +2014,21 @@
"key": "x-reaqta-event.task_name",
"object": "x-reaqta"
},
"technique": {
"key": "x-reaqta-event.technique",
"object": "x-reaqta"
},
"technique": [
{
"key": "x-ibm-finding.ttp_tagging_refs",
delliott90 marked this conversation as resolved.
Show resolved Hide resolved
"object": "x-ibm-finding",
"references": ["x-ibm-ttp-tagging"]
},
{
"key": "x-ibm-ttp-tagging.extensions.'mitre-attack-ext'.technique_name",
"object": "x-ibm-ttp-tagging"
},
{
"key": "x-ibm-ttp-tagging.extensions.name",
"object": "x-ibm-ttp-tagging"
}
],
"url": {
"key": "url.value",
"object": "url"
Expand Down
34 changes: 26 additions & 8 deletions stix_shifter_modules/reaqta/stix_translation/json/to_stix_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -1787,10 +1787,17 @@
"key": "x-reaqta-event.start_type",
"object": "x-reaqta"
},
"tactics": {
"key": "x-reaqta-event.tactics",
"object": "x-reaqta"
},
"tactics": [
{
"key": "x-ibm-finding.ttp_tagging_refs",
"object": "x-ibm-finding",
"references": ["x-ibm-ttp-tagging"]
},
{
"key": "x-ibm-ttp-tagging.extensions.'mitre-attack-ext'.tactic_name",
"object": "x-ibm-ttp-tagging"
}
],
"tags": {
"key": "x-reaqta-event.tags",
"object": "x-reaqta"
Expand Down Expand Up @@ -1971,10 +1978,21 @@
"key": "x-reaqta-event.task_name",
"object": "x-reaqta"
},
"technique": {
"key": "x-reaqta-event.technique",
"object": "x-reaqta"
},
"technique": [
{
"key": "x-ibm-finding.ttp_tagging_refs",
"object": "x-ibm-finding",
"references": ["x-ibm-ttp-tagging"]
},
{
"key": "x-ibm-ttp-tagging.extensions.'mitre-attack-ext'.technique_name",
"object": "x-ibm-ttp-tagging"
},
{
"key": "x-ibm-ttp-tagging.extensions.name",
"object": "x-ibm-ttp-tagging"
}
],
"url": {
"key": "url.value",
"object": "url"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def test_x_ibm_finding(self):
event = TestReaqtaResultsToStix.get_first_of_type(objects.values(), 'x-ibm-finding')

assert(event is not None), "x-ibm-finding not found"
assert(event.keys() == {'type', 'extensions', 'src_ip_ref', 'dst_ip_ref'})
assert(event.keys() == {'type', 'extensions', 'ttp_tagging_refs', 'src_ip_ref', 'dst_ip_ref'})
assert(event['type'] == "x-ibm-finding")

ip_ref = event['src_ip_ref']
Expand Down Expand Up @@ -343,11 +343,9 @@ def test_x_reaqta_event(self):
event = TestReaqtaResultsToStix.get_first_of_type(objects.values(), 'x-reaqta-event')

assert(event is not None), "x-reaqta-event not found"
assert(event.keys() == {'type', 'local_id', 'root_object', 'name', 'data', 'version', 'namespace_name', 'operation', 'is_local', 'queryName', 'custom_type', 'custom_name', 'relevance', 'tags', 'region_size', 'pe_type', 'return_code', 'technique', 'tactics', 'task_name', 'action_name', 'service_name', 'start_type', 'service_type'})
assert(event.keys() == {'type', 'local_id', 'root_object', 'name', 'data', 'version', 'namespace_name', 'operation', 'is_local', 'queryName', 'custom_type', 'custom_name', 'relevance', 'tags', 'region_size', 'pe_type', 'return_code', 'task_name', 'action_name', 'service_name', 'start_type', 'service_type'})
assert(event['type'] == "x-reaqta-event")
assert(event['local_id'] == DATA_LOCAL_ID)
assert(event['technique'] == DATA_TECHNIQUE)
assert(event['tactics'] == DATA_TACTICS)
assert(event['tags'] == DATA_TAGS)
assert(event['relevance'] == DATA_RELEVANCE)
assert(event['version'] == DATA_VERSION)
Expand Down Expand Up @@ -418,11 +416,9 @@ def test_stix_21_prop(self):

event = TestReaqtaResultsToStix.get_first_cybox_of_type_stix_2_1(result_bundle_objects, 'x-reaqta-event')
assert(event is not None), "x-reaqta-event not found"
assert(event.keys() == {'type', 'id', 'spec_version', 'local_id', 'root_object', 'name', 'data', 'version', 'namespace_name', 'operation', 'is_local', 'queryName', 'custom_type', 'custom_name', 'relevance', 'tags', 'region_size', 'pe_type', 'return_code', 'technique', 'tactics', 'task_name', 'action_name', 'service_name', 'start_type', 'service_type'})
assert(event.keys() == {'type', 'local_id', 'id', 'spec_version', 'root_object', 'name', 'data', 'version', 'namespace_name', 'operation', 'is_local', 'queryName', 'custom_type', 'custom_name', 'relevance', 'tags', 'region_size', 'pe_type', 'return_code', 'task_name', 'action_name', 'service_name', 'start_type', 'service_type'})
assert(event['type'] == "x-reaqta-event")
assert(event['local_id'] == DATA_LOCAL_ID)
assert(event['technique'] == DATA_TECHNIQUE)
assert(event['tactics'] == DATA_TACTICS)
assert(event['tags'] == DATA_TAGS)
assert(event['relevance'] == DATA_RELEVANCE)
assert(event['version'] == DATA_VERSION)
Expand Down
Loading