From 24be4465981354fc06ce885c5108185b32d1f64a Mon Sep 17 00:00:00 2001 From: Julien DEPAILLAT Date: Mon, 10 May 2021 16:08:58 +0200 Subject: [PATCH] New Feature : It is now possible to import IoCs from an added MISP instance. --- app/backend/src/App.vue | 5 +- app/backend/src/assets/custom.css | 55 +++- app/backend/src/router/index.js | 6 + app/backend/src/views/iocs-misp.vue | 402 ++++++++++++++++++++++++++ assets/requirements.txt | 3 +- assets/scheme.sql | 11 + server/backend/app/blueprints/ioc.py | 16 +- server/backend/app/blueprints/misp.py | 76 +++++ server/backend/app/classes/iocs.py | 7 +- server/backend/app/classes/mispobj.py | 240 +++++++++++++++ server/backend/app/db/models.py | 10 + 11 files changed, 826 insertions(+), 5 deletions(-) create mode 100644 app/backend/src/views/iocs-misp.vue create mode 100644 server/backend/app/blueprints/misp.py create mode 100644 server/backend/app/classes/mispobj.py diff --git a/app/backend/src/App.vue b/app/backend/src/App.vue index cec5174..cd06924 100644 --- a/app/backend/src/App.vue +++ b/app/backend/src/App.vue @@ -39,6 +39,9 @@ + @@ -95,4 +98,4 @@ .fade-leave-active { opacity: 0 } - \ No newline at end of file + diff --git a/app/backend/src/assets/custom.css b/app/backend/src/assets/custom.css index dc347ec..9b6ccec 100644 --- a/app/backend/src/assets/custom.css +++ b/app/backend/src/assets/custom.css @@ -650,4 +650,57 @@ h4, h5 { .upper { text-transform: uppercase; -} \ No newline at end of file +} + +/*** MISP CSS ***/ + +.misp-form { + /* Using CSS Grid to lay out the elements in two-dimensions: */ + display: grid; + /* specifying a 0.2em gutter/gap between adjacent elements: */ + gap: 0.2em; + overflow:auto; + grid-template-columns: 10em 0.5em 1fr; + width: 100%; + border:0.05rem solid #cecece; + border-radius:.1rem; + margin-bottom:.4rem; + padding:.4rem; +} + +.misp-label { + /* placing all