misp training and slide decks - circl1 misp training slide decks misp1 is a threat intelligence...

309
1 MISP Training Slide Decks MISP 1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise of targeted attacks, threat intelligence, fi- nancial fraud information, vulnerability information or even counter-terrorism information. This document includes the slides which are the support materials used for MISP trainings. The slides are licensed under CC-BY-SA license which allows you to freely use, remixes and share-alike the slides while still mentioning the contributors under the same conditions. 2 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 Rapha¨ el Vinot https://github.com/rafiot Gerard Wagener https://github.com/haegardev 3 Acknowledgment The MISP project is co-financed and resource supported by CIRCL Computer Incident Response Center Luxembourg 2 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. Co-financed by the Connecting Europe Facility of the European Union 1 https://www.misp-project.org/ 2 https://www.circl.lu/ 1

Upload: others

Post on 17-Jan-2020

22 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

1 MISP Training Slide Decks

MISP1 is a threat intelligence platform for gathering, sharing, storing and cor-relating Indicators of Compromise of targeted attacks, threat intelligence, fi-nancial fraud information, vulnerability information or even counter-terrorisminformation.

This document includes the slides which are the support materials used forMISP trainings. The slides are licensed under CC-BY-SA license which allowsyou to freely use, remixes and share-alike the slides while still mentioning thecontributors under the same conditions.

2 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

• Raphael Vinot https://github.com/rafiot

• Gerard Wagener https://github.com/haegardev

3 Acknowledgment

The MISP project is co-financed and resource supported by CIRCL ComputerIncident Response Center Luxembourg2 and co-financed by a CEF (ConnectingEurope Facility) funding under CEF-TC-2016-3 - Cyber Security as ImprovingMISP as building blocks for next-generation information sharing.

Co-financed by the Connecting Europe

Facility of the European Union

1https://www.misp-project.org/2https://www.circl.lu/

1

Page 2: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

An Introduction to Cybersecurity Information SharingMISP - Malware Information Sharing Platform & Threat Sharing

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 3: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Agenda

• (10:00 - 11:30) Introduction to Information Sharing with MISP

• (11:30 - 11:40) Coffee break

• (11:40 - 13:00) User perspective - diving into MISP functionalitiesand integration

• (13:00 - 14:00) Lunch Break

• (14:00 - 15:00) Administrating your MISP instance

• (15:00 - 15:45) Building your information sharing communities -CSIRT and financial sectors

• (15:45 - 16:45) Modules and extending MISP (taxonomies, objectsand galaxies)

• (16:45 - 17:15) Future - Sharing Ideas

2 of 22

Page 4: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP and starting from a practical use-case

• During a malware analysis workgroup in 2012, we discovered thatwe worked on the analysis of the same malware.

• We wanted to share information in an easy and automated way toavoid duplication of work.

• Christophe Vandeplas (then working at the CERT for the BelgianMoD) showed us his work on a platform that later became MISP.

• A first version of the MISP Platform was used by the MALWG andthe increasing feedback of users helped us to build an improvedplatform.

• MISP is now a community-driven development.

3 of 22

Page 5: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Development based on practical user feedback

• There are many different types of users of an information sharingplatform like MISP:◦ Malware reversers willing to share indicators of analysis with

respective colleagues.◦ Security analysts searching, validating and using indicators in

operational security.◦ Intelligence analysts gathering information about specific adversary

groups.◦ Law-enforcement relying on indicators to support or bootstrap their

DFIR cases.◦ Risk analysis teams willing to know about the new threats,

likelyhood and occurences.◦ Fraud analysts willing to share financial indicators to detect financial

frauds.

4 of 22

Page 6: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP model of governance

5 of 22

Page 7: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Many objectives from different user-groups

• Sharing indicators for a detection matter.◦ ’Do I have infected systems in my infrastructure or the ones I operate?’

• Sharing indicators to block.◦ ’I use these attributes to block, sinkhole or divert traffic.’

• Sharing indicators to perform intelligence.◦ ’Gathering information about campaigns and attacks. Are they

related? Who is targeting me? Who are the adversaries?’

• → These objectives can be conflicting (e.g. False-positives havedifferent impacts)

6 of 22

Page 8: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Sharing Difficulties

• Sharing difficulties are not really technical issues but often it’s amatter of social interactions (e.g. trust).

• Legal restriction1

◦ ”Our legal framework doesn’t allow us to share information.”◦ ”Risk of information-leak is too high and it’s too risky for our

organization or partners.”

• Practical restriction◦ ”We don’t have information to share.”◦ ”We don’t have time to process or contribute indicators.”◦ ”Our model of classification doesn’t fit your model.”◦ ”Tools for sharing information are tied to a specific format, we use a

different one.”

1https://www.misp-project.org/compliance/7 of 22

Page 9: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Project Overview

• The core projecta (PHP/Python3)supports the backend, API & UI.

• Modules (Python3) expand MISPfunctionalities.

• Taxonomies (JSON) to add categories &global tagging.

• Warning-lists (JSON) help analysts todetect potential false-positives.

• Galaxy (JSON) to add threat-actors,tools or ”intelligence”.

• Objects (JSON) to allow for templatedcomposition of security related atomicpoints of information.

ahttp://github.com/MISP/

8 of 22

Page 10: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP features

• MISP2 is a threat information sharing free & open source software.

• MISP has a host of functionalities that assist users in creating,collaborating & sharing threat information - e.g. flexible sharinggroups, automatic correlation, free-text import helper, eventdistribution & proposals.

• Many export formats which support IDSes / IPSes (e.g. Suricata,Bro, Snort), SIEMs (eg CEF), Host scanners (e.g. OpenIOC,STIX, CSV, yara), analysis tools (e.g. Maltego), DNS policies (e.g.RPZ).

• A rich set of MISP modules3 to add expansion, import and exportfunctionalities.

2https://github.com/MISP/MISP3https://www.github.com/MISP/misp-modules

9 of 22

Page 11: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Communities using MISP

• Communities are groups of users sharing within a set of commonobjectives/values.

• CIRCL operates multiple MISP instances with a significant userbase (more than 950 organizations with more than 2400 users).

• Trusted groups running MISP communities in island mode (airgapped system) or partially connected mode.

• Financial sector (banks, ISACs, payment processingorganizations) use MISP as a sharing mechanism.

• Military and international organizations (NATO, militaryCSIRTs, n/g CERTs,...).

• Security vendors running their own communities (e.g. Fidelis) orinterfacing with MISP communities (e.g. OTX).

10 of 22

Page 12: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP core distributed sharing functionality

• MISPs’ core functionality is sharing where everyone can be aconsumer and/or a contributor/producer.”

• Quick benefit without the obligation to contribute.

• Low barrier access to get acquainted to the system.

11 of 22

Page 13: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Events, Objects and Attributes in MISP

• MISP events are encapsulations for contextually linked information

• MISP attributes4 initially started with a standard set of ”cybersecurity” indicators.

• MISP attributes are purely based on usage (what people andorganizations use daily).

• Evolution of MISP attributes is based on practical usage & users(e.g. the addition of financial indicators in 2.4).

• MISP objects are attribute compositions describing points of datausing many facets, constructed along the lines of community anduser defined templates.

• Galaxies granularly contextualise, classify & categorise data basedon threat actors, preventive measures, tools used by adversaries.4attributes can be anything that helps describe the intent of the event package

from indicators, vulnerabilities or any relevant information12 of 22

Page 14: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Terminology about Indicators

• Indicators5

◦ Indicators contain a pattern that can be used to detect suspicious ormalicious cyber activity.

• Attributes in MISP can be network indicators (e.g. IP address),system indicators (e.g. a string in memory) or even bank accountdetails.◦ A type (e.g. MD5, url) is how an attribute is described.

◦ An attribute is always in a category (e.g. Payload delivery) which putsit in a context.

• A category is what describes an attribute.

◦ An IDS flag on an attribute allows to determine if an attribute canbe automatically used for detection.

5IoC (Indicator of Compromise) is a subset of indicators13 of 22

Page 15: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Helping Contributors in MISP

• Contributors can use the UI, API or using the freetext import toadd events and attributes.◦ Modules existing in Viper (a binary framework for malware reverser)

to populate and use MISP from the vty or via your IDA.

• Contribution can be direct by creating an event but users canpropose attributes updates to the event owner.

• Users should not be forced to use a single interface tocontribute.

14 of 22

Page 16: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Example: Freetext import in MISP

15 of 22

Page 17: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Supporting Classification

• Tagging is a simple way to attach a classification to an event or anattribute.

• Classification must be globally used to be efficient.• MISP includes a flexible tagging scheme where users can select

from more than 42 existing taxonomies or create their owntaxonomy.

16 of 22

Page 18: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Supporting Sharing in MISP

• Delegate events publication to another organization (introduced inMISP 2.4.18).◦ The other organization can take over the ownership of an event and

provide pseudo-anonymity to initial organization.

• Sharing groups allow custom sharing (introduced in MISP 2.4) perevent or even at attribute level.◦ Sharing communities can be used locally or even cross MISP instances.◦ Sharing groups can be done at event level or attributes level (e.g.

financial indicators shared to a financial sharing groups and cybersecurity indicators to CSIRT community).

17 of 22

Page 19: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Sightings support

• Sightings allow users to notify thecommunity about the activities relatedto an indicator.

• In recent MISP versions, the sightingsystem supports negative sigthings (FP)and expiration sightings.

• Sightings can be performed via the API,and the UI, even including the import ofSTIX sighting documents.

• Many use-cases for scoring indicatorsbased on users sighting.

18 of 22

Page 20: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Improving Information Sharing in MISP

• False-positives are a recurring challenge in information sharing.

• In MISP 2.4.39, we introduced the misp-warninglists6 to helpanalysts in their day-to-day job.

• Predefined lists of well-known indicators which are oftenfalse-positives like RFC1918 networks, public DNS resolver areincluded by default.

6https://github.com/MISP/misp-warninglists19 of 22

Page 21: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Improving support of sharing within and outside anorganization

• Even in a single organization, multiple use-cases of MISP canappear (groups using it for dynamic malware analysis correlations,dispatching notification).

• In MISP 2.4.51, we introduced the ability to have local MISPservers connectivity to avoid changes in distribution level. Thisallows to have mixed synchronization setup within and outside anorganization.

• Feed support was also introduced to support synchronizationbetween untrusted and trusted networks.

20 of 22

Page 22: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Bootstrapping MISP with indicators

• We maintain the default CIRCL OSINT feeds (TLP:WHITEselected from our communities) in MISP to allow users to easetheir bootstrapping.

• The format of the OSINT feed is based on standard MISP JSONoutput pulled from a remote TLS/HTTP server.

