diff --git a/bin/lib/Correlate_object.py b/bin/lib/Correlate_object.py index afd82379..16b29d8f 100755 --- a/bin/lib/Correlate_object.py +++ b/bin/lib/Correlate_object.py @@ -38,7 +38,7 @@ def get_object_metadata(object_type, correlation_id, type_id=None): if object_type == 'domain': return Domain.Domain(correlation_id).get_domain_metadata() elif object_type == 'paste': - return {} + return Item.get_item({"id": correlation_id, "date": True, "tags": True})[0] elif object_type == 'decoded': return Decoded.get_decoded_metadata(correlation_id, nb_seen=True, size=True) elif object_type == 'pgp': diff --git a/var/www/blueprints/correlation.py b/var/www/blueprints/correlation.py index ca2972de..819e6f3f 100644 --- a/var/www/blueprints/correlation.py +++ b/var/www/blueprints/correlation.py @@ -22,6 +22,7 @@ from Role_Manager import login_admin, login_analyst sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib')) import Correlate_object +import Domain sys.path.append(os.path.join(os.environ['AIL_BIN'], 'packages')) import Cryptocurrency @@ -108,9 +109,10 @@ def get_card_metadata(object_type, correlation_id, type_id=None): card_dict["vt"] = Decoded.get_decoded_vt_report(correlation_id) card_dict["vt"]["status"] = vt_enabled elif object_type == 'domain': - pass + card_dict["icon"] = Correlate_object.get_correlation_node_icon(object_type, value=correlation_id) + card_dict["tags"] = Domain.get_domain_tags(correlation_id) elif object_type == 'paste': - pass + card_dict["icon"] = Correlate_object.get_correlation_node_icon(object_type, value=correlation_id) return card_dict # ============= ROUTES ============== @@ -180,7 +182,7 @@ def show_correlation(): if type_id: dict_object["metadata"]['type_id'] = type_id dict_object["metadata_card"] = get_card_metadata(object_type, correlation_id, type_id=type_id) - return render_template("show_correlation.html", dict_object=dict_object) + return render_template("show_correlation.html", dict_object=dict_object, bootstrap_label=bootstrap_label) @correlation.route('/correlation/graph_node_json') @login_required diff --git a/var/www/modules/showpaste/templates/show_saved_paste.html b/var/www/modules/showpaste/templates/show_saved_paste.html index 31d72436..623b9ea6 100644 --- a/var/www/modules/showpaste/templates/show_saved_paste.html +++ b/var/www/modules/showpaste/templates/show_saved_paste.html @@ -346,6 +346,13 @@ {% endif %} +
+ + + +
+
diff --git a/var/www/templates/correlation/metadata_card_domain.html b/var/www/templates/correlation/metadata_card_domain.html new file mode 100644 index 00000000..5cacd513 --- /dev/null +++ b/var/www/templates/correlation/metadata_card_domain.html @@ -0,0 +1,164 @@ +
+
+

{{ dict_object["correlation_id"] }} :

+
    +
  • + + + + + + + + + + + + + + + + + + + + + +
    Object typetypeFirst seenLast checkPortStatus
    {{ dict_object["object_type"] }} + + + + {{ dict_object["metadata_card"]["icon"]["icon_text"] }} + + + {{ dict_object["metadata"]["type_id"] }} + {{ dict_object["metadata"]['first_seen'] }}{{ dict_object["metadata"]['last_check'] }}{{ dict_object["metadata"]['ports'] }} + {% if dict_object["metadata"]["status"] %} +
    + + UP +
    + {% else %} +
    + + DOWN +
    + {% endif %} +
    +
  • + +
  • +
    +
    + Tags: + {% for tag in dict_object["metadata_card"]['tags'] %} + {{ tag }} + {% endfor %} +
    + + +
  • +
+
+
+ + + + + diff --git a/var/www/templates/correlation/metadata_card_paste.html b/var/www/templates/correlation/metadata_card_paste.html new file mode 100644 index 00000000..6a9946ea --- /dev/null +++ b/var/www/templates/correlation/metadata_card_paste.html @@ -0,0 +1,146 @@ +
+
+

{{ dict_object["correlation_id"] }} :

+
    +
  • + + + + + + + + + + + + + + + +
    Object typetypedate
    {{ dict_object["object_type"] }} + + + + {{ dict_object["metadata_card"]["icon"]["icon_text"] }} + + + {{ dict_object["metadata"]["type_id"] }} + {{ dict_object["metadata"]['date'][0:4] }}/{{ dict_object["metadata"]['date'][4:6] }}/{{ dict_object["metadata"]['date'][6:8] }}
    +
  • + +
  • +
    +
    + Tags: + {% for tag in dict_object["metadata"]['tags'] %} + {{ tag }} + {% endfor %} +
    + + +
  • +
+
+
+ + + + + diff --git a/var/www/templates/correlation/show_correlation.html b/var/www/templates/correlation/show_correlation.html index f6e00ae3..bcf4d19a 100644 --- a/var/www/templates/correlation/show_correlation.html +++ b/var/www/templates/correlation/show_correlation.html @@ -94,6 +94,10 @@ {% include 'correlation/metadata_card_pgp.html' %} {% elif dict_object["object_type"] == "decoded" %} {% include 'correlation/metadata_card_decoded.html' %} + {% elif dict_object["object_type"] == "domain" %} + {% include 'correlation/metadata_card_domain.html' %} + {% elif dict_object["object_type"] == "paste" %} + {% include 'correlation/metadata_card_paste.html' %} {% endif %}
diff --git a/var/www/templates/crawler/crawler_splash/showDomain.html b/var/www/templates/crawler/crawler_splash/showDomain.html index 16161fe9..75bc88b6 100644 --- a/var/www/templates/crawler/crawler_splash/showDomain.html +++ b/var/www/templates/crawler/crawler_splash/showDomain.html @@ -98,6 +98,16 @@ Last Origin: {{ dict_domain['origin_item'] }} {%endif%} + {% if 'decoded' in dict_domain or 'pgp' in dict_domain or 'cryptocurrency' in dict_domain%} +
+ + {%endif%} +