diff --git a/README.md b/README.md index af32bc0..66bea3c 100644 --- a/README.md +++ b/README.md @@ -393,7 +393,7 @@ mkdir misp-modules-offline pip3 wheel -r REQUIREMENTS shodan --wheel-dir=./misp-modules-offline tar -cjvf misp-module-bundeled.tar.bz2 ./misp-modules-offline/* ~~~ -On offline machine : +On offline machine : ~~~ mkdir misp-modules-bundle tar xvf misp-module-bundeled.tar.bz2 -C misp-modules-bundle @@ -452,3 +452,14 @@ cd tests/ curl -s http://127.0.0.1:6666/query -H "Content-Type: application/json" --data @MY_TEST_FILE.json -X POST cd ../ ~~~ + +## Documentation + +In order to provide documentation about some modules that require specific input / output / configuration, the [doc](doc) directory contains detailed information about the general purpose, requirements, features, input and ouput of each of these modules: + +- ***description** - quick description of the general purpose of the module, as the one given by the moduleinfo +- **requirements** - special libraries needed to make the module work +- **features** - description of the way to use the module, with the required MISP features to make the module give the intended result +- **references** - link(s) giving additional information about the format concerned in the module +- **input** - description of the format of data used in input +- **output** - description of the format given as the result of the module execution diff --git a/doc/documentation.md b/doc/documentation.md new file mode 100644 index 0000000..1212b5f --- /dev/null +++ b/doc/documentation.md @@ -0,0 +1,508 @@ +# MISP modules documentation + +## Expansion Modules + +#### asn_history + +Query an ASN description history service (https://github.com/CIRCL/ASN-Description-History.git). +- **requirements**: +>asnhistory + +----- + +#### circl_passivedns + + + +Module to access CIRCL Passive DNS. + +----- + +#### circl_passivessl + + + +Modules to access CIRCL Passive SSL. + +----- + +#### countrycode + +Module to expand country codes. + +----- + +#### crowdstrike_falcon + + + +Module to query Crowdstrike Falcon. + +----- + +#### cve + +An expansion hover module to expand information about CVE id. + +----- + +#### dbl_spamhaus + + + +Module to check Spamhaus DBL for a domain name. + +----- + +#### dns + +A simple DNS expansion service to resolve IP address from MISP attributes. + +----- + +#### domaintools + + + +DomainTools MISP expansion module. + +----- + +#### eupi + + + +A module to query the Phishing Initiative service (https://phishing-initiative.lu). + +----- + +#### farsight_passivedns + + + +Module to access Farsight DNSDB Passive DNS. + +----- + +#### geoip_country + +Module to query a local copy of Maxminds Geolite database. + +----- + +#### intelmq_eventdb + +Module to access intelmqs eventdb. + +----- + +#### ipasn + +Module to query an IP ASN history service (https://github.com/CIRCL/IP-ASN-history.git). + +----- + +#### iprep + +Module to query IPRep data for IP addresses. + +----- + +#### onyphe + + + + + +----- + +#### onyphe_full + + + + + +----- + +#### otx + + + +Module to get information from AlienVault OTX. + +----- + +#### passivetotal + + + +The PassiveTotal MISP expansion module brings the datasets derived from Internet scanning directly into your MISP instance. This module supports passive DNS, historic SSL, WHOIS, and host attributes. In order to use the module, you must have a valid PassiveTotal account username and API key. Registration is free and can be done by visiting https://www.passivetotal.org/register + +----- + +#### rbl + +Module to check an IPv4 address against known RBLs. +- **requirements**: +>dnspython3 + +----- + +#### reversedns + +Simple Reverse DNS expansion service to resolve reverse DNS from MISP attributes. + +----- + +#### shodan + + + +Module to query on Shodan. + +----- + +#### sourcecache + +Module to cache web pages of analysis reports, OSINT sources. The module returns a link of the cached page. + +----- + +#### threatcrowd + + + +Module to get information from ThreatCrowd. + +----- + +#### threatminer + + + +Module to get information from ThreatMiner. + +----- + +#### virustotal + + + +Module to get information from virustotal. + +----- + +#### vmray_submit + + + +Module to submit a sample to VMRay. + +----- + +#### vulndb + + + +Module to query VulnDB (RiskBasedSecurity.com). + +----- + +#### whois + +Module to query a local instance of uwhois (https://github.com/rafiot/uwhoisd). +- **requirements**: +>uwhois + +----- + +#### wiki + + + +An expansion hover module to extract information from Wikidata to have additional information about particular term for analysis. + +----- + +#### xforceexchange + + + +An expansion module for IBM X-Force Exchange. + +----- + +#### yara_syntax_validator + + + +An expansion hover module to perform a syntax check on if yara rules are valid or not. + +----- + +## Export Modules + +#### cef_export + +Module to export a MISP event in CEF format. +- **features**: +>The module takes a MISP event in input, to look every attribute. Each attribute matching with some predefined types is then exported in Common Event Format. +>Thus, there is no particular feature concerning MISP Events since any event can be exported. However, 4 configuration parameters recognized by CEF format are required and should be provided by users before exporting data: the device vendor, product and version, as well as the default severity of data. +- **references**: +>https://community.softwaregrp.com/t5/ArcSight-Connectors/ArcSight-Common-Event-Format-CEF-Guide/ta-p/1589306?attachment-id=65537 +- **input**: +>MISP Event attributes +- **output**: +>Common Event Format file + +----- + +#### goamlexport + + + +This module is used to export MISP events containing transaction objects into GoAML format. +- **requirements**: +>PyMISP, MISP objects +- **features**: +>The module works as long as there is at least one transaction object in the Event. +> +>Then in order to have a valid GoAML document, please follow these guidelines: +>- For each transaction object, use either a bank-account, person, or legal-entity object to describe the origin of the transaction, and again one of them to describe the target of the transaction. +>- Create an object reference for both origin and target objects of the transaction. +>- A bank-account object needs a signatory, which is a person object, put as object reference of the bank-account. +>- A person can have an address, which is a geolocation object, put as object reference of the person. +> +>Supported relation types for object references that are recommended for each object are the folowing: +>- transaction: +> - 'from', 'from_my_client': Origin of the transaction - at least one of them is required. +> - 'to', 'to_my_client': Target of the transaction - at least one of them is required. +> - 'address': Location of the transaction - optional. +>- bank-account: +> - 'signatory': Signatory of a bank-account - the reference from bank-account to a signatory is required, but the relation-type is optional at the moment since this reference will always describe a signatory. +> - 'entity': Entity owning the bank account - optional. +>- person: +> - 'address': Address of a person - optional. +- **references**: +>http://goaml.unodc.org/ +- **input**: +>MISP objects (transaction, bank-account, person, legal-entity, geolocation), with references, describing financial transactions and their origin and target. +- **output**: +>GoAML format file, describing financial transactions, with their origin and target (bank accounts, persons or entities). + +----- + +#### liteexport + +Lite export of a MISP event. +- **features**: +>This module is simply producing a json MISP event format file, but exporting only Attributes from the Event. Thus, MISP Events exported with this module should have attributes that are not internal references, otherwise the resulting event would be empty. +- **input**: +>MISP Event attributes +- **output**: +>Lite MISP Event + +----- + +#### pdfexport + +Simple export of a MISP event to PDF. +- **requirements**: +>PyMISP, asciidoctor +- **features**: +>The module takes care of the PDF file building, and work with any MISP Event. Except the requirement of asciidoctor, used to create the file, there is no special feature concerning the Event. +- **references**: +>https://acrobat.adobe.com/us/en/acrobat/about-adobe-pdf.html +- **input**: +>MISP Event +- **output**: +>MISP Event in a PDF file. + +----- + +#### testexport + +Skeleton export module. + +----- + +#### threatStream_misp_export + + + +Module to export a structured CSV file for uploading to threatStream. +- **requirements**: +>csv +- **features**: +>The module takes a MISP event in input, to look every attribute. Each attribute matching with some predefined types is then exported in a CSV format recognized by ThreatStream. +- **references**: +>https://www.anomali.com/platform/threatstream, https://github.com/threatstream +- **input**: +>MISP Event attributes +- **output**: +>ThreatStream CSV format file + +----- + +#### threat_connect_export + + + +Module to export a structured CSV file for uploading to ThreatConnect. +- **requirements**: +>csv +- **features**: +>The module takes a MISP event in input, to look every attribute. Each attribute matching with some predefined types is then exported in a CSV format recognized by ThreatConnect. +>Users should then provide, as module configuration, the source of data they export, because it is required by the output format. +- **references**: +>https://www.threatconnect.com +- **input**: +>MISP Event attributes +- **output**: +>ThreatConnect CSV format file + +----- + +## Import Modules + +#### csvimport + +Module to import MISP attributes from a csv file. +- **requirements**: +>PyMISP +- **features**: +>In order to parse data from a csv file, a header is required to let the module know which column is matching with known attribute fields / MISP types. +>This header is part of the configuration of the module and should be filled out in MISP plugin settings, each field separated by COMMAS. Fields that do not match with any type known in MISP can be ignored in import, using a space or simply nothing between two separators (example: 'ip-src, , comment, '). +>There is also one type that is confused and can be either a MISP attribute type or an attribute field: 'comment'. In this case, using 'attrComment' specifies that the attribute field 'comment' should be considered, otherwise it will be considered as the MISP attribute type. +> +>For each MISP attribute type, an attribute is created. +>Attribute fields that are imported are the following: value, type, category, to-ids, distribution, comment, tag. +- **references**: +>https://tools.ietf.org/html/rfc4180, https://tools.ietf.org/html/rfc7111 +- **input**: +>CSV format file. +- **output**: +>MISP Event attributes + +----- + +#### cuckooimport + + + +Module to import Cuckoo JSON. +- **features**: +>The module simply imports MISP Attributes from a Cuckoo JSON format file. There is thus no special feature to make it work. +- **references**: +>https://cuckoosandbox.org/, https://github.com/cuckoosandbox/cuckoo +- **input**: +>Cuckoo JSON file +- **output**: +>MISP Event attributes + +----- + +#### email_import + +Module to import emails in MISP. +- **features**: +>This module can be used to import e-mail text as well as attachments and urls. +>3 configuration parameters are then used to unzip attachments, guess zip attachment passwords, and extract urls: set each one of them to True or False to process or not the respective corresponding actions. +- **input**: +>E-mail file +- **output**: +>MISP Event attributes + +----- + +#### goamlimport + + + +Module to import MISP objects about financial transactions from GoAML files. +- **requirements**: +>PyMISP +- **features**: +>Unlike the GoAML export module, there is here no special feature to import data from GoAML external files, since the module will import MISP Objects with their References on its own, as it is required for the export module to rebuild a valid GoAML document. +- **references**: +>http://goaml.unodc.org/ +- **input**: +>GoAML format file, describing financial transactions, with their origin and target (bank accounts, persons or entities). +- **output**: +>MISP objects (transaction, bank-account, person, legal-entity, geolocation), with references, describing financial transactions and their origin and target. + +----- + +#### mispjson + +Module to import MISP JSON format for merging MISP events. +- **features**: +>The module simply imports MISP Attributes from an other MISP Event in order to merge events together. There is thus no special feature to make it work. +- **input**: +>MISP Event +- **output**: +>MISP Event attributes + +----- + +#### ocr + +Optical Character Recognition (OCR) module for MISP. +- **features**: +>The module tries to recognize some text from an image and import the result as a freetext attribute, there is then no special feature asked to users to make it work. +- **input**: +>Image +- **output**: +>freetext MISP attribute + +----- + +#### openiocimport + +Module to import OpenIOC packages. +- **requirements**: +>PyMISP +- **features**: +>The module imports MISP Attributes from OpenIOC packages, there is then no special feature for users to make it work. +- **references**: +>https://www.fireeye.com/blog/threat-research/2013/10/openioc-basics.html +- **input**: +>OpenIOC packages +- **output**: +>MISP Event attributes + +----- + +#### threatanalyzer_import + +Module to import ThreatAnalyzer archive.zip / analysis.json files. +- **features**: +>The module imports MISP Attributes from a ThreatAnalyzer format file. This file can be either ZIP, or JSON format. +>There is by the way no special feature for users to make the module work. +- **references**: +>https://www.threattrack.com/malware-analysis.aspx +- **input**: +>ThreatAnalyzer format file +- **output**: +>MISP Event attributes + +----- + +#### vmray_import + + + +Module to import VMRay (VTI) results. +- **requirements**: +>vmray_rest_api +- **features**: +>The module imports MISP Attributes from VMRay format, using the VMRay api. +>Users should then provide as the module configuration the API Key as well as the server url in order to fetch their data to import. +- **references**: +>https://www.vmray.com/ +- **input**: +>VMRay format +- **output**: +>MISP Event attributes + +----- diff --git a/doc/expansion/asn_history.json b/doc/expansion/asn_history.json new file mode 100644 index 0000000..936feba --- /dev/null +++ b/doc/expansion/asn_history.json @@ -0,0 +1,4 @@ +{ + "description": "Query an ASN description history service (https://github.com/CIRCL/ASN-Description-History.git).", + "requirements": ["asnhistory"] +} diff --git a/doc/expansion/circl_passivedns.json b/doc/expansion/circl_passivedns.json new file mode 100644 index 0000000..664ca77 --- /dev/null +++ b/doc/expansion/circl_passivedns.json @@ -0,0 +1,4 @@ +{ + "description": "Module to access CIRCL Passive DNS.", + "logo": "logos/passivedns.png" +} diff --git a/doc/expansion/circl_passivessl.json b/doc/expansion/circl_passivessl.json new file mode 100644 index 0000000..2015b59 --- /dev/null +++ b/doc/expansion/circl_passivessl.json @@ -0,0 +1,4 @@ +{ + "description": "Modules to access CIRCL Passive SSL.", + "logo": "logos/passivessl.png" +} diff --git a/doc/expansion/countrycode.json b/doc/expansion/countrycode.json new file mode 100644 index 0000000..367c14b --- /dev/null +++ b/doc/expansion/countrycode.json @@ -0,0 +1,3 @@ +{ + "description": "Module to expand country codes." +} diff --git a/doc/expansion/crowdstrike_falcon.json b/doc/expansion/crowdstrike_falcon.json new file mode 100644 index 0000000..0faa6c0 --- /dev/null +++ b/doc/expansion/crowdstrike_falcon.json @@ -0,0 +1,4 @@ +{ + "description": "Module to query Crowdstrike Falcon.", + "logo": "logos/crowdstrike.png" +} diff --git a/doc/expansion/cve.json b/doc/expansion/cve.json new file mode 100644 index 0000000..afc4c33 --- /dev/null +++ b/doc/expansion/cve.json @@ -0,0 +1,3 @@ +{ + "description": "An expansion hover module to expand information about CVE id." +} diff --git a/doc/expansion/dbl_spamhaus.json b/doc/expansion/dbl_spamhaus.json new file mode 100644 index 0000000..b691007 --- /dev/null +++ b/doc/expansion/dbl_spamhaus.json @@ -0,0 +1,4 @@ +{ + "description": "Module to check Spamhaus DBL for a domain name.", + "logo": "logos/spamhaus.jpg" +} diff --git a/doc/expansion/dns.json b/doc/expansion/dns.json new file mode 100644 index 0000000..2ca7e42 --- /dev/null +++ b/doc/expansion/dns.json @@ -0,0 +1,3 @@ +{ + "description": "A simple DNS expansion service to resolve IP address from MISP attributes." +} diff --git a/doc/expansion/domaintools.json b/doc/expansion/domaintools.json new file mode 100644 index 0000000..5ed0cb2 --- /dev/null +++ b/doc/expansion/domaintools.json @@ -0,0 +1,4 @@ +{ + "description": "DomainTools MISP expansion module.", + "logo": "logos/domaintools.png" +} diff --git a/doc/expansion/eupi.json b/doc/expansion/eupi.json new file mode 100644 index 0000000..42da8aa --- /dev/null +++ b/doc/expansion/eupi.json @@ -0,0 +1,4 @@ +{ + "description": "A module to query the Phishing Initiative service (https://phishing-initiative.lu).", + "logo": "logos/eupi.png" +} diff --git a/doc/expansion/farsight_passivedns.json b/doc/expansion/farsight_passivedns.json new file mode 100644 index 0000000..6fd038b --- /dev/null +++ b/doc/expansion/farsight_passivedns.json @@ -0,0 +1,4 @@ +{ + "description": "Module to access Farsight DNSDB Passive DNS.", + "logo": "logos/farsight.png" +} diff --git a/doc/expansion/geoip_country.json b/doc/expansion/geoip_country.json new file mode 100644 index 0000000..fb3bf33 --- /dev/null +++ b/doc/expansion/geoip_country.json @@ -0,0 +1,3 @@ +{ + "description": "Module to query a local copy of Maxminds Geolite database." +} diff --git a/doc/expansion/intelmq_eventdb.json b/doc/expansion/intelmq_eventdb.json new file mode 100644 index 0000000..7746551 --- /dev/null +++ b/doc/expansion/intelmq_eventdb.json @@ -0,0 +1,3 @@ +{ + "description": "Module to access intelmqs eventdb." +} diff --git a/doc/expansion/ipasn.json b/doc/expansion/ipasn.json new file mode 100644 index 0000000..1ab9cdd --- /dev/null +++ b/doc/expansion/ipasn.json @@ -0,0 +1,3 @@ +{ + "description": "Module to query an IP ASN history service (https://github.com/CIRCL/IP-ASN-history.git)." +} diff --git a/doc/expansion/iprep.json b/doc/expansion/iprep.json new file mode 100644 index 0000000..343ce4d --- /dev/null +++ b/doc/expansion/iprep.json @@ -0,0 +1,3 @@ +{ + "description": "Module to query IPRep data for IP addresses." +} diff --git a/doc/expansion/onyphe.json b/doc/expansion/onyphe.json new file mode 100644 index 0000000..4c00866 --- /dev/null +++ b/doc/expansion/onyphe.json @@ -0,0 +1,4 @@ +{ + "description": "Module to process a query on Onyphe.", + "logo": "logos/onyphe.jpg" +} diff --git a/doc/expansion/onyphe_full.json b/doc/expansion/onyphe_full.json new file mode 100644 index 0000000..15f07f1 --- /dev/null +++ b/doc/expansion/onyphe_full.json @@ -0,0 +1,4 @@ +{ + "description": "Module to process a full query on Onyphe.", + "logo": "logos/onyphe.jpg" +} diff --git a/doc/expansion/otx.json b/doc/expansion/otx.json new file mode 100644 index 0000000..16ee6d6 --- /dev/null +++ b/doc/expansion/otx.json @@ -0,0 +1,4 @@ +{ + "description": "Module to get information from AlienVault OTX.", + "logo": "logos/otx.png" +} diff --git a/doc/expansion/passivetotal.json b/doc/expansion/passivetotal.json new file mode 100644 index 0000000..5b09f56 --- /dev/null +++ b/doc/expansion/passivetotal.json @@ -0,0 +1,4 @@ +{ + "description": "The PassiveTotal MISP expansion module brings the datasets derived from Internet scanning directly into your MISP instance. This module supports passive DNS, historic SSL, WHOIS, and host attributes. In order to use the module, you must have a valid PassiveTotal account username and API key. Registration is free and can be done by visiting https://www.passivetotal.org/register", + "logo": "logos/passivetotal.png" +} diff --git a/doc/expansion/rbl.json b/doc/expansion/rbl.json new file mode 100644 index 0000000..0f67c2c --- /dev/null +++ b/doc/expansion/rbl.json @@ -0,0 +1,4 @@ +{ + "description": "Module to check an IPv4 address against known RBLs.", + "requirements": ["dnspython3"] +} diff --git a/doc/expansion/reversedns.json b/doc/expansion/reversedns.json new file mode 100644 index 0000000..96773ac --- /dev/null +++ b/doc/expansion/reversedns.json @@ -0,0 +1,3 @@ +{ + "description": "Simple Reverse DNS expansion service to resolve reverse DNS from MISP attributes." +} diff --git a/doc/expansion/shodan.json b/doc/expansion/shodan.json new file mode 100644 index 0000000..734d768 --- /dev/null +++ b/doc/expansion/shodan.json @@ -0,0 +1,4 @@ +{ + "description": "Module to query on Shodan.", + "logo": "logos/shodan.png" +} diff --git a/doc/expansion/sourcecache.json b/doc/expansion/sourcecache.json new file mode 100644 index 0000000..13c2a03 --- /dev/null +++ b/doc/expansion/sourcecache.json @@ -0,0 +1,3 @@ +{ + "description": "Module to cache web pages of analysis reports, OSINT sources. The module returns a link of the cached page." +} diff --git a/doc/expansion/threatcrowd.json b/doc/expansion/threatcrowd.json new file mode 100644 index 0000000..83af5fd --- /dev/null +++ b/doc/expansion/threatcrowd.json @@ -0,0 +1,4 @@ +{ + "description": "Module to get information from ThreatCrowd.", + "logo": "logos/threatcrowd.png" +} diff --git a/doc/expansion/threatminer.json b/doc/expansion/threatminer.json new file mode 100644 index 0000000..da75784 --- /dev/null +++ b/doc/expansion/threatminer.json @@ -0,0 +1,4 @@ +{ + "description": "Module to get information from ThreatMiner.", + "logo": "logos/threatminer.png" +} diff --git a/doc/expansion/virustotal.json b/doc/expansion/virustotal.json new file mode 100644 index 0000000..8c203eb --- /dev/null +++ b/doc/expansion/virustotal.json @@ -0,0 +1,4 @@ +{ + "description": "Module to get information from virustotal.", + "logo": "logos/virustotal.png" +} diff --git a/doc/expansion/vmray_submit.json b/doc/expansion/vmray_submit.json new file mode 100644 index 0000000..b977203 --- /dev/null +++ b/doc/expansion/vmray_submit.json @@ -0,0 +1,4 @@ +{ + "description": "Module to submit a sample to VMRay.", + "logo": "logos/vmray.png" +} diff --git a/doc/expansion/vulndb.json b/doc/expansion/vulndb.json new file mode 100644 index 0000000..a4fec3b --- /dev/null +++ b/doc/expansion/vulndb.json @@ -0,0 +1,4 @@ +{ + "description": "Module to query VulnDB (RiskBasedSecurity.com).", + "logo": "logos/vulndb.png" +} diff --git a/doc/expansion/whois.json b/doc/expansion/whois.json new file mode 100644 index 0000000..7c5c119 --- /dev/null +++ b/doc/expansion/whois.json @@ -0,0 +1,4 @@ +{ + "description": "Module to query a local instance of uwhois (https://github.com/rafiot/uwhoisd).", + "requirements": ["uwhois"] +} diff --git a/doc/expansion/wiki.json b/doc/expansion/wiki.json new file mode 100644 index 0000000..14c4451 --- /dev/null +++ b/doc/expansion/wiki.json @@ -0,0 +1,4 @@ +{ + "description": "An expansion hover module to extract information from Wikidata to have additional information about particular term for analysis.", + "logo": "logos/wikidata.png" +} diff --git a/doc/expansion/xforceexchange.json b/doc/expansion/xforceexchange.json new file mode 100644 index 0000000..13d3622 --- /dev/null +++ b/doc/expansion/xforceexchange.json @@ -0,0 +1,4 @@ +{ + "description": "An expansion module for IBM X-Force Exchange.", + "logo": "logos/xforce.png" +} diff --git a/doc/expansion/yara_syntax_validator.json b/doc/expansion/yara_syntax_validator.json new file mode 100644 index 0000000..891aa5a --- /dev/null +++ b/doc/expansion/yara_syntax_validator.json @@ -0,0 +1,4 @@ +{ + "description": "An expansion hover module to perform a syntax check on if yara rules are valid or not.", + "logo": "logos/yara.png" +} diff --git a/doc/export_mod/cef_export.json b/doc/export_mod/cef_export.json new file mode 100644 index 0000000..84bba8e --- /dev/null +++ b/doc/export_mod/cef_export.json @@ -0,0 +1,8 @@ +{ + "description": "Module to export a MISP event in CEF format.", + "requirements": [], + "features": "The module takes a MISP event in input, to look every attribute. Each attribute matching with some predefined types is then exported in Common Event Format.\nThus, there is no particular feature concerning MISP Events since any event can be exported. However, 4 configuration parameters recognized by CEF format are required and should be provided by users before exporting data: the device vendor, product and version, as well as the default severity of data.", + "references": ["https://community.softwaregrp.com/t5/ArcSight-Connectors/ArcSight-Common-Event-Format-CEF-Guide/ta-p/1589306?attachment-id=65537"], + "input": "MISP Event attributes", + "output": "Common Event Format file" +} diff --git a/doc/export_mod/goamlexport.json b/doc/export_mod/goamlexport.json new file mode 100644 index 0000000..57a1587 --- /dev/null +++ b/doc/export_mod/goamlexport.json @@ -0,0 +1,9 @@ +{ + "description": "This module is used to export MISP events containing transaction objects into GoAML format.", + "logo": "logos/goAML.jpg", + "requirements": ["PyMISP","MISP objects"], + "features": "The module works as long as there is at least one transaction object in the Event.\n\nThen in order to have a valid GoAML document, please follow these guidelines:\n- For each transaction object, use either a bank-account, person, or legal-entity object to describe the origin of the transaction, and again one of them to describe the target of the transaction.\n- Create an object reference for both origin and target objects of the transaction.\n- A bank-account object needs a signatory, which is a person object, put as object reference of the bank-account.\n- A person can have an address, which is a geolocation object, put as object reference of the person.\n\nSupported relation types for object references that are recommended for each object are the folowing:\n- transaction:\n\t- 'from', 'from_my_client': Origin of the transaction - at least one of them is required.\n\t- 'to', 'to_my_client': Target of the transaction - at least one of them is required.\n\t- 'address': Location of the transaction - optional.\n- bank-account:\n\t- 'signatory': Signatory of a bank-account - the reference from bank-account to a signatory is required, but the relation-type is optional at the moment since this reference will always describe a signatory.\n\t- 'entity': Entity owning the bank account - optional.\n- person:\n\t- 'address': Address of a person - optional.", + "references": ["http://goaml.unodc.org/"], + "input": "MISP objects (transaction, bank-account, person, legal-entity, geolocation), with references, describing financial transactions and their origin and target.", + "output": "GoAML format file, describing financial transactions, with their origin and target (bank accounts, persons or entities)." +} diff --git a/doc/export_mod/liteexport.json b/doc/export_mod/liteexport.json new file mode 100644 index 0000000..110577c --- /dev/null +++ b/doc/export_mod/liteexport.json @@ -0,0 +1,8 @@ +{ + "description": "Lite export of a MISP event.", + "requirements": [], + "features": "This module is simply producing a json MISP event format file, but exporting only Attributes from the Event. Thus, MISP Events exported with this module should have attributes that are not internal references, otherwise the resulting event would be empty.", + "references": [], + "input": "MISP Event attributes", + "output": "Lite MISP Event" +} diff --git a/doc/export_mod/pdfexport.json b/doc/export_mod/pdfexport.json new file mode 100644 index 0000000..9803c77 --- /dev/null +++ b/doc/export_mod/pdfexport.json @@ -0,0 +1,8 @@ +{ + "description": "Simple export of a MISP event to PDF.", + "requirements": ["PyMISP", "asciidoctor"], + "features": "The module takes care of the PDF file building, and work with any MISP Event. Except the requirement of asciidoctor, used to create the file, there is no special feature concerning the Event.", + "references": ["https://acrobat.adobe.com/us/en/acrobat/about-adobe-pdf.html"], + "input": "MISP Event", + "output": "MISP Event in a PDF file." +} diff --git a/doc/export_mod/testexport.json b/doc/export_mod/testexport.json new file mode 100644 index 0000000..213ea92 --- /dev/null +++ b/doc/export_mod/testexport.json @@ -0,0 +1,3 @@ +{ + "description": "Skeleton export module." +} diff --git a/doc/export_mod/threatStream_misp_export.json b/doc/export_mod/threatStream_misp_export.json new file mode 100644 index 0000000..3fdc50a --- /dev/null +++ b/doc/export_mod/threatStream_misp_export.json @@ -0,0 +1,9 @@ +{ + "description": "Module to export a structured CSV file for uploading to threatStream.", + "logo": "logos/threatstream.png", + "requirements": ["csv"], + "features": "The module takes a MISP event in input, to look every attribute. Each attribute matching with some predefined types is then exported in a CSV format recognized by ThreatStream.", + "references": ["https://www.anomali.com/platform/threatstream", "https://github.com/threatstream"], + "input": "MISP Event attributes", + "output": "ThreatStream CSV format file" +} diff --git a/doc/export_mod/threat_connect_export.json b/doc/export_mod/threat_connect_export.json new file mode 100644 index 0000000..8d19572 --- /dev/null +++ b/doc/export_mod/threat_connect_export.json @@ -0,0 +1,9 @@ +{ + "description": "Module to export a structured CSV file for uploading to ThreatConnect.", + "logo": "logos/threatconnect.png", + "requirements": ["csv"], + "features": "The module takes a MISP event in input, to look every attribute. Each attribute matching with some predefined types is then exported in a CSV format recognized by ThreatConnect.\nUsers should then provide, as module configuration, the source of data they export, because it is required by the output format.", + "references": ["https://www.threatconnect.com"], + "input": "MISP Event attributes", + "output": "ThreatConnect CSV format file" +} diff --git a/doc/generate_documentation.py b/doc/generate_documentation.py new file mode 100644 index 0000000..ce4d60f --- /dev/null +++ b/doc/generate_documentation.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +import os +import json + +root_path = os.path.dirname(os.path.realpath(__file__)) +module_types = ['expansion', 'export_mod', 'import_mod'] +titles = ['Expansion Modules', 'Export Modules', 'Import Modules'] +markdown= ["# MISP modules documentation\n"] +for _path, title in zip(module_types, titles): + markdown.append('\n## {}\n'.format(title)) + current_path = os.path.join(root_path, _path) + files = sorted(os.listdir(current_path)) + for _file in files: + markdown.append('\n#### {}\n'.format(_file.split('.json')[0])) + filename = os.path.join(current_path, _file) + with open(filename, 'rt', encoding='utf-8') as f: + definition = json.loads(f.read()) + if 'logo' in definition: + markdown.append('\n\n'.format(definition.pop('logo'))) + if 'description' in definition: + markdown.append('\n{}\n'.format(definition.pop('description'))) + for field, value in definition.items(): + if value: + value = ', '.join(value) if isinstance(value, list) else '{}'.format(value.replace('\n', '\n>')) + markdown.append('- **{}**:\n>{}\n'.format(field, value)) + markdown.append('\n-----\n') +with open('documentation.md', 'w') as w: + w.write(''.join(markdown)) diff --git a/doc/import_mod/csvimport.json b/doc/import_mod/csvimport.json new file mode 100644 index 0000000..6dc6182 --- /dev/null +++ b/doc/import_mod/csvimport.json @@ -0,0 +1,8 @@ +{ + "description": "Module to import MISP attributes from a csv file.", + "requirements": ["PyMISP"], + "features": "In order to parse data from a csv file, a header is required to let the module know which column is matching with known attribute fields / MISP types.\nThis header is part of the configuration of the module and should be filled out in MISP plugin settings, each field separated by COMMAS. Fields that do not match with any type known in MISP can be ignored in import, using a space or simply nothing between two separators (example: 'ip-src, , comment, ').\nThere is also one type that is confused and can be either a MISP attribute type or an attribute field: 'comment'. In this case, using 'attrComment' specifies that the attribute field 'comment' should be considered, otherwise it will be considered as the MISP attribute type.\n\nFor each MISP attribute type, an attribute is created.\nAttribute fields that are imported are the following: value, type, category, to-ids, distribution, comment, tag.", + "references": ["https://tools.ietf.org/html/rfc4180", "https://tools.ietf.org/html/rfc7111"], + "input": "CSV format file.", + "output": "MISP Event attributes" +} diff --git a/doc/import_mod/cuckooimport.json b/doc/import_mod/cuckooimport.json new file mode 100644 index 0000000..8091d07 --- /dev/null +++ b/doc/import_mod/cuckooimport.json @@ -0,0 +1,9 @@ +{ + "description": "Module to import Cuckoo JSON.", + "logo": "logos/cuckoo.png", + "requirements": [], + "features": "The module simply imports MISP Attributes from a Cuckoo JSON format file. There is thus no special feature to make it work.", + "references": ["https://cuckoosandbox.org/", "https://github.com/cuckoosandbox/cuckoo"], + "input": "Cuckoo JSON file", + "output": "MISP Event attributes" +} diff --git a/doc/import_mod/email_import.json b/doc/import_mod/email_import.json new file mode 100644 index 0000000..1f53852 --- /dev/null +++ b/doc/import_mod/email_import.json @@ -0,0 +1,8 @@ +{ + "description": "Module to import emails in MISP.", + "requirements": [], + "features": "This module can be used to import e-mail text as well as attachments and urls.\n3 configuration parameters are then used to unzip attachments, guess zip attachment passwords, and extract urls: set each one of them to True or False to process or not the respective corresponding actions.", + "references": [], + "input": "E-mail file", + "output": "MISP Event attributes" +} diff --git a/doc/import_mod/goamlimport.json b/doc/import_mod/goamlimport.json new file mode 100644 index 0000000..f2a1ec2 --- /dev/null +++ b/doc/import_mod/goamlimport.json @@ -0,0 +1,9 @@ +{ + "description": "Module to import MISP objects about financial transactions from GoAML files.", + "logo": "logos/goAML.jpg", + "requirements": ["PyMISP"], + "features": "Unlike the GoAML export module, there is here no special feature to import data from GoAML external files, since the module will import MISP Objects with their References on its own, as it is required for the export module to rebuild a valid GoAML document.", + "references": "http://goaml.unodc.org/", + "input": "GoAML format file, describing financial transactions, with their origin and target (bank accounts, persons or entities).", + "output": "MISP objects (transaction, bank-account, person, legal-entity, geolocation), with references, describing financial transactions and their origin and target." +} diff --git a/doc/import_mod/mispjson.json b/doc/import_mod/mispjson.json new file mode 100644 index 0000000..dd11405 --- /dev/null +++ b/doc/import_mod/mispjson.json @@ -0,0 +1,8 @@ +{ + "description": "Module to import MISP JSON format for merging MISP events.", + "requirements": [], + "features": "The module simply imports MISP Attributes from an other MISP Event in order to merge events together. There is thus no special feature to make it work.", + "references": [], + "input": "MISP Event", + "output": "MISP Event attributes" +} diff --git a/doc/import_mod/ocr.json b/doc/import_mod/ocr.json new file mode 100644 index 0000000..14bbf0b --- /dev/null +++ b/doc/import_mod/ocr.json @@ -0,0 +1,8 @@ +{ + "description": "Optical Character Recognition (OCR) module for MISP.", + "requirements": [], + "features": "The module tries to recognize some text from an image and import the result as a freetext attribute, there is then no special feature asked to users to make it work.", + "references": [], + "input": "Image", + "output": "freetext MISP attribute" +} diff --git a/doc/import_mod/openiocimport.json b/doc/import_mod/openiocimport.json new file mode 100644 index 0000000..e173392 --- /dev/null +++ b/doc/import_mod/openiocimport.json @@ -0,0 +1,8 @@ +{ + "description": "Module to import OpenIOC packages.", + "requirements": ["PyMISP"], + "features": "The module imports MISP Attributes from OpenIOC packages, there is then no special feature for users to make it work.", + "references": ["https://www.fireeye.com/blog/threat-research/2013/10/openioc-basics.html"], + "input": "OpenIOC packages", + "output": "MISP Event attributes" +} diff --git a/doc/import_mod/threatanalyzer_import.json b/doc/import_mod/threatanalyzer_import.json new file mode 100644 index 0000000..40e4436 --- /dev/null +++ b/doc/import_mod/threatanalyzer_import.json @@ -0,0 +1,8 @@ +{ + "description": "Module to import ThreatAnalyzer archive.zip / analysis.json files.", + "requirements": [], + "features": "The module imports MISP Attributes from a ThreatAnalyzer format file. This file can be either ZIP, or JSON format.\nThere is by the way no special feature for users to make the module work.", + "references": ["https://www.threattrack.com/malware-analysis.aspx"], + "input": "ThreatAnalyzer format file", + "output": "MISP Event attributes" +} diff --git a/doc/import_mod/vmray_import.json b/doc/import_mod/vmray_import.json new file mode 100644 index 0000000..b7c0dad --- /dev/null +++ b/doc/import_mod/vmray_import.json @@ -0,0 +1,9 @@ +{ + "description": "Module to import VMRay (VTI) results.", + "logo": "logos/vmray.png", + "requirements": ["vmray_rest_api"], + "features": "The module imports MISP Attributes from VMRay format, using the VMRay api.\nUsers should then provide as the module configuration the API Key as well as the server url in order to fetch their data to import.", + "references": ["https://www.vmray.com/"], + "input": "VMRay format", + "output": "MISP Event attributes" +} diff --git a/doc/logos/Sigma.png b/doc/logos/Sigma.png new file mode 100644 index 0000000..0bd0db1 Binary files /dev/null and b/doc/logos/Sigma.png differ diff --git a/doc/logos/crowdstrike.png b/doc/logos/crowdstrike.png new file mode 100644 index 0000000..359cb01 Binary files /dev/null and b/doc/logos/crowdstrike.png differ diff --git a/doc/logos/cuckoo.png b/doc/logos/cuckoo.png new file mode 100644 index 0000000..57cf35a Binary files /dev/null and b/doc/logos/cuckoo.png differ diff --git a/doc/logos/domaintools.png b/doc/logos/domaintools.png new file mode 100644 index 0000000..69965e1 Binary files /dev/null and b/doc/logos/domaintools.png differ diff --git a/doc/logos/eupi.png b/doc/logos/eupi.png new file mode 100644 index 0000000..1800657 Binary files /dev/null and b/doc/logos/eupi.png differ diff --git a/doc/logos/farsight.png b/doc/logos/farsight.png new file mode 100644 index 0000000..31a73c1 Binary files /dev/null and b/doc/logos/farsight.png differ diff --git a/doc/logos/goAML.jpg b/doc/logos/goAML.jpg new file mode 100644 index 0000000..4e938ee Binary files /dev/null and b/doc/logos/goAML.jpg differ diff --git a/doc/logos/onyphe.jpg b/doc/logos/onyphe.jpg new file mode 100644 index 0000000..cd16f76 Binary files /dev/null and b/doc/logos/onyphe.jpg differ diff --git a/doc/logos/otx.png b/doc/logos/otx.png new file mode 100644 index 0000000..eae32c1 Binary files /dev/null and b/doc/logos/otx.png differ diff --git a/doc/logos/passivedns.png b/doc/logos/passivedns.png new file mode 100644 index 0000000..4959a84 Binary files /dev/null and b/doc/logos/passivedns.png differ diff --git a/doc/logos/passivessl.png b/doc/logos/passivessl.png new file mode 100644 index 0000000..e92c87d Binary files /dev/null and b/doc/logos/passivessl.png differ diff --git a/doc/logos/passivetotal.png b/doc/logos/passivetotal.png new file mode 100644 index 0000000..87cef69 Binary files /dev/null and b/doc/logos/passivetotal.png differ diff --git a/doc/logos/securitytrails.png b/doc/logos/securitytrails.png new file mode 100644 index 0000000..072dac5 Binary files /dev/null and b/doc/logos/securitytrails.png differ diff --git a/doc/logos/shodan.png b/doc/logos/shodan.png new file mode 100644 index 0000000..7de068e Binary files /dev/null and b/doc/logos/shodan.png differ diff --git a/doc/logos/spamhaus.jpg b/doc/logos/spamhaus.jpg new file mode 100644 index 0000000..4c868e4 Binary files /dev/null and b/doc/logos/spamhaus.jpg differ diff --git a/doc/logos/stix.png b/doc/logos/stix.png new file mode 100644 index 0000000..e8b8241 Binary files /dev/null and b/doc/logos/stix.png differ diff --git a/doc/logos/threatconnect.png b/doc/logos/threatconnect.png new file mode 100644 index 0000000..4c8a5b1 Binary files /dev/null and b/doc/logos/threatconnect.png differ diff --git a/doc/logos/threatcrowd.png b/doc/logos/threatcrowd.png new file mode 100644 index 0000000..94eacfc Binary files /dev/null and b/doc/logos/threatcrowd.png differ diff --git a/doc/logos/threatminer.png b/doc/logos/threatminer.png new file mode 100644 index 0000000..d7ac96e Binary files /dev/null and b/doc/logos/threatminer.png differ diff --git a/doc/logos/threatstream.png b/doc/logos/threatstream.png new file mode 100644 index 0000000..eb3837e Binary files /dev/null and b/doc/logos/threatstream.png differ diff --git a/doc/logos/virustotal.png b/doc/logos/virustotal.png new file mode 100644 index 0000000..935c5cc Binary files /dev/null and b/doc/logos/virustotal.png differ diff --git a/doc/logos/vmray.png b/doc/logos/vmray.png new file mode 100644 index 0000000..e2e9fa1 Binary files /dev/null and b/doc/logos/vmray.png differ diff --git a/doc/logos/vulndb.png b/doc/logos/vulndb.png new file mode 100644 index 0000000..bfaf40f Binary files /dev/null and b/doc/logos/vulndb.png differ diff --git a/doc/logos/wikidata.png b/doc/logos/wikidata.png new file mode 100644 index 0000000..0ffb4b1 Binary files /dev/null and b/doc/logos/wikidata.png differ diff --git a/doc/logos/xforce.png b/doc/logos/xforce.png new file mode 100644 index 0000000..96db659 Binary files /dev/null and b/doc/logos/xforce.png differ diff --git a/doc/logos/yara.png b/doc/logos/yara.png new file mode 100644 index 0000000..c74c314 Binary files /dev/null and b/doc/logos/yara.png differ