capa analysis results look nicer now
This commit is contained in:
parent
de49d84788
commit
de93bbd271
1 changed files with 2 additions and 3 deletions
|
@ -14,7 +14,6 @@ import json
|
|||
import os
|
||||
import capa.render.utils as rutils
|
||||
import capa.render.result_document as rd
|
||||
import collections
|
||||
from capa.render.default import find_subrule_matches
|
||||
capa_bp = Blueprint('capa', __name__)
|
||||
|
||||
|
@ -55,7 +54,7 @@ def analyze_capa():
|
|||
capability = rule.meta.name + f" ({count} matches)"
|
||||
caps[capability] = rule.meta.namespace
|
||||
for attack in rule.meta.attack:
|
||||
tactics[attack.tactic] = attack.technique + attack.subtechnique + attack.id.strip("[").strip("]")
|
||||
tactics[attack.tactic] = attack.technique + " " + attack.subtechnique + " " + attack.id.strip("[").strip("]")
|
||||
|
||||
maec_categories = {
|
||||
"analysis_conclusion",
|
||||
|
@ -71,7 +70,7 @@ def analyze_capa():
|
|||
maec[maec_category] = maec_value
|
||||
for rule in rutils.capability_rules(doc):
|
||||
for mbc in rule.meta.mbc:
|
||||
objectives[mbc.objective] = mbc.behavior + mbc.method + mbc.id.strip("[").strip("]")
|
||||
objectives[mbc.objective] = mbc.behavior + " " + mbc.method + " " + mbc.id.strip("[").strip("]")
|
||||
|
||||
return jsonify(capabilities=caps, tactics=tactics, maec=maec, objectives=objectives)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue