Misp Training
Misp Training
Misp Training
MISP Project
https://www.misp-project.org/
CIISI-IE
Threat Sharing
Agenda
1 14
MISP and starting from a practical use-case
2 14
about CIRCL
3 14
MISP and CIRCL
4 14
What is MISP?
5 14
Development based on practical user feedback
6 14
MISP model of governance
7 14
Many objectives from different user-groups
8 14
Communities using MISP
1
https://www.misp-project.org/compliance/
10 14
MISP Project Overview
misp-modules misp-galaxy
compliance documents
such as GDPR,
MISP objects template
ISO 27010:2015
PyMISP
misp-noticelist
threat intelligence
best practices &
misp-dashboard
training materials
misp-warninglists
ISAC/ISAO
best practises
11 14
Sharing in MISP
12 14
Information quality management
Correlating data
Feedback loop from detections via Sightings
False positive management via the warninglist system
Enrichment system via MISP-modules
workflow system to review and control information
publication
Integrations with a plethora of tools and formats
Flexible API and support libraries such as PyMISP to ease
integration
Timelines and giving information a temporal context
Full chain for indicator life-cycle management
13 14
Conclusion
14 / 14
An Introduction to Cybersecu-
rity Information Sharing
MISP - Threat Sharing
MISP Project
https://www.misp-project.org/
CIISI-IE
Threat Sharing
Agenda
1 24
MISP and starting from a practical use-case
2 24
about CIRCL
3 24
MISP and CIRCL
4 24
What is MISP?
5 24
Development based on practical user feedback
6 24
MISP model of governance
7 24
Many objectives from different user-groups
8 24
Communities using MISP
1
https://www.misp-project.org/compliance/
10 24
MISP Project Overview
misp-modules misp-galaxy
compliance documents
such as GDPR,
MISP objects template
ISO 27010:2015
PyMISP
misp-noticelist
threat intelligence
best practices &
misp-dashboard
training materials
misp-warninglists
ISAC/ISAO
best practises
11 24
A rich data-model: telling stories via
relationships
12 24
Contextualisation and aggregation
13 24
Sharing in MISP
14 24
MISP core distributed sharing functionality
15 24
Information quality management
Correlating data
Feedback loop from detections via Sightings
False positive management via the warninglist system
Enrichment system via MISP-modules
Integrations with a plethora of tools and formats
Flexible API and support libraries such as PyMISP to ease
integration
Timelines and giving information a temporal context
Full chain for indicator life-cycle management
16 24
Correlation features: a tool for analysts
17 24
Sightings support
18 24
Timelines and giving information a temporal
context
Recently introduced first_seen and last_seen data
points
All data-points can be placed in time
Enables the visualisation and adjustment of indicators
timeframes
19 24
Life-cycle management via decaying of indicators
20 24
Decaying of indicators: Fine tuning tool
21 24
Decaying of indicators: simulation tool
22 24
Bootstrapping your MISP with data
2
A recurring challenge in information sharing
23 24
Conclusion
24 / 24
MISP User Training - General us-
age of MISP
MISP - Threat Sharing
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
MISP - VM
Credentials
I MISP admin: [email protected]/admin
I SSH: misp/Password1234
Available at the following location (VirtualBox and VMWare):
I https://www.circl.lu/misp-images/latest/
1 22
MISP - VM
It is a bit broken.
I sudo -s
I cd /var/www/MISP/
I sudo pear install
INSTALL/dependencies/Console_CommandLine/package.xml
I sudo pear install
INSTALL/dependencies/Crypt_GPG/package.xml
I cd /usr/local/src/misp-modules
I pip3 install -r REQUIREMENTS
I pip3 install .
I reboot
2 22
MISP - General Usage
3 22
MISP - Event (MISP’s basic building block)
4 22
MISP - Event (Attributes, giving meaning to
events)
5 22
MISP - Event (Correlations on similar
attributes)
6 22
MISP - Event (Proposals)
7 22
MISP - Event (Tags)
8 22
MISP - Event (Discussions)
9 22
MISP - Event (Taxonomies and proposal
correlations)
10 22
MISP - Event (The state of the art MISP
datamodel)
11 22
MISP - Viewing the Event Index
Event Index
I Event context
I Tags
I Distribution
I Correlations
Filters
12 22
MISP - Viewing an Event
Event View
I Event context
I Attributes
Category/type, IDS, Correlations
I Objects
I Galaxies
I Proposals
I Discussions
Tools to find what you are looking for
Correlation graphs
13 22
MISP - Creating and populating events in various
ways (demo)
14 22
MISP - Various features while adding data
15 22
MISP - Using the data
Correlation graphs
Downloading the data in various formats
API (explained later)
Collaborating with users (proposals, discussions, emails)
16 22
MISP - Sync explained (if no admin training)
Sync connections
Pull/push model
Previewing instances
Filtering the sync
Connection test tool
Cherry pick mode
17 22
MISP - Feeds explained (if no admin training)
18 22
MISP - Distributions explained
19 22
MISP - Distribution and Topology
20 22
MISP - Exports and API
Download an event
Quick glance at the APIs
Download search results
ReST API and query builder
21 22
MISP - Shorthand admin (if no admin training)
Settings
Troubleshooting
Workers
Logs
22 / 22
MISP Training: MISP Deployment
and Integration
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
A Common Integration
1 11
Recommended MISP Setup
2 11
Vendors and Formats
3 11
Use case: Normalizing OSINT and Private Feeds
4 11
Connecting Devices and Tools to MISP
5 11
SIEM and MISP Integration
6 11
ZMQ integration: misp-dashboard
7 11
New integrations: IR and threat hunting using
MISP
8 11
The Hive integration
9 11
Reporting Back from your Devices, Tools or
Processes
1
https://www.github.com/MISP/misp-sighting-tools
10 11
Q&A
11 / 11
Viper - Using MISP from your ter-
minal
MISP - Threat Sharing
MISP Project
https://www.misp-project.org/
CIISI-IE
Threat Sharing
Viper - Main ideas
1 12
Viper
Solid CLI
Plenty of modules (PE files, *office, ELF, APK, ...)
Connection to 3rd party services (MISP, VirusTotal, cuckoo)
Connectors to 3rd party tools (IDA, radare)
Locale storage of your own zoo
Django interface is available (I’ve been told)
2 12
Viper
3 12
PyMISP & Viper
4 12
MISP Module
5 12
Viper & VT
6 12
VirusTotal Module
7 12
Extra features
8 12
Other modules
9 12
Passive SSL
10 12
Passive DNS
11 12
Q&A
https://github.com/MISP/PyMISP
https://github.com/MISP/
https://github.com/viper-framework/viper
We welcome new functionalities and pull requests.
12 / 12
mail_to_misp
Connect your mail infrastructure to MISP to
create events based on the information con-
CIRCL
tained/ Team MISP Project
within mails
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
Context
1 6
Features: Email handling
2 6
Features: Support MISP features
3 6
Implementation
Legacy
I Email → Apple Mail → Mail rule → AppleScript
→ AppleScript → mail_to_misp → PyMISP → MISP
4 6
Installation
mail_to_misp
1. git clone
git://github.com/MISP/mail_to_misp.git
2. Install dependencies - See Github site
5 6
Exercise: mail_2_misp.py
Bonus:
https://github.com/MISP/mail_to_misp_test
. / mail_to_misp . py −r m a i l _ t o _ m i s p _ t e s t / simple_forward . eml
t e l n e t 1 2 7 . 0 . 0 . 1 2526
Trying 1 2 7 . 0 . 0 . 1 . . .
Connected to 1 2 7 . 0 . 0 . 1 .
Escape c h a r a c t e r i s ’ ^ ] ’ .
220 misp Python SMTP 1 . 1
helo misp
250 misp
mail from : mikel
250 OK
r c p t to : m2m
250 OK
data
354 End data with <CR>< LF > . < CR>< LF >
6/6
MISP User Training - Administra-
tion of MISP 2.4
MISP Threat Sharing
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
MISP - VM
VM can be downloaded at
https://www.circl.lu/misp-training/
Credentials
I MISP admin: [email protected]/admin
I SSH: misp/Password1234
2 network interfaces
I NAT
I Host only adapter
Start the enrichment system by typing:
I cd /home/misp/misp-modules/bin
I python3 misp-modules.py
1 21
MISP - Administration
2 21
MISP - Creating Users
3 21
MISP - Creating Organisations
4 21
MISP - Sharing groups
5 21
MISP - Templates
Why templating?
Create a basic template
Text fields
Attribute fields
Attachment fields
Automatic tagging
6 21
MISP - Tags and Taxonomies
7 21
MISP - Object Templates
8 21
MISP - Whitelisting, Regexp entries,
Warninglists
9 21
MISP - Setting up the synchronisation
Requirements - versions
Pull/Push
One way vs Two way synchronisation
Exchanging sync users
Certificates
Filtering
Connection test tool
Previewing an instance
Cherry picking and keeping the list updated
10 21
MISP - Scheduled tasks
11 21
MISP - Setting up the synchronisation
12 21
MISP - Settings and diagnostics
Settings
I Settings interface
I The tabs explained at a glance
I Issues and their severity
I Setting guidance and how to best use it
13 21
MISP - Settings and diagnostics continued
14 21
MISP - Settings and diagnostics continued
Plugins
I Enrichment Modules
I RPZ
I ZeroMQ
15 21
MISP - Settings and diagnostics continued
Diagnostics
I Updating MISP
I Writeable Directories
I PHP settings
I Dependency diagnostics
16 21
MISP - Settings and diagnostics continued
Workers
I What do the background workers do?
I Queues
I Restarting workers, adding workers, removing workers
I Worker diagnostics (queue size, jobs page)
I Clearing worker queues
I Worker and background job debugging
17 21
MISP - Settings and diagnostics continued
Seeking help
I Dump your settings to a file!
I Make sure to sanitise it
I Send it to us together with your issue to make our lives easier
I Ask Github (https://github.com/MISP/MISP)
I Have a chat with us on gitter (https://gitter.im/MISP/MISP)
I Ask the MISP mailing list
I If this is security related, drop us a PGP encrypted email to
mailto:[email protected]
18 21
MISP - Logging
19 21
MISP - Updating MISP
git pull
git submodule init && git submodule update
reset the permissions if it goes wrong according to the
INSTALL.txt
when MISP complains about missing fields, make sure to
clear the caches
I in /var/www/MISP/app/tmp/cache/models remove myapp*
I in /var/www/MISP/app/tmp/cache/persistent remove
myapp*
No additional action required on hotfix level
Read the migration guide for major and minor version
changes
20 21
MISP - Administrative tools
21 / 21
Information Sharing and Tax-
onomies
Practical Classification of Threat Indicators us-
ing MISP
CIRCL / Team MISP Project
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
From Tagging to Flexible Taxonomies
2 16
MISP Taxonomies
1
https://www.github.com/MISP/misp-taxonomies/
3 16
Existing Taxonomies
4 16
Want to write your own taxonomy? 1/2
1 {
2 " namespace " : " admiralty−s c a l e " ,
3 " d e s c r i p t i o n " : " The A d m i r a l t y S c a l e ( a l s o c a l l e d the NATO System
) i s used to rank the r e l i a b i l i t y of a source and the
c r e d i b i l i t y of an i n f o r m a t i o n . " ,
4 " version " : 1 ,
5 " predicates " : [
6 {
7 " value " : " source−r e l i a b i l i t y " ,
8 " expanded " : " Source R e l i a b i l i t y "
9 },
10 {
11 " value " : " information−c r e d i b i l i t y " ,
12 " expanded " : " I n f o r m a t i o n C r e d i b i l i t y "
13 }
14 ],
15 . . . .
5 16
Want to write your own taxonomy? 2/2
1 {
2 " values " : [
3 {
4 " p r e d i c a t e " : " source−r e l i a b i l i t y " ,
5 " entry " : [
6 {
7 " value " : " a " ,
8 " expanded " : " Completely r e l i a b l e "
9 },
10 . . . .
2
https://github.com/MISP/misp-taxonomies
6 16
How are taxonomies integrated in MISP?
MISP administrator can just import (or even cherry pick) the
namespace or predicates they want to use as tags.
Tags can be exported to other instances.
Tags are also accessible via the MISP REST API.
7 16
Filtering the distribution of events among MISP
instances
8 16
Other use cases using MISP taxonomies
9 16
Future functionalities related to MISP
taxonomies
10 16
PyTaxonomies
11 16
PyTaxonomies
12 16
The dilemma of false-positives
13 16
MISP warning lists
14 16
MISP warning lists
15 16
Q&A
https://github.com/MISP/MISP
https://github.com/MISP/misp-taxonomies
https://github.com/MISP/PyTaxonomies
https://github.com/MISP/misp-warninglists
[email protected] (if you want to join one of the MISP community
operated by CIRCL)
PGP key fingerprint: CA57 2205 C002 4E06 BA70 BE89 EAAD
CFFC 22BD 4CD5
16 / 16
Extending MISP with Python mod-
ules
MISP - Threat Sharing
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
Why we want to go more modular...
1 20
Goals for the module system
2 20
MISP modules - extending MISP with Python
scripts
4 20
MISP modules - Simple REST API mechanism
5 20
Finding available MISP modules
curl -s http://127.0.0.1:6666/modules
1 {
2 "type": "expansion",
3 "name": "dns",
4 "meta": {
5 "module-type": [
6 "expansion",
7 "hover"
8 ],
9 "description": "Simple DNS expansion service
to resolve IP address from MISP
attributes",
10 "author": "Alexandre Dulaunoy",
11 "version": "0.1"
12 },
13 "mispattributes": {
14 "output": [
15 "ip-src",
16 "ip-dst"
17 ],
18 "input": [
19 "hostname",
20 "domain"
21 ]
22 }
6 20
MISP modules - configuration in the UI
7 20
MISP modules - How it’s integrated in the UI?
8 20
MISP modules - main types of modules
9 20
Querying a module
body.json
1 {"module": "dns", "hostname": "www.circl.lu"}
10 20
Creating your module - DNS module
import json
import dns . r e s o l v e r
misperrors = { ’ e r r o r ’ : ’ E r r o r ’ }
m i s p a t t r i b u t e s = { ’ i n p u t ’ : [ ’ hostname ’ , ’ domain ’ ] , ’ output ’ : [ ’ ip−s r c ’ , ’ ip−dst ’ ] }
moduleinfo = { ’ v e r s i o n ’ : ’ 0 . 1 ’ , ’ author ’ : ’ Alexandre Dulaunoy ’ ,
’ d e s c r i p t i o n ’ : ’ Simple DNS expansion s e r v i c e to r e s o l v e I P address from MISP a t t r i b u t e s ’ , ’ module−type ’ : [ ’ expansion ’ , ’ hover ’ ] }
def handler ( q= F a l s e ) :
i f q i s False :
return False
request = json . loads ( q )
i f request . get ( ’ hostname ’ ) :
toquery = request [ ’ hostname ’ ]
e l i f request . get ( ’ domain ’ ) :
toquery = request [ ’ domain ’ ]
else :
return False
r = dns . r e s o l v e r . Resolver ( )
r . timeout = 2
r . lifetime = 2
r . nameservers = [ ’ 8 . 8 . 8 . 8 ’ ]
try :
answer = r . query ( toquery , ’ A ’ )
except dns . r e s o l v e r . NXDOMAIN :
misperrors [ ’ e r r o r ’ ] = "NXDOMAIN"
r e t u r n misperrors
except dns . exception . Timeout :
misperrors [ ’ e r r o r ’ ] = " Timeout "
r e t u r n misperrors
except :
misperrors [ ’ e r r o r ’ ] = "DNS r e s o l v i n g e r r o r "
r e t u r n misperrors
r = { ’ r e s u l t s ’ : [ { ’ types ’ : m i s p a t t r i b u t e s [ ’ output ’ ] , ’ values ’ : [ s t r ( answer [ 0 ] ) ] } ] }
return r
def i n t r o s p e c t i o n ( ) :
return mispattributes
def v e r s i o n ( ) :
r e t u r n moduleinfo
11 20
Testing your module
12 20
Code samples (Configuration)
# C o n f i g u r a t i o n at the top
moduleconfig = [ ’ username ’ , ’ password ’ ]
# Code block i n the handler
i f request . get ( ’ c o n f i g ’ ) :
i f ( request [ ’ c o n f i g ’ ] . get ( ’ username ’ ) i s None ) or ( request [ ’ c o n f i g ’ ] . get ( ’ password ’ ) i s None ) :
misperrors [ ’ e r r o r ’ ] = ’ CIRCL P a s s i v e SSL a u t h e n t i c a t i o n i s missing ’
r e t u r n misperrors
−
x = p y p s s l . PyPSSL ( basic_auth = ( request [ ’ c o n f i g ’ ] [ ’ username ’ ] , request [ ’ c o n f i g ’ ] [ ’ password ’ ] ) )
13 20
Default expansion module set
asn history
CIRCL Passive DNS
CIRCL Passive SSL
Country code lookup
CVE information expansion
DNS resolver
DomainTools
eupi (checking url in phishing database)
IntelMQ (experimental)
ipasn
PassiveTotal -
http://blog.passivetotal.org/misp-sharing-done-differently
sourcecache
Virustotal
Whois
14 20
Import modules
15 20
Export modules
16 20
New expansion & import modules format
17 20
New expansion & import modules view (MISP
2.4.110
18 20
Future of the modules system
19 20
Q&A
https://github.com/MISP/misp-modules
https://github.com/MISP/
We welcome new modules and pull requests.
MISP modules can be designed as standalone application.
20 / 20
MISP Galaxy
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
MISP Galaxies
1 19
Solution
2 19
The galaxy object stack
3 19
(some) Existing galaxies
4 19
What a cluster looks like
5 19
Attaching clusters to events
6 19
Attaching clusters
7 19
Creating your own galaxy
8 19
Galaxy JSON
9 19
Cluster JSON
10 19
Cluster JSON value example
1 {
2 " meta " : {
3 " synonyms " : [
4 " APT 28 " , " APT28 " , "Pawn Storm " , " Fancy Bear " ,
5 " S e d n i t " , " TsarTeam " , " TG−4 1 2 7 " , " Group−4 1 2 7 " ,
6 " STRONTIUM " , " Grey−Cloud "
7 ],
8 " country " : "RU" ,
9 " refs " : [
10 " h t t p s : //en . w i k i p e d i a . org / w i k i / Sofacy_Group "
11 ]
12 },
13 " d e s c r i p t i o n " : " The Sofacy Group ( a l s o known as APT28 ,
14 Pawn Storm , Fancy Bear and S e d n i t ) i s a cyber
15 espionage group b e l i e v e d to have t i e s to the
16 Russian government . L i k e l y o p e r a t i n g s i n c e 2007 ,
17 the group i s known to t a r g e t government , m i l i t a r y ,
18 and s e c u r i t y o r g a n i z a t i o n s . I t has been
19 c h a r a c t e r i z e d as an advanced p e r s i s t e n t t h r e a t . " ,
20 " value " : " Sofacy "
21 },
11 19
meta best practices
12 19
meta best practices - a sample
1 {
2 " d e s c r i p t i o n " : " P u t t e r Panda were the s u b j e c t of an
e x t e n s i v e r e p o r t by CrowdStrike , which s t a t e d : ’ The
CrowdStrike I n t e l l i g e n c e team has been t r a c k i n g t h i s
p a r t i c u l a r u n i t s i n c e 201 2 , under the codename PUTTER
PANDA , and has documented a c t i v i t y d a t i n g back to 2007 .
The r e p o r t i d e n t i f i e s Chen Ping , aka cpyy , and the
primary l o c a t i o n of U n i t 6 1 486 . ’ " ,
3 " meta " : {
4 " c f r −suspected−s t a t e−sponsor " : " China " ,
5 " c f r −suspected−v i c t i m s " : [
6 "U . S . s a t e l l i t e and aerospace s e c t o r "
7 ],
8 " c f r −t a r g e t −c a t e g or y " : [
9 " Private sector " ,
10 " Government "
11 ],
12 " c f r −type−of−i n c i d e n t " : " Espionage " ,
13 " country " : "CN" ,
14 " refs " : [
15 " h t t p : //cdn0 . vox−cdn . com/ a s s e t s /4 58985 3/ c r o w d s t r i k e−
i n t e l l i g e n c e −report−putter−panda . o r i g i n a l . pdf " ,
16 " h t t p s : //www. c f r . org / i n t e r a c t i v e / cyber−o p er a ti o n s / putter
−panda "
17 ], 13 19
Galaxy JSON matrix-like
14 19
Galaxy JSON matrix-like
1 {
2 " d e s c r i p t i o n " : " U n i v e r s a l Development and S e c u r i t y G u i d e l i n e s as
A p p l i c a b l e to E l e c t i o n Technology . " ,
3 " icon " : "map" ,
4 "kill_chain_order": { \\Tab in the matrix
5 "example-of-threats": [ \\Column in the matrix
6 "setup | party/candidate-registration",
7 "setup | electoral-rolls",
8 "campaign | campaign-IT",
9 "all-phases | governement-IT",
10 "voting | election-technology",
11 "campaign/public-communication | media/press"
12 ]
13 },
14 "name" : " E l e c t i o n g u i d e l i n e s " ,
15 " namespace " : " misp " ,
16 " type " : " g u i d e l i n e s " ,
17 " uuid " : " c 1 dc03b2−89b3−4 2a5−9d4 1−7 82 e f 7 264 3 5a " ,
18 " version " : 1
19 }
15 19
Cluster JSON matrix-like
1 {
2 " d e s c r i p t i o n " : " DoS or overload of p a r t y /campaign
r e g i s t r a t i o n , causing them to miss the deadline " ,
3 " meta " : {
4 " date " : " March 201 8 . " ,
5 "kill_chain": [ \\Define in which column the cluster should be placed
6 "example-of-threats:setup | party/candidate-registration"
7 ],
8 " refs " : [
9 " h t t p s : //www. r i a . ee/ s i t e s / d e f a u l t / f i l e s / content−e d i t o r s /
kuberturve / c y b e r _ s e c u r i t y _ o f _ e l e c t i o n _ t e c h n o l o g y . pdf
"
10 ]
11 },
12 " uuid " : " 1 5 4 c6 1 86−a007−4 460−a029−ea2 3 1 63 4 48 f e " ,
13 " value " : " DoS or overload of p a r t y /campaign r e g i s t r a t i o n ,
causing them to miss the deadline "
14 }
16 19
Expressing relation between clusters
17 19
PyMISPGalaxies
18 19
Q&A
19 / 19
MISP Object Template
Building custom and open data models
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
Objects - or How We Learned to Stop Worrying
and Love the Templates
Attributes are a simple but powerful tool to describe data
Lacking the capability to create containers around attributes
describing a common concept
The goal was to develop something semi-standardised, with
the option to dynamically build templates
We have considered a list of different solutions such as
simple boolean operators, but found that the current
implementation was superior.
The result is a simple template that uses the basic attriubte
types as building blocks along with some meta data
The template does not have to be known in order to use the
constructed objects
What we maintain now is a set of common objects, but
similarly to our other JSON formats, users can extend it with
their own ideas.
1 11
MISP Object Templates
1
https://www.github.com/MISP/misp-objects/
2 11
Existing Object examples
3 11
Object Template skeleton
1 {
2 " requiredOneOf " : [ ] ,
3 " required " : [ ] ,
4 " attributes " : { } ,
5 " version " : 1 ,
6 " d e s c r i p t i o n " : "My d e s c r i p t i o n " ,
7 " meta−c a t e go r y " : " Chosen meta c a t e g o ry " ,
8 " uuid " : " Object template uuid " ,
9 "name" : " Object template name"
10 }
4 11
Adding elements to an object template
5 11
Attribute keys
7 11
What will the template actually do?
8 11
Templates as rendered in the UI
9 11
Templates as rendered in the UI
10 11
Q&A
https://github.com/MISP/MISP
https://github.com/MISP/misp-objects
[email protected] (if you want to join one of the MISP community
operated by CIRCL)
PGP key fingerprint: CA57 2205 C002 4E06 BA70 BE89 EAAD
CFFC 22BD 4CD5
11 / 11
MISP Dashboard
Real-time overview of threat intelligence from
MISP instances
CIRCL / Team MISP Project
February 9, 2023
Threat Sharing
MISP ZeroMQ
1 14
MISP ZeroMQ
2 14
MISP ZeroMQ
1
Security Information & Event Management
3 14
MISP-Dashboard: An
introduction
4 14
MISP-Dashboard - Realtime activities and threat
intelligence
5 14
MISP-Dashboard - Features
6 14
MISP-Dashboard: Architecture
and development
7 14
Setting up the dashboard
8 14
MISP-Dashboard architecture
9 14
Writing your handler
10 14
1 # Implement your handler
2
3 # e.g. user handler
4 def handler_user(zmq_name, jsondata):
5 # json action performed by the user
6 action = jsondata[’action’]
7 # user json data
8 json_user = jsondata[’User’]
9 # organisation json data
10 json_org = jsondata[’Organisation’]
11 # organisation name
12 org = json_org[’name’]
13 # only consider user login
14 if action == ’login’:
15 timestamp = time.time()
16 # users_helper is a class to interact with the DB
17 users_helper.add_user_login(timestamp, org)
18
11 14
Recent changes in the misp-dashboard
12 14
Future development
13 14
Conclusion
14 / 14
Contributing to the MISP Project
Become part of the community to design, develop
and improve information sharing
CIRCL / Team MISP Project
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
Code of Conduct
1
https://github.com/MISP/MISP/code_of_conduct.md
1 7
Reporting a bug, an issue or suggesting features
2 7
Reporting security vulnerabilities
3 7
Automatic integration and testing
8
https://github.com/MISP/misp-rfc
9
https://datatracker.ietf.org/doc/search/?name=misp&
activedrafts=on&rfcs=on
7/7
MISP core development crash
course
How I learned to stop worrying and love the PHP
CIISI-IE
Threat Sharing
Some things to know in advance...
1 18
MVC frameworks in general
2 18
Structure of MISP Core app directories
3 18
Controllers - scope
4 18
Controllers - functionalities of controllers
pagination functionality
logging functionality
Controllers actions can access functionality / variables of
Models
Controllers cannot access code of other controller actions
(kind of...)
Access to the authenticated user’s data
beforeFilter(), afterFilter() methods
Inherited code in AppController
5 18
Controllers - components
6 18
Controllers - additional functionalities
7 18
Models - scope
8 18
Models - hooking system
9 18
Model - hooking pipeline (add/edit)
10 18
Models - hooking pipeline (delete/read)
11 18
Models - misc
12 18
Views - scope and structure
13 18
Views - Types of views and helpers
14 18
Views - Generators
Mostly in genericElements
Preparing the move to Cake4
Important ones
I Form - generate forms in a standardised way (/add, /edit, etc)
I IndexTable - index lists using Field templates (/index, etc)
I SingleViews - key-value lists with child elements (/view, etc)
I Menues - to be refactored, see Cerebrate
15 18
General reusable libraries
Located in app/Lib
Code that is to be reused across several layers
Important ones
I Dashboard - Dashboard widget backend code
I EventReport - Report generation
I Export - MISP -> external format converter modules
I Tools - List of generic helper libraries - examples:
Attachment, JSON conversion, random generation, emailing,
sync request generation
Kafka, ZMQ, AWS S3, Elastic integration, PGP encryption, CIDR
operations
16 18
Distribution
17 18
Testing your code
funtional testing
Github actions
impact scope
I view code changes: only impacts request type based views
I controller code changes: Should only affect given action
I model code changes: can have impact on entire application
I lib changes: can have affect on the entire application
Don’t forget: queryACL, change querystring
18 / 18
Deep-dive into PyMISP
MISP - Threat Sharing
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
Context
1 21
Big picture
2 21
Common queries: Recent changes on a timeframe
3 21
Common queries: Search things
4 21
Common queries: create things
5 21
Administrative tasks
6 21
Other Capabilities
Upload/download samples
Proposals: add, edit, accept, discard
Sightings: Get, set, update
Export statistics
Manage feeds
Get MISP server version, recommended PyMISP version
And more, look at the api file
7 21
MISPEvent - Usecase
# Mark an a t t r i b u t e as d e l e t e d ( From 2 . 4 . 6 0 )
event . d e l e t e _ a t t r i b u t e ( ’ < A t t r i b u t e UUID> ’ )
# Dump as j so n
event_as_jsondump = json . dumps ( event , c l s =EncodeUpdate )
8 21
Basics
9 21
Examples
10 21
Examples
11 21
Usage
Basic example
from pymisp import PyMISP
a pi = PyMISP ( u r l , apikey , v e r i f y c e r t = True , debug= False , p r o x i e s =None )
response = api . < f u n c t i o n >
i f response [ ’ e r r o r ’ ] :
# <something went wrong >
else :
# <do something with the output >
12 21
Concept behind AbstractMISP
13 21
MISPEvent, MISPAttribute, MISPObject,
MISPSighting...
14 21
MISPEvent - Main entrypoints
load_file(event_path)
load(json_event)
add_attribute(type, value, **kwargs)
add_object(obj=None, **kwargs)
add_attribute_tag(tag, attribute_identifier)
get_attribute_tag(attribute_identifier)
add_tag(tag=None, **kwargs)
objects[], attributes[], tags[]
edited, all other paramaters of the MISPEvent element (info,
date, ...)
to_json()
15 21
MISPObject - Main entrypoints
add_attribute(object_relation, **value)
add_reference(referenced_uuid, relationship_type,
comment=None, **kwargs)
has_attributes_by_relation(list_of_relations)
get_attributes_by_relation(object_relation)
attributes[], relations[]
edited, all other paramaters of the MISPObject element
(name, comment, ...)
to_json()
Can be validated against their template
Can have default parameters applied to all attributes (i.e.
distribution, category, ...)
16 21
MISPAttribute - Main entrypoints
add_tag(tag=None, **kwargs)
delete()
malware_binary (if relevant)
tags[]
edited, all other paramaters of the MISPObject element
(value, comment, ...)
to_json()
17 21
PyMISP - Tools
18 21
PyMISP - Default objects generators
19 21
PyMISP - Logging / Debugging
l o g g e r = l o g g i n g . getLogger ( ’ pymisp ’ )
l o g g e r . s e t L e v e l ( l o g g i n g . DEBUG ) # enable debug to stdout
20 21
Q&A
https://github.com/MISP/PyMISP
https://github.com/MISP/
https://pymisp.readthedocs.io/
We welcome new functionalities and pull requests.
21 / 21
MISP feeds - A simple and secure
approach to generate, select and
collect intelligence
Providing ready-to-use threat intelligence in
MISP standard format
CIRCL / Team MISP Project
TLP:WHITE
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
MISP Feed - Basics
1 10
Feed - Overview
1 https://github.com/MISP/MISP/blob/2.4/app/files/feed-metadata/
defaults.json
2 http://www.misp-project.org/feeds/
2 10
Feed - Operations
3 10
Feed - Creation using PyMISP feed generator
Particularly,
Used to generate the CIRCL OSINT feed
Export events as json based on tags, organisation, events, ...
Automatically update the dumps and the metadata file
Comparable to a lighweight TAXII interface
4 10
Feed generator - configuration file
1 url = ’your/misp/url’
2 key = ’YourAPIKey’
3 ssl = True
4 outputdir = ’output_directory’
5
6 filters = {
7 ’tag’:’tlp:white|feed-export|!privint’,
8 ’org’:’CIRCL’
9 }
10 # the above would generate a feed for all events created by CIRCL,
tagged tlp:white and/or feed-export but exclude anything
tagged privint
11
12 valid_attribute_distribution_levels = [’0’, ’1’, ’2’, ’3’, ’4’, ’5
’]
13 # 0: Your Organisation Only
14 # 4: Sharing Group
15 # 5: Inherit Event
16
5 10
Real-time Feed generator - Purpose
Honeypot MISP
ip-src
payload-delivery
url
malware
...
6 10
Real-time Feed generator - Usage
7 10
Real-time Feed generator - Usage (2)
8 10
Adding custom feed to MISP
Enabled
Lookup visible
Name
Provider
Source Format
Url
Source Format
Headers
Distribution
Default Tag
Filter rules
9 10
Q&A
https://github.com/MISP/PyMISP
https://github.com/MISP/
We welcome new functionalities and pull requests.
10 / 10
MISP workshop
Introduction into Information Sharing using
MISP for CSIRTs
Team CIRCL
TLP:WHITE
CIISI-IE
Threat Sharing
Plan for this session
1
We published the complete guidelines in https://www.x-isac.org/
assets/images/guidelines_to_set-up_an_ISAC.pdf
1 31
Communities operated by CIRCL
2 31
Communities operated by CIRCL
3 31
Communities operated by CIRCL
2
https://www.x-isac.org/
4 31
Communities operated by CIRCL
3
https://www.attack-community.org/
4
Tactics, Techniques and Procedures
5 31
Communities supported by CIRCL
6 31
Sharing Scenarios in MISP
7 31
CSIRT core services
Incident response
I Internal storage of incident response data
I Sharing of indicators derived from incident response
I Correlating data derived and using the built in analysis tools
I Enrichment services
I Collaboration with affected parties via MISP during IR
I Co-ordination and collaboration
I Takedown requests
Alerting of information leaks (integration with AIL5 )
5
https://www.ail-project.org/
8 31
CSIRT proactive services
9 31
CSIRT advanced services
10 31
CSIRTs’ management of sharing communities for
constituent actions:
11 31
A quick note on compliance...
12 31
Bringing different sharing communities
together
13 31
Advantages of cross sectorial sharing
14 31
Getting started with building your own sharing
community
15 31
Getting started with building your own sharing
community
16 31
Running a sharing community using MISP - How
to get going?
17 31
Rely on our instincts to immitate over expecting
adherence to rules
18 31
What counts as valuable data?
19 31
How to deal with organisations that only
"leech"?
20 31
So how does one convert the passive organisa-
tions into actively sharing ones?
21 31
Dispelling the myths around blockers when it
comes to information sharing
22 31
Contextualising the information
23 31
Choice of vocabularies
24 31
Shared libraries of meta-information (Galaxies)
25 31
False-positive handling
26 31
Many objectives from different user-groups
27 31
False-positive handling
28 31
Managing sub-communities
29 31
Managing sub-communities
30 31
Get in touch if you need some help to get started
31 / 31
MISP and Decaying of Indicators
An indicator scoring method and ongoing imple-
mentation in MISP
Team CIRCL
February 9, 2023
Threat Sharing
Expiring IOCs: Why and How?
1 29
Indicators - Problem Statement
2 29
Indicators - Problem Statement
3 29
Indicators - Problem Statement
3 29
Requirements to enjoy the decaying feature in
MISP
4 29
Sightings - Refresher
5 29
Organisations opt-in - setting a level of
confidence
6 29
Taxonomies - Refresher (1)
7 29
Taxonomies - Refresher (2)
9 29
Scoring Indicators: Our solution
Where,
score ∈ [0, +∞
base_score ∈ [0, 100]
decay is a function defined by model’s parameters
controlling decay speed
Attribute Contains Attribute’s values and metadata
(Taxonomies, Galaxies, ...)
10 29
Current implementation in
MISP
11 29
Implementation in MISP: Event/view
12 29
Implementation in MISP: API result
/attributes/restSearch
1 "Attribute": [
2 {
3 "category": "Network activity",
4 "type": "ip-src",
5 "to_ids": true,
6 "timestamp": "1565703507",
7 [...]
8 "value": "8.8.8.8",
9 "decay_score": [
10 {
11 "score": 54.475223849544456,
12 "decayed": false,
13 "DecayingModel": {
14 "id": "85",
15 "name": "NIDS Simple Decaying Model"
16 }
17 }
18 ],
19 [...]
20 13 29
Implementation in MISP: Playing with Models
14 29
Decaying Models in Depth
15 29
Scoring Indicators: base_score (1)
→ base_score = tags
17 29
Scoring Indicators: decay speed (1)
18 29
Scoring Indicators: putting it all toghether
τ = lifetime
δ = decay speed
19 29
Implementation in MISP: Models definition
1
score = base_score · 1 − τt δ
Models are an instanciation of the formula where elements can
be defined:
Parameters: lifetime, decay_rate, threshold
base_score
default base_score
formula
associate Attribute types
creator organisation
20 29
Implementation in MISP: Models Types
3
https://github.com/MISP/misp-decaying-models.git
21 29
Implementation in MISP: Index
23 29
Implementation in MISP: base_score tool
25 29
Implementation in MISP: API query body
/attributes/restSearch
1 {
2 "includeDecayScore": 1,
3 "includeFullModel": 0,
4 "excludeDecayed": 0,
5 "decayingModel": [85],
6 "modelOverrides": {
7 "threshold": 30
8 }
9 "score": 30,
10 }
11
26 29
Creating a new decay algorithm (1)
27 29
Creating a new decay algorithm (2)
1 <?php
2 include_once ’ Base . php ’ ;
3
4 c l a s s Polynomial extends DecayingModelBase
5 {
6 p u b l i c const DESCRIPTION = ’ The d e s c r i p t i o n of your new
decaying a l g o r i t h m ’ ;
7
8 p u b l i c f u n c t i o n computeScore ( $model , $ a t t r i b u t e , $base_score ,
$elapsed_time )
9 {
10 // a l g o r i t h m r e t u r n i n g a numerical score
11 }
12
13 p u b l i c f u n c t i o n isDecayed ( $model , $ a t t r i b u t e , $score )
14 {
15 // a l g o r i t h m r e t u r n i n g a boolean s t a t i n g
16 // i f the a t t r i b u t e i s expired or not
17 }
18 }
19 ?>
20
28 29
Decaying Models 2.0
Improved support of Sightings
I False positive Sightings should somehow reduce the
score
I Expiration Sightings should mark the attribute as decayed
Potential Model improvements
I Instead of resetting the score to base_score once a
Sighting is set, the score should be increased additively
(based on a defined coefficient); thus prioritizing surges
rather than infrequent Sightings
I Take into account related Tags or Correlations when
computing score
Increase Taxonomy coverage
I Users should be able to manually override the
numerical_value of Tags
For specific type, take into account data from other services
I Could fetch data from BGP ranking, Virus Total, Passive X for
IP/domain/... and adapt the score
29 / 29
MISP and Decaying of Indicators
Primer for indicator scoring in MISP
Team CIRCL
February 9, 2023
Threat Sharing
Outline of the presentation
1 26
Expiring IOCs: Why and How?
2 26
Indicators lifecycle - Problem Statement
3 26
Indicators lifecycle - Problem Statement
4 26
Indicators lifecycle - Problem Statement
4 26
Requirements to enjoy the decaying feature in
MISP
5 26
Sightings - Refresher (1)
6 26
Sightings - Refresher (2)
7 26
Taxonomies - Refresher (1)
8 26
Taxonomies - Refresher (2)
admirality-scale taxonomy1
Description Value Description Value
Completely reliable 100 Confirmed by other sources 100
Usually reliable 75 Probably true 75
Fairly reliable 50 Possibly true 50
Not usually reliable 25 Doubtful 25
Unreliable 0 Improbable 0
Reliability cannot be judged 50 Truth cannot be judged 50
Deliberatly deceptive 0
1
https://github.com/MISP/misp-taxonomies/blob/master/
admiralty-scale/machinetag.json
10 26
Taxonomies - Refresher (3)
admirality-scale taxonomy2
Description Value Description Value
Completely reliable 100 Confirmed by other sources 100
Usually reliable 75 Probably true 75
Fairly reliable 50 Possibly true 50
Not usually reliable 25 Doubtful 25
Unreliable 0 Improbable 0
Reliability cannot be judged 50 ? Truth cannot be judged 50 ?
Deliberatly deceptive 0?
2
https://github.com/MISP/misp-taxonomies/blob/master/
admiralty-scale/machinetag.json
11 26
Scoring Indicators: Our solution
base_score(Attribute, Model )
I Initial score of the Attribute only considering the context
(Attribute’s type, Tags)
decay(Model, )
time
12 26
Scoring Indicators: Our solution
score
base_score
time
13 26
Current implementation in
MISP
14 26
Implementation in MISP: Event/view
15 26
Implementation in MISP: API result
/attributes/restSearch
1 "Attribute": [
2 {
3 "category": "Network activity",
4 "type": "ip-src",
5 "to_ids": true,
6 "timestamp": "1565703507",
7 [...]
8 "value": "8.8.8.8",
9 "decay_score": [
10 {
11 "score": 54.475223849544456,
12 "decayed": false,
13 "DecayingModel": {
14 "id": "85",
15 "name": "NIDS Simple Decaying Model"
16 }
17 }
18 ],
19 [...]
20 16 26
Implementation in MISP: Objectives
17 26
Implementation in MISP: Models definition
1
score = base_score · 1 − τt δ
Models are an instanciation of the formula with configurable
parameters:
Parameters: lifetime, decay_rate, threshold
base_score computation
default base_score
associate Attribute types
formula
creator organisation
18 26
Implementation in MISP: Models Types
3
https://github.com/MISP/misp-decaying-models.git
19 26
Implementation in MISP: Index
21 26
Implementation in MISP: base_score tool
23 26
Implementation in MISP: API query body
/attributes/restSearch
1 {
2 "includeDecayScore": 1,
3 "includeFullModel": 0,
4 "excludeDecayed": 0,
5 "decayingModel": [85],
6 "modelOverrides": {
7 "threshold": 30
8 }
9 "score": 30,
10 }
11
24 26
Creating a new decay algorithm
1 <?php
2 include_once ’ Base . php ’ ;
3
4 c l a s s Polynomial extends DecayingModelBase
5 {
6 p u b l i c const DESCRIPTION = ’ The d e s c r i p t i o n of your new
decaying a l g o r i t h m ’ ;
7
8 p u b l i c f u n c t i o n computeScore ( $model , $ a t t r i b u t e , $base_score ,
$elapsed_time )
9 {
10 // a l g o r i t h m r e t u r n i n g a numerical score
11 }
12
13 p u b l i c f u n c t i o n isDecayed ( $model , $ a t t r i b u t e , $score )
14 {
15 // a l g o r i t h m r e t u r n i n g a boolean s t a t i n g
16 // i f the a t t r i b u t e i s expired or not
17 }
18 }
19 ?>
20
25 26
Decaying Models 2.0
26 / 26
Forensic support in MISP
Tools and visualization to support digital
forensic expert
Team CIRCL
February 9, 2023
Threat Sharing
DFIR and MISP digital evidences
1
MISP has a flexible correlation engine which can correlate on 1-to-1 value
matches, but also on fuzzy hashing (e.g. ssdeep) or CIDR block matching.
1 5
Benefits of using MISP
2 5
Challenges and implementations
3 5
Forensic import (MISP 2.4.98)
5/5
MISP restSearch API
An easy way to query, add and update your threat
intelligence in MISP
CIRCL / Team MISP Project
CIISI-IE
MISP API reworked
1 10
Goals we’ve set for ourselves
2 10
Export API’s reimagined
3 10
Export API’s reimagined
4 10
Performance tuning
5 10
Designing tools that use the APIs can be com-
plex, but there’s help
6 10
Why is the search API receiving so much focus?
7 10
CLI tools for the CLI God, automation for the au-
tomation throne
8 10
So what does all of this look like in practice?
Demo time!
9 10
Plans for the future
10 / 10
Best Practices in Threat Intelli-
gence
Gather, document, analyse and contextualise in-
telligence using MISP
CIRCL / Team MISP Project
MISP Project
https://www.misp-project.org/
CIISI-IE
Threat Sharing
Objectives
1
https:
//gist.github.com/adulau/8c1de48060e259799d3397b83b0eec4f
1 12
(Threat) Intelligence
2 12
Overall process of collecting and analysing
OSINT
3 12
Meta information and contextualisation 1/2
2
https://www.misp-project.org/taxonomies.html
4 12
Meta information and contextualisation 2/2
3
https://www.misp-project.org/galaxy.html
5 12
Estimative Probability
4
https:
//www.cia.gov/library/center-for-the-study-of-intelligence/
csi-publications/books-and-monographs/
sherman-kent-and-the-board-of-national-estimates-collected-essa
6words.html
5
https://www.misp-project.org/taxonomies.html
6 12
Reliability, credibility, and confidence
8 12
How to select the right object?
10
https://www.misp-project.org/objects.html
9 12
microblog object
Use case
A series of OSINT tweets from a
security researcher. To
structure the thread, the Object to use
information, and keep a history. The microblog object can be
used for Tweets or any
microblog post (e.g. Facebook).
The object can be linked using
followed-by to describe a series
of post.
10 12
file object
Object to use
Use case The file object can be used to
A file sample was received describe file. It’s usual to have
by email or extracted from partial meta information such
VirusTotal as a single hash and a filename.
A list of file hashes were
included in a report
A hash value was
mentioned in a blog post
11 12
References
12 / 12
MISP core development hands-on
exercise
Building a small nifty feature for the MISP core
CIISI-IE
Threat Sharing
Some practical things first...
1 20
Let’s try to develop a feature together
Idea: Users should have the option to set alert filters for the
publish alert e-mails
By default receive all alerts as before
If a filter is set, check if the alert is interesting for us or not
2 20
How to ensure that the feature is useful for the
community at large?
3 20
User settings - a long overdue feature
4 20
Objectives of the feature
5 20
Before we start with anything...
6 20
Implementation
Storage:
I Single key/value table for all settings
I Each user should be able to set a single instance of a key
I Values could possible become complex, let’s use JSON!
I Add timestamping for traceability
I Consider which fields we might want to look-up frequently for
indexing
7 20
The database changes we need
8 20
Checklist
9 20
Create the new Model skeleton
location: /var/www/MISP/app/Model/UserSetting.php
Create basic skeleton
Add model relationships (hasMany/BelongsTo)
Use the hooking functionality to deal with the JSON field
(beforeSave(), beforeFind())
Add a function that can be used to check if a user should get
an alert based on filters (checkPublishFilter())
Add a function to check if a user can access/modify a setting
(checkAccess())
10 20
Create the Controller skeleton
location: /var/www/MISP/app/Model/UserSetting.php
Create basic skeleton
Set pagination rules
Define CRUD functions (exceptionally, we diverge here from
the norm)
I setSetting()
I getSetting()
I index()
I delete()
11 20
Start with an API only approach at first
setSetting():
I Accepted methods: ADD / POST
I Separate handling of API / UI
I POST should create/update an entry
I GET should describe the API
12 20
getSetting / index
getSetting():
I Accepted methods: GET
I Retrieves a single setting based on either ID or setting key
and user_id
I Encode the data depending on API/UI
I Accepted methods: GET
I List all settings
I Filter user scope on demand
I Filter available scopes based on role
13 20
delete
delete():
I Accepted methods: POST / DELETE
I Deletes a single entry based on ID or setting key
I Encode the data depending on API/UI
14 20
Add the ACL functionalities
15 20
Test the functionalities
16 20
Start adding the UI components
17 20
Add the checkPublishFilter() function to the e-
mailing
18 20
Test if our code works correctly
19 20
Push our code to our fork and create a pull
request
20 / 20
MISP restSearch module develop-
ment
Building a simple export module for the core
CIISI-IE
Threat Sharing
Building a native restSearch export
1 28
Building a native restSearch export
2 28
So how does restSearch work?
3 28
Where does the module system come into play?
4 28
Our little training module: Nibbler, the ever
hungry IDS/IPS
5 28
Nibbler
6 28
Nibbler format - caveats
7 28
Nibbler format
8 28
Supported types
IP
Domain
Hostname
MD5
SHA1
SHA256
Filename
9 28
Supported values
10 28
Mapping the types to MISP
11 28
Mapping the types to MISP
ip-dst :: IP
ip-src :: IP
domain :: Domain
domain|ip :: Domain, IP
hostname :: Hostname
md5 :: MD5
sha1 :: SHA1
sha256 :: SHA256
filename|md5 :: Filename, MD5
malware-sample :: Filename, MD5
filename|sha1 :: Filename, SHA1
filename|sha256 :: Filename, SHA256
12 28
Export module skeleton
<?php
class NibblerExport
{
p u b l i c $additional_params = a r r a y ( ) ;
p u b l i c f u n c t i o n handler (
$data , $options = a r r a y ( )
) {}
p u b l i c f u n c t i o n header (
$options = a r r a y ( )
) {}
public function footer ( ) { }
public function separator ( ) { }
}
13 28
Additional parameters
p u b l i c $additional_params = a r r a y (
’ f l a t t e n ’ => 1
);
14 28
Adding our mapping
p r i v a t e $__mapping = a r r a y (
’ ip−dst ’ => ’ IP ’ ,
’ ip−src ’ => ’ IP ’ ,
’ domain ’ => ’ Domain ’ ,
’ domain | ip ’ => [ ’ Domain ’ , ’ IP ’ ] ,
’ hostname ’ => ’ Hostname ’ ,
’md5 ’ => ’ MD5 ’ ,
’ sha1 ’ => ’ SHA1 ’ ,
’ sha256 ’ => ’ SHA256 ’ ,
’ filename |md5 ’ = > a r r a y ( ’ Filename ’ , ’ MD5 ’ ) ,
’ malware−sample ’ = > a r r a y ( ’ Filename ’ , ’ MD5 ’ ) ,
’ filename | sha1 ’ = > a r r a y ( ’ Filename ’ , ’ SHA1 ’ ) ,
’ filename | sha256 ’ = > a r r a y ( ’ Filename ’ , ’ SHA256 ’ )
);
15 28
Writing the start of the output
p u b l i c f u n c t i o n header ( $options = a r r a y ( ) )
{
return s p r i n t f (
"# N i b b l e r r u l e s generated by MISP a t %s \n " ,
date ( ’ Y−m−d H : i : s ’ )
);
}
16 28
Footer function - how should the output end?
17 28
What separates the chunks?
18 28
The actual legwork, the handler
19 28
Building an optional internal converter
function
p r i v a t e f u n c t i o n _ _ c o n v e r t A t t r i b u t e ( $ a t t r i b u t e , $even
{
i f ( empty ( $ t h i s −>__mapping [ $ a t t r i b u t e [ ’ type ’ ] ] ) ) {
// mapping not found − i n v a l i d type f o r n i b b l e r
return ’ ’ ;
}
i f ( i s _ a r r a y ( $ t h i s −>__mapping [ $ a t t r i b u t e [ ’ type ’ ] ] ) )
// handle mappings f o r composites − s l i d e
} else {
// handle simple mappings − s l i d e
}
// r e t u r n 1 or 2 l i n e s , separated by s e p a r a t o r ( )
r e t u r n implode ( $ t h i s −>s e p a r a t o r ( ) , $ r e s u l t ) ;
}
20 28
Handling the simple case
$result [ ] = sprintf (
’% s|%s|%s|%s|%s ’ ,
$ t h i s −>__escapeSpecialChars ( $ a t t r i b u t e [ ’ value ’ ] ) ,
$ t h i s −>__mapping [ $ a t t r i b u t e [ ’ type ’ ] ] ,
$event [ ’ uuid ’ ] ,
$ t h i s −>__escapeSpecialChars ( $event [ ’ i n f o ’ ] ) ,
’ ALERT ’
);
21 28
Handling the case for composites
$ a t t r i b u t e [ ’ value ’ ] = explode (
’ | ’ , $ a t t r i b u t e [ ’ value ’ ]
);
foreach ( a r r a y ( 0 , 1 ) as $ p a r t ) {
$result [ ] = sprintf (
’% s|%s|%s|%s|%s ’ ,
$ t h i s −>__escapeSpecialChars (
$ a t t r i b u t e [ ’ value ’ ] [ $ p a r t ]
),
$ t h i s −>__mapping [ $ a t t r i b u t e [ ’ type ’ ] ] [ $ p a r t ] ,
$event [ ’ uuid ’ ] ,
$ t h i s −>__escapeSpecialChars ( $event [ ’ i n f o ’ ] ) ,
’ ALERT ’
);
}
22 28
Putting it together
p r i v a t e f u n c t i o n _ _ c o n v e r t A t t r i b u t e ( $ a t t r i b u t e , $event ) {
i f ( empty ( $ t h i s −>__mapping [ $ a t t r i b u t e [ ’ type ’ ] ] ) ) r e t u r n ’ ’ ;
$result = array ( ) ;
$attributes = array ( ) ;
i f ( i s _ a r r a y ( $ t h i s −>__mapping [ $ a t t r i b u t e [ ’ type ’ ] ] ) ) {
$ a t t r i b u t e [ ’ value ’ ] = explode ( ’ | ’ , $ a t t r i b u t e [ ’ value ’ ] ) ;
foreach ( a r r a y ( 0 , 1 ) as $part ) {
$result [ ] = sprintf (
’% s|%s|%s|%s|%s ’ ,
$ t h i s −>__escapeSpecialChars ( $ a t t r i b u t e [ ’ value ’ ] [ $pa rt ] ) ,
$ t h i s −>__mapping [ $ a t t r i b u t e [ ’ type ’ ] ] [ $part ] ,
/ events / view / . $event [ ’ uuid ’ ] ,
$ t h i s −>__escapeSpecialChars ( $event [ ’ i n f o ’ ] ) ,
$ t h i s −>__decideOnAction ( $ a t t r i b u t e [ ’ A t t r i b u t e T a g ’ ] )
);
}
} else {
$result [ ] = sprintf (
’% s|%s|%s|%s|%s ’ ,
$ t h i s −>__escapeSpecialChars ( $ a t t r i b u t e [ ’ value ’ ] ) ,
$ t h i s −>__mapping [ $ a t t r i b u t e [ ’ type ’ ] ] ,
/ events / view / . $event [ ’ uuid ’ ] ,
$ t h i s −>__escapeSpecialChars ( $event [ ’ i n f o ’ ] ) ,
$ t h i s −>__decideOnAction ( $ a t t r i b u t e [ ’ A t t r i b u t e T a g ’ ] )
);
}
r e t u r n implode ( $ t h i s −>s e p a r a t o r ( ) , $ r e s u l t ) ;
}
23 28
Adding the function that decides on the action
p r i v a t e f u n c t i o n __decideOnAction ( $ a t t r i b u t e T a g s )
{
foreach ( $ a t t r i b u t e T a g s as $ a t t r i b u t e T a g ) {
if (
$ a t t r i b u t e T a g [ ’ Tag ’ ] [ ’ name ’ ] ===
’ n i b b l e r : block ’
) {
r e t u r n ’ BLOCK ’ ;
}
}
r e t u r n ’ ALERT ’ ;
}
24 28
Finalising the export module... The escaping
function
p r i v a t e f u n c t i o n __escapeSpecialChars ( $value )
{
$value = preg_replace (
"/\ r |\ n / " , "## LINEBREAK # # " , $value
);
$value = preg_replace (
" / , / " , "##COMMA# # " , $value
);
$value = preg_replace (
" / \ | / " , "## PIPE # # " , $value
);
r e t u r n $value ;
}
25 28
Modifying the MISP core to know about the ex-
port module
26 28
Let us test the module!
27 28
REST client
28 / 28
MISP - Galaxy 2.0
Method for sharing threat intelligence
Team CIRCL
February 9, 2023
Threat Sharing
Outline of the presentation
1 12
MISP Galaxy 2.0
Galaxy 2.0 introduces various new features for Galaxies and their
Clusters allowing:
Creation of custom Clusters
ACL on Clusters
Connection of Clusters via Relations
Synchronization to connected instances.
Visualization of forks and relationships
2 12
Default Galaxy clusters
4 12
MISP Galaxy 2.0 - Others changes
Role perm_galaxy_editor
Relations also have a distribution and can have Tags
Synchronization servers have 2 new flags
I pull_galaxy_clusters
I push_galaxy_clusters
Clusters blocklist
5 12
Features in depth: CRUD
Standard CRUD
Soft and Hard deletion
Publishing
Update forked cluster to keep it synchronized with its parent
ACL on the Cluster itself, not on its tag
I misp-galaxy:galaxy-type="cluster UUID"
I misp-galaxy:mitre-attack-pattern="e4932f21-4867-4de6-849a-1b11e48e2682"
6 12
Features in depth: Visualization
7 12
Features in depth: Visualization
Tree and network views for Relations between Clusters
8 12
Features in depth: Visualization
Tree and network views for Relations between Clusters
9 12
Galaxy cluster elements
2
Will be included in next release
10 12
Galaxy cluster elements
JSON view
Allows you to visualisation cluster element in a JSON
structure
Allows you to convert any JSON into cluster elements
enabling searches and correlations
11 12
Synchronization in depth
Pull All: Pull all remote Clusters (similar to event’s pull all)
Pull Update: Update local Clusters (similar to event’s pull
update)
Pull Relevant: Pull missing Clusters based on local Tags
Push: Triggered whenever a Cluster is published or via
standard push
12 / 12
An Introduction to Cybersecu-
rity Information Sharing
MISP - Threat Sharing
MISP Project
https://www.misp-project.org/
CIISI-IE
Threat Sharing
Content of the presentation
1 36
Layers of data model
Data layer
I The raw data itself as well as element to link them together
I Indicators, Observables and means to contextually link them
I MISP terminology: Event, Attributes, misp-objects, ...
Context layer
I As important as the data layer, allow triage, false-positive
management, risk-assessment and prioritisation
I Latches on the data layer, usually referencing threat
intelligence, concepts, knowledge base and vocabularies
I Tags, Taxonomies, Galaxies, ...
2 36
Data sharing in MISP
Sharing in MISP: Distribution
MISP offers granulars distribution settings:
Organisation only
This community
Connected communities
All communities
Distribution lists - aka Sharing groups
4 36
Data layer
Data layer: Naming conventions
Data layer
I Events are encapsulations for contextually linked information
I Attributes are individual data points, which can be indicators
or supporting data.
I Objects are custom templated Attribute compositions
I Object references are the relationships between individual
building blocks
I Shadow Attributes/Proposal are suggestions made by users
to modify an existing attribute
I Sightings are a means to convey that a data point has been
seen
I Event reports are supporting materials for analysts to
describe events, processes, etc
5 36
Data layer: Events
Events are encapsulations for contextually linked information
Purpose: Group datapoints and context together. Acting as
an envelop, it allows setting distribution and sharing rules
for itself and its children.
Usecase: Encode incidents / events / reports / ...
6 36
Data layer: Event building blocks - Base
7 36
Data layer: Events
1 {
2 " date " : " 2019−02−20 " ,
3 " i n f o " : " I o T malware − G a f g y t . Gen28 ( a c t i v e ) " ,
4 " uuid " : " 5 c6d21e5−bb60−47b7−b892−42e6950d2111 " ,
5 " analysis " : "2" ,
6 " timestamp " : " 1602315388 " ,
7 " distribution " : "3" ,
8 " s h a r i n g _ g r o u p _ i d " : "0" ,
9 " threat_level_id " : "3" ,
10 " extends_uuid " : " " ,
11 " Attribute " : [ . . . ] ,
12 " Object " : [ . . . ] ,
13 " EventReport " : [ . . . ] ,
14 " Tag " : [ . . . ] ,
15 " Galaxy " : [ . . . ]
16 }
8 36
Data layer: Attributes
9 36
Data layer: Event building blocks - Raw data
10 36
Data layer: Attributes
1 {
2 " type " : " u r l " ,
3 " c a t ego r y " : " Network a c t i v i t y " ,
4 " t o _ i d s " : true ,
5 " uuid " : " 5 c6d24bd−d094−4dd6−a1b6−4f a 3 9 5 0 d 2 1 1 1 " ,
6 " e ven t_i d " : " 178 " ,
7 " distribution " : "5" ,
8 " s h a r i n g _ g r o u p _ i d " : "0" ,
9 " timestamp " : " 1550656701 " ,
10 "comment" : " D e l i v e r y p o i n t f o r the malware " ,
11 " o b j e c t _ i d " : "0" ,
12 " object_relation " : null ,
13 " first_seen " : null ,
14 " last_seen " : null ,
15 " value " : " f t p : / / 1 8 5 . 1 3 5 . 8 0 . 1 6 3 / " ,
16 " Tag " : [ . . . ]
17 " Galaxy " : [ . . . ]
18 }
11 36
Data layer: MISP Objects
Objects are custom templated Attribute compositions
Purpose: Groups Attributes that are intrinsically linked
together
Usecase: File, person, credit-card, x509, device, ...
12 36
Data layer: Event building blocks - Data
composition
13 36
Data layer: MISP Objects
1 {
2 "name" : " e l f −s e c t i o n " ,
3 " meta−c a t e go r y " : " f i l e " ,
4 " d e s c r i p t i o n " : " Object d e s c r i b i n g a s e c t . . . " ,
5 " template_uuid " : " c a 2 7 1 f 3 2 −1234−4e87−b240−6b6e882de5de " ,
6 " template_version " : " 4 " ,
7 " uuid " : " ab5f0c85 −5623−424c−bc03−d79841700d74 " ,
8 " timestamp " : " 1550655984 " ,
9 " distribution " : "5" ,
10 " s h a r i n g _ g r o u p _ i d " : "0" ,
11 "comment" : " " ,
12 " first_seen " : null ,
13 " last_seen " : null ,
14 " ObjectReference " : [ ] ,
15 " Attribute " : [ . . . ]
16 }
14 36
Data layer: Object references
Object references are the relationships between individual
building blocks
Purpose: Allows to create relationships between entities,
thus creating a graph where they are the edges and entities
are the nodes.
Usecase: Represent behaviours, similarities, affiliation, ...
15 36
Data layer: Object references
1 {
2 " uuid " : " 5 c6d21f9 −0384−4bd2−b256−40de950d2111 " ,
3 " timestamp " : " 1602318569 " ,
4 " o b j e c t _ i d " : " 1024 " ,
5 " source_uuid " : " 23275 e05−c202−460e−aadf −819 c 4 1 7 f b 3 2 6 " ,
6 " referenced_uuid " : " ab5f0c85 −5623−424c−bc03−d79841700d74 " ,
7 " referenced_type " : " 1 " ,
8 " r e l a t i o n s h i p _ t y p e " : " included−i n " ,
9 "comment" : " S e c t i o n 0 of ELF "
10 }
16 36
Data layer: Event building blocks - Context
17 36
Data layer: Sightings
Sightings are a means to convey that a data point has been seen
Purpose: Allows to add temporality to the data.
Usecase: Record activity or occurence, perform IoC
expiration, ...
1 {
2 " org_id " : " 1 " ,
3 " date_sighting " : " 1573722432 " ,
4 " uuid " : " 5 dcd1940−5de8−4462−93dd−12a2a5e38e14 " ,
5 " source " : " " ,
6 " type " : "0" ,
7 " a t t r i b u t e _ u u i d " : " 5 da97b59−9650−4be2 −9443−2194 a5e38e14 "
8 }
18 36
Data layer: Event reports
Event reports are supporting data for analysis to describe
events, processes, ect
Purpose: Supporting data point to describe events or
processes
Usecase: Encode reports, provide more information about
the Event, ...
19 36
Data layer: Event building blocks - Collabora-
tion & intelligence
20 36
Data layer: Event reports
1 {
2 " uuid " : " 076e240b−5a76−4a8b−9eab−c f f f 5 5 1 9 9 3 d d " ,
3 " e ven t_i d " : " 2 1 2 7 " ,
4 "name" : " Event r e p o r t ( 1 6 0 7 3 6 2 9 8 6 ) " ,
5 " content " : " . . . " ,
6 " distribution " : "5" ,
7 " s h a r i n g _ g r o u p _ i d " : "0" ,
8 " timestamp " : " 1607362986 "
9 }
21 36
Data layer: Event building blocks - Full
22 36
Context layer
Context layer: Naming conventions
Context layer
I Tags are free-text labels attached to events/attributes and
can come from Taxonomies
Android Malware, C2, ...
I Taxonomies are a set of common classification allowing to
express the same vocabulary among a distributed set of
users and organisations
tlp:green, false-positive:risk="high",
admiralty-scale:information-credibility="2"
23 36
Context layer: Naming conventions
Context layer
I Galaxies are container copmosed of Galaxy-clusters that
belongs to the same family
Similar to what Events are to Attributes
Country, Threat actors, Botnet, ...
I Galaxy-clusters are knowledge base items coming from
Galaxies.
Basically a taxonomy with additional meta-information
misp-galaxy:threat-actor="APT 29",
misp-galaxy:country="luxembourg"
24 36
Context layer: Tags
Simple free-text labels
1 {
2 "name" : " Android malware " ,
3 " c o l o u r " : " #22681 c " ,
4 " exp or ta bl e " : true ,
5 " numerical_value " : n u l l ,
6 }
25 36
Context layer: Taxonomies
26 36
Context layer: Taxonomies
1 {
2 " Taxonomy " : {
3 " namespace " : " admiralty−s c a l e " ,
4 " d e s c r i p t i o n " : " The A d m i r a l t y S c a l e or Ranking ( a l s o c a l l e d
the NATO System ) . . . " ,
5 " version " : "6" ,
6 " exclusive " : false ,
7 },
8 " entries " : [
9 {
10 " tag " : " admiralty−s c a l e : information−c r e d i b i l i t y = \ " 1 \ " " ,
11 " expanded " : " I n f o r m a t i o n C r e d i b i l i t y : Confirmed by other
sources " ,
12 " numerical_value " : 100 ,
13 " e x c l u s i v e _ p r e d i c a t e " : true ,
14 },
15 ...
16 ]
17 }
27 36
Context layer: Galaxies
28 36
Context layer: Galaxy clusters
Kownledge base items including a description, links, synonyms,
meta-information and relationships
Purpose: Enable description of complex high-level
information for classification
Usecase: Extensively describe elements such as threat
actors, countries, technique used, ...
29 36
Context layer: Galaxy clusters
Galaxy cluster elements: Tabular view
30 36
Context layer: Galaxy clusters
1 {
2 " uuid " : " 5 eda0a53−1d98−4d01−ae06−40da0a00020f " ,
3 " type " : " f e l l o w s h i p −c h a r a c t e r s " ,
4 " value " : " Aragorn w i e l d i n g A n d u r i l " ,
5 " tag_name " : " misp−g a l a x y : f e l l o w s h i p −c h a r a c t e r s =\" c3fe907a −6a36
−4cd1 −9456−d c d f 3 5 c 3 f 9 0 7 \" " ,
6 " d e s c r i p t i o n " : " The Aragorn c h a r a c t e r w i e l d i n g A n d u r i l " ,
7 " source " : " Middle−earth u n i v e r s e by J . R . R . T o l k i e n " ,
8 " authors " : n u l l ,
9 " version " : " 1591347795 " ,
10 " d i s t r i b u t i o n " : "0" ,
11 " sharing_group_id " : null ,
12 " default " : false ,
13 " extends_uuid " : " 5 eda0117 −1e14−4b0a−9e26−34 a f f 3 3 1 d c 3 b " ,
14 " extends _version " : " 1 5 9 1 3 4 5 4 3 1 " ,
15 " GalaxyElement " : [ . . . ] ,
16 " GalaxyClusterRelation " : [ . . . ]
17 }
31 36
Context layer: Galaxies & Galaxy clusters
32 36
Galaxy JSON matrix-like
1 {
2 " d e s c r i p t i o n " : " U n i v e r s a l Development and S e c u r i t y G u i d e l i n e s as
A p p l i c a b l e to E l e c t i o n Technology . " ,
3 " icon " : "map" ,
4 "kill_chain_order": { \\Tab in the matrix
5 "example-of-threats": [ \\Column in the matrix
6 "setup | party/candidate-registration",
7 "setup | electoral-rolls",
8 "campaign | campaign-IT",
9 "all-phases | governement-IT",
10 "voting | election-technology",
11 "campaign/public-communication | media/press"
12 ]
13 },
14 "name" : " E l e c t i o n g u i d e l i n e s " ,
15 " namespace " : " misp " ,
16 " type " : " g u i d e l i n e s " ,
17 " uuid " : " c1dc03b2 −89b3−42a5−9d41 −782 e f 7 2 6 4 3 5 a " ,
18 " version " : 1
19 }
33 36
Cluster JSON matrix-like
1 {
2 " d e s c r i p t i o n " : " DoS or overload of p a r t y /campaign
r e g i s t r a t i o n , causing them to miss the deadline " ,
3 " meta " : {
4 " date " : " March 2 0 1 8 . " ,
5 "kill_chain": [ \\Define in which column the cluster should be placed
6 "example-of-threats:setup | party/candidate-registration"
7 ],
8 " refs " : [
9 " h t t p s : / /www. r i a . ee/ s i t e s / d e f a u l t / f i l e s / content−e d i t o r s /
kuberturve / c y b e r _ s e c u r i t y _ o f _ e l e c t i o n _ t e c h n o l o g y . pdf
"
10 ]
11 },
12 " uuid " : " 154 c6186−a007−4460−a029−ea23163448fe " ,
13 " value " : " DoS or overload of p a r t y /campaign r e g i s t r a t i o n ,
causing them to miss the deadline "
14 }
34 36
Expressing relation between clusters
35 36
Acknowledgements
36 / 36
Visualise all the things
Building dashboard widgets for MISP
http://www.misp-project.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
Dashboard in MISP
1 9
The internals of awidget
2 9
The view layer of a widget
3 9
Widget behaviours
4 9
Exercise module: simple Whoami
5 9
Exercise module: simple Whoami
1 <?php
2 class MispWhoamiWidget
3 {
4 public $title = ’Whoami’;
5 public $render = ’SimpleList’;
6 public $width = 2;
7 public $height = 2;
8 public $params = array();
9 public $description = ’Shows information about the
currently logged in user.’;
10 public $cacheLifetime = false;
11 public $autoRefreshDelay = 3;
12
13 public function handler($user, $options = array())
14 {
15 $data = array();
16 return $data;
17 }
18 }
6 9
Meta information
7 9
The handler
1 public function handler($user, $options = array())
2 {
3 $this->Log = ClassRegistry::init(’Log’);
4 $entries = $this->Log->find(’all’, array(
5 ’recursive’ => -1,
6 ’conditions’ => array(
7 ’action’ => ’login’, ’user_id’ => $user[’id’]
8 ),
9 ’order’ => ’id desc’,
10 ’limit’ => 5,
11 ’fields’ => array(’created’, ’ip’)
12 ));
13 foreach ($entries as &$entry) {
14 $entry = $entry[’Log’][’created’] . ’ --- ’ .
15 (
16 empty($entry[’Log’][’ip’]) ?
17 ’IP not logged’ :
18 $entry[’Log’][’ip’]
19 );
20 }
21 return array(
22 array(’title’ => ’Email’, ’value’ => $user[’email’]),
23 array(
24 ’title’ => ’Role’, ’value’ => $user[’Role’][’name’]
25 ),
26 array(
27 ’title’ => ’Organisation’,
28 ’value’ => $user[’Organisation’][’name’]
29 ),
30 array(
31 ’title’ => ’IP’, ’value’ => $_SERVER[’REMOTE_ADDR’]
32 ),
33 array(’title’ => ’Last logins’, ’value’ => $entries)
34 );
35 }
8 9
Result
9/9
Turning data into actionable in-
telligence
advanced features in MISP supporting your ana-
lysts and tools
CIRCL / Team MISP Project
CIISI-IE
Threat Sharing
about CIRCL
1 37
MISP and CIRCL
2 37
The aim of this presentation
3 37
Development based on practical user feedback
4 37
The initial scope of MISP
5 37
Initial workflow
6 37
Why was it so simplistic?
7 37
The growing need to contextualise data
8 37
Our initial solution
9 37
Our initial failures
10 37
Human creativity
We tried an alternate approach instead: Free tagging
I Result was spectacularly painful, at least 7 different ways to
spell tlp:amber
I No canonisation for common terms lead to tagging ultimately
becoming a highly flawed tool for filtering within a sharing
community
11 37
How we ended up tackling the issue more
successfuly
We ended up with a mixed approach, currently implemented
by the MISP-taxonomy system
I Taxonomies are vocabularies of known tags
I Tags would be in a triple tag format
namespace:predicate=”value”
I Create your own taxonomies, recipients should be able to use
data you tag with them without knowing it at the first place
I Avoid any coding, stick to JSON
Massive success, approaching 100 taxonomies
Organisations can solve their own issues without having to
rely on us
12 37
We were still missing something...
Taxonomy tags often non self-explanatory
Example: universal understanding of tlp:green vs APT 28
For the latter, a single string was ill-suited
So we needed something new in addition to taxonomies -
Galaxies
I Community driven knowledge-base libraries used as tags
I Including descriptions, links, synonyms, meta information,
etc.
I Goal was to keep it simple and make it reusable
I Internally it works the exact same way as taxonomies (stick to
JSON)
13 37
Broadening the scope of what sort of context
we are interested in
Who can receive our data? What can they do with it?
Data accuracy, source reliability
Why is this data relevant to us?
Who do we think is behind it, what tools were used?
What sort of motivations are we dealing with? Who are the
targets?
How can we block/detect/remediate the attack?
What sort of impact are we dealing with?
14 37
Parallel to the contextualisation efforts: False
positive handling
1
https://github.com/MISP/misp-warninglists
15 37
More complex data-structures for a modern age
2
https://github.com/MISP/misp-objects
16 37
Supporting specific datamodel
17 37
Continuous feedback loop
18 37
Supporting specific datamodel
19 37
Making use of all this context
20 37
Example query
/attributes/restSearch
{
" returnFormat " : " n e t f i l t e r " ,
" enforceWarninglist " : 1 ,
" tags " : {
"NOT " : [
" t l p : white " ,
" type : OSINT "
],
"OR " : [
" misp−g a l a x y : t h r e a t −a c t o r =\" Sofacy \ " " ,
" misp−g a l a x y : s e c t o r =\" Chemical \ " "
],
}
}
21 37
Synchronisation filters
22 37
The emergence of ATT&CK and similar galaxies
3
https://www.misp-project.org/galaxy.html#_attck4fraud
4
https:
//www.misp-project.org/galaxy.html#_election_guidelines
23 37
Example query to generate ATT&CK heatmaps
/events/restSearch
{
" returnFormat " : " a t t a c k " ,
" tags " : [
" misp−g a l a x y : s e c t o r =\" Chemical \ " "
],
" timestamp " : "365 d "
}
24 37
A sample result for the above query
25 37
Monitor trends outside of MISP (example:
dashboard)
26 37
Decaying of indicators
27 37
Scoring Indicators: Our solution
Where,
28 37
Implementation in MISP: Event/view
29 37
Implementation in MISP: API result
/attributes/restSearch
" Attribute " : [
{
" c ategory " : " Network a c t i v i t y " ,
" type " : " ip−s r c " ,
" t o _ i d s " : true ,
" timestamp " : " 1 5 6 5 7 0 3 5 0 7 " ,
[...]
" value " : " 8 . 8 . 8 . 8 " ,
" decay_score " : [
{
" score " : 5 4 . 4 7 5 2 2 3 8 4 9 5 4 4 4 5 6 ,
" decayed " : f a l s e ,
" DecayingModel " : {
" id " : "85" ,
"name " : " NIDS Simple Decaying Model "
} 30 37
Implementation in MISP: Index
32 37
Implementation in MISP: base_score tool
34 37
Implementation in MISP: API query body
/attributes/restSearch
{
" includeDecayScore " : 1 ,
" includeFullModel " : 0 ,
" excludeDecayed " : 0 ,
" decayingModel " : [ 8 5 ] ,
" modelOverrides " : {
" t h r e s h o l d " : 30
}
" score " : 30 ,
}
35 37
To sum it all up...
36 37
Get in touch if you have any questions
Contact us
I https://twitter.com/mokaddem_sami
I https://twitter.com/iglocska
Contact CIRCL
I [email protected]
I https://twitter.com/circl_lu
I https://www.circl.lu/
Contact MISPProject
I https://github.com/MISP
I https://gitter.im/MISP/MISP
I https://twitter.com/MISPProject
37 / 37
Turning data into actionable in-
telligence
advanced features in MISP supporting your ana-
lysts and tools
CIRCL / Team MISP Project
CIISI-IE
Threat Sharing
The aim of this presentation
1 25
The growing need to contextualise data
2 25
Objectives
3 25
Different layers of context
4 25
Context added by analysts / tools
Expressing why data-points matter
5 25
Broadening the scope of what sort of context
we are interested in
Who can receive our data? What can they do with it?
Data accuracy, source reliability
Why is this data relevant to us?
Who do we think is behind it, what tools were used?
What sort of motivations are we dealing with? Who are the
targets?
How can we block/detect/remediate the attack?
What sort of impact are we dealing with?
6 25
Tagging and taxonomies
Simple labels
Standardising on vocabularies
Different organisational/community cultures require
different nomenclatures
Triple tag system - taxonomies
JSON libraries that can easily be defined without our
intervention
7 25
Galaxies
Taxonomy tags often non self-explanatory
I Example: universal understanding of tlp:green vs APT 28
For the latter, a single string was ill-suited
So we needed something new in addition to taxonomies -
Galaxies
I Community driven knowledge-base libraries used as tags
I Including descriptions, links, synonyms, meta information,
etc.
I Goal was to keep it simple and make it reusable
I Internally it works the exact same way as taxonomies (stick to
JSON)
8 25
The emergence of ATT&CK and similar galaxies
1
https://www.misp-project.org/galaxy.html#_attck4fraud
2
https:
//www.misp-project.org/galaxy.html#_election_guidelines
9 25
Data that tells a story
More complex data-structures for a modern age
3
https://github.com/MISP/misp-objects
10 25
Supporting specific datamodels
11 25
Continuous feedback loop
12 25
Continuous feedback loop (2)
13 25
A brief history of time - Adding temporality to
our data
As Andreas said - no time based aspect was painful
Recently introduced first_seen and last_seen data
points
Along with a complete integration with the UI
Enables the visualisation and adjustment of indicators
timeframes
14 25
The various ways of encoding
analyst knowledge to automati-
cally leverage our TI
False positive handling
4
https://github.com/MISP/misp-warninglists
15 25
Making use of all this context
16 25
Example query
/attributes/restSearch
{
" returnFormat " : " n e t f i l t e r " ,
" enforceWarninglist " : 1 ,
" tags " : {
"NOT " : [
" t l p : white " ,
" type : OSINT "
],
"OR " : [
" misp−g a l a x y : t h r e a t −a c t o r =\" Sofacy \ " " ,
" misp−g a l a x y : s e c t o r =\" Chemical \ " "
],
}
}
17 25
Example query to generate ATT&CK heatmaps
/events/restSearch
{
" returnFormat " : " a t t a c k " ,
" tags " : [
" misp−g a l a x y : s e c t o r =\" Chemical \ " "
],
" timestamp " : "365 d "
}
18 25
A sample result for the above query
19 25
Monitor trends outside of MISP (example:
dashboard)
20 25
Decaying of indicators
21 25
Implementation in MISP: Event/view
22 25
Implementation in MISP: API result
/attributes/restSearch
" Attribute " : [
{
" c ategory " : " Network a c t i v i t y " ,
" type " : " ip−s r c " ,
" t o _ i d s " : true ,
" timestamp " : " 1 5 6 5 7 0 3 5 0 7 " ,
[...]
" value " : " 8 . 8 . 8 . 8 " ,
" decay_score " : [
{
" score " : 5 4 . 4 7 5 2 2 3 8 4 9 5 4 4 4 5 6 ,
" decayed " : f a l s e ,
" DecayingModel " : {
" id " : "85" ,
"name " : " NIDS Simple Decaying Model "
} 23 25
To sum it all up...
24 25
Get in touch if you have any questions
Contact us
I https://twitter.com/mokaddem_sami
I https://twitter.com/iglocska
Contact CIRCL
I [email protected]
I https://twitter.com/circl_lu
I https://www.circl.lu/
Contact MISPProject
I https://github.com/MISP
I https://gitter.im/MISP/MISP
I https://twitter.com/MISPProject
25 / 25
MISP Standard
The collaborative intelligence standard pow-
ering intelligence and information exchange,
CIRCL / Teamand
sharing MISP Project
modeling.
http://www.misp-standard.org/
Twitter: @MISPProject
CIISI-IE
Threat Sharing
MISP Standard
1 6
Standard - MISP core format
2 6
MISP object template format
3 6
MISP galaxy format
4 6
SightingDB format
5 6
Internet-Draft - IETF for MISP formats and MISP
standard
CIISI-IE
MISP CLI functionalities
1 5
Types of objectives for the scripts
2 5
CLI documentation
https://path.to.your.misp/events/automation
3 5
Usage
4 5
Automation via crontab
5/5
MISP Deployment
Some basic guidelines
CIISI-IE
MISP deployment considerations
Deployment types
Distro choice
Hardware specs
Authentication
Other considerations - settings, gotchas
1 11
Deployment types
Native install
I Manual
I One liner script - INSTALL.sh
https://github.com/MISP/MISP/tree/2.4/INSTALL
MISP VM
https://www.circl.lu/misp-images/latest/
Docker
RPM maintained by SWITCH
https://github.com/amuehlem/MISP-RPM
Cloud provider images
https://github.com/MISP/misp-cloud
2 11
Docker options
3 11
Distro options
4 11
Hardware specs
5 11
Hardware considerations
6 11
Hardware considerations - continues
7 11
Hardware considerations - continues
8 11
Authentication options
9 11
Other considerations - tuning
PHP tuning
I Maximum memory usage (per process)
I Timeout settings
I Consider setting it per role!
I Background processes are exempt
MySQL: key buffer size is important
Generally, tune for few heavy requests rather than many
light ones
10 11
Other considerations - high availability
Clustering
I Load balanced apache servers with MISP
I Replicating / mirrored database backends
Careful about session pinning
Attachment storage can be abstracted / network attached
An example implementation for AWS
https://github.com/0xtf/HAMISPA
11 / 11
An Introduction to Workflows in
MISP
MISP - Threat Sharing
MISP Project
https://www.misp-project.org/
CIISI-IE
Threat Sharing
Content of the presentation
1 30
What problems are we trying to tackle
1
Workshop organized by the Canadian Cyber Center
2 30
Workflow - Fundamentals
Simplistic overview of a Workflow in action
3 30
Terminology
4 30
Workflow execution process
5 30
Blocking and non-blocking Workflows
6 30
Execution context
7 30
Classes of Workflow modules
3 classes of modules
action: Allow to executes functions, callbacks or scripts
I Can stop execution
I e.g. Webhook, block the execution, perform enrichments, ...
logic: Allow to redirect the execution flow.
I IF condition, fork the blocking execution into a non-blocking
one, ...
blueprint: Allow to reuse composition of modules
I Can save subworkflows and its module’s configuration
8 30
Sources of Workflow modules
9 30
Sources of Workflow modules
10 30
Triggers currently available
11 30
Workflow - Getting started
Getting started with workflows (1)
Review MISP settings:
1. Make sure MISP.background_jobs is turned on
2. Make sure workers are up-and-running and healthy
3. Turn the setting Plugin.Workflow_enable on
12 30
Getting started with workflows (2)
13 30
Getting started with workflows (3)
14 30
Creating a workflow with the editor
1. Go to the list of triggers Administration > Workflows
2. Enable and edit a trigger from the list
3. Drag an action module from the side panel to the canvas
4. From the trigger output, drag an arrow into the action’s
input (left side)
5. Execute the action that would run the trigger and observe
the effect!
15 30
Working with the editor
16 30
Working with the editor
17 30
Working with the editor
18 30
Workflow blueprints
Blueprints origins:
1. From the "official" misp-workflow-blueprints
repository
2. Created or imported by users
19 30
Workflow blueprints: Create
Select one or more modules to be saved as blueprint then click
on the save blueprint button
20 30
Hash path filtering
Some modules have the possibility to filter or check
conditions using CakePHP’s path expression.
1 $path_expression = ’ { n } [ name= f r e d ] . i d ’ ;
2 $users = [
3 { ’ i d ’ : 1 2 3 , ’ name ’ : ’ f r e d ’ , ’ surname ’ : ’ bloggs ’ } ,
4 { ’ i d ’ : 2 4 5 , ’ name ’ : ’ f r e d ’ , ’ surname ’ : ’ smith ’ } ,
5 { ’ i d ’ : 3 5 6 , ’ name ’ : ’ joe ’ , ’ surname ’ : ’ smith ’ } ,
6 ];
7 $ i d s = Hash : : e x t r a c t ( $users , $path_expression ) ;
8 // => $ids will be [123, 245]
21 30
Module filtering
Some action modules accept filtering conditions
E.g. the enrich-event module will only perform the
enrichment on Attributes having a tlp:white Tag
22 30
Data format in Workflows
23 30
Logic module: Concurrent Task
Special type of logic module allowing multiple connections
Allows breaking the execution flow into a concurrent tasks
to be executed later on by a background worker
As a side effect, blocking modules cannot cancel ongoing
operations
24 30
Debugging Workflows: Log Entries
25 30
Debugging Workflows: Debug mode
26 30
Learning by examples
Workflow example 1
27 30
Workflow example 2
28 30
Extending the system
Creating a new module in PHP
app/Lib/WorkflowModules/action/[module_name].php
Module configuration are defined as public variables
The exec function has to be implemented.
I If it returns true, execution will proceed
I If it returns false
And the module is blocking, the execution will stop and the
operation will be blocked
29 30
Creating a new module in Python
Built-in integration
Export & Import features
I Export MISP Events collections
I Import STIX files
Supported version
I STIX 1.1.1
I STIX 2.0
Accessible via restSearch
1 7
Limitations
Feature limitations
I Supported versions
I Data type support
Practical limitations
I Export and import features only available via MISP rest client
I Github: STIX issues lost within the MISP core issues
2 7
Handling the conversion with a python library
3 7
Key features
Mapping documentation
Package available on PyPI1
1
https://pypi.org/project/misp-stix/
4 7
Work in Progress & Next improvements
WiP
I Implement the import feature
I Support of existing STIX objects libraries2
Next features on the roadmap
I Extend the export feature to any kind of data collection
I Support custom STIX format3
Continuous improvement
I Mapping improvement
I More tests to avoid edge case issues
2
https://github.com/mitre/cti
3
Especially while importing STIX data, and as long as we can implement
support of well defined versions
5 7
How to report bugs/issues
Github issues
I https://github.com/MISP/misp-stix/issues
I https://github.com/MISP/MISP/issues
6 7
To get in touch with us
https://github.com/MISP/misp-stix
https://github.com/MISP/misp-stix/tree/main/
documentation
https://github.com/MISP
https://www.misp-project.org/
https://twitter.com/MISPProject
https://twitter.com/chrisred_68
7/7
MISP Concepts Cheat sheet
Glossary Distribution
Correlations: Links created automatically whenever an Attribute is created or Controls who can see the data and how it should be synchronised.
modified. They allow interconnection between Events based on their attributes. Organisation only: Only members of your organisation
Correlation Engine: Is the system used by MISP to create correlations between This community: Organisations on this MISP instance
Attribute ’s value. It currently supports strict string comparison, SSDEEP and Connected Communities: Organisations on this MISP instance and those on
CDIR blocks matches. MISP instances synchronising with this one. Upon receiving data, the distribution
Caching: Is the process of fetching data from a MISP instance or feed but only will be downgraded to This community to avoid further propagation. (n ≤ 1)
storing hashes of the collected values for correlation and look-up purposes. n=0 n=1 n=2 n=3 n=4
Delegation: Act of transfering the ownership of an Event to another organisation Does not have the Event
while hidding the original creator, thus providing anonymity. Has the Event
Deletion (hard/soft): Hard deletion is the act of removing the element from All Communities: Anyone having access. Data will be freely propagated in the
the system; it will not perform revocation on other MISP instances. Soft deletion network of connected MISP instances. (n = ∞)
is the act flagging an element as deleted and propagating the revocation among
n=0 n=1 n=2 n=3 n=4
the network of connected MISP instances.
Extended Event: Event that extends an existing Event , providing a combined
view of the data contained in both Events . The owner of the extending Event
is the organisation that created the extension. This allows anyone to extend any Sharing Groups: Distribution list that exhaustively keeps track of which organ-
Events and have total control over them. isations can access the data and how it should be synchronised.
Galaxy Matrix: Matrix derived from Galaxy Clusters belonging to the same
Galaxy . The layout (pages and columns) is defined at the Galaxy level and its Sharing Group configuration MISP 2
content comes from the Galaxy Clusters meta-data themselves. Org. α
MISP 1 Org. ω
Organisations Org. ω
Indicators: Attribute containing a pattern that can be used to detect suspicious
Org. γ Org. α
or malicious activity. These Attributes usually have their to ids flag enabled.
MISP 1 MISP 3
Orgc / Org: Creator Organisation (Orgc) is the organisation that created the Instances* MISP 2 Org. ω
data and the one allowed to modify it. Owner Organisation (Org) is the organi- MISP 3 Org. γ
sation owning the data on a given instance and is allowed to view it regardless of *Or enable roaming mode instead
the distribution level. The two are not necessarily the same.
Publishing: Action of declaring that an Event is ready to be synchronised. It
Synchronisation
may also send e-mail notifications and makes it available to some export formats.
The act of sharing where everyone can be a consumer and/or a producer. A one
Pulling: Action of using a user on a remote instance to fetch the accessible data
and storing it locally. way synchronisation link between two MISP instances. Organisation α created a
sync user on MISP 2 and noted down the generated API Key. A synchroni-
Pushing: Action of using an uplink connection via a sync. user to send data to
sation link can be created on MISP 1 using the API Key and the organisation of
a remote instance.
the sync user. At that point, MISP 1 can pull data from MISP 2 and push data
Synchronisation: Is the exchange of data between two (or more) MISP instances to MISP 2.
throught the pull or push mechanisms.
MISP 1 MISP 2
Sync. filtering rule: Can be applied on a synchronisation link for both the pull
and push mechanisms to block or allow data to be transfered. Org. α PUSH Org. α Org. ω
Sync. User: Special role of a user granting addional sync permissions. The
ggg gg ggg
recommanded way to setup push synchronisation is to use sync users. PULL
Proposals: Are a mechanism to propose modications to the creating organisa-
tions (Orgc). If a path of connected MISP instances exists, the Proposal will be Sync. connection
synchronised allowing the creator to accept or discard it.
MISP Data Model Cheat Sheet
$ Context such as Taxonomies or Galaxy % Object Reference T Taxonomies
Clusters can be attached to the element T Machine and human-readable labels standardised on a
X Has a distribution level Relationships between individual building blocks. common set of vocabularies.
T Can be synchronised to/from other instances
Purpose: Allows to create relationships between en- Purpose: Enable efficent classification globally un-
R Event tities, thus creating a graph where they are the edges derstood, easing consumption and automation.
$XT and entities are the nodes. Usecase: Provide classification such as: TLP, Confi-
Encapsulations for contextually linked information. Usecase: Represent behaviours, similarities, affilia- dence, Source, Workflows, Event type, . . .
tion, . . . I Even though MISP allows the creation of free-text
Purpose: Group datapoints and context together.
I References can have a textual relationship which tags, it’s always preferable to use those coming from
Acting as an envelop, it allows setting distribution
can come from MISP or be set freely. Taxonomies , if they exists.
and sharing rules for itself and its children.
Usecase: Encode incidents/events/reports/. . .
I Events can contain other elements such as Y Sightings Galaxies
Attributes , MISP Objects and Event Reports . T
Act as a container to group together context described
I The distribution level and any context added on an Means to convey that an Attribute has been seen. in Galaxy Clusters by their type.
Event (such as Taxonomies ) are propagated to its Purpose: Allows to add temporality to the data. Purpose: Bundle Galaxy Clusters by their type to
underlying data. Usecase: Record activity or occurence, perform IoC avoid confusion and to ease searches.
expiration, . . . Usecase: Bundle types: Exploit-Kit, Preventive
" Attribute I Sightings are the best way to express that some- Measures, ATT&CK, Tools, Threat-actors, . . .
$XT thing has been seen. They can also be used to mark
Basic building block to share information. false positives.
Galaxies Clusters
Purpose: Individual data point. Can be an indicator XT
or supporting data. p Event Report Kownledge base items used as tags with additional
Usecase: Domain, IP, link, sha1, attachment, . . . XT
complex meta-data aimed for human consumption.
I Attributes cannot be duplicated inside the same Advanced building block containing formated text.
Event and can have Sightings . Purpose: Enable description of complex high-level
Purpose: Supporting data point to describe events information for classification.
I The difference between an indicator or supporting or processes.
data is usualy indicated by the state of the attribute’s Usecase: Extensively describe elements such as:
Usecase: Encode reports, provide more information threat actors, countries, technique used, . . .
to ids flag. about the Event , . . . I Galaxy Clusters can be seen as an enhanced
I Event Reports are markdown-aware and include a Taxonomy as they can have meta-data and relation-
# MISP Object special syntax to reference data points or context. ships with other Galaxy Clusters .
XT I Any Galaxy Clusters can contain the following:
Advanced building block providing Attribute compo- 7 Proposals • Cluster Elements: Key-Value pair forming
sitions via templates. T the meta-data.
Purpose: Groups Attributes that are intrinsically Clone of an Attribute containing information about Example: Country:LU, Synonym:APT28,
linked together. modification to be done. Currency:Dollar, refs:https://*,
Usecase: File, person, credit-card, x509, device, . . . Purpose: Allow the correction or the creation of ...
I MISP Objects have their attribute compositions Attributes for Events your organisation does not • Cluster Relations ($ T X ): Enable the
described in their respective template. They are in- own. creation of relationships between one or more
stanciated with Attributes and can Reference other Usecase: Disable the IDS flag, Correct errors Galaxy Clusters .
Attributes or MISP Objects . I As Proposals are sync., if the creator organisation Example: Threat actor X is similar to threat actor
I MISP is not required to know the template to save is connected to the MISP instance from where the Y with high-likelyhood.
and display the object. However, edits will not be pos- Proposal has been created, it will be able to either
sible as the template to validate against is unknown. accept or discard it.
Failed spear-phishing attempt Representation of an incident in MISP
UUID 28b1cd2e-46a7-4ee2-a364-c3d26451b089
Date 2021-12-09
Creator Org. CIRCL.lu
Distribution
Event: Encapsulates contextually linked information.
Connected Communities
✓
Events also have basic information including ownership and access-control
Published
Here: Contains all the information related to the spear-phishing incident.
Event Graph: Visualization of the relationships between entities contained in the Event.
Here: The whole story of the attack can be described with relationships defined between
Attributes and Objects
Event Timeline: Visualization of the temporality of the data contained in the event.
Here: A timeline of the steps performed during the attack. The time data is taken directly from
the Attributes and Objects belonging to the Event.
Objects: Advanced building block allowing Attribute composition via predefined templates.
As an Object is an instantiation of its template, it is composed of Attributes that make sense
... Together. They can also have relationship to other entity contained in the Event
Here: A file object composed of Attributes such as the filename, size and hashes. It also
have a relationship
MISP User & Admin Cheat Sheet
- User - - Admin -
API Reset Password
Wildcard searches: API: POST /users/initiatePasswordReset/[id] {"password": "***"}
POST / attributes / restSearch
{ " value " : " 1.2.3.% " } CLI: MISP/app/Console/cake Password [email] [password]
User
Administrator (Community)
Administrator (Instance)
Contributors
• Steve Clement https://github.com/SteveClement
• Alexandre Dulaunoy https://github.com/adulau
• Andras Iklody https://github.com/iglocska
• Sami Mokaddem https://github.com/mokaddem
• Sascha Rommelfangen https://github.com/rommelfs
• Christian Studer https://github.com/chrisr3d
• Raphaël Vinot https://github.com/rafiot
• Gerard Wagener https://github.com/haegardev
Acknowledgment
The MISP project is co-financed and resource supported by CIRCL Computer
Incident Response Center Luxembourg3 and co-financed by a CEF (Connecting
Europe Facility) funding under CEF-TC-2016-3 - Cyber Security as Improving
MISP as building blocks for next-generation information sharing.
1 https://www.misp-project.org/
2 https://github.com/MISP/misp-training
3 https://www.circl.lu/
1
2