• Additional content providers can provide their own MISP feeds.(https://botvrij.eu/)

• Allows users to test their MISP installations andsynchronisation with a real dataset.

• Opening contribution to other threat intel feeds but also allowingthe analysis of overlapping data7.

7A recurring challenge in information sharing21 of 22

Page 23: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Conclusion

• Information sharing practices come from usage and byexample (e.g. learning by imitation from the shared information).

• MISP is just a tool. What matters is your sharing practices. Thetool should be as transparent as possible to support you.

• Enable users to customize MISP to meet their community’suse-cases.

22 of 22

Page 24: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Workbench - Manage your very own Cyber ThreatIntelligence tool

MISP - Malware Information Sharing Platform & Threat Sharing

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 25: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Functionalities of MISP Workbench

• Merging of events (campaign, attacker, tool, victim, ...)

• Comparing campaigns composed of multiple events

• Expanding MISP in a timely manner (no Apache, MySQL & PHP)

• Extraction of PE indicators & correlation

• Reduce an investigation on a subset of events

• Very fast lookups, use the dataset in an untrusted environment

2 of 19

Page 26: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Galaxy

• List of known keywords:◦ Adversary groups (with synonyms)◦ Threat actors tools (with synonyms)

• Used to automatically group related events

3 of 19

Page 27: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP galaxy - elements of threat actors

• An element list of threat actors included by default.1 {2 "synonyms": [

3 "PLA Unit 61486", "APT 2", "Group 36",

4 "APT -2", "MSUpdater", "4HCrew", "SULPHUR"

5 ],

6 "country": "CN",

7 "refs": [

8 "http://cdn0.vox -cdn.com/assets/4589853/

9 crowdstrike -intelligence -report -putter -panda.

original.pdf"

10 ],

11 "description": "The CrowdStrike Intelligence team has

12 been tracking this particular unit since 2012, under

13 the codename PUTTER PANDA, and has documented activity

14 dating back to 2007. The report identifies Chen Ping,

15 aka cpyy, and the primary location of Unit 61486.",

16 "group": "Putter Panda"

17 }4 of 19

Page 28: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP galaxy - elements of threat actors tools

• An element list of tools used by various threat actors.

• The key-values can be freely combined.1 {2 "value": "MSUpdater"

3 },4 {5 "value": "Poison Ivy",

6 "description": "Poison Ivy is a RAT which was freely

7 available and first released in 2005.",

8 "refs": ["https://www.fireeye.com/content/dam/fireeye -

www/global/en/current -threats/pdfs/rpt -poison -ivy.

pdf"]

9 },10 {11 "value": "Elise Backdoor",

12 "synonyms": ["Elise"]

13 }

5 of 19

Page 29: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Groups

6 of 19

Page 30: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PE indicators

• Original filename

• Compilation timestamp

• Import hashes

• Number of sections

• Entry points

• Soon: API calls

• Soon: Entropy of the sections

• Soon: Fuzzy hashing on the import table

7 of 19

Page 31: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PE indicators

8 of 19

Page 32: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PE indicators - Compilation Timestamp

9 of 19

Page 33: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PE indicators - Compilation Timestamp

10 of 19

Page 34: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PE indicators - Original Filenames

11 of 19

Page 35: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PE indicators - Original Filenames

12 of 19

Page 36: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

SSDeep Clustering

• Compute SSDeep hashes on big datasets

• Group samples by similarity

• Allow to pick groups with a certain level of similarities

• Especially interesting on targeted and/or unpaked samples

13 of 19

Page 37: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

SSDeep

14 of 19

Page 38: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Hashstore

• Allow very fast lookups against big dataset.

• Only store hashed versions of the attributes.

• Can be used on untrusted or compromised systems (comparable tobloom filter).

• Hashstore can be used for forensic analysis (e.g. compare baseline

• Beta version available1.

1https://github.com/MISP/misp-workbench/tree/master/hashstore15 of 19

Page 39: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Workbench

• Objective: bundle all the functionalities in one single tool

• Easily enrich MISP dataset with other fields (specially PEindicators)

• Simple connectors with other tools and datasets

• Group events using galaxies (adversaries and tools)

• Full text indexing and lookups for other keywords

• Display the amount of unique MISP events matching a PEattribute

• Single user lightweitht interface

• Stand-alone and offline

16 of 19

Page 40: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Implementation

• Full python 3

• Redis backend

• Whoosh full text indexer

• Pefile for the PE processing, radare2 will be used soon

• Flask + bootstrap web interface

17 of 19

Page 41: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Setup

• Export MySQL to Redis◦ Full snapshot for workbench◦ Partial snapshot for hashstore

• Doesn’t respect MISP ACL

• Redis database can be moved to an other system

• Run full text indexing

• Import the PE indicators

• Run ssdeep correlation

18 of 19

Page 42: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Q&A

• Developed in collaboration with Marion Marschalek

• https://github.com/MISP/misp-workbench

• https://github.com/MISP/misp-galaxy

• https://github.com/MISP/data-processing

• https://github.com/CIRCL/ssdc

• We welcome new functionalities and pull requests.

19 of 19

Page 43: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

What’s next?MISP - Malware Information Sharing Platform & Threat Sharing

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 44: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

What’s cooking?

MISP next features and work in progress

2 of 14

Page 45: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Tagging improvements

• Generating related tags (to show and propose similar tags forsimilar values)

• Special local tags to tags non-owned events

• ”Tag everything project”◦ Gives us much more granularity.◦ Convenient way to add features without a database change.

• Tags exclusivity as expressed in Taxonomy (e.g. TLP:AMBER andTLP:GREEN tags are exclusive to an attribute or event)

3 of 14

Page 46: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Unified API and modules interface

• Single search API / scope (events, objects, attributes)

• Return in any format supported by the internal converters andexport module

• Consistent filters for all output formats

• Open up export modules for bulk exports (framing system)

4 of 14

Page 47: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Graphing improvements

• Highly used but a currently underdeveloped feature

• Open up the correlation graph to the enrichment modulefunctionality

• Allow adding attributes directly from the correlation graph

• Allow tagging / attaching clusters directly from the correlationgraph

• Advanced correlation where correlations are proposed based onfuzzy matching

• Persistent / shareable graphs (on correlation - already available ingraph event)

• Gephi export/integration (on correlation - already available ingraph event)

5 of 14

Page 48: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP objects improvements

• In application object template editor

• Object level tagging and galaxies

• Share the object designs within partners on-demand (e.g.remotely browse shared templates of a partner and import them).

• Closer integration of the objects into the various exports

• MISP-modules upgrade for tighter object integration

6 of 14

Page 49: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP galaxy 2.0

• Currently galaxy clusters are static and based on the sharedrepository / an out of bound created local repository

• 2.0 will allow the interactive creation / editing of galaxies andclusters

• Sharing these across instances will happen purely in MISP insteadof just sharing the tags

7 of 14

Page 50: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Darwin

• MISP events are great for more technical analysts or staff familiarwith MISP

• The goal is to consolidate the information and automaticallygenerate natural language reports out of these events

• Upcoming new project on GitHub

• Python code for managing the creation based on triggers andconversion mechanisms

• Using a list of pre-defined strings from customiseable libraries

• Similar approach as warninglists, taxonomies or galaxies. Justcreate your own JSON

8 of 14

Page 51: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Hashstore

• Allow very fast lookups against big dataset.

• Only store hashed versions of the attributes.

• Can be used on untrusted or compromised systems (comparable tobloom filter).

• Hashstore can be used for forensic analysis (e.g. compare baseline

• Beta version available1.

1https://github.com/MISP/misp-workbench/tree/master/hashstore9 of 14

Page 52: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP privacy-aware exchange

• A privacy-aware exchange module to securely and privately shareyour indicators.

• The basic idea is to transform MISP attributes into somethingsharable which does not leak any information.

• A first prototype is accessible2.

2https://github.com/MISP/misp-privacy-aware-exchange10 of 14

Page 53: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP dashboard 2.0

• Tighter integration with MISP

• 2 way communication with MISP

• Authenticated / ACL enabled version

11 of 14

Page 54: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Gamification

• Goal is to encourage users to contribute by offering recognition fortheir efforts.

• Profiles with various metrics tracking contribution.

• Opt-in system since it requires a loss of anonymity.

• Gain points by◦ Entering events◦ Proposing changes (that have to be accepted to get credit)◦ Reviewing events and pointing out false positives

• Based on the existing work in misp-dashboard (MISP up vote onusefulness on information will be added).

12 of 14

Page 55: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Conclusion

• Information sharing practices come from usage and byexample (e.g. learning by imitation from the shared information).

• MISP is just a tool. What matters is your sharing practices. Thetool should be as transparent as possible to support you.

• Enable users to customize MISP to meet their community’suse-cases.

• MISP is evolving into a modular tool for information sharing and”CTI”.

• Contributions and ideas originate from the community ofusers.

• Co-funding of new features or projects around MISP are welcome.

13 of 14

Page 56: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Q&A

• https://github.com/MISP/MISP

• https://github.com/MISP/ for misp-modules, misp-objects,misp-taxonomies and misp-galaxy.

• Feel free to open an issue or make a pull-request on GitHub.

14 of 14

Page 57: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Contributing to MISP ProjectBecome part of the community to design, develop and improve information

sharing

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 58: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Code of Conduct

• The MISP project has a Contributor Covenant Code of Conduct1.

• The goal of the code of conduct is to foster an open, fun andwelcoming environment.

• Another important aspect of the MISP projects is to welcomedifferent areas of expertise in information sharing and analysis. Thediversity of the MISP community is important to make theproject useful for everyone.

1https://github.com/MISP/MISP/code_of_conduct.md

Page 59: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Reporting a bug, an issue or suggesting features

• The most common way to contribute to the MISP project is toreport a bug, issues or suggesting features.

• Each project (MISP core, misp-modules, misp-book,misp-taxonomies, misp-galaxy, misp-object or PyMISP) has theirown issue management.

• Don’t forget that you can cross-reference issues from othersub-projects.

• If you know an answer or could help on a specific issue, wewelcome all contributions including useful comments to reach aresolution.

Page 60: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Reporting security vulnerabilities

• If you find security vulnerabilities (even minor ones) in MISPproject, send an encrypted email ([email protected]) with the detailsand especially how to reproduce the issues. Avoid to share publiclythe vulnerability before a fix is available in MISP. PGP keyfingerprint: CA57 2205 C002 4E06 BA70 BE89 EAAD CFFC22BD 4CD5.

• We usually fix reported and confirmed security vulnerabilities inless than 48 hours.

• We will request a CVE number if the reporters didn’t ask forone (don’t forget to mention how you want to be credited).

Page 61: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Automatic integration and testing

• The majority of the repositories within the MISP GitHuborganisation includes automatic integration with TravisCI.

• If you contribute and make a pull-request, verify if your changesaffect the result of the tests.

• Automatic integration is not perfect including Travis but it’s aquick win to catch new bugs or major issues in contribution.

• When you do a pull-request, TravisCI is automatically called2.◦ If this fails, no worries, review the output at Travis (it’s not always

you).

• We are working on additional automatic tests including unit testingfor the MISP core software (contributors are welcome).

2https://travis-ci.org/MISP

Page 62: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

JSON validation for MISP libraries

• All JSON format (galaxy, taxonomies, objects or warning-lists)are described in a JSON Schema3.

• The TravisCI tests are including JSON validation (via jq) andvalidated with the associated JSON schema.

• How to contribute a JSON library (objects, taxonomies, galaxy orwarning-list):◦ If you update a JSON library, don’t forget to run jq all the things.sh.

It’s fast and easy. If it fails, review your JSON.◦ Commit your code and make a pull-request.

• Documentations (in PDF and HTML format) for the librairies areautomatically generated from the JSON via asciidoctor4.

3schema name.json4example https:

//github.com/MISP/misp-galaxy/blob/master/tools/adoc_galaxy.py

Page 63: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Documentation

• In addition to the automatic generation of documentations fromJSON files, we maintain misp-book5 which is a genericdocumentation for MISP including usage, API documentation, bestpractices and specific configuration settings.

• The book is generated in HTML, PDF, epub and mobi usingGitBook6 which is a framework to write documentation inMarkDown format.

• TravisCI is included in misp-book and the book generation istested at each commit.

• The MISP book is regularly published on misp-project.org andcircl.lu website.

• Contributors are welcome especially for new topics7 and also fixingour broken english.5https://github.com/MISP/misp-book6https://github.com/GitbookIO7Topics of interest are analysts best-practices,

Page 64: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Internet-Draft - IETF for MISP formats

• If you want to contribute to our IETF Internet-Draft for the MISPstandard, misp-rfc8 is the repository where to contribute.

• Update only the markdown file, the XML and ASCII for theIETF I-D are automatically generated.

• If a major release or updates happen in the format, we will publishthe I-D to the IETF9.

• The process is always MISP implementation → IETF I-D updates.

8https://github.com/MISP/misp-rfc9https://datatracker.ietf.org/doc/search/?name=misp&activedrafts=

on&rfcs=on

Page 65: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP core development crash courseHow I learned to stop worrying and love the PHP

Team CIRCL

MISP Training @ Prague20180917

1 of 17

Page 66: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Some things to know in advance...

• MISP is based on PHP 5.6+

• Using the MVC framework CakePHP 2.x

• What we’ll look at now will be a quick glance at the structuring /layout of the code

2 of 17

Page 67: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MVC frameworks in general

• separation of business logic and views, interconnected by controllers

• main advantage is clear separation of the various components

• lean controllers, fat models (kinda...)

• domain based code reuse

• No interaction between Model and Views, ever

3 of 17

Page 68: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Structure of MISP Core app directories

• Config: general configuration files

• Console: command line tools

• Controller: Code dealing with requests/responses, generating datafor views based on interactions with the models

• Lib: Generic reusable code / libraries

• Model: Business logic, data gathering and modification

• Plugin: Alternative location for plugin specific codes, ordered intocontroller, model, view files

• View: UI views, populated by the controller

4 of 17

Page 69: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Controllers - scope

• Each public function in a controller is exposed as an API action

• request routing (admin routing)

• multi-use functions (POST/GET)

• request/response objects

• contains the action code, telling the application what datafetching/modifying calls to make, preparing the resulting data forthe resulting view

• grouped into controller files based on model actions

• Accessed via UI, API, AJAX calls directly by users

• For code reuse: behaviours

• Each controller bound to a model

5 of 17

Page 70: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Controllers - functionalities of controllers

• pagination functionality

• logging functionality

• Controllers actions can access functionality / variables of Models

• Controllers cannot access code of other controller actions (kindof...)

• Access to the authenticated user’s data

• beforeFilter(), afterFilter() methods

• Inherited code in AppController

6 of 17

Page 71: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Controllers - components

• Components = reusable code for Controllers◦ Authentication components◦ RestResponse component◦ ACL component◦ Cidr component◦ IOCImport component (should be moved)

7 of 17

Page 72: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Controllers - additional functionalities

• code handling API requests

• auth/session management

• ACL management

• API management

• Security component

• important: quertString/PyMISP versions, MISP version handler

• future improvements to the export mechanisms

8 of 17

Page 73: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Models - scope

• Controls anything that has to do with:◦ finding subsets of data◦ altering existing data◦ inherited model: AppModel◦ reusable code for models: Behaviours◦ regex, trim

9 of 17

Page 74: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Models - hooking system

• Versatile hooking system◦ manipulate the data at certain stages of execution◦ code can be located in 3 places: Model hook, AppModel hook,

behaviour

10 of 17

Page 75: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Model - hooking pipeline (add/edit)

• Hooks / model pipeline for data creation / edits◦ beforeValidate() (lowercase all hashes)◦ validate() (check hash format)◦ afterValidate() (we never use it◦ could be interesting if we ever validated without saving)◦ beforeSave() (purge existing correlations for an attribute)◦ afterSave() (create new correlations for an attribute / zmq)

11 of 17

Page 76: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Models - hooking pipeline (delete/read)

• Hooks for deletions◦ beforeDelete() (purge correlations for an attribute)◦ afterDelete() (zmq)

• Hooks for retrieving data◦ beforeFind() (modify the find parameters before execution, we don’t

use it)◦ afterFind() (json decode json fields)

12 of 17

Page 77: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Models - misc

• code to handle version upgrades contained in AppModel

• generic cleanup/data migration tools

• centralised redis/pubsub handlers

• (Show example of adding an attribute with trace)

13 of 17

Page 78: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Views - scope and structure

• templates for views

• layouts

• reusable template code: elements◦ attribute list, rows (if reused)

• reusable code: helpers◦ commandhelper (for discussion boards), highlighter for searches, tag

colour helper

• views per controller

14 of 17

Page 79: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Views - Types of views and helpers

• ajax views vs normal views

• data views vs normal views vs serialisation in the controller

• sanitisation h()

• creating forms◦ sanitisation◦ CSRF

15 of 17

Page 80: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Distribution

• algorithm for checking if a user has access to an attribute

• creator vs owner organisation

• distribution levels and inheritance (events -¿ objects -¿ attributes)

• shorthand inherit level

• sharing groups (org list, instance list)

• correlation distribution

• algorithms for safe data fetching (fetchEvents(),fetchAttributes(),...)

16 of 17

Page 81: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Testing your code

• funtional testing

• impact scope◦ view code changes: only impacts request type based views◦ controller code changes: Should only affect given action◦ model code changes: can have impact on entire application◦ lib changes: can have affect on the entire application

• Don’t forget: queryACL, change querystring

17 of 17

Page 82: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Deep-dive into PyMISPMISP - Malware Information Sharing Platform & Threat Sharing

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 83: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Context

• MISP is a large project

• Your production environment is even more complex

• 3rd party services are even worse

• Querying MISP via CURL is doable, but get’s painful fast

• Talking to MySQL directly can be dangerous

• POST a JSON blob, receive a JSON blob. You can do itmanually(-ish)

2 of 22

Page 84: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Big picture

• Core goal: providing stable access to APIs, respect access control

• Simplifying handling & automation of indicators in 3rd party tools

• Hiding complexity of the JSON blobs

• Providing pre-cooked examples for commonly used operations

• Helping integration with existing infrastructure

3 of 22

Page 85: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Common queries: Recent changes on a timeframe

There are 4 main cases here:

• Metadata of the events that have been modified◦ search index ⇒ timestamp (1h, 1d, 7d, ...), returns list of all the

modified events

• Full events (metadata + attributes)◦ search ⇒ timestamp (1h, 1d, 7d, ...)

• Modified attributes◦ search ⇒ controller = attributes and timestamp (1h, 1d, 7d, ...)

• Other use case: get last published events by using the lastparameter in the search method.

4 of 22

Page 86: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Common queries: Search things

There are 3 main cases here:

• Easy, but slow: full text search with search all

• Faster: use the search method and search by tag, type, enforcethe warning lists, with(-out) attachments, dates interval, ...

• Get malware samples (if available on the instance).

5 of 22

Page 87: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Common queries: create things

There are 3 main cases here:

• Add Event, edit its metadata

• Add attributes or objects to event

• (un)Tag event or attribute (soon object)

• Edit Attributes medatada

• Upload malware sample (and automatically expand it)

6 of 22

Page 88: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Administrative tasks

Assyming you have the right to do it on the instance.

• Managing users

• Managing organisations

• Managing sync servers

7 of 22

Page 89: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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

8 of 22

Page 90: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISPEvent - Usecase

from pymisp import MISPEvent , EncodeUpdate

# Create a new even t w i th d e f a u l t v a l u e se v e n t = MISPEvent ( )

# Load an e x i s t i n g JSON dump ( o p t i o n a l )e v e n t . l o a d f i l e ( ’ Path / to / e v e n t . j s o n ’ )e v e n t . i n f o = ’My c o o l e v e n t ’ # Duh .

# Add an a t t r i b u t e o f type ip−d s te v e n t . a d d a t t r i b u t e ( ’ ip−d s t ’ , ’ 8 . 8 . 8 . 8 ’ )

# Mark an a t t r i b u t e as d e l e t e d (From 2 . 4 . 6 0 )e v e n t . 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 s o ne v e n t a s j s o n d u m p = j s o n . dumps ( event , c l s=EncodeUpdate )

9 of 22

Page 91: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Basics

• Python 3.5+ is recommended

• PyMISP is always inline with current version (pip3 install pymisp)

• Dev version: pip3 installgit+https://github.com/MISP/PyMISP.git

• Get your auth key from:https://misppriv.circl.lu/events/automation

◦ Not available: you don’t have ”Auth key access” role. Contact yourinstance admin.

• Source available here: git clonehttps://github.com/MISP/PyMISP.git

10 of 22

Page 92: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Examples

• PyMISP needs to be installed (duh)

• Usage:◦ Create examples/keys.py with the following content

m i s p u r l = ” h t t p s : / / u r l−to−your−misp ”m i s p k e y = ”<API KEY>”m i s p v e r i f y c e r t = True

• Proxy support:p r o x i e s = {

’ h t t p ’ : ’ h t t p : / / 1 2 7 . 0 . 0 . 1 : 8 1 2 3 ’ ,’ h t t p s ’ : ’ h t t p : / / 1 2 7 . 0 . 0 . 1 : 8 1 2 3 ’ ,

}PyMISP ( m i s p u r l , misp key , m i s p v e r i f y c e r t , p r o x i e s=p r o x i e s )

11 of 22

Page 93: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Examples

• Lots of ideas on how to use the API

• You may also want to look at the tests directory

• All the examples use argparse. Help usage is available: script.py-h◦ add file object.py: Attach a file (PE/ELF/Mach-O) object to an

event◦ upload.py: Upload a malware sample (use advanced expansion is

available on the server)◦ last.py: Returns all the most recent events (on a timeframe)◦ add named attribute.py: Add attribute to an event◦ sighting.py: Update sightings on an attribute◦ stats.py: Returns the stats of a MISP instance◦ {add,edit,create} user.py : Add, Edit, Create a user on MISP

12 of 22

Page 94: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Usage

• Basic example

from pymisp import PyMISPa p i = PyMISP ( u r l , a p i k e y , v e r i f y c e r t=True , debug=F a l s e , p r o x i e s=None )r e s p o n s e = a p i .< f u n c t i o n >i f r e s p o n s e [ ’ e r r o r ’ ] :

# <someth ing went wrong>e l s e :

# <do someth ing wi th the output>

13 of 22

Page 95: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Concept behind AbstractMISP

• JSON blobs are python dictionaries

• ... Accessing content can be a pain

• AbstractMISP inherits collections.MutableMapping, they areall dictionaries!

• ... Has helpers to load, dump, and edit JSON blobs

• Important: All the public attributes (not starting with a ) definedin a class are dumped to JSON

• Tags: Events and Attributes have tags, soon Objects. Taghandling is defined in this class.

• edited: When pushing a full MISPEvent, only the objects withouta timestamp, or with a newer timestamp will be updated. Thismethod recursively finds updated events, and removes thetimestamp key from the object.

14 of 22

Page 96: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISPEvent, MISPAttribute, MISPObject,MISPSighting...

• Pythonic representation of MISP elements

• Easy manipulation◦ Load an existing event◦ Update te metadata, add attributes, objects, tags, mark an attribute

as deleted, ...◦ Set relations between objects◦ Load and add attachments or malware samples as pseudo files

• Dump to JSON

15 of 22

Page 97: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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()

16 of 22

Page 98: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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, ...)

17 of 22

Page 99: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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()

18 of 22

Page 100: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PyMISP - Tools

• Libraries requiring specfic 3rd party dependencies

• Callable via PyMISP for specific usecases

• Curently implemented:◦ OpenIOC to MISP Event◦ MISP to Neo4J

19 of 22

Page 101: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PyMISP - Default objects generators

• File - PE/ELF/MachO - Sections

• VirusTotal

• Generic object generator

20 of 22

Page 102: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PyMISP - Logging / Debugging

• debug=True passed to the constructor enable debug to stdout

• Configurable using the standard logging module

• Show everything send to the server and received by the client

import pymispimport l o g g i n g

l o g g e r = l o g g i n g . g e t L o g g e r ( ’ pymisp ’ )l o g g e r . s e t L e v e l ( l o g g i n g .DEBUG) # enab l e debug to s t dou t

l o g g i n g . b a s i c C o n f i g ( l e v e l=l o g g i n g .DEBUG, # Enable debug to f i l ef i l e n a m e=” debug . l o g ” ,f i l e m o d e= ’w ’ ,format=pymisp .FORMAT)

21 of 22

Page 103: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Q&A

• https://github.com/MISP/PyMISP

• https://github.com/MISP/

• https://pymisp.readthedocs.io/

• We welcome new functionalities and pull requests.

22 of 22

Page 104: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP feeds - A simple and secure approach to generate,select and collect intelligence

Providing ready-to-use threat intelligence in MISP standard format

Team CIRCLTLP:WHITE

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 105: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Feed - Basics

MISP Feeds provide a way to

• Exchange information via any transports (e.g. HTTP, TLS, USBkeys)

• Preview events along with their attributes, objects

• Select and import events

• Correlate attributes using caching

MISP Feeds have the following advantages

• Feeds work without the need of MISP synchronisation (reducing attacksurface and complexity to a static directory with the events)

• Feeds can be produced without a MISP instance (e.g. securitydevices, honeypot sensors)

2 of 11

Page 106: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Feed - Overview

• By default, MISP is bundled with ∼50 default feeds (MISP feeds, CSV orfreetext feeds) which are not enabled by default and described in a simpleJSON file1.

• The feeds include CIRCL OSINT feed but also feeds like abuse.ch, Torexit nodes or many more 2.

1https:

//github.com/MISP/MISP/blob/2.4/app/files/feed-metadata/defaults.json2http://www.misp-project.org/feeds/

3 of 11

Page 107: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Feed - Operations

• Cache feed attributes for correlation (not imported but visible in MISP)

• Disable feed

• Explore remote events

• Fetch all events (imported in MISP as event)

• Edit the feed configuration (e.g. authentication, URL,...)

• Remove feed

• Download feed metadata (to share feed details)

4 of 11

Page 108: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Feed - Creation using PyMISP feed generator

feed generator fetches events (matching some filtering) from a MISPinstance and construct the manifest (defined in MISP core format) neededto export data.

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

5 of 11

Page 109: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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

6 of 11

Page 110: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Real-time Feed generator - Purpose

The PyMISP feed generator is great but may be inadequate or ineficient:

• Batch import of attributes/objects

• Data producer doesn’t have a MISP instance at hand and only wants toproduce a directly consumable feed:

Honeypot MISP

ip-srcpayload-deliveryurlmalware...

7 of 11

Page 111: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Real-time Feed generator - Usage

• generator.py exposes a class allowing to generate a MISP feed inreal-time

• Each items can be appended on daily generated events

Example:

1 # Init generator

2 generator = FeedGenerator ()

3

4 # Adding an attribute to the daily event

5 attr_type = "ip-src"

6 attr_value = "8.8.8.8"

7 additional_data = {}

8 generator.add_attribute_to_event(attr_type ,

9 attr_value ,

10 ** additional_data)

8 of 11

Page 112: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Real-time Feed generator - Usage (2)

1 # Adding a MISP object (cowrie) to the daily event

2 obj_name = "cowrie"

3 obj_data = {

4 "session": "session_id",

5 "username": "admin",

6 "password": "admin",

7 "protocol": "telnet"

8 }

9 generator.add_object_to_event(obj_name , ** obj_data)

9 of 11

Page 113: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Adding custom feed to MISP

• Enabled

• Lookup visible

• Name

• Provider

• Source Format

• Url

• Source Format

• Headers

• Distribution

• Default Tag

• Filter rules

10 of 11

Page 114: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Q&A

• https://github.com/MISP/PyMISP

• https://github.com/MISP/

• We welcome new functionalities and pull requests.

11 of 11

Page 115: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP workshopIntroduction into Information Sharing using MISP for CSIRTs

Team CIRCLTLP:WHITE

MISP Training @ Prague20180917

Page 116: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Plan for this session

• Explanation of the CSIRT use case for information sharing andwhat CIRCL does

• Building an information sharing community and best practices

2 / 34

Page 117: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Communities operated by CIRCL

• As a CSIRT, CIRCL operates a wide range of communities

• We use it as an internal tool to cover various day-to-day activities

• Whilst being the main driving force behind the development, we’realso one of the largest consumers

• Different communities have different needs and restrictions

3 / 34

Page 118: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Communities operated by CIRCL

• Private sector community◦ Our largest sharing community◦ Over 900 organisations◦ 2000 users◦ Functions as a central hub for a lot of sharing communities◦ Private organisations, Researchers, Various SoCs, some CSIRTs, etc

• CSIRT community◦ Tighter community◦ National CSIRTs, connections to international organisations, etc

4 / 34

Page 119: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Communities operated by CIRCL

• Financial sector community◦ Banks, payment processors, etc.◦ Sharing of mule accounts and non-cyber threat infomartion

• X-ISAC◦ Bridging the gap between the various sectorial and georgraphical

ISACs◦ New, but ambitious initiative◦ Goal is to bootstrap the cross-sectorial sharing along with building

the infrastructure to enable sharing when needed

5 / 34

Page 120: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Communities operated by CIRCL

• Coming up - the ATT&CK EU community◦ Work on attacker modelling◦ With the assistance of Mitre themselves◦ Unique opportunity to standardise on TTPs◦ Looking for organisations that want to get involved!

6 / 34

Page 121: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Communities supported by CIRCL

• FIRST.org’s MISP community

• Telecom and Mobile operators’ community

• Various ad-hoc communities for exercises for example◦ Most recently for example for the ENISA exercise a few weeks ago

7 / 34

Page 122: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Sharing Scenarios in MISP

• Sharing can happen for many different reasons. Let’s see whatwe believe are the typical CSIRT scenarios

• We can generally split these activities into 4 main groups whenwe’re talking about traditional CSIRT tasks:◦ Core services◦ Proactive services◦ Advanced services◦ Sharing communities managed by CSIRTs for various tasks

8 / 34

Page 123: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

CSIRT core services

• Incident response◦ Internal storage of incident response data◦ Sharing of indicators derived from incident response◦ Correlating data derived and using the built in analysis tools◦ Enrichment services◦ Collaboration with affected parties via MISP during IR◦ Co-ordination and collaboration◦ Takedown requests

• Alerting of information leaks (integration with AIL1)

1https://github.com/CIRCL/AIL-framework9 / 34

Page 124: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

CSIRT proactive services

• Contextualising both internal and external data

• Collection and dissimination of data from various sources(including OSINT)

• Storing, correlating and sharing own manual research (reversing,behavioural analysis)

• Aggregating automated collection (sandboxing, honeypots,spamtraps, sensors)◦ MISP allows for the creation of internal MISP ”clouds”◦ Store large specialised datasets (for example honeypot data)◦ MISP has interactions with a large set of such tools (Cuckoo,

Mail2MISP, etc)

• Situational awareness tools to monitor trends and adversaryTTPs within my sector/geographical region (MISP-dashboard,built in statistics)

10 / 34

Page 125: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

CSIRT proactive services - MISP dashboard

11 / 34

Page 126: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

CSIRT proactive services - MISP dashboard

12 / 34

Page 127: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

CSIRT advanced services

• Supporting forensic analysts

• Collaboration with law enforcement

• Vulnerability information sharing◦ Notifications to the constituency about relevant vulnerabilities◦ Co-ordinating with vendors for notifications (*)◦ Internal / closed community sharing of pentest results◦ We’re planning on starting a series of hackathons to find

13 / 34

Page 128: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

CSIRTs’ management of sharing communities forconstituent actions:

• Reporting non-identifying information about incidents (such asoutlined in NISD)

• Seeking and engaging in collaboration with CSIRT or otherparties during an incident

• Pre-sharing information to request for help / additionalinformation from the community

• Pseudo-anonymised sharing through 3rd parties to avoidattribution of a potential target

• Building processes for other types of sharing to get thecommunity engaged and acquainted with the methodologies ofsharing (mule account information, border control, etc)

14 / 34

Page 129: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

A quick note on compliance...

• Collaboration with Deloitte as part of a CEF project for creatingcompliance documents◦ Information sharing and cooperation enabled by GDPR◦ How MISP enables stakeholders identified by the NISD to perform

key activities◦ AIL and MISP

• For more information: https://github.com/CIRCL/compliance

15 / 34

Page 130: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Bringing different sharing communities together

• We generally all end up sharing with peers that face similarthreats

• Division is either sectorial or geographical

• So why even bother with trying to bridge these communities?

16 / 34

Page 131: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Advantages of cross sectorial sharing

• Reuse of TTPs across sectors• Being hit by something that another sector has faced before• Hybrid threats - how seemingly unrelated things may be

interesting to correlate• Prepare other communities for the capability and culture of

sharing for when the need arises for them to reach out to CSIRT• Generally our field is ahead of several other sectors when it comes

to information sharing, might as well spread the love

17 / 34

Page 132: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Getting started with building your own sharingcommunity

• Starting a sharing community is both easy and difficult at thesame time

• Many moving parts and most importantly, you’ll be dealing with adiverse group of people

• Understanding and working with your constituents to help themface their challenges is key

18 / 34

Page 133: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Getting started with building your own sharingcommunity

• When you are starting out - you are in a unique position to drivethe community and set best practices...

19 / 34

Page 134: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Running a sharing community using MISP - How toget going?

• Different models for constituents◦ Connecting to a MISP instance hosted by a CSIRT◦ Hosting their own instance and connecting to CSIRT’s MISP◦ Becoming member of a sectorial MISP community that is connected

to CSIRT’s community

• Planning ahead for future growth◦ Estimating requirements◦ Deciding early on common vocabularies◦ Offering services through MISP

20 / 34

Page 135: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Rely on our instincts to immitate over expectingadherence to rules

• Lead by example - the power of immitation

• Encourage improving by doing instead of blocking sharing withunrealistic quality controls◦ What should the information look like?◦ How should it be contextualise◦ What do you consider as useful information?◦ What tools did you use to get your conclusions?

• Side effect is that you will end up raising the capabilities of yourconstituents

21 / 34

Page 136: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

What counts as valuable data?

• Sharing comes in many shapes and sizes◦ Sharing results / reports is the classical example◦ Sharing enhancements to existing data◦ Validating data / flagging false positives◦ Asking for support from the community

• Embrace all of them. Even the ones that don’t do either, you’llnever know when they change their minds...

22 / 34

Page 137: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

How to deal with organisations that only ”leech”?

• From our own communities, only about 30% of the organisationsactively share data

• We have come across some communities with sharing requirements

• In our experience, this sets you up for failure because:◦ Organisations will lose protection who would possibily benefit the

most from it◦ Organisations that want to stay above the thresholds will start sharing

junk / fake data◦ You lose organisations that might turn into valuable contributors in

the future

23 / 34

Page 138: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

So how does one convert the passive organisationsinto actively sharing ones?

• Rely on organic growth

• Help them increase their capabilities

• As mentioned before, lead by example

• Rely on the inherent value to one’s self when sharing information(validation, enrichments, correlations)

• Give credit where credit is due, never steal the accolades of yourcommunity (that is incredibly demotivating)

24 / 34

Page 139: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Dispelling the myths around blockers when it comes toinformation sharing

• Sharing difficulties are not really technical issues but often it’s amatter of social interactions (e.g. trust).◦ You can play a role here: organise regular workshops, conferences,

have face to face meetings

• Legal restrictions◦ ”Our legal framework doesn’t allow us to share information.”◦ ”Risk of information leak is too high and it’s too risky for our

organization or partners.”

• Practical restrictions◦ ”We don’t have information to share.”◦ ”We don’t have time to process or contribute indicators.”◦ ”Our model of classification doesn’t fit your model.”◦ ”Tools for sharing information are tied to a specific format, we use a

different one.”25 / 34

Page 140: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Contextualising the information

• Sharing technical information is a great start

• However, to truly create valueable information for your community,always consider the context:◦ Your IDS might not care why it should alert on a rule◦ But your analysts will be interested in the threat landscape and the

”big picture”

• Classify data to make sure your partners understand why it isimportant for them

• Massively important once an organisation has the maturity to filterthe most critical subsets of information for their own defense

26 / 34

Page 141: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Choice of vocabularies

• MISP has a verify versatile system (taxonomies) for classifying andmarking data

• However, this includes different vocabularies with obvious overlaps

• MISP allows you to pick and choose vocabularies to use andenforce in a community

• Good idea to start with this process early

• If you don’t find what you’re looking for:◦ Create your own (JSON format, no coding skills required)◦ If it makes sense, share it with us via a pull request for redistribution

27 / 34

Page 142: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Shared libraries of meta-information (Galaxies)

• The MISPProject in co-operation with partners provides a curatedlist of galaxy information

• Can include information packages of different types, for example:◦ Threat actor information◦ Specialised information such as Ransomware, Exploit kits, etc◦ Methodology information such as preventative actions◦ Classification systems for methodologies used by adversaries -

ATT&CK

• Consider improving the default libraries or contributing your own(simple JSON format)

• If there is something you cannot share, run your own galaxies andshare it out of bound with partners

• Pull requests are always welcome

28 / 34

Page 143: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

False-positive handling

• You might often fall into the trap of discarding seemingly ”junk”data

• Besides volume limitations (which are absolutely valid, fear offalse-positives is the most common reason why people discarddata) - Our recommendation:◦ Be lenient when considering what to keep◦ Be strict when you are feeding tools

• MISP allows you to filter out the relevant data on demand whenfeeding protective tools

• What may seem like junk to you may be absolutely critical to otherusers

29 / 34

Page 144: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Many objectives from different user-groups

• Sharing indicators for a detection matter.◦ ’Do I have infected systems in my infrastructure or the ones I operate?’

• Sharing indicators to block.◦ ’I use these attributes to block, sinkhole or divert traffic.’

• Sharing indicators to perform intelligence.◦ ’Gathering information about campaigns and attacks. Are they

related? Who is targeting me? Who are the adversaries?’

• → These objectives can be conflicting (e.g. False-positives havedifferent impacts)

30 / 34

Page 145: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

False-positive handling

• Analysts will often be interested in the modus operandi of threatactors over long periods of time

• Even cleaned up infected hosts might become interesting again(embedded in code, recurring reuse)

• Use the tools provided to eliminate obvious false positives insteadand limit your data-set to the most relevant sets

31 / 34

Page 146: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Managing sub-communities

• Often within a community smaller bubbles of information sharingwill form

• For example: Within a national private sector sharing community,specific community for financial institutions

• Sharing groups serve this purpose mainly

• As a CSIRT running a national community, consider bootstrapingthese sharing communities

• Organisations can of course self-organise, but you are the oneswith the know-how to get them started

32 / 34

Page 147: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Managing sub-communities

• Consider compartmentalisation - does it make sense to move asecret squirrel club to their own sharing hub to avoid accidentalleaks?

• Use your best judgement to decide which communities should beseparated from one another

• Create sharing hubs with manual data transfer

• Some organisations will even have their data air-gapped - Feedsystem

• Create guidance on what should be shared outside of their bubbles- organisations often lack the insight / experience to decide how toget going. Take the initiative!

33 / 34

Page 148: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Get in touch if you need some help to get started

• Getting started with building a new community can be daunting.Feel free to get in touch with us if you have any questions!

• Contact: [email protected]

• https://www.circl.lu/

• https://github.com/MISP - https://gitter.im/MISP/MISP -https://twitter.com/MISPProject

34 / 34

Page 149: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP User Training - General usage of MISPMISP - Malware Information Sharing Platform & Threat Sharing

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 150: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - VM

• Credentials◦ MISP admin: [email protected]/admin◦ SSH: misp/Password1234

• Available at the following location (VirtualBox and VMWare):◦ https://www.circl.lu/misp-images/latest/

2 of 22

Page 151: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - General Usage

Plan for this part of the training

• Data model

• Viewing data

• Creating data

• Co-operation

• Distribution

• Exports

3 of 22

Page 152: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Event (MISP’s basic building block)

4 of 22

Page 153: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Event (Attributes, giving meaning to events)

5 of 22

Page 154: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Event (Correlations on similar attributes)

6 of 22

Page 155: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Event (Proposals)

7 of 22

Page 156: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Event (Tags)

8 of 22

Page 157: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Event (Discussions)

9 of 22

Page 158: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Event (Taxonomies and proposal correlations)

10 of 22

Page 159: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Event (The state of the art MISP datamodel)

11 of 22

Page 160: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Viewing the Event Index

• Event Index◦ Event context◦ Tags◦ Distribution◦ Correlations

• Filters

12 of 22

Page 161: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Viewing an Event

• Event View◦ Event context◦ Attributes

• Category/type, IDS, Correlations

◦ Objects◦ Galaxies◦ Proposals◦ Discussions

• Tools to find what you are looking for

• Correlation graphs

13 of 22

Page 162: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Creating and populating events in variousways (demo)

• The main tools to populate an event◦ Adding attributes / batch add◦ Adding objects and how the object templates work◦ Freetext import◦ Import◦ Templates◦ Adding attachments / screenshots◦ API

14 of 22

Page 163: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Various features while adding data

• What happens automatically when adding data?◦ Automatic correlation◦ Input modification via validation and filters (regex)◦ Tagging / Galaxy Clusters

• Various ways to publish data◦ Publish with/without e-mail◦ Publishing via the API◦ Delegation

15 of 22

Page 164: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Using the data

• Correlation graphs

• Downloading the data in various formats

• Cached exports

• API (explained later)

• Collaborating with users (proposals, discussions, emails)

16 of 22

Page 165: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Sync explained (if no admin training)

• Sync connections

• Pull/push model

• Previewing instances

• Filtering the sync

• Connection test tool

• Cherry pick mode

17 of 22

Page 166: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Feeds explained (if no admin training)

• Feed types (MISP, Freetext, CSV)

• Adding/editing feeds

• Previewing feeds

• Local vs Network feeds

18 of 22

Page 167: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Distributions explained

• Your Organisation Only

• This Community Only

• Connected Communities

• All Communities

• Sharing Group

19 of 22

Page 168: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Distribution and Topology

20 of 22

Page 169: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Exports and API

• Download an event

• Quick glance at the APIs

• Download search results

• Cached exports

21 of 22

Page 170: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Shorthand admin (if no admin training)

• Settings

• Troubleshooting

• Workers

• Logs

22 of 22

Page 171: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Viper - Using MISP from your terminalMISP - Malware Information Sharing Platform & Threat Sharing

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 172: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Viper - Main ideas

Viper is a binary analysis and management framework. Itsfundamental objective is to provide a solution to easily orga-nize your collection of malware and exploit samples as well asyour collection of scripts you created or found over the time tofacilitate your daily research. Think of it as a Metasploit formalware researchers: it provides a terminal interface that youcan use to store, search and analyze arbitrary files with and aframework to easily create plugins of any sort.

2 of 13

Page 173: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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)

3 of 13

Page 174: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Viper

4 of 13

Page 175: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PyMISP & Viper

• Full featured CLI for MISP

• Remote storage of your zoo

• Search / Cross check with VirusTotal

• Create / Update / Show / Publish Event

• Download / Upload Samples

• Mass export / Upload / Download

• Get Yara rules

5 of 13

Page 176: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Module

6 of 13

Page 177: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Viper & VT

• Searches for hashes/ips/domains/URLs from the current MISPevent, or download the samples

• Download samples from current MISP event

• Download all samples from all the MISP events of the currentsession

7 of 13

Page 178: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

VirusTotal Module

8 of 13

Page 179: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Extra features

• Link to a MISP event

• Local storage of the MISP event

• On the fly cross-check of MISP atributes with 3rd party services

• Never leaving your CLI!

9 of 13

Page 180: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Other modules

• Fully featured CLI for Passive SSL

• Fully featured CLI for Passive DNS

• Can launch Radare2 or IDA

10 of 13

Page 181: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Passive SSL

11 of 13

Page 182: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Passive DNS

12 of 13

Page 183: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Q&A

• https://github.com/MISP/PyMISP

• https://github.com/MISP/

• https://github.com/viper-framework/viper

• We welcome new functionalities and pull requests.

13 of 13

Page 184: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Training: MISP Deployment and Integration

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 185: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

A Common Integration

2 / 12

Page 186: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Recommended MISP Setup

• Provisioning your MISP infrastructure depends heavily on thenumber of attributes/events (whether your dataset is below orabove 50 million attributes).

• Number of MISP instances and the overall design depends on thefollowing factors:◦ Is your community private? Are you gathering MISP events from

other communities? Are you publishing events to external(trusted/untrusted) communities.

◦ Do you plan to have automatic tools (e.g. sandbox analysis orlow-value information needing correlation or an analyst workbench)feeding MISP?

3 / 12

Page 187: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Vendors and Formats

• There is a jungle of formats with some vendors having little to nointerest in keeping their users autonomous.

• Attacks and threats require a dynamic format to be efficientlyshared (e.g. from financial indicators to personal information).

• Review your current list of formats/vendors to ensure a limitedloss of information, especially when exporting from MISP to otherformats (e.g. STIX not supporting financial indicators ortaxonomies/galaxies).

4 / 12

Page 188: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Use case: Normalizing OSINT and Private Feeds

• Normalizing external input and feed into MISP (e.g. feedimporter).

• Comparing feeds before import (how many similarities?false-positives?).

• Evaluating quality of information before import (warning-listlookup at feed evaluation).

5 / 12

Page 189: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Connecting Devices and Tools to MISP

• One of the main goals of MISP is to feed protective or detectiontools with data◦ IDSes / IPSes (e.g. Suricata, Bro, Snort format as included in Cisco

products)◦ SIEMs (e.g. CEF, CSV or real-time ZMQ pub-sub or Sigma)◦ Host scanners (e.g. OpenIOC, STIX, yara rule-set, CSV)◦ Various analysis tools (e.g. Maltego)◦ DNS policies (e.g. RPZ)

• Various ways of exporting this data (downloads of the selecteddata, full exports, APIs)

• The idea was to leave the selection process of the subset of data tobe pushed to these up to the user using APIs.

6 / 12

Page 190: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

SIEM and MISP Integration

• SIEMs and MISP can be integrated with different techniquesdepending on the processes at your SOC or IR:◦ Pulling events (via the API) or indicator lists at regular intervals in a

given time frame to perform lookups.◦ Subscribing to the MISP ZMQ pub-sub channel to directly get the

published events and use these in a lookup process.◦ Lookup expansion module in MISP towards the SIEM to have a

direct view of the attributes matched against the SIEM.

• The above options can be combined, depending on yourorganisation or requirements to increase coverage and detection.

7 / 12

Page 191: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

ZMQ integration: misp-dashboard

• A dashboard showing live data and statistics from the ZMQpub-sub of one or more MISP instances.

• Building low-latency software by consuming pub-sub channelprovides significant advantages over standard API use.

• Process information in real-time when it’s updated, created,published or gathered in MISP.

• Demo!

8 / 12

Page 192: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

New integrations: IR and threat hunting using MISP

• Close co-operation with the Hive project for IR◦ Interact with MISP directly from the Hive◦ Use both the MISP modules and the Cortex analysers in MISP or the

Hive directly

• Using MISP to support your threat hunting via McAfeeOpenDXL

• (https://securingtomorrow.mcafee.com/business/optimize-operations/

expanding-automated-threat-hunting-response-open-dxl)

9 / 12

Page 193: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

The Hive integration

10 / 12

Page 194: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Reporting Back from your Devices, Tools or Processes

As Sightings can be positive, negative or even based on expiration,different use cases are possible:

• Sightings allow users to notify a MISP instance about theactivities related to an indicator.

• Activities can be from a SIEM (e.g. Splunk lookup validation orfalse-positive feedback), a NIDS or honeypot devices1.

• Sighting can affect the API to limit the NIDS exports and improvethe NIDS rule-set directly.

1https://www.github.com/MISP/misp-sighting-tools11 / 12

Page 195: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Q&A

[email protected] (if you want to join the CIRCL MISP sharingcommunity)

• https://github.com/MISP/ -http://www.misp-project.org/

• We welcome any contributions to the project, be it pull requests,ideas, github issues,...

12 / 12

Page 196: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP-DashboardReal-time overview of threat intelligence from MISP instances

Team CIRCL

[email protected]

September 19, 2018

Page 197: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP ZeroMQ

2 of 14

Page 198: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP ZeroMQ

MISP includes a flexible publish-subscribe model to allow real-timeintegration of the MISP activities:

• Event publication

• Attribute creation or removal

• Sighting

• User login

→ Operates at global level in MISP

3 of 14

Page 199: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP ZeroMQ

MISP ZeroMQ functionality can be used for various model ofintegration or to extend MISP functionalities:

• Real-time search of indicators into a SIEM1

• Dashboard activities

• Logging mechanisms

• Continuous indexing

• Custom software or scripting

1Security Information & Event Management4 of 14

Page 200: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP-Dashboard: An introduction

5 of 14

Page 201: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP-Dashboard - Realtime activities and threatintelligence

6 of 14

Page 202: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP-Dashboard - Features

• Subscribe to multiple ZMQ MISP instances

• Provides historical geolocalised information

• Present an experimental Gamification of the platform

• Shows when and how MISP is used

• Provides real time information showing current threats and activity

7 of 14

Page 203: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP-Dashboard: Architecture and development

8 of 14

Page 204: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Setting up the dashboard

1. Be sure to have a running redis server: e.g.◦ redis-server -p 6250

2. Update your configuration in config.cfg

3. Activate your virtualenv:◦ . ./DASHENV/bin/activate

4. Listen to the MISP feed by starting the zmq subscriber:◦ ./zmq subscriber.py

5. Start the dispatcher to process received messages:◦ ./zmq dispatcher.py

6. Start the Flask server:◦ ./server.py

7. Access the interface at http://localhost:8001/

9 of 14

Page 205: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP-Dashboard architecture

10 of 14

Page 206: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Writing your handler

1 # Register your handler

2 dico_action = {

3 "misp_json": handler_dispatcher ,

4 "misp_json_event": handler_event ,

5 "misp_json_self": handler_keepalive ,

6 "misp_json_attribute": handler_attribute ,

7 "misp_json_object": handler_object ,

8 "misp_json_sighting": YOUR_CUSTOM_SIGHTINGS_HANDLER ,

9 "misp_json_organisation": handler_log ,

10 "misp_json_user": handler_user ,

11 "misp_json_conversation": handler_conversation ,

12 "misp_json_object_reference": handler_log ,

13 }

14

11 of 14

Page 207: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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

12 of 14

Page 208: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Future development

Optimizing contribution scoring and model to encouragesharing and contributions enrichment

Increasing geolocation coverage

Global filtering capabilities

- Geolocation: Showing wanted attribute or only on specific region- Trendings: Showing only specified taxonomies

Tighter integration with MISP

- Present in MISP by default- Authenticated / ACL enabled version

13 of 14

Page 209: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Conclusion

MISP-Dashboard can provides realtime information to supportsecurity teams, CSIRTs or SOC showing current threats and activityby providing:

• Historical geolocalised information

• Geospatial information from specific regions

• The most active events, categories, tags, attributes, ...

It also propose a prototype of gamification of the platform providingincentive to share and contribute to the community

14 of 14

Page 210: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP User Training - Administration of MISP 2.4MISP - Malware Information Sharing Platform & Threat Sharing

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 211: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - VM

• VM can be downloaded athttps://www.circl.lu/misp-training/

• Credentials◦ MISP admin: [email protected]/admin◦ SSH: misp/Password1234

• 2 network interfaces◦ NAT◦ Host only adapter

• Start the enrichment system by typing:◦ cd /home/misp/misp-modules/bin◦ python3 misp-modules.py

2 of 22

Page 212: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Administration

• Plan for this part of the training◦ User and Organisaton administration◦ Sharing group creation◦ Templates◦ Tags and Taxonomy◦ Whitelisting and Regexp entries◦ Setting up the synchronisation◦ Scheduled tasks◦ Feeds◦ Settings and diagnostics◦ Logging◦ Troubleshooting and updating

3 of 22

Page 213: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Creating Users

• Add new user ([email protected])

• NIDS SID, Organisation, disable user

• Fetch the PGP key

• Roles◦ Re-using standard roles◦ Creating a new custom role

• Send out credentials

4 of 22

Page 214: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Creating Organisations

• Adding a new organisation

• UUID

• Local vs External organisation

• Making an organisation self sustaining with Org Admins

• Creating a sync user

5 of 22

Page 215: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Sharing groups

• The concept of a sharing group

• Creating a sharing group

• Adding extending rights to an organisation

• Include all organisations of an instance

• Not specifying an instance

• Making a sharing group active

• Reviewing the sharing group

6 of 22

Page 216: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Templates

• Why templating?

• Create a basic template

• Text fields

• Attribute fields

• Attachment fields

• Automatic tagging

7 of 22

Page 217: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Tags and Taxonomies

• git submodule init && git submodule update

• Loading taxonomies

• Enabling taxonomies and associated tags

• Tag management

• Exportable tags

8 of 22

Page 218: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Object Templates

• git submodule init && git submodule update

• Enabling objects (and what about versioning)

9 of 22

Page 219: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Whitelisting, Regexp entries, Warninglists

• Block from exports - whitelisting

• Block from imports - blacklisting via regexp

• Modify on import - modification via regexp

• Maintaining the warninglists

10 of 22

Page 220: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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

11 of 22

Page 221: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Scheduled tasks

• How to schedule the next execution

• Frequency, next execution

• What happens if a job fails?

12 of 22

Page 222: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Setting up the synchronisation

• MISP Feeds and their generation

• PyMISP

• Default free feeds

• Enabling a feed

• Previewing a feed and cherry picking

• Feed filters

• Auto tagging

13 of 22

Page 223: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Settings and diagnostics

• Settings◦ Settings interface◦ The tabs explained at a glance◦ Issues and their severity◦ Setting guidance and how to best use it

14 of 22

Page 224: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Settings and diagnostics continued

• Basic instance setup

• Additional features released as hotfixes

• Customise the look and feel of your MISP

• Default behaviour (encryption, e-mailing, default distributions)

• Maintenance mode

• Disabling the e-mail alerts for an initial sync

15 of 22

Page 225: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Settings and diagnostics continued

• Plugins◦ Enrichment Modules◦ RPZ◦ ZeroMQ

16 of 22

Page 226: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Settings and diagnostics continued

• Diagnostics◦ Updating MISP◦ Writeable Directories◦ PHP settings◦ Dependency diagnostics

17 of 22

Page 227: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Settings and diagnostics continued

• Workers◦ What do the background workers do?◦ Queues◦ Restarting workers, adding workers, removing workers◦ Worker diagnostics (queue size, jobs page)◦ Clearing worker queues◦ Worker and background job debugging

18 of 22

Page 228: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Settings and diagnostics continued

• Seeking help◦ Dump your settings to a file!◦ Make sure to sanitise it◦ Send it to us together with your issue to make our lives easier◦ Ask Github (https://github.com/MISP/MISP)◦ Have a chat with us on gitter (https://gitter.im/MISP/MISP)◦ Ask the MISP mailing list◦ If this is security related, drop us a PGP encrypted email tomailto:[email protected]

19 of 22

Page 229: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Logging

• Audit logs in MISP

• Enable IP logging / API logging

• Search the logs, the fields explained

• External logs◦ /var/www/MISP/app/tmp/logs/error.log◦ /var/www/MISP/app/tmp/logs/resque-worker-error.log◦ /var/www/MISP/app/tmp/logs/resque-scheduler-error.log◦ /var/www/MISP/app/tmp/logs/resque-[date].log◦ /var/www/MISP/app/tmp/logs/error.log◦ apache access logs

20 of 22

Page 230: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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 thecaches◦ in /var/www/MISP/app/tmp/cache/models remove myapp*◦ 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

21 of 22

Page 231: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP - Administrative tools

• Upgrade scripts for minor / major versions

• Maintenance scripts

22 of 22

Page 232: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Information Sharing and TaxonomiesPractical Classification of Threat Indicators using MISP

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 233: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

From Tagging to Flexible Taxonomies

• Tagging is a simple way to attach a classification to an event or anattribute.

• In the early version of MISP, tagging was local to an instance.• Classification must be globally used to be efficient.• After evaluating different solutions of classification, we build a new

scheme using the concept of machine tags.2 of 17

Page 234: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Machine Tags

• Triple tag or machine tag was introduced in 2004 to extendgeotagging on images.

• A machine tag is just a tag expressed in way that allows systems toparse and interpret it.

• Still have a human-readable version:

◦ admiralty-scale:Source Reliability=”Fairly reliable”

3 of 17

Page 235: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Taxonomies

• Taxonomies are implemented in a simple JSON format.

• Anyone can create their own taxonomy or reuse an existing one.

• The taxonomies are in an independent git repository1.

• These can be freely reused and integrated in other threat inteltools.

• Taxonomies are licensed under CC0 (public domain) except if thetaxonomy author decided to use another license.

1https://www.github.com/MISP/misp-taxonomies/4 of 17

Page 236: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Existing Taxonomies

• NATO - Admiralty Scale

• CIRCL Taxonomy - Schemes of Classification in IncidentResponse and Detection

• eCSIRT and IntelMQ incident classification

• EUCI EU classified information marking

• Information Security Marking Metadata from DNI (Director ofNational Intelligence - US)

• NATO Classification Marking

• OSINT Open Source Intelligence - Classification

• TLP - Traffic Light Protocol

• Vocabulary for Event Recording and Incident Sharing - VERIS

• and many more like ENISA, Europol, or the draft FIRST SIGInformation Exchange Policy.

5 of 17

Page 237: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Want to write your own taxonomy? 1/2

1 {2 ”namespace” : ” adm i r a l t y−s c a l e ” ,3 ” d e s c r i p t i o n ” : ”The Admi ra l t y S ca 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 o f a s ou r c e andthe c r e d i b i l i t y o f an i n f o rma t i o n . ” ,

4 ” v e r s i o n ” : 1 ,5 ” p r e d i c a t e s ” : [6 {7 ” va l u e ” : ” 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 ” va l u e ” : ” i n f o rma t i on−c r e d i b i l i t y ” ,12 ” expanded ” : ” I n f o rma t i o n C r e d i b i l i t y ”13 }14 ] ,15 . . . .

6 of 17

Page 238: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Want to write your own taxonomy? 2/2

1 {2 ” v a l u e s ” : [3 {4 ” p r e d i c a t e ” : ” source− r e l i a b i l i t y ” ,5 ” e n t r y ” : [6 {7 ” va l u e ” : ”a” ,8 ” expanded ” : ” Comp le te l y r e l i a b l e ”9 } ,

10 . . . .

• Publishing your taxonomy is as easy as a simple git pull request onmisp-taxonomies2.

2https://github.com/MISP/misp-taxonomies7 of 17

Page 239: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

How are taxonomies integrated in MISP?

• MISP administrator can just import (or even cherry pick) thenamespace or predicates they want to use as tag.

• Tags can be exported to other instances.

• Tags are also accessible via the MISP REST API.

8 of 17

Page 240: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Filtering the distribution of events among MISPinstances

• Applying rules for distribution based on tags:

9 of 17

Page 241: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Other use cases using MISP taxonomies

• Tags can be used to set events or attributes for further processingby external tools (e.g. VirusTotal auto-expansion using Viper).

• Ensuring a classification manager classies the events beforerelease (e.g. release of information from air-gapped/classifiednetworks).

• Enriching IDS export with tags to fit your NIDS deployment.

• Using IntelMQ and MISP together to process events (tags limitedper organization introduced in MISP 2.4.49).

10 of 17

Page 242: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Future functionalities related to MISP taxonomies

• Sighting support (thanks to NCSC-NL) is integrated in MISPallowing to auto expire IOC based on user detection.

• Adjusting taxonomies (adding/removing tags) based on their scoreor visibility via sighting.

• Simple taxonomy editors to help non-technical users to createtheir taxonomies.

• Filtering mechanisms in MISP to rename or replacetaxonomies/tags at pull and push synchronisation.

• More public taxonomies to be included.

11 of 17

Page 243: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PyTaxonomies

• Python module to handle the taxonomies

• Offline and online mode (fetch the newest taxonomies fromGitHub)

• Simple search to make tagging easy

• Totally independant from MISP

• No external dependencies in offline mode

• Python3 only

• Can be used to create & dump a new taxonomy

12 of 17

Page 244: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PyTaxonomies

from pytaxonomies import Taxonomiestaxonomies = Taxonomies ( )taxonomies . v e r s i o n# => ’20160725 ’taxonomies . d e s c r i p t i o n# => ’ Man i f e s t f i l e o f MISP taxonomies a v a i l a b l e . ’l i s t ( taxonomies . keys ( ) )# => [ ’ t l p ’ , ’ eu−c r i t i c a l −s e c t o r s ’ , ’ de−vs ’ , ’ o s i n t ’ , ’ c i r c l ’ , ’ v e r i s ’ ,# ’ e c s i r t ’ , ’ dhs−c i i p−s e c t o r s ’ , ’ f r−c l a s s i f ’ , ’ misp ’ , ’ adm i r a l t y−s c a l e ’ , . . . ]taxonomies . ge t ( ’ e n i s a ’ ) . d e s c r i p t i o n# ’The p r e s e n t t h r e a t taxonomy i s an i n i t i a l v e r s i o n tha t has been deve l oped on# the b a s i s o f a v a i l a b l e ENISA ma t e r i a l . Th i s ma t e r i a l has been used as an ENISA−i n t e r n a l# s t r u c t u r i n g a i d f o r i n f o rma t i o n c o l l e c t i o n and t h r e a t c o n s o l i d a t i o n pu rpo s e s .# I t emerged i n the t ime p e r i o d 2012−2015. ’p r i n t ( taxonomies . ge t ( ’ c i r c l ’ ) )# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=” v u l n e r a b i l i t y ”# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=”malware ”# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=” f a s t f l u x ”# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=”system−compromise ”# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=”sq l−i n j e c t i o n ”# . . . .p r i n t ( taxonomies . ge t ( ’ c i r c l ’ ) . mach ine tags expanded ( ) )# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=”Ph i s h i ng ”# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=”Malware”# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=”XSS”# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=”Copy r i gh t i s s u e ”# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=”Spam”# c i r c l : i n c i d e n t−c l a s s i f i c a t i o n=”SQL I n j e c t i o n ”

13 of 17

Page 245: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

The dilemma of false-positive

• False-positive is a common issue in threat intelligence sharing.

• It’s often a contextual issue:◦ false-positive might be different per community of users sharing

information.◦ organization might have their own view on false-positive.

• Based on the success of the MISP taxonomy model, we buildmisp-warninglists.

14 of 17

Page 246: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP warning lists

• misp-warninglists are lists of w¯

ell-known indicators that can beassociated to potential false positives, errors or mistakes.

• Simple JSON files

1 {2 ”name” : ” L i s t o f known p u b l i c DNS r e s o l v e r s ” ,3 ” v e r s i o n ” : 2 ,4 ” d e s c r i p t i o n ” : ”Event c o n t a i n s one or more p u b l i c DNS

r e s o l v e r s as a t t r i b u t e w i th an IDS f l a g s e t ” ,5 ” ma t c h i n g a t t r i b u t e s ” : [6 ” ip−s r c ” ,7 ” ip−ds t ”8 ] ,9 ” l i s t ” : [

10 ”8 . 8 . 8 . 8” ,11 ”8 . 8 . 4 . 4” , . . . ]12 }

15 of 17

Page 247: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP warning lists

• The warning lists are integrated in MISP to display aninfo/warning box at the event and attribute level.

• Enforceable via the API where all attributes that have a hit on awarninglist will be excluded.

• This can be enabled at MISP instance level.

• Default warning lists can be enabled or disabled like known publicresolver, multicast IP addresses, hashes for empty values,rfc1918, TLDs or known google domains.

• The warning lists can be expanded or added in JSON locally or viapull requests.

• Warning lists can be also used for critical or core infrastructurewarning, personally identifiable information...

16 of 17

Page 248: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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 communityoperated by CIRCL)

• PGP key fingerprint: CA57 2205 C002 4E06 BA70 BE89 EAADCFFC 22BD 4CD5

17 of 17

Page 249: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Extending MISP with Python modulesMISP - Malware Information Sharing Platform & Threat Sharing

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 250: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Why we want to go more modular...

• Ways to extend MISP before modules◦ APIs (PyMISP, MISP API)

• Works really well• No integration with the UI

◦ Change the core code

• Have to change the core of MISP, diverge from upstream• Needs a deep understanding of MISP internals• Let’s not beat around the bush: Everyone hates PHP

2 of 32

Page 251: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Goals for the module system

• Have a way to extend MISP without altering the core

• Get started quickly without a need to study the internals

• Make the modules as light weight as possible◦ Module developers should only have to worry about the data

transformation◦ Modules should have a simple and clean skeleton

• In a friendlier language - Python

3 of 32

Page 252: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP modules - extending MISP with Python scripts

• Extending MISP with expansionmodules with zero customization inMISP.

• A simple ReST API between themodules and MISP allowingauto-discovery of new modules withtheir features.

• Benefit from existing Pythonmodules in Viper or any other tools.

• MISP modules functionnalityintroduced in MISP 2.4.28.

• MISP import/export modulesintroduced in MISP 2.4.50.

4 of 32

Page 253: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP modules - installation

• MISP modules can be run on the same system or on a remoteserver.

• Python 3 is required to run MISP modules.◦ sudo apt-get install python3-dev python3-pip libpq5◦ cd /usr/local/src/◦ sudo git clone https://github.com/MISP/misp-modules.git◦ cd misp-modules◦ sudo pip3 install -I -r REQUIREMENTS◦ sudo pip3 install -I .◦ sudo vi /etc/rc.local, add this line: ‘sudo -u www-data misp-modules

-s &‘

5 of 32

Page 254: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP modules - Simple REST API mechanism

• http://127.0.0.1:6666/modules - introspection interface to get allmodules available◦ returns a JSON with a description of each module

• http://127.0.0.1:6666/query - interface to query a specificmodule◦ to send a JSON to query the module

• MISP autodiscovers the available modules and the MISP siteadministrator can enable modules as they wish.

• If a configuration is required for a module, MISP addsautomatically the option in the server settings.

6 of 32

Page 255: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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 }

7 of 32

Page 256: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Querying a module

• curl -s http://127.0.0.1:6666/query -H ”Content-Type:application/json” –data @body.json -X POST

body.json

1 {"module": "dns", "hostname": "www.circl.lu"}

• and the response of the dns module:

1 {"results": [{"values": ["149.13.33.14"],

2 "types": ["ip-src", "ip-dst"]}]}

8 of 32

Page 257: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP modules - How it’s integrated in the UI?

9 of 32

Page 258: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP modules - configuration in the UI

10 of 32

Page 259: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP modules - main types of modules

• Expansion modules - enrich data that is in MISP◦ Hover type - showing the expanded values directly on the attributes◦ Expansion type - showing and adding the expanded values via a

proposal form

• Import modules - import new data into MISP

• Export modules - export existing data from MISP

11 of 32

Page 260: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your Expansion module (Skeleton)

import j s o nimport dns . r e s o l v e r

m i s p e r r o r s = { ’ 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 ’ : [ ] , ’ output ’ : [ ] }m o d u l e i n f o = { ’ v e r s i o n ’ : ’ ’ , ’ a u t h o r ’ : ’ ’ ,

’ d e s c r i p t i o n ’ : ’ ’ , ’ module−t y p e ’ : [ ] }

def h a n d l e r ( q=F a l s e ) :i f q i s F a l s e :

return F a l s er e q u e s t = j s o n . l o a d s ( q )r = { ’ r e s u l t s ’ : [{ ’ t y p e s ’ : [ ] , ’ v a l u e s ’ : [ ] } ] }return r

def i n t r o s p e c t i o n ( ) :return m i s p a t t r i b u t e s

def v e r s i o n ( ) :return m o d u l e i n f o

12 of 32

Page 261: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your Expansion module (metadata 1)

m i s p e r r o r s = { ’ 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−d s t ’ ]}m o d u l e i n f o = { ’ v e r s i o n ’ : ’ ’ , ’ a u t h o r ’ : ’ ’ ,

’ d e s c r i p t i o n ’ : ’ ’ , ’ module−t y p e ’ : [ ] }

13 of 32

Page 262: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your Expansion module (metadata 2)

m i s p e r r o r s = { ’ 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−d s t ’ ]}m o d u l e i n f o = { ’ v e r s i o n ’ : ’ 0 . 1 ’ , ’ a u t h o r ’ : ’ A l e x a n d r e Dulaunoy ’ ,

’ d e s c r i p t i o n ’ : ’ S imple DNS e x p a n s i o n s e r v i c e tor e s o l v e IP a d d r e s s from MISP a t t r i b u t e s ’ , ’ module−t y p e ’ : [ ’ e x p a n s i o n ’ , ’ h o v e r ’ ]}

14 of 32

Page 263: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your Expansion module (handler 1)

def h a n d l e r ( q=F a l s e ) :i f q i s F a l s e :

return F a l s er e q u e s t = j s o n . l o a d s ( q )# MAGIC# MORE MAGICr = { ’ r e s u l t s ’ : [

{ ’ t y p e s ’ : o u t p u t t y p e s , ’ v a l u e s ’ : v a l u e s } ,{ ’ t y p e s ’ : o u t p u t t y p e s 2 , ’ v a l u e s ’ : v a l u e s 2 }

]}return r

15 of 32

Page 264: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your Expansion module (handler 2)

i f r e q u e s t . g e t ( ’ hostname ’ ) :t o q u e r y = r e q u e s t [ ’ hostname ’ ]

e l i f r e q u e s t . g e t ( ’ domain ’ ) :t o q u e r y = r e q u e s t [ ’ domain ’ ]

e l s e :return F a l s e

r = dns . r e s o l v e r . R e s o l v e r ( )r . t i m e o u t = 2r . l i f e t i m e = 2r . n a m e s e r v e r s = [ ’ 8 . 8 . 8 . 8 ’ ]t r y :

answer = r . qu e r y ( toquery , ’A ’ )except dns . r e s o l v e r .NXDOMAIN:

m i s p e r r o r s [ ’ e r r o r ’ ] = ”NXDOMAIN”return m i s p e r r o r s

except dns . e x c e p t i o n . Timeout :m i s p e r r o r s [ ’ e r r o r ’ ] = ” Timeout ”return m i s p e r r o r s

except :m i s p e r r o r s [ ’ e r r o r ’ ] = ”DNS r e s o l v i n g e r r o r ”return m i s p e r r o r s

r = { ’ r e s u l t s ’ : [{ ’ t y p e s ’ : m i s p a t t r i b u t e s [ ’ output ’ ] , ’ v a l u e s ’ : [ s t r ( answer [ 0 ] ) ] } ] }return r

16 of 32

Page 265: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your module - finished DNS module

import j s o nimport dns . r e s o l v e rm i s p e r r o r s = { ’ 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−d s t ’ ]}m o d u l e i n f o = { ’ v e r s i o n ’ : ’ 0 . 1 ’ , ’ a u t h o r ’ : ’ A l e x a n d r e Dulaunoy ’ ,

’ d e s c r i p t i o n ’ : ’ S imple DNS e x p a n s i o n s e r v i c e to r e s o l v e IP a d d r e s s from MISP a t t r i b u t e s ’ , ’ module−t y p e ’ : [ ’ e x p a n s i o n ’ , ’ h o v e r ’ ]}def h a n d l e r ( q=F a l s e ) :

i f q i s F a l s e :return F a l s e

r e q u e s t = j s o n . l o a d s ( q )i f r e q u e s t . g e t ( ’ hostname ’ ) :

t o q u e r y = r e q u e s t [ ’ hostname ’ ]e l i f r e q u e s t . g e t ( ’ domain ’ ) :

t o q u e r y = r e q u e s t [ ’ domain ’ ]e l s e :

return F a l s er = dns . r e s o l v e r . R e s o l v e r ( )r . t i m e o u t = 2r . l i f e t i m e = 2r . n a m e s e r v e r s = [ ’ 8 . 8 . 8 . 8 ’ ]t r y :

answer = r . qu e r y ( toquery , ’A ’ )except dns . r e s o l v e r .NXDOMAIN:

m i s p e r r o r s [ ’ e r r o r ’ ] = ”NXDOMAIN”return m i s p e r r o r s

except dns . e x c e p t i o n . Timeout :m i s p e r r o r s [ ’ e r r o r ’ ] = ” Timeout ”return m i s p e r r o r s

except :m i s p e r r o r s [ ’ e r r o r ’ ] = ”DNS r e s o l v i n g e r r o r ”return m i s p e r r o r s

r = { ’ r e s u l t s ’ : [{ ’ t y p e s ’ : m i s p a t t r i b u t e s [ ’ output ’ ] , ’ v a l u e s ’ : [ s t r ( answer [ 0 ] ) ] } ] }return r

def i n t r o s p e c t i o n ( ) :return m i s p a t t r i b u t e s

def v e r s i o n ( ) :return m o d u l e i n f o

17 of 32

Page 266: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Testing your module

• Copy your module dns.py in modules/expansion/

• Restart the server misp-modules.py[ a d u l a u : ˜ / g i t / misp−modules / b i n ] $ python3 misp−modules . py2016−03−20 1 9 : 2 5 : 4 3 , 7 4 8 − misp−modules − INFO − MISP modules p a s s i v e t o t a l i m p o r t e d2016−03−20 1 9 : 2 5 : 4 3 , 7 8 7 − misp−modules − INFO − MISP modules s o u r c e c a c h e i m p o r t e d2016−03−20 1 9 : 2 5 : 4 3 , 7 8 9 − misp−modules − INFO − MISP modules cve i m p o r t e d2016−03−20 1 9 : 2 5 : 4 3 , 7 9 0 − misp−modules − INFO − MISP modules dns i m p o r t e d2016−03−20 1 9 : 2 5 : 4 3 , 7 9 7 − misp−modules − INFO − MISP modules s e r v e r s t a r t e d on TCP p o r t 6666

• Check if your module is present in the introspection

• curl -s http://127.0.0.1:6666/modules

• If yes, test it directly with MISP or via curl

18 of 32

Page 267: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Code samples (Configuration)

# Con f i g u r a t i o n at the topm o d u l e c o n f i g = [ ’ username ’ , ’ password ’ ]# Code b l o ck i n the hand l e r

i f r e q u e s t . g e t ( ’ c o n f i g ’ ) :i f ( r e q u e s t [ ’ c o n f i g ’ ] . g e t ( ’ username ’ ) i s None ) or ( r e q u e s t [ ’ c o n f i g ’ ] . g e t ( ’ password ’ ) i s None ) :

m i s p e r r o r s [ ’ 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 m i s s i n g ’return m i s p e r r o r s

−x = p y p s s l . PyPSSL ( b a s i c a u t h =( r e q u e s t [ ’ c o n f i g ’ ] [ ’ username ’ ] , r e q u e s t [ ’ c o n f i g ’ ] [ ’ password ’ ] ) )

19 of 32

Page 268: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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• Whois20 of 32

Page 269: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Import modules

• Similar to expansion modules

• Input is a file upload or a text paste

• Output is a list of parsed attributes to be editend and verified bythe user

• System is still new but some modules already exist◦ Cuckoo JSON import◦ email import◦ OCR module◦ Simple STIX import module

• Many ideas for future modules (OpenIOC import, connector tosandboxes, STIX 2.0, etc)

21 of 32

Page 270: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your Import module (Skeleton)

import j s o n

m i s p e r r o r s = { ’ e r r o r ’ : ’ E r r o r ’ }u s e r C o n f i g = {

’ number1 ’ : {’ t y p e ’ : ’ I n t e g e r ’ ,’ r e g e x ’ : ’ /ˆ[0−4] $/ i ’ ,’ e r r o r M e s s a g e ’ : ’ Expected a number i n ra ng e [0−4] ’ ,’ message ’ : ’ Column number used f o r v a l u e ’

}} ;

i n p u t S o u r c e = [ ’ f i l e ’ , ’ p a s t e ’ ]m o d u l e i n f o = { ’ v e r s i o n ’ : ’ ’ , ’ a u t h o r ’ : ’ ’ ,

’ d e s c r i p t i o n ’ : ’ ’ , ’ module−t y p e ’ : [ ’ i m p o r t ’ ]}m o d u l e c o n f i g =[ ]

def h a n d l e r ( q=F a l s e ) :i f q i s F a l s e :

return F a l s er e q u e s t = j s o n . l o a d s ( q )r e q u e s t [ ” data ” ] = base64 . b64decode ( r e q u e s t [ ” data ” ] )r = { ’ r e s u l t s ’ : [{ ’ c a t e g o r i e s ’ : [ ] , ’ t y p e s ’ : [ ] , ’ v a l u e s ’ : [ ] } ] }return r

def i n t r o s p e c t i o n ( ) :return { ’ u s e r C o n f i g ’ : u s e r C o n f i g , ’ i n p u t S o u r c e ’ : i n p u t S o u r c e , ’ modu leConf ig ’ : modu leConf ig }

def v e r s i o n ( ) :return m o d u l e i n f o

22 of 32

Page 271: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your import module (userConfig andinputSource)

u s e r C o n f i g = {’ number1 ’ : {

’ t y p e ’ : ’ I n t e g e r ’ ,’ r e g e x ’ : ’ /ˆ[0−4] $/ i ’ ,’ e r r o r M e s s a g e ’ : ’ Expected a number i n ra ng e [0−4] ’ ,’ message ’ : ’ Column number used f o r v a l u e ’

}} ;i n p u t S o u r c e = [ ’ f i l e ’ , ’ p a s t e ’ ]

23 of 32

Page 272: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your import module (Handler)

def h a n d l e r ( q=F a l s e ) :i f q i s F a l s e :

return F a l s er e q u e s t = j s o n . l o a d s ( q )r e q u e s t [ ” data ” ] = base64 . b64decode ( r e q u e s t [ ” data ” ] )r = { ’ r e s u l t s ’ : [{ ’ c a t e g o r i e s ’ : [ ] , ’ t y p e s ’ : [ ] , ’ v a l u e s ’ : [ ] } ] }return r

24 of 32

Page 273: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your import module (Introspection)

def i n t r o s p e c t i o n ( ) :modulesetup = {}t r y :

u s e r C o n f i gmodulesetup [ ’ u s e r C o n f i g ’ ] = u s e r C o n f i g

except NameError :pass

t r y :modu leConf igmodulesetup [ ’ modu leConf ig ’ ] = moduleConf ig

except NameError :pass

t r y :i n p u t S o u r c emodulesetup [ ’ i n p u t S o u r c e ’ ] = i n p u t S o u r c e

except NameError :pass

return modulesetup

25 of 32

Page 274: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Export modules

• Input is currently only a single event

• Dynamic settings

• Later on to be expanded to event collections / attribute collections

• Output is a file in the export format served back to the user

• Export modules was recently introduced but a CEF export modulealready available

• Lots of ideas for upcoming modules and including interaction withmisp-darwin

26 of 32

Page 275: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your Export module (Skeleton)

import j s o ni n p u t S o u r c e = [ ’ e v e n t ’ ]o u t p u t F i l e E x t e n s i o n = ’ t x t ’r e s p o n s e T y p e = ’ a p p l i c a t i o n / t x t ’m o d u l e i n f o = { ’ v e r s i o n ’ : ’ 0 . 1 ’ , ’ a u t h o r ’ : ’ Andras I k l o d y ’ ,

’ d e s c r i p t i o n ’ : ’ S k e l e t o n e x p o r t module ’ ,’ module−t y p e ’ : [ ’ e x p o r t ’ ]}

def h a n d l e r ( q=F a l s e ) :i f q i s F a l s e :

return F a l s er e q u e s t = j s o n . l o a d s ( q )# i n s e r t your magic he r e !output = my magic ( r e q u e s t [ ” data ” ] )r = {” data ” : base64 . b64encode ( output . encode ( ’ u t f−8 ’ ) ) . decode ( ’ u t f−8 ’ )}return r

def i n t r o s p e c t i o n ( ) :return { ’ u s e r C o n f i g ’ : u s e r C o n f i g , ’ i n p u t S o u r c e ’ : i n p u t S o u r c e , ’ modu leConf ig ’ : moduleConf ig , ’ o u t p u t F i l e E x t e n s i o n ’ : o u t p u t F i l e E x t e n s i o n }

def v e r s i o n ( ) :return m o d u l e i n f o

27 of 32

Page 276: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your export module (settings)

i n p u t S o u r c e = [ ’ e v e n t ’ ]o u t p u t F i l e E x t e n s i o n = ’ t x t ’r e s p o n s e T y p e = ’ a p p l i c a t i o n / t x t ’

28 of 32

Page 277: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your export module (handler)

def h a n d l e r ( q=F a l s e ) :i f q i s F a l s e :

return F a l s er e q u e s t = j s o n . l o a d s ( q )# i n s e r t your magic he r e !output = my magic ( r e q u e s t [ ” data ” ] )r = {” data ” : base64 . b64encode ( output . encode ( ’ u t f−8 ’ ) ) . decode ( ’ u t f−8 ’ )}return r

29 of 32

Page 278: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your export module (introspection)def i n t r o s p e c t i o n ( ) :

modu lesetup = {}t r y :

r e s p o n s e T y p emodulesetup [ ’ r e s p o n s e T y p e ’ ] = r e s p o n s e T y p e

except NameError :pass

t r y :u s e r C o n f i gmodulesetup [ ’ u s e r C o n f i g ’ ] = u s e r C o n f i g

except NameError :pass

t r y :modu leConf igmodulesetup [ ’ modu leConf ig ’ ] = moduleConf ig

except NameError :pass

t r y :o u t p u t F i l e E x t e n s i o nmodulesetup [ ’ o u t p u t F i l e E x t e n s i o n ’ ] = o u t p u t F i l e E x t e n s i o n

except NameError :pass

t r y :i n p u t S o u r c emodulesetup [ ’ i n p u t S o u r c e ’ ] = i n p u t S o u r c e

except NameError :pass

return modulesetup

30 of 32

Page 279: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Upcoming additions to the module system - General

• Expose the modules to the APIs

• Move the modules to background processes with a messagingsystem

• Difficulty is dealing with uncertain results on import (without theuser having final say)

31 of 32

Page 280: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

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.

32 of 32

Page 281: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Training: Galaxies

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 282: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Galaxies

• MISP started out as a platform for technical indicator sharing

• The need for a way to describe threat actors, tools and othercommonalities became more and more pressing

• Taxonomies quickly became essential for classifying events

• The weakness of the tagging aproach is that it’s not verydescriptive

• We needed a way to attach more complex structures to data

• Also, with the different naming conventions for the same ”thing”attribution was a mess

• This is where the Galaxy concept came in

2 / 17

Page 283: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Solution

• Pre-crafted galaxy ”clusters” via GitHub project

• Attach them to an event and attribute(s)

• The main design principle was that these higher level informationsare meant for human consumption

• This means flexibility - key value pairs, describe them dynamically

• Technical indicators remain strongly typed and validated, galaxiesare loose key value lists

3 / 17

Page 284: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

The galaxy object stack

• Galaxy: The type of data described (Threat actor, Tool, ...)

• Cluster: An individual instance of the galaxy (Sofacy, Turla, ...)

• Element: Key value pairs describing the cluster (Country: RU,Synonym: APT28, Fancy Bear)

• Reference: Referenced galaxy cluster (Such as a threat actorusing a specific tool)

4 / 17

Page 285: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

(some) Existing galaxies

• Exploit-Kit: An enumeration of known exploitation kits used byadversaries

• Microsoft activity group: Adversary groups as defined byMicrosoft

• Preventive measure: Potential preventive measures againstthreats

• Ransomware: List of known ransomwares

• TDS: Traffic Direction System used by adversaries

• Threat-Actor: Known or estimated adversary groups

• Tool: Tools used by adversaries (from Malware to common tools)

• MITRE ATT&CK: Adversarial Tactics, Techniques, and CommonKnowledge (ATT&CKTM)

5 / 17

Page 286: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

What a cluster looks like

6 / 17

Page 287: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Attaching clusters to events

• Internally simply using a taxonomy-like tag to attach them toevents

• Example: misp-galaxy:threat-actor=”Sofacy”

• Synchronisation works out of the box with older instances too.They will simply see the tags until they upgrade.

• Currently, as mentioned we rely on the community’s contributionof galaxies

7 / 17

Page 288: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Attaching clusters

• Use a searchable synonym database to find what you’re after

8 / 17

Page 289: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Creating your own galaxy

• Creating galaxy clusters has to be straightforward to get thecommunity to contribute

• Building on the prior success of the taxonomies and warninglists

• Simple JSON format in similar fashion

• Just drop the JSON in the proper directory and let MISP ingest it

• We always look forward to contributions to our galaxies repository

9 / 17

Page 290: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Galaxy JSON

• If you want to create a completely new galaxy instead of enrichingan existing one

1 {2 ”name” : ”Threat Actor ” ,3 ” type ” : ” th r e a t−a c t o r ” ,4 ” d e s c r i p t i o n ” : ”Threat a c t o r s a r e c h a r a c t e r i s t i c s o f

ma l i c i o u s a c t o r s ( o r a d v e r s a r i e s ) r e p r e s e n t i n g a cybe ra t t a c k t h r e a t i n c l u d i n g presumed i n t e n t andh i s t o r i c a l l y ob s e r v ed behav i ou r . ” ,

5 ” v e r s i o n ” : 1 ,6 ” uu id ” : ”698774c7−8022−42c4−917 f−8d6e4 f 06ada3”7 }

10 / 17

Page 291: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Cluster JSON

• Clusters contain the meat of the data

• Skeleton structure as follows1 {2 ” v a l u e s ” : [3 {4 ”meta” : {} ,5 ” d e s c r i p t i o n ” : ”” ,6 ” v a l u e ” : ”” ,7 ” r e l a t e d c l u s t e r s ” : [ {} ] ,8 }9 ]

10 }

11 / 17

Page 292: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Cluster JSON value example1 {2 ”meta” : {3 ” synonyms” : [4 ”APT 28” , ”APT28” , ”Pawn Storm” , ”Fancy Bear ” ,5 ” Sedn i t ” , ”TsarTeam” , ”TG−4127” , ”Group−4127” ,6 ”STRONTIUM” , ”Grey−Cloud”7 ] ,8 ” coun t r y ” : ”RU” ,9 ” r e f s ” : [

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 Sedn i t ) i s a cybe r15 e sp i onage group b e l i e v e d to have t i e s to the16 Rus s i an 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 been19 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 ” v a l u e ” : ” So facy ”21 } ,

12 / 17

Page 293: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

meta best practices

• Reusing existing values such as properties, complexity,effectiveness, country, possible issues, colour, motive,impact, refs, synonyms, derivated from, status, date,encryption, extensions, ransomnotes, cfr-suspected-victims,cfr-suspected-state-sponsor, cfr-type-of-incident,cfr-target-category.

• Or adding your own meta fields.

13 / 17

Page 294: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

meta best practices - a sample1 {2 ” d e s c r i p t i o n ” : ” Pu t t e r Panda were the s u b j e c t o f an

e x t e n s i v e r e p o r t by CrowdSt r i ke , which s t a t e d : ’TheCrowdSt r i ke 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 sp a r t i c u l a r u n i t s i n c e 2012 , under the codename

PUTTER PANDA, and has documented a c t i v i t y d a t i n gback to 2007 . The r e p o r t i d e n t i f i e s Chen Ping , akacpyy , and the p r imary l o c a t i o n o f Un i t 61486 . ’ ” ,

3 ”meta” : {4 ” c f r−su spec ted−s t a t e−spon so r ” : ”China ” ,5 ” c f r−su spec ted−v i c t im s ” : [6 ”U. S . s a t e l l i t e and ae r o spac e s e c t o r ”7 ] ,8 ” c f r−t a r g e t−c a t e go r y ” : [9 ” P r i v a t e s e c t o r ” ,

10 ”Government”11 ] ,12 ” c f r−type−of− i n c i d e n t ” : ” Esp ionage ” ,13 ” coun t r y ” : ”CN” ,14 ” r e f s ” : [15 ” h t tp : // cdn0 . vox−cdn . com/ a s s e t s /4589853/ c r owd s t r i k e−

i n t e l l i g e n c e −r e po r t−pu t t e r−panda . o r i g i n a l . pd f ” ,16 ” h t t p s : //www. c f r . o rg / i n t e r a c t i v e / cyber−o p e r a t i o n s /

pu t t e r−panda”17 ] ,18 ” synonyms” : [19 ”PLA Uni t 61486” ,20 ”APT 2” ,21 ”Group 36” ,22 ”APT−2” ,23 ”MSUpdater” ,24 ”4HCrew” ,25 ”SULPHUR” ,26 ”TG−6952”27 ]28 }}

14 / 17

Page 295: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Expressing relation between clusters

• Cluster can be related to one or more clusters using defaultrelationships from MISP objects and a list of tags to classify therelation.

1 ” r e l a t e d ” : [2 {3 ” dest−uu id ” : ”5 ce 5392a−3a6c−4e07−9 d f 3−9b6a9159ac45” ,4 ” t ag s ” : [5 ” e s t ima t i v e−l anguage : l i k e l i h o o d −p r o b a b i l i t y =\”

l i k e l y \””6 ] ,7 ” type ” : ” s i m i l a r ”8 }9 ] ,

10 ” uu id ” : ”0 ca45163−e223−4167−b1 af−f 088ed14a93d” ,11 ” v a l u e ” : ” Pu t t e r Panda”

15 / 17

Page 296: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

PyMISPGalaxies

from p ym i s p g a l a x i e s import C l u s t e r sc = C l u s t e r s ( )l i s t ( g . keys ( ) )# [ ’ t h r e a t−a c t o r ’ , ’ ransomware ’ , ’ e x p l o i t−k i t ’ , ’ t d s ’ , ’ t o o l ’ , ’ r a t ’ , ’ m i t re−at tack−pa t t e r n ’ ,# ’ mit re−t o o l ’ , ’ m i c r o s o f t−a c t i v i t y−group ’ , ’ mi t re−cour se−of−a c t i o n ’ , ’ mi t re−malware ’ ,# ’ mit re−i n t r u s i o n−s e t ’ , ’ p r e v e n t i v e−measure ’ ]p r i n t ( c . ge t ( ” r a t ” ) )# misp−ga l a x y : r a t=”Brat ”# misp−ga l a x y : r a t=”Lok i RAT”# misp−ga l a x y : r a t=” j o i n .me”# misp−ga l a x y : r a t=”Se t ro ”# misp−ga l a x y : r a t=”d r a t ”# misp−ga l a x y : r a t=”Plasma RAT”# misp−ga l a x y : r a t=”NanoCore”# misp−ga l a x y : r a t=”DarkTrack”# misp−ga l a x y : r a t=”Theef ”# misp−ga l a x y : r a t=”Greame”# misp−ga l a x y : r a t=”Nuc l ea r RAT”# misp−ga l a x y : r a t=”DameWare Mini Remote Con t r o l ”# misp−ga l a x y : r a t=”ProRat”# misp−ga l a x y : r a t=”death ”# misp−ga l a x y : r a t=”Dark DDoSeR”# . . . .p r i n t ( c . ge t ( ” r a t ” ) . d e s c r i p t i o n )# remote a dm i n i s t r a t i o n t o o l o r remote a c c e s s t o o l (RAT) , a l s o c a l l e d somet imes remote# ac c e s s t r o j a n , i s a p i e c e o f s o f twa r e or programming tha t a l l ow s a remote ” op e r a t o r ”# to c o n t r o l a system as i f they have p h y s i c a l a c c e s s to tha t system .

16 / 17

Page 297: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Q&A

[email protected] (if you want to join the CIRCL MISP sharingcommunity)

• OpenPGP fingerprint: 3B12 DCC2 82FA 2931 2F5B 709A 09E2CD49 44E6 CBCD

• https://github.com/MISP/ -http://www.misp-project.org/

• We welcome any contributions to the project, be it pull requests,ideas, github issues,...

17 / 17

Page 298: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Information Sharing and TaxonomiesPractical Classification of Threat Indicators using MISP

Team CIRCL

http://www.misp-project.org/Twitter: @MISPProject

MISP Training @ Prague20180917

Page 299: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Objects - or How We Learned to Stop Worrying andLove 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 wassuperior.

• The result is a simple template that uses the basic attriubte typesas building blocks along with some meta data

• The template does not have to be known in order to use theconstructed objects

• What we maintain now is a set of common objects, but similarly toour other JSON formats, users can extend it with their own ideas.2 of 12

Page 300: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

MISP Object Templates

• Using a similar JSON format as the taxonomies, galaxies,warninglists.

• You can find the default set of object templates in the gitrepository1.

• Some of the object templates capture objects from other standardsor mimic the output of tools

• We tried to capture the most common use-cases coming from ourown use-case as well as those of various partners that got involved

• Improvements or pull requests for new object templates are ofcourse always welcome

1https://www.github.com/MISP/misp-objects/3 of 12

Page 301: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Existing Object examples

• AIL-leak - AIL object, an example for an object catering tothe output of another tool

• Android permission - An object used to further contextualiseanother object

• Bank account

• File Generic object to describe a file

• Passive DNS

• Regex

• Sandbox report

• Vulnerability Enabling new use-cases such as pre-sharing ofvulnerability information

• x509

• Yara Verbatim sharing of rule sets along with meta-data4 of 12

Page 302: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Object Template skeleton

1 {2 ” requ i r edOneOf ” : [ ] ,3 ” r e q u i r e d ” : [ ] ,4 ” a t t r i b u t e s ” : {} ,5 ” v e r s i o n ” : 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 go r y ” ,8 ” uu id ” : ”Object t emp la t e uu id ” ,9 ”name” : ”Object t emp la t e name”

10 }

5 of 12

Page 303: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Adding elements to an object template

1 ” regexp−t ype ” : {2 ” d e s c r i p t i o n ” : ”Type o f the r e g u l a r e x p r e s s i o n s yn tax . ” ,3 ” d i s a b l e c o r r e l a t i o n ” : t r u e ,4 ” u i−p r i o r i t y ” : 0 ,5 ”misp−a t t r i b u t e ” : ” t e x t ” ,6 ” v a l u e s l i s t ” : [7 ”PCRE” ,8 ”PCRE2” ,9 ”POSIX BRE” ,

10 ”POSIX ERE”11 ]12 } ,

6 of 12

Page 304: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Attribute keys

• Primary key: Object relation

• description: A description of the attribute in relation to the object

• disable correlation: You can disable correlations for attributes inthe resulting object

• ui-priority: Not implemented yet, but the idea is to have a ”quickview” of objects only showing certain prio levels

• misp-attribute: The misp attribute type used as as the buildingblock

• values list: an optional list of values from which the user mustchoose instead of entering a value manually

• sane defaults: an optional list of values from which the user maychoose instead of entering a value

• multiple: Allow the user to add more than one of this attribute7 of 12

Page 305: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Enforcement of certain keys

• The template also defines which of the added attributes aremandatory

• Requirements are pointed to via their object relations names

• We differentiate between two types of rule sets:◦ Required: Everything in this list has to be set in order for the object

to validate◦ Required One Of: Any of the attributes in this list will satisfy the

requirements

8 of 12

Page 306: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

What will the the template actually do?

• Templates create a form that can be used to populate an event

• When using templates, MISP will enforce everything according tothe template rules

• However, these are only optional, users can avoid using thetemplates when creating events via the API

• The reason for this is that you do not need to have the template inorder to create an object

• The limitation of this system: You cannot modify objects thatwere created with unknown templates

9 of 12

Page 307: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Templates as rendered in the UI

10 of 12

Page 308: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Templates as rendered in the UI

11 of 12

Page 309: MISP Training and Slide Decks - CIRCL1 MISP Training Slide Decks MISP1 is a threat intelligence platform for gathering, sharing, storing and cor- relating Indicators of Compromise

Q&A

• https://github.com/MISP/MISP

• https://github.com/MISP/misp-objects

[email protected] (if you want to join one of the MISP communityoperated by CIRCL)

• PGP key fingerprint: CA57 2205 C002 4E06 BA70 BE89 EAADCFFC 22BD 4CD5

12 of 12