
Una dashboard live per una panoramica in tempo reale delle intelligence sulle minacce provenienti da istanze MISP
Una dashboard che mostra dati in tempo reale e statistiche dai feed ZMQ di una o più istanze MISP. La dashboard può essere utilizzata come strumento di situational awareness in tempo reale per raccogliere informazioni sulle minacce. misp-dashboard include uno strumento di gamificazione per mostrare i contributi di ogni organizzazione e come vengono classificate nel tempo. La dashboard può essere utilizzata per SOC (Security Operation Centers), team di sicurezza o durante esercitazioni informatiche per tenere traccia di ciò che viene elaborato sulle varie istanze MISP.


Mostra:
Include:



Prima di installare, considera che gli unici sistemi supportati sono sistemi operativi open source Unix-like come Linux e altri.
./install_dependencies.sh dalla directory di MISP-Dashboard (idempotente-ish)config.cfg in modo che corrisponda al tuo sistema
./install_dependencies.sh per scaricare nuove dipendenze necessarieconfig.cfg confrontando eventuali modifiche in config.cfg.default⚠️ Assicurati che nessuno script zmq python3 sia in esecuzione. Bloccano l'aggiornamento.
+ virtualenv -p python3 DASHENV
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/steve/code/misp-dashboard/DASHENV/bin/python3
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==15.0.1', 'console_scripts', 'virtualenv')()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 942, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1261, in install_python
shutil.copyfile(executable, py_executable)
File "/usr/lib/python3.5/shutil.py", line 115, in copyfile
with open(dst, 'wb') as fdst:
OSError: [Errno 26] Text file busy: '/home/steve/code/misp-dashboard/DASHENV/bin/python3'
./start_all.sh OPPURE ./start_zmq.sh e ./server.py &⚠️ Non dovresti eseguirlo come root. I privilegi normali sono sufficienti.
redis-server --port 6250. ./DASHENV/bin/activate./zmq_subscriber.py &./zmq_dispatcher.py &./server.py &http://localhost:8001/In alternativa, puoi eseguire lo script start_all.sh per eseguire i comandi descritti sopra.
L'autenticazione può essere abilitata in config/config.cfg impostando auth_enabled = True.
Gli utenti dovranno effettuare il login su MISP e potranno procedere se l'impostazione User Setting dashboard_access è impostata su 1 per l'account utente MISP.
Il debug è divertente e fornisce maggiori dettagli su ciò che accade quando le cose falliscono. Tieni presente che eseguire Flask in debug NON è adatto alla produzione; se abilitato, ti porterà a una shell Python per approfondire ulteriormente.
Subito prima di eseguire ./server.py fai:
export FLASK_DEBUG=1
export FLASK_APP=server.py
flask run --host=0.0.0.0 --port=8001 # <- Fai attenzione qui, espone su TUTTI gli indirizzi IP. Idealmente se eseguito localmente --host=127.0.0.1
OPPURE, attiva semplicemente il flag di debug in start_all.sh o config.cfg.
Happy hacking ;)
Per riavviare da zero e svuotare tutti i dati dalla dashboard, puoi utilizzare lo script di pulizia dedicato clean.py
Clean data stored in the redis server specified in the configuration file
optional arguments:
-h, --help show this help message and exit
-b, --brutal Perfom a FLUSHALL on the redis database. If not set, will use
a soft method to delete only keys used by MISP-Dashboard.
misp-dashboard, essendo stateless rispetto a MISP, può elaborare solo i dati che riceve. Ciò significa che se il tuo MISP non pubblica tutte le notifiche sul suo ZMQ, misp-dashboard non le avrà.
L'esempio più rilevante potrebbe essere il punchcard di login dell'utente. Se il tuo MISP non ha l'opzione Plugin.ZeroMQ_audit_notifications_enable impostata su true, il punchcard sarà vuoto.
Quando la dashboard non mostra risultati, controlla innanzitutto se il modulo zmq all'interno di MISP è installato correttamente.
In Administration, Plugin Settings, ZeroMQ verifica che Plugin.ZeroMQ_enable sia impostato su True.
Pubblica un evento di test da MISP a ZMQ tramite Event Actions, Publish event to ZMQ.
Verifica i file di log
${PATH_TO_MISP}/app/tmp/log/mispzmq.error.log
${PATH_TO_MISP}/app/tmp/log/mispzmq.log
Se c'è un errore ModuleNotFoundError: No module named 'zmq', installa pyzmq.
$SUDO_WWW ${PATH_TO_MISP}/venv/bin/pip install pyzmq
A zmq subscriber. It subscribe to a ZMQ then redispatch it to the MISP-dashboard
optional arguments:
-h, --help show this help message and exit
-n ZMQNAME, --name ZMQNAME
The ZMQ feed name
-u ZMQURL, --url ZMQURL
The URL to connect to
Installa Apache mod-wsgi per Python3
sudo apt-get install libapache2-mod-wsgi-py3
Avvertenza: Se hai già mod-wsgi installato per Python2, verrà sostituito!
The following packages will be REMOVED:
libapache2-mod-wsgi
The following NEW packages will be installed:
libapache2-mod-wsgi-py3
Il file di configurazione /etc/apache2/sites-available/misp-dashboard.conf presuppone che misp-dashboard sia clonato in /var/www/misp-dashboard. In questo esempio viene eseguito come utente misp. Modifica i permessi per la tua cartella personalizzata e i file di conseguenza.
<VirtualHost *:8001>
ServerAdmin [email protected]
ServerName misp.local
DocumentRoot /var/www/misp-dashboard
WSGIDaemonProcess misp-dashboard \
user=misp group=misp \
python-home=/var/www/misp-dashboard/DASHENV \
processes=1 \
threads=15 \
maximum-requests=5000 \
listen-backlog=100 \
queue-timeout=45 \
socket-timeout=60 \
connect-timeout=15 \
request-timeout=60 \
inactivity-timeout=0 \
deadlock-timeout=60 \
graceful-timeout=15 \
eviction-timeout=0 \
shutdown-timeout=5 \
send-buffer-size=0 \
receive-buffer-size=0 \
header-buffer-size=0 \
response-buffer-size=0 \
server-metrics=Off
WSGIScriptAlias / /var/www/misp-dashboard/misp-dashboard.wsgi
<Directory /var/www/misp-dashboard>
WSGIProcessGroup misp-dashboard
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
LogLevel info
ErrorLog /var/log/apache2/misp-dashboard.local_error.log
CustomLog /var/log/apache2/misp-dashboard.local_access.log combined
ServerSignature Off
</VirtualHost>
Copyright (C) 2017-2021 CIRCL - Computer Incident Response Center Luxembourg (c/o smile, security made in Lëtzebuerg, Groupement d'Intérêt Economique)
Copyright (c) 2017-2020 Sami Mokaddem
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Immagini e loghi sono realizzati a mano per:
Nota che:
MISPHonorableIcons/1.svg proviene da octicons.github.com (CC0 - Nessun diritto riservato)MISPHonorableIcons/2.svg proviene da Zeptozephyr (CC0 - Nessun diritto riservato)MISPHonorableIcons/3.svg proviene da octicons.github.com (CC0 - Nessun diritto riservato)MISPHonorableIcons/4.svg proviene da Zeptozephyr & octicons.github.com (CC0 - Nessun diritto riservato)MISPHonorableIcons/5.svg proviene da Zeptozephyr & octicons.github.com (CC0 - Nessun diritto riservato)