diff --git a/README.md b/README.md index 01ec367..7a93d88 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,11 @@ For more information: [Extending MISP with Python modules](https://www.circl.lu/ * [STIX2 pattern syntax validator](misp_modules/modules/expansion/stix2_pattern_syntax_validator.py) - a module to check a STIX2 pattern syntax. * [ThreatCrowd](misp_modules/modules/expansion/threatcrowd.py) - an expansion module for [ThreatCrowd](https://www.threatcrowd.org/). * [threatminer](misp_modules/modules/expansion/threatminer.py) - an expansion module to expand from [ThreatMiner](https://www.threatminer.org/). +* [urlscan](misp_modules/modules/expansion/urlscan.py) - an expansion module to query [urlscan.io](https://urlscan.io). * [virustotal](misp_modules/modules/expansion/virustotal.py) - an expansion module to pull known resolutions and malware samples related with an IP/Domain from virusTotal (this modules require a VirusTotal private API key) * [VMray](misp_modules/modules/expansion/vmray_submit.py) - a module to submit a sample to VMray. * [VulnDB](misp_modules/modules/expansion/vulndb.py) - a module to query [VulnDB](https://www.riskbasedsecurity.com/). +* [Vulners](misp_modules/modules/expansion/vulners.py) - an expansion module to expand information about CVEs using Vulners API. * [whois](misp_modules/modules/expansion) - a module to query a local instance of [uwhois](https://github.com/rafiot/uwhoisd). * [wikidata](misp_modules/modules/expansion/wiki.py) - a [wikidata](https://www.wikidata.org) expansion module. * [xforce](misp_modules/modules/expansion/xforceexchange.py) - an IBM X-Force Exchange expansion module. diff --git a/doc/documentation.md b/doc/documentation.md index a11bcfb..49fb6b5 100644 --- a/doc/documentation.md +++ b/doc/documentation.md @@ -5,14 +5,34 @@ #### [asn_history](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/asn_history.py) Query an ASN description history service (https://github.com/CIRCL/ASN-Description-History.git). +- **features**: +>The module takes an AS number attribute as input and displays its description and history. +> +>For a proper working, a communication with a redis database is needed, thus 3 parameters are needed: +>- host, the address of the redis server +>- port, the port used by redis +>- db, the index of the database used +> +- **input**: +>Autonomous system number. +- **output**: +>Text containing a description of the ASN and its history. +- **references**: +>https://github.com/CIRCL/ASN-Description-History.git - **requirements**: ->asnhistory +>asnhistory python library ----- #### [btc](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/btc.py) + + An expansion hover module to get a blockchain balance from a BTC address in MISP. +- **input**: +>btc address attribute. +- **output**: +>Text to describe the blockchain balance and the transactions related to the btc address in input. ----- @@ -21,6 +41,18 @@ An expansion hover module to get a blockchain balance from a BTC address in MISP Module to access CIRCL Passive DNS. +- **features**: +>This module takes a hostname, domain or ip-address (ip-src or ip-dst) attribute as input, and queries the CIRCL Passive DNS REST API to get and display information about this input. +> +>To make it work a username and a password are thus required to authenticate to the CIRCL Passive DNS API. +- **input**: +>Hostname, domain, or ip-address attribute. +- **ouput**: +>Text describing passive DNS information related to the input attribute. +- **references**: +>https://www.circl.lu/services/passive-dns/, https://datatracker.ietf.org/doc/draft-dulaunoy-dnsop-passive-dns-cof/ +- **requirements**: +>pypdns: Passive DNS python library, A CIRCL passive DNS account with username & password ----- @@ -29,12 +61,32 @@ Module to access CIRCL Passive DNS. Modules to access CIRCL Passive SSL. +- **features**: +>This module takes an ip-address (ip-src or ip-dst) attribute as input, and queries the CIRCL Passive SSL REST API to get and display information about this input. +> +>To make it work a username and a password are thus required to authenticate to the CIRCL Passive SSL API. +- **input**: +>Ip-address attribute. +- **output**: +>Text describing passive SSL information related to the input attribute. +- **references**: +>https://www.circl.lu/services/passive-ssl/ +- **requirements**: +>pypssl: Passive SSL python library, A CIRCL passive SSL account with username & password ----- #### [countrycode](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/countrycode.py) Module to expand country codes. +- **features**: +>The module takes a domain or a hostname as input, and returns the country it belongs to. +> +>For non country domains, a list of the most common possible extensions is used. +- **input**: +>Hostname or domain attribute. +- **output**: +>Text with the country code the input belongs to. ----- @@ -43,12 +95,68 @@ Module to expand country codes. Module to query Crowdstrike Falcon. +- **features**: +>This module takes a MISP attribute as input to query a CrowdStrike Falcon API. The API returns then the result of the query with some types we map into compatible types we add as MISP attributes. +> +>Please note that composite attributes composed by at least one of the input types mentionned below (domains, IPs, hostnames) are also supported. +- **input**: +>A MISP attribute included in the following list: +>- domain +>- email-attachment +>- email-dst +>- email-reply-to +>- email-src +>- email-subject +>- filename +>- hostname +>- ip-src +>- ip-dst +>- md5 +>- mutex +>- regkey +>- sha1 +>- sha256 +>- uri +>- url +>- user-agent +>- whois-registrant-email +>- x509-fingerprint-md5 +- **output**: +>MISP attributes mapped after the CrowdStrike API has been queried, included in the following list: +>- hostname +>- email-src +>- email-subject +>- filename +>- md5 +>- sha1 +>- sha256 +>- ip-dst +>- ip-dst +>- mutex +>- regkey +>- url +>- user-agent +>- x509-fingerprint-md5 +- **references**: +>https://www.crowdstrike.com/products/crowdstrike-falcon-faq/ +- **requirements**: +>A CrowdStrike API access (API id & key) ----- #### [cve](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/cve.py) + + An expansion hover module to expand information about CVE id. +- **features**: +>The module takes a vulnerability attribute as input and queries the CIRCL CVE search API to get information about the vulnerability as it is described in the list of CVEs. +- **input**: +>Vulnerability attribute. +- **output**: +>Text giving information about the CVE related to the Vulnerability. +- **references**: +>https://cve.circl.lu/, https://cve.mitre.org/ ----- @@ -57,12 +165,38 @@ An expansion hover module to expand information about CVE id. Module to check Spamhaus DBL for a domain name. +- **features**: +>This modules takes a domain or a hostname in input and queries the Domain Block List provided by Spamhaus to determine what kind of domain it is. +> +>DBL then returns a response code corresponding to a certain classification of the domain we display. If the queried domain is not in the list, it is also mentionned. +> +>Please note that composite MISP attributes containing domain or hostname are supported as well. +- **input**: +>Domain or hostname attribute. +- **output**: +>Information about the nature of the input. +- **references**: +>https://www.spamhaus.org/faq/section/Spamhaus%20DBL +- **requirements**: +>dnspython3: DNS python3 library ----- #### [dns](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/dns.py) -A simple DNS expansion service to resolve IP address from MISP attributes. +A simple DNS expansion service to resolve IP address from domain MISP attributes. +- **features**: +>The module takes a domain of hostname attribute as input, and tries to resolve it. If no error is encountered, the IP address that resolves the domain is returned, otherwise the origin of the error is displayed. +> +>The address of the DNS resolver to use is also configurable, but if no configuration is set, we use the Google public DNS address (8.8.8.8). +> +>Please note that composite MISP attributes containing domain or hostname are supported as well. +- **input**: +>Domain or hostname attribute. +- **output**: +>IP address resolving the input. +- **requirements**: +>dnspython3: DNS python3 library ----- @@ -71,6 +205,35 @@ A simple DNS expansion service to resolve IP address from MISP attributes. DomainTools MISP expansion module. +- **features**: +>This module takes a MISP attribute as input to query the Domaintools API. The API returns then the result of the query with some types we map into compatible types we add as MISP attributes. +> +>Please note that composite attributes composed by at least one of the input types mentionned below (domains, IPs, hostnames) are also supported. +- **input**: +>A MISP attribute included in the following list: +>- domain +>- hostname +>- email-src +>- email-dst +>- target-email +>- whois-registrant-email +>- whois-registrant-name +>- whois-registrant-phone +>- ip-src +>- ip-dst +- **output**: +>MISP attributes mapped after the Domaintools API has been queried, included in the following list: +>- whois-registrant-email +>- whois-registrant-phone +>- whois-registrant-name +>- whois-registrar +>- whois-creation-date +>- text +>- domain +- **references**: +>https://www.domaintools.com/ +- **requirements**: +>Domaintools python library, A Domaintools API access (username & apikey) ----- @@ -79,6 +242,18 @@ DomainTools MISP expansion module. A module to query the Phishing Initiative service (https://phishing-initiative.lu). +- **features**: +>This module takes a domain, hostname or url MISP attribute as input to query the Phishing Initiative API. The API returns then the result of the query with some information about the value queried. +> +>Please note that composite attributes containing domain or hostname are also supported. +- **input**: +>A domain, hostname or url MISP attribute. +- **output**: +>Text containing information about the input, resulting from the query on Phishing Initiative. +- **references**: +>https://phishing-initiative.eu/?lang=en +- **requirements**: +>pyeupi: eupi python library, An access to the Phishing Initiative API (apikey & url) ----- @@ -87,30 +262,125 @@ A module to query the Phishing Initiative service (https://phishing-initiative.l Module to access Farsight DNSDB Passive DNS. +- **features**: +>This module takes a domain, hostname or IP address MISP attribute as input to query the Farsight Passive DNS API. The API returns then the result of the query with some information about the value queried. +- **input**: +>A domain, hostname or IP address MISP attribute. +- **output**: +>Text containing information about the input, resulting from the query on the Farsight Passive DNS API. +- **references**: +>https://www.farsightsecurity.com/ +- **requirements**: +>An access to the Farsight Passive DNS API (apikey) ----- #### [geoip_country](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/geoip_country.py) -Module to query a local copy of Maxminds Geolite database. + + +Module to query a local copy of Maxmind's Geolite database. +- **features**: +>This module takes an IP address MISP attribute as input and queries a local copy of the Maxmind's Geolite database to get information about the location of this IP address. +> +>Please note that composite attributes domain|ip are also supported. +- **input**: +>An IP address MISP Attribute. +- **output**: +>Text containing information about the location of the IP address. +- **references**: +>https://www.maxmind.com/en/home +- **requirements**: +>A local copy of Maxmind's Geolite database + +----- + +#### [hashdd](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/hashdd.py) + +A hover module to check hashes against hashdd.com including NSLR dataset. +- **features**: +>This module takes a hash attribute as input to check its known level, using the hashdd API. This information is then displayed. +- **input**: +>A hash MISP attribute (md5). +- **output**: +>Text describing the known level of the hash in the hashdd databases. +- **references**: +>https://hashdd.com/ ----- #### [intelmq_eventdb](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/intelmq_eventdb.py) + + Module to access intelmqs eventdb. +- **features**: +>/!\ EXPERIMENTAL MODULE, some features may not work /!\ +> +>This module takes a domain, hostname, IP address or Autonomous system MISP attribute as input to query the IntelMQ database. The result of the query gives then additional information about the input. +- **input**: +>A hostname, domain, IP address or AS attribute. +- **output**: +>Text giving information about the input using IntelMQ database. +- **references**: +>https://github.com/certtools/intelmq, https://intelmq.readthedocs.io/en/latest/Developers-Guide/ +- **requirements**: +>psycopg2: Python library to support PostgreSQL, An access to the IntelMQ database (username, password, hostname and database reference) ----- #### [ipasn](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/ipasn.py) Module to query an IP ASN history service (https://github.com/CIRCL/IP-ASN-history.git). +- **features**: +>This module takes an IP address attribute as input and queries the CIRCL IP ASN service to get additional information about the input. +- **input**: +>An IP address MISP attribute. +- **output**: +>Text describing additional information about the input after a query on the IP-ASN-history database. +- **references**: +>https://www.circl.lu/services/ip-asn-history/ +- **requirements**: +>ipasn_redis: Python library to access IP-ASN-history instance via redis, An IP-ASN-history instance information (host, port and database index) ----- #### [iprep](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/iprep.py) Module to query IPRep data for IP addresses. +- **features**: +>This module takes an IP address attribute as input and queries the database from packetmail.net to get some information about the reputation of the IP. +- **input**: +>An IP address MISP attribute. +- **output**: +>Text describing additional information about the input after a query on the IPRep API. +- **references**: +>https://github.com/mahesh557/packetmail +- **requirements**: +>An access to the packetmail API (apikey) + +----- + +#### [macaddress_io](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/macaddress_io.py) + + + +MISP hover module for macaddress.io +- **features**: +>This module takes a MAC address attribute as input and queries macaddress.io for additional information. +> +>This information contains data about: +>- MAC address details +>- Vendor details +>- Block details +- **input**: +>MAC address MISP attribute. +- **output**: +>Text containing information on the MAC address fetched from a query on macaddress.io. +- **references**: +>https://macaddress.io/, https://github.com/CodeLineFi/maclookup-python +- **requirements**: +>maclookup: macaddress.io python library, An access to the macaddress.io API (apikey) ----- @@ -119,6 +389,16 @@ Module to query IPRep data for IP addresses. Module to process a query on Onyphe. +- **features**: +>This module takes a domain, hostname, or IP address attribute as input in order to query the Onyphe API. Data fetched from the query is then parsed and MISP attributes are extracted. +- **input**: +>A domain, hostname or IP address MISP attribute. +- **output**: +>MISP attributes fetched from the Onyphe query. +- **references**: +>https://www.onyphe.io/, https://github.com/sebdraven/pyonyphe +- **requirements**: +>onyphe python library, An access to the Onyphe API (apikey) ----- @@ -127,6 +407,18 @@ Module to process a query on Onyphe. Module to process a full query on Onyphe. +- **features**: +>This module takes a domain, hostname, or IP address attribute as input in order to query the Onyphe API. Data fetched from the query is then parsed and MISP attributes are extracted. +> +>The parsing is here more advanced than the one on onyphe module, and is returning more attributes, since more fields of the query result are watched and parsed. +- **input**: +>A domain, hostname or IP address MISP attribute. +- **output**: +>MISP attributes fetched from the Onyphe query. +- **references**: +>https://www.onyphe.io/, https://github.com/sebdraven/pyonyphe +- **requirements**: +>onyphe python library, An access to the Onyphe API (apikey) ----- @@ -135,6 +427,33 @@ Module to process a full query on Onyphe. Module to get information from AlienVault OTX. +- **features**: +>This module takes a MISP attribute as input to query the OTX Alienvault API. The API returns then the result of the query with some types we map into compatible types we add as MISP attributes. +- **input**: +>A MISP attribute included in the following list: +>- hostname +>- domain +>- ip-src +>- ip-dst +>- md5 +>- sha1 +>- sha256 +>- sha512 +- **output**: +>MISP attributes mapped from the result of the query on OTX, included in the following list: +>- domain +>- ip-src +>- ip-dst +>- text +>- md5 +>- sha1 +>- sha256 +>- sha512 +>- email +- **references**: +>https://www.alienvault.com/open-threat-exchange +- **requirements**: +>An access to the OTX API (apikey) ----- @@ -142,21 +461,118 @@ Module to get information from AlienVault OTX. -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 + +- **features**: +>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 +- **input**: +>A MISP attribute included in the following list: +>- hostname +>- domain +>- ip-src +>- ip-dst +>- x509-fingerprint-sha1 +>- email-src +>- email-dst +>- target-email +>- whois-registrant-email +>- whois-registrant-phone +>- text +>- whois-registrant-name +>- whois-registrar +>- whois-creation-date +- **output**: +>MISP attributes mapped from the result of the query on PassiveTotal, included in the following list: +>- hostname +>- domain +>- ip-src +>- ip-dst +>- x509-fingerprint-sha1 +>- email-src +>- email-dst +>- target-email +>- whois-registrant-email +>- whois-registrant-phone +>- text +>- whois-registrant-name +>- whois-registrar +>- whois-creation-date +>- md5 +>- sha1 +>- sha256 +>- link +- **references**: +>https://www.passivetotal.org/register +- **requirements**: +>Passivetotal python library, An access to the PassiveTotal API (apikey) ----- #### [rbl](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/rbl.py) Module to check an IPv4 address against known RBLs. +- **features**: +>This module takes an IP address attribute as input and queries multiple know Real-time Blackhost Lists to check if they have already seen this IP address. +> +>We display then all the information we get from those different sources. +- **input**: +>IP address attribute. +- **output**: +>Text with additional data from Real-time Blackhost Lists about the IP address. +- **references**: +>[RBLs list](https://github.com/MISP/misp-modules/blob/8817de476572a10a9c9d03258ec81ca70f3d926d/misp_modules/modules/expansion/rbl.py#L20) - **requirements**: ->dnspython3 +>dnspython3: DNS python3 library ----- #### [reversedns](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/reversedns.py) Simple Reverse DNS expansion service to resolve reverse DNS from MISP attributes. +- **features**: +>The module takes an IP address as input and tries to find the hostname this IP address is resolved into. +> +>The address of the DNS resolver to use is also configurable, but if no configuration is set, we use the Google public DNS address (8.8.8.8). +> +>Please note that composite MISP attributes containing IP addresses are supported as well. +- **input**: +>An IP address attribute. +- **output**: +>Hostname attribute the input is resolved into. +- **requirements**: +>DNS python library + +----- + +#### [securitytrails](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/securitytrails.py) + + + +An expansion modules for SecurityTrails. +- **features**: +>The module takes a domain, hostname or IP address attribute as input and queries the SecurityTrails API with it. +> +>Multiple parsing operations are then processed on the result of the query to extract a much information as possible. +> +>From this data extracted are then mapped MISP attributes. +- **input**: +>A domain, hostname or IP address attribute. +- **output**: +>MISP attributes resulting from the query on SecurityTrails API, included in the following list: +>- hostname +>- domain +>- ip-src +>- ip-dst +>- dns-soa-email +>- whois-registrant-email +>- whois-registrant-phone +>- whois-registrant-name +>- whois-registrar +>- whois-creation-date +>- domain +- **references**: +>https://securitytrails.com/ +- **requirements**: +>dnstrails python library, An access to the SecurityTrails API (apikey) ----- @@ -165,12 +581,90 @@ Simple Reverse DNS expansion service to resolve reverse DNS from MISP attributes Module to query on Shodan. +- **features**: +>The module takes an IP address as input and queries the Shodan API to get some additional data about it. +- **input**: +>An IP address MISP attribute. +- **output**: +>Text with additional data about the input, resulting from the query on Shodan. +- **references**: +>https://www.shodan.io/ +- **requirements**: +>shodan python library, An access to the Shodan API (apikey) + +----- + +#### [sigma_queries](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/sigma_queries.py) + + + +An expansion hover module to display the result of sigma queries. +- **features**: +>This module takes a Sigma rule attribute as input and tries all the different queries available to convert it into different formats recognized by SIEMs. +- **input**: +>A Sigma attribute. +- **output**: +>Text displaying results of queries on the Sigma attribute. +- **references**: +>https://github.com/Neo23x0/sigma/wiki +- **requirements**: +>Sigma python library + +----- + +#### [sigma_syntax_validator](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/sigma_syntax_validator.py) + + + +An expansion hover module to perform a syntax check on sigma rules. +- **features**: +>This module takes a Sigma rule attribute as input and performs a syntax check on it. +> +>It displays then that the rule is valid if it is the case, and the error related to the rule otherwise. +- **input**: +>A Sigma attribute. +- **output**: +>Text describing the validity of the Sigma rule. +- **references**: +>https://github.com/Neo23x0/sigma/wiki +- **requirements**: +>Sigma python library, Yaml python library ----- #### [sourcecache](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/sourcecache.py) Module to cache web pages of analysis reports, OSINT sources. The module returns a link of the cached page. +- **features**: +>This module takes a link or url attribute as input and caches the related web page. It returns then a link of the cached page. +- **input**: +>A link or url attribute. +- **output**: +>A malware-sample attribute describing the cached page. +- **references**: +>https://github.com/adulau/url_archiver +- **requirements**: +>urlarchiver: python library to fetch and archive URL on the file-system + +----- + +#### [stix2_pattern_syntax_validator](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/stix2_pattern_syntax_validator.py) + + + +An expansion hover module to perform a syntax check on stix2 patterns. +- **features**: +>This module takes a STIX2 pattern attribute as input and performs a syntax check on it. +> +>It displays then that the rule is valid if it is the case, and the error related to the rule otherwise. +- **input**: +>A STIX2 pattern attribute. +- **output**: +>Text describing the validity of the STIX2 pattern. +- **references**: +>[STIX2.0 patterning specifications](http://docs.oasis-open.org/cti/stix/v2.0/cs01/part5-stix-patterning/stix-v2.0-cs01-part5-stix-patterning.html) +- **requirements**: +>stix2patterns python library ----- @@ -179,6 +673,35 @@ Module to cache web pages of analysis reports, OSINT sources. The module returns Module to get information from ThreatCrowd. +- **features**: +>This module takes a MISP attribute as input and queries ThreatCrowd with it. +> +>The result of this query is then parsed and some data is mapped into MISP attributes in order to enrich the input attribute. +- **input**: +>A MISP attribute included in the following list: +>- hostname +>- domain +>- ip-src +>- ip-dst +>- md5 +>- sha1 +>- sha256 +>- sha512 +>- whois-registrant-email +- **output**: +>MISP attributes mapped from the result of the query on ThreatCrowd, included in the following list: +>- domain +>- ip-src +>- ip-dst +>- text +>- md5 +>- sha1 +>- sha256 +>- sha512 +>- hostname +>- whois-registrant-email +- **references**: +>https://www.threatcrowd.org/ ----- @@ -187,6 +710,58 @@ Module to get information from ThreatCrowd. Module to get information from ThreatMiner. +- **features**: +>This module takes a MISP attribute as input and queries ThreatMiner with it. +> +>The result of this query is then parsed and some data is mapped into MISP attributes in order to enrich the input attribute. +- **input**: +>A MISP attribute included in the following list: +>- hostname +>- domain +>- ip-src +>- ip-dst +>- md5 +>- sha1 +>- sha256 +>- sha512 +- **output**: +>MISP attributes mapped from the result of the query on ThreatMiner, included in the following list: +>- domain +>- ip-src +>- ip-dst +>- text +>- md5 +>- sha1 +>- sha256 +>- sha512 +>- ssdeep +>- authentihash +>- filename +>- whois-registrant-email +>- url +>- link +- **references**: +>https://www.threatminer.org/ + +----- + +#### [urlscan](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/urlscan.py) + + + +An expansion module to query urlscan.io. +- **features**: +>This module takes a MISP attribute as input and queries urlscan.io with it. +> +>The result of this query is then parsed and some data is mapped into MISP attributes in order to enrich the input attribute. +- **input**: +>A domain, hostname or url attribute. +- **output**: +>MISP attributes mapped from the result of the query on urlscan.io. +- **references**: +>https://urlscan.io/ +- **requirements**: +>An access to the urlscan.io API ----- @@ -195,6 +770,22 @@ Module to get information from ThreatMiner. Module to get information from virustotal. +- **features**: +>This module takes a MISP attribute as input and queries the VirusTotal API with it, in order to get additional data on the input attribute. +> +>Multiple recursive requests on the API can then be processed on some attributes found in the first request. A limit can be set to restrict the number of values to query again, and at the same time the number of request submitted to the API. +> +>This limit is important because the default user VirusTotal apikey only allows to process a certain nunmber of queries per minute. As a consequence it is recommended to have a larger number of requests or a private apikey. +> +>Data is then mapped into MISP attributes. +- **input**: +>A domain, hash (md5, sha1, sha256 or sha512), hostname or IP address attribute. +- **output**: +>MISP attributes mapped from the rersult of the query on VirusTotal API. +- **references**: +>https://www.virustotal.com/ +- **requirements**: +>An access to the VirusTotal API (apikey) ----- @@ -203,6 +794,23 @@ Module to get information from virustotal. Module to submit a sample to VMRay. +- **features**: +>This module takes an attachment or malware-sample attribute as input to query the VMRay API. +> +>The sample contained within the attribute in then enriched with data from VMRay mapped into MISP attributes. +- **input**: +>An attachment or malware-sample attribute. +- **output**: +>MISP attributes mapped from the result of the query on VMRay API, included in the following list: +>- text +>- sha1 +>- sha256 +>- md5 +>- link +- **references**: +>https://www.vmray.com/ +- **requirements**: +>An access to the VMRay API (apikey & url) ----- @@ -211,14 +819,54 @@ Module to submit a sample to VMRay. Module to query VulnDB (RiskBasedSecurity.com). +- **features**: +>This module takes a vulnerability attribute as input and queries VulnDB in order to get some additional data about it. +> +>The API gives the result of the query which can be displayed in the screen, and/or mapped into MISP attributes to add in the event. +- **input**: +>A vulnerability attribute. +- **output**: +>Additional data enriching the CVE input, fetched from VulnDB. +- **references**: +>https://vulndb.cyberriskanalytics.com/ +- **requirements**: +>An access to the VulnDB API (apikey, apisecret) + +----- + +#### [vulners](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/vulners.py) + + + +An expansion hover module to expand information about CVE id using Vulners API. +- **features**: +>This module takes a vulnerability attribute as input and queries the Vulners API in order to get some additional data about it. +> +>The API then returns details about the vulnerability. +- **input**: +>A vulnerability attribute. +- **output**: +>Text giving additional information about the CVE in input. +- **references**: +>https://vulners.com/ +- **requirements**: +>Vulners python library, An access to the Vulners API ----- #### [whois](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/whois.py) Module to query a local instance of uwhois (https://github.com/rafiot/uwhoisd). +- **features**: +>This module takes a domain or IP address attribute as input and queries a 'Univseral Whois proxy server' to get the correct details of the Whois query on the input value (check the references for more details about this whois server). +- **input**: +>A domain or IP address attribute. +- **output**: +>Text describing the result of a whois request for the input value. +- **references**: +>https://github.com/rafiot/uwhoisd - **requirements**: ->uwhois +>uwhois: A whois python library ----- @@ -227,6 +875,16 @@ Module to query a local instance of uwhois (https://github.com/rafiot/uwhoisd). An expansion hover module to extract information from Wikidata to have additional information about particular term for analysis. +- **features**: +>This module takes a text attribute as input and queries the Wikidata API. If the text attribute is clear enough to define a specific term, the API returns a wikidata link in response. +- **input**: +>Text attribute. +- **output**: +>Text attribute. +- **references**: +>https://www.wikidata.org +- **requirements**: +>SPARQLWrapper python library ----- @@ -235,6 +893,41 @@ An expansion hover module to extract information from Wikidata to have additiona An expansion module for IBM X-Force Exchange. +- **features**: +>This module takes a MISP attribute as input to query the X-Force API. The API returns then additional information known in their threats data, that is mapped into MISP attributes. +- **input**: +>A MISP attribute included in the following list: +>- ip-src +>- ip-dst +>- vulnerability +>- md5 +>- sha1 +>- sha256 +- **output**: +>MISP attributes mapped from the result of the query on X-Force Exchange. +- **references**: +>https://exchange.xforce.ibmcloud.com/ +- **requirements**: +>An access to the X-Force API (apikey) + +----- + +#### [yara_query](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/yara_query.py) + + + +An expansion & hover module to translate any hash attribute into a yara rule. +- **features**: +>The module takes a hash attribute (md5, sha1, sha256, imphash) as input, and is returning a YARA rule from it. This YARA rule is also validated using the same method as in 'yara_syntax_validator' module. +>Both hover and expansion functionalities are supported with this module, where the hover part is displaying the resulting YARA rule and the expansion part allows you to add the rule as a new attribute, as usual with expansion modules. +- **input**: +>MISP Hash attribute (md5, sha1, sha256, imphash, or any of the composite attribute with filename and one of the previous hash type). +- **output**: +>YARA rule. +- **references**: +>https://virustotal.github.io/yara/, https://github.com/virustotal/yara-python +- **requirements**: +>yara-python python library ----- @@ -243,6 +936,16 @@ An expansion module for IBM X-Force Exchange. An expansion hover module to perform a syntax check on if yara rules are valid or not. +- **features**: +>This modules simply takes a YARA rule as input, and checks its syntax. It returns then a confirmation if the syntax is valid, otherwise the syntax error is displayed. +- **input**: +>YARA rule attribute. +- **output**: +>Text to inform users if their rule is valid. +- **references**: +>http://virustotal.github.io/yara/ +- **requirements**: +>yara_python python library ----- @@ -254,12 +957,12 @@ 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 +- **references**: +>https://community.softwaregrp.com/t5/ArcSight-Connectors/ArcSight-Common-Event-Format-CEF-Guide/ta-p/1589306?attachment-id=65537 ----- @@ -268,8 +971,6 @@ Module to export a MISP event in CEF format. 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. > @@ -289,12 +990,14 @@ This module is used to export MISP events containing transaction objects into Go > - '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). +- **references**: +>http://goaml.unodc.org/ +- **requirements**: +>PyMISP, MISP objects ----- @@ -327,16 +1030,16 @@ OSQuery export of a MISP event. #### [pdfexport](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/export_mod/pdfexport.py) 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. +- **references**: +>https://acrobat.adobe.com/us/en/acrobat/about-adobe-pdf.html +- **requirements**: +>PyMISP, asciidoctor ----- @@ -351,16 +1054,16 @@ Skeleton export module. 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 +- **references**: +>https://www.anomali.com/platform/threatstream, https://github.com/threatstream +- **requirements**: +>csv ----- @@ -369,17 +1072,17 @@ Module to export a structured CSV file for uploading to threatStream. 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 +- **references**: +>https://www.threatconnect.com +- **requirements**: +>csv ----- @@ -388,8 +1091,6 @@ Module to export a structured CSV file for uploading to ThreatConnect. #### [csvimport](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/import_mod/csvimport.py) 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, '). @@ -397,12 +1098,14 @@ Module to import MISP attributes from a csv file. > >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 +- **references**: +>https://tools.ietf.org/html/rfc4180, https://tools.ietf.org/html/rfc7111 +- **requirements**: +>PyMISP ----- @@ -413,12 +1116,12 @@ Module to import MISP attributes from a csv file. 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 +- **references**: +>https://cuckoosandbox.org/, https://github.com/cuckoosandbox/cuckoo ----- @@ -440,16 +1143,16 @@ Module to import emails in MISP. 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. +- **references**: +>http://goaml.unodc.org/ +- **requirements**: +>PyMISP ----- @@ -480,16 +1183,16 @@ Optical Character Recognition (OCR) module for MISP. #### [openiocimport](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/import_mod/openiocimport.py) 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 +- **references**: +>https://www.fireeye.com/blog/threat-research/2013/10/openioc-basics.html +- **requirements**: +>PyMISP ----- @@ -499,12 +1202,12 @@ 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 +- **references**: +>https://www.threattrack.com/malware-analysis.aspx ----- @@ -513,16 +1216,16 @@ Module to import ThreatAnalyzer archive.zip / analysis.json files. 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 +- **references**: +>https://www.vmray.com/ +- **requirements**: +>vmray_rest_api ----- diff --git a/doc/expansion/asn_history.json b/doc/expansion/asn_history.json index 936feba..b3eea26 100644 --- a/doc/expansion/asn_history.json +++ b/doc/expansion/asn_history.json @@ -1,4 +1,8 @@ { "description": "Query an ASN description history service (https://github.com/CIRCL/ASN-Description-History.git).", - "requirements": ["asnhistory"] + "requirements": ["asnhistory python library"], + "features": "The module takes an AS number attribute as input and displays its description and history.\n\nFor a proper working, a communication with a redis database is needed, thus 3 parameters are needed:\n- host, the address of the redis server\n- port, the port used by redis\n- db, the index of the database used\n", + "references": ["https://github.com/CIRCL/ASN-Description-History.git"], + "input": "Autonomous system number.", + "output": "Text containing a description of the ASN and its history." } diff --git a/doc/expansion/btc.json b/doc/expansion/btc.json index 3aeceab..fd264d8 100644 --- a/doc/expansion/btc.json +++ b/doc/expansion/btc.json @@ -1,3 +1,6 @@ { - "description": "An expansion hover module to get a blockchain balance from a BTC address in MISP." + "description": "An expansion hover module to get a blockchain balance from a BTC address in MISP.", + "logo": "logos/bitcoin.png", + "input": "btc address attribute.", + "output": "Text to describe the blockchain balance and the transactions related to the btc address in input." } diff --git a/doc/expansion/circl_passivedns.json b/doc/expansion/circl_passivedns.json index 664ca77..fda50eb 100644 --- a/doc/expansion/circl_passivedns.json +++ b/doc/expansion/circl_passivedns.json @@ -1,4 +1,9 @@ { "description": "Module to access CIRCL Passive DNS.", - "logo": "logos/passivedns.png" + "logo": "logos/passivedns.png", + "requirements": ["pypdns: Passive DNS python library", "A CIRCL passive DNS account with username & password"], + "input": "Hostname, domain, or ip-address attribute.", + "ouput": "Text describing passive DNS information related to the input attribute.", + "features": "This module takes a hostname, domain or ip-address (ip-src or ip-dst) attribute as input, and queries the CIRCL Passive DNS REST API to get and display information about this input.\n\nTo make it work a username and a password are thus required to authenticate to the CIRCL Passive DNS API.", + "references": ["https://www.circl.lu/services/passive-dns/", "https://datatracker.ietf.org/doc/draft-dulaunoy-dnsop-passive-dns-cof/"] } diff --git a/doc/expansion/circl_passivessl.json b/doc/expansion/circl_passivessl.json index 2015b59..ec449ee 100644 --- a/doc/expansion/circl_passivessl.json +++ b/doc/expansion/circl_passivessl.json @@ -1,4 +1,9 @@ { "description": "Modules to access CIRCL Passive SSL.", - "logo": "logos/passivessl.png" + "logo": "logos/passivessl.png", + "requirements": ["pypssl: Passive SSL python library", "A CIRCL passive SSL account with username & password"], + "input": "Ip-address attribute.", + "output": "Text describing passive SSL information related to the input attribute.", + "features": "This module takes an ip-address (ip-src or ip-dst) attribute as input, and queries the CIRCL Passive SSL REST API to get and display information about this input.\n\nTo make it work a username and a password are thus required to authenticate to the CIRCL Passive SSL API.", + "references": ["https://www.circl.lu/services/passive-ssl/"] } diff --git a/doc/expansion/countrycode.json b/doc/expansion/countrycode.json index 367c14b..c6214e5 100644 --- a/doc/expansion/countrycode.json +++ b/doc/expansion/countrycode.json @@ -1,3 +1,6 @@ { - "description": "Module to expand country codes." + "description": "Module to expand country codes.", + "input": "Hostname or domain attribute.", + "output": "Text with the country code the input belongs to.", + "features": "The module takes a domain or a hostname as input, and returns the country it belongs to.\n\nFor non country domains, a list of the most common possible extensions is used." } diff --git a/doc/expansion/crowdstrike_falcon.json b/doc/expansion/crowdstrike_falcon.json index 0faa6c0..07e9dbd 100644 --- a/doc/expansion/crowdstrike_falcon.json +++ b/doc/expansion/crowdstrike_falcon.json @@ -1,4 +1,9 @@ { "description": "Module to query Crowdstrike Falcon.", - "logo": "logos/crowdstrike.png" + "logo": "logos/crowdstrike.png", + "requirements": ["A CrowdStrike API access (API id & key)"], + "input": "A MISP attribute included in the following list:\n- domain\n- email-attachment\n- email-dst\n- email-reply-to\n- email-src\n- email-subject\n- filename\n- hostname\n- ip-src\n- ip-dst\n- md5\n- mutex\n- regkey\n- sha1\n- sha256\n- uri\n- url\n- user-agent\n- whois-registrant-email\n- x509-fingerprint-md5", + "output": "MISP attributes mapped after the CrowdStrike API has been queried, included in the following list:\n- hostname\n- email-src\n- email-subject\n- filename\n- md5\n- sha1\n- sha256\n- ip-dst\n- ip-dst\n- mutex\n- regkey\n- url\n- user-agent\n- x509-fingerprint-md5", + "references": ["https://www.crowdstrike.com/products/crowdstrike-falcon-faq/"], + "features": "This module takes a MISP attribute as input to query a CrowdStrike Falcon API. The API returns then the result of the query with some types we map into compatible types we add as MISP attributes.\n\nPlease note that composite attributes composed by at least one of the input types mentionned below (domains, IPs, hostnames) are also supported." } diff --git a/doc/expansion/cve.json b/doc/expansion/cve.json index afc4c33..04f131f 100644 --- a/doc/expansion/cve.json +++ b/doc/expansion/cve.json @@ -1,3 +1,8 @@ { - "description": "An expansion hover module to expand information about CVE id." + "description": "An expansion hover module to expand information about CVE id.", + "logo": "logos/cve.png", + "input": "Vulnerability attribute.", + "output": "Text giving information about the CVE related to the Vulnerability.", + "references": ["https://cve.circl.lu/", "https://cve.mitre.org/"], + "features": "The module takes a vulnerability attribute as input and queries the CIRCL CVE search API to get information about the vulnerability as it is described in the list of CVEs." } diff --git a/doc/expansion/dbl_spamhaus.json b/doc/expansion/dbl_spamhaus.json index b691007..ea73dcb 100644 --- a/doc/expansion/dbl_spamhaus.json +++ b/doc/expansion/dbl_spamhaus.json @@ -1,4 +1,9 @@ { "description": "Module to check Spamhaus DBL for a domain name.", - "logo": "logos/spamhaus.jpg" + "logo": "logos/spamhaus.jpg", + "requirements": ["dnspython3: DNS python3 library"], + "input": "Domain or hostname attribute.", + "output": "Information about the nature of the input.", + "references": ["https://www.spamhaus.org/faq/section/Spamhaus%20DBL"], + "features": "This modules takes a domain or a hostname in input and queries the Domain Block List provided by Spamhaus to determine what kind of domain it is.\n\nDBL then returns a response code corresponding to a certain classification of the domain we display. If the queried domain is not in the list, it is also mentionned.\n\nPlease note that composite MISP attributes containing domain or hostname are supported as well." } diff --git a/doc/expansion/dns.json b/doc/expansion/dns.json index 2ca7e42..dc43b64 100644 --- a/doc/expansion/dns.json +++ b/doc/expansion/dns.json @@ -1,3 +1,7 @@ { - "description": "A simple DNS expansion service to resolve IP address from MISP attributes." + "description": "A simple DNS expansion service to resolve IP address from domain MISP attributes.", + "requirements": ["dnspython3: DNS python3 library"], + "input": "Domain or hostname attribute.", + "output": "IP address resolving the input.", + "features": "The module takes a domain of hostname attribute as input, and tries to resolve it. If no error is encountered, the IP address that resolves the domain is returned, otherwise the origin of the error is displayed.\n\nThe address of the DNS resolver to use is also configurable, but if no configuration is set, we use the Google public DNS address (8.8.8.8).\n\nPlease note that composite MISP attributes containing domain or hostname are supported as well." } diff --git a/doc/expansion/domaintools.json b/doc/expansion/domaintools.json index 5ed0cb2..849028c 100644 --- a/doc/expansion/domaintools.json +++ b/doc/expansion/domaintools.json @@ -1,4 +1,9 @@ { "description": "DomainTools MISP expansion module.", - "logo": "logos/domaintools.png" + "logo": "logos/domaintools.png", + "requirements": ["Domaintools python library", "A Domaintools API access (username & apikey)"], + "input": "A MISP attribute included in the following list:\n- domain\n- hostname\n- email-src\n- email-dst\n- target-email\n- whois-registrant-email\n- whois-registrant-name\n- whois-registrant-phone\n- ip-src\n- ip-dst", + "output": "MISP attributes mapped after the Domaintools API has been queried, included in the following list:\n- whois-registrant-email\n- whois-registrant-phone\n- whois-registrant-name\n- whois-registrar\n- whois-creation-date\n- text\n- domain", + "references": ["https://www.domaintools.com/"], + "features": "This module takes a MISP attribute as input to query the Domaintools API. The API returns then the result of the query with some types we map into compatible types we add as MISP attributes.\n\nPlease note that composite attributes composed by at least one of the input types mentionned below (domains, IPs, hostnames) are also supported." } diff --git a/doc/expansion/eupi.json b/doc/expansion/eupi.json index 42da8aa..02a16fb 100644 --- a/doc/expansion/eupi.json +++ b/doc/expansion/eupi.json @@ -1,4 +1,9 @@ { "description": "A module to query the Phishing Initiative service (https://phishing-initiative.lu).", - "logo": "logos/eupi.png" + "logo": "logos/eupi.png", + "requirements": ["pyeupi: eupi python library", "An access to the Phishing Initiative API (apikey & url)"], + "input": "A domain, hostname or url MISP attribute.", + "output": "Text containing information about the input, resulting from the query on Phishing Initiative.", + "references": ["https://phishing-initiative.eu/?lang=en"], + "features": "This module takes a domain, hostname or url MISP attribute as input to query the Phishing Initiative API. The API returns then the result of the query with some information about the value queried.\n\nPlease note that composite attributes containing domain or hostname are also supported." } diff --git a/doc/expansion/farsight_passivedns.json b/doc/expansion/farsight_passivedns.json index 6fd038b..2c1bf05 100644 --- a/doc/expansion/farsight_passivedns.json +++ b/doc/expansion/farsight_passivedns.json @@ -1,4 +1,9 @@ { "description": "Module to access Farsight DNSDB Passive DNS.", - "logo": "logos/farsight.png" + "logo": "logos/farsight.png", + "requirements": ["An access to the Farsight Passive DNS API (apikey)"], + "input": "A domain, hostname or IP address MISP attribute.", + "output": "Text containing information about the input, resulting from the query on the Farsight Passive DNS API.", + "references": ["https://www.farsightsecurity.com/"], + "features": "This module takes a domain, hostname or IP address MISP attribute as input to query the Farsight Passive DNS API. The API returns then the result of the query with some information about the value queried." } diff --git a/doc/expansion/geoip_country.json b/doc/expansion/geoip_country.json index fb3bf33..9db49a2 100644 --- a/doc/expansion/geoip_country.json +++ b/doc/expansion/geoip_country.json @@ -1,3 +1,9 @@ { - "description": "Module to query a local copy of Maxminds Geolite database." + "description": "Module to query a local copy of Maxmind's Geolite database.", + "logo": "logos/maxmind.png", + "requirements": ["A local copy of Maxmind's Geolite database"], + "input": "An IP address MISP Attribute.", + "output": "Text containing information about the location of the IP address.", + "references": ["https://www.maxmind.com/en/home"], + "features": "This module takes an IP address MISP attribute as input and queries a local copy of the Maxmind's Geolite database to get information about the location of this IP address.\n\nPlease note that composite attributes domain|ip are also supported." } diff --git a/doc/expansion/hashdd.json b/doc/expansion/hashdd.json new file mode 100644 index 0000000..d963820 --- /dev/null +++ b/doc/expansion/hashdd.json @@ -0,0 +1,7 @@ +{ + "description": "A hover module to check hashes against hashdd.com including NSLR dataset.", + "input": "A hash MISP attribute (md5).", + "output": "Text describing the known level of the hash in the hashdd databases.", + "references": ["https://hashdd.com/"], + "features": "This module takes a hash attribute as input to check its known level, using the hashdd API. This information is then displayed." +} diff --git a/doc/expansion/intelmq_eventdb.json b/doc/expansion/intelmq_eventdb.json index 7746551..bc48414 100644 --- a/doc/expansion/intelmq_eventdb.json +++ b/doc/expansion/intelmq_eventdb.json @@ -1,3 +1,9 @@ { - "description": "Module to access intelmqs eventdb." + "description": "Module to access intelmqs eventdb.", + "logo": "logos/intelmq.png", + "requirements": ["psycopg2: Python library to support PostgreSQL", "An access to the IntelMQ database (username, password, hostname and database reference)"], + "input": "A hostname, domain, IP address or AS attribute.", + "output": "Text giving information about the input using IntelMQ database.", + "references": ["https://github.com/certtools/intelmq", "https://intelmq.readthedocs.io/en/latest/Developers-Guide/"], + "features": "/!\\ EXPERIMENTAL MODULE, some features may not work /!\\\n\nThis module takes a domain, hostname, IP address or Autonomous system MISP attribute as input to query the IntelMQ database. The result of the query gives then additional information about the input." } diff --git a/doc/expansion/ipasn.json b/doc/expansion/ipasn.json index 1ab9cdd..aa9d0b1 100644 --- a/doc/expansion/ipasn.json +++ b/doc/expansion/ipasn.json @@ -1,3 +1,8 @@ { - "description": "Module to query an IP ASN history service (https://github.com/CIRCL/IP-ASN-history.git)." + "description": "Module to query an IP ASN history service (https://github.com/CIRCL/IP-ASN-history.git).", + "requirements": ["ipasn_redis: Python library to access IP-ASN-history instance via redis", "An IP-ASN-history instance information (host, port and database index)"], + "input": "An IP address MISP attribute.", + "output": "Text describing additional information about the input after a query on the IP-ASN-history database.", + "references": ["https://www.circl.lu/services/ip-asn-history/"], + "features": "This module takes an IP address attribute as input and queries the CIRCL IP ASN service to get additional information about the input." } diff --git a/doc/expansion/iprep.json b/doc/expansion/iprep.json index 343ce4d..95250e0 100644 --- a/doc/expansion/iprep.json +++ b/doc/expansion/iprep.json @@ -1,3 +1,8 @@ { - "description": "Module to query IPRep data for IP addresses." + "description": "Module to query IPRep data for IP addresses.", + "requirements": ["An access to the packetmail API (apikey)"], + "input": "An IP address MISP attribute.", + "output": "Text describing additional information about the input after a query on the IPRep API.", + "references": ["https://github.com/mahesh557/packetmail"], + "features": "This module takes an IP address attribute as input and queries the database from packetmail.net to get some information about the reputation of the IP." } diff --git a/doc/expansion/macaddress_io.json b/doc/expansion/macaddress_io.json new file mode 100644 index 0000000..6bd2658 --- /dev/null +++ b/doc/expansion/macaddress_io.json @@ -0,0 +1,9 @@ +{ + "description": "MISP hover module for macaddress.io", + "logo": "logos/macaddress_io.png", + "requirements": ["maclookup: macaddress.io python library", "An access to the macaddress.io API (apikey)"], + "input": "MAC address MISP attribute.", + "output": "Text containing information on the MAC address fetched from a query on macaddress.io.", + "references": ["https://macaddress.io/", "https://github.com/CodeLineFi/maclookup-python"], + "features": "This module takes a MAC address attribute as input and queries macaddress.io for additional information.\n\nThis information contains data about:\n- MAC address details\n- Vendor details\n- Block details" +} diff --git a/doc/expansion/onyphe.json b/doc/expansion/onyphe.json index 4c00866..04ebdd3 100644 --- a/doc/expansion/onyphe.json +++ b/doc/expansion/onyphe.json @@ -1,4 +1,9 @@ { "description": "Module to process a query on Onyphe.", - "logo": "logos/onyphe.jpg" + "logo": "logos/onyphe.jpg", + "requirements": ["onyphe python library", "An access to the Onyphe API (apikey)"], + "input": "A domain, hostname or IP address MISP attribute.", + "output": "MISP attributes fetched from the Onyphe query.", + "references": ["https://www.onyphe.io/", "https://github.com/sebdraven/pyonyphe"], + "features": "This module takes a domain, hostname, or IP address attribute as input in order to query the Onyphe API. Data fetched from the query is then parsed and MISP attributes are extracted." } diff --git a/doc/expansion/onyphe_full.json b/doc/expansion/onyphe_full.json index 15f07f1..4b722fa 100644 --- a/doc/expansion/onyphe_full.json +++ b/doc/expansion/onyphe_full.json @@ -1,4 +1,9 @@ { "description": "Module to process a full query on Onyphe.", - "logo": "logos/onyphe.jpg" + "logo": "logos/onyphe.jpg", + "requirements": ["onyphe python library", "An access to the Onyphe API (apikey)"], + "input": "A domain, hostname or IP address MISP attribute.", + "output": "MISP attributes fetched from the Onyphe query.", + "references": ["https://www.onyphe.io/", "https://github.com/sebdraven/pyonyphe"], + "features": "This module takes a domain, hostname, or IP address attribute as input in order to query the Onyphe API. Data fetched from the query is then parsed and MISP attributes are extracted.\n\nThe parsing is here more advanced than the one on onyphe module, and is returning more attributes, since more fields of the query result are watched and parsed." } diff --git a/doc/expansion/otx.json b/doc/expansion/otx.json index 16ee6d6..c6032cc 100644 --- a/doc/expansion/otx.json +++ b/doc/expansion/otx.json @@ -1,4 +1,9 @@ { "description": "Module to get information from AlienVault OTX.", - "logo": "logos/otx.png" + "logo": "logos/otx.png", + "requirements": ["An access to the OTX API (apikey)"], + "input": "A MISP attribute included in the following list:\n- hostname\n- domain\n- ip-src\n- ip-dst\n- md5\n- sha1\n- sha256\n- sha512", + "output": "MISP attributes mapped from the result of the query on OTX, included in the following list:\n- domain\n- ip-src\n- ip-dst\n- text\n- md5\n- sha1\n- sha256\n- sha512\n- email", + "references": ["https://www.alienvault.com/open-threat-exchange"], + "features": "This module takes a MISP attribute as input to query the OTX Alienvault API. The API returns then the result of the query with some types we map into compatible types we add as MISP attributes." } diff --git a/doc/expansion/passivetotal.json b/doc/expansion/passivetotal.json index 5b09f56..ef8b044 100644 --- a/doc/expansion/passivetotal.json +++ b/doc/expansion/passivetotal.json @@ -1,4 +1,9 @@ { - "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" + "description": "", + "logo": "logos/passivetotal.png", + "requirements": ["Passivetotal python library", "An access to the PassiveTotal API (apikey)"], + "input": "A MISP attribute included in the following list:\n- hostname\n- domain\n- ip-src\n- ip-dst\n- x509-fingerprint-sha1\n- email-src\n- email-dst\n- target-email\n- whois-registrant-email\n- whois-registrant-phone\n- text\n- whois-registrant-name\n- whois-registrar\n- whois-creation-date", + "output": "MISP attributes mapped from the result of the query on PassiveTotal, included in the following list:\n- hostname\n- domain\n- ip-src\n- ip-dst\n- x509-fingerprint-sha1\n- email-src\n- email-dst\n- target-email\n- whois-registrant-email\n- whois-registrant-phone\n- text\n- whois-registrant-name\n- whois-registrar\n- whois-creation-date\n- md5\n- sha1\n- sha256\n- link", + "references": ["https://www.passivetotal.org/register"], + "features": "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" } diff --git a/doc/expansion/rbl.json b/doc/expansion/rbl.json index 0f67c2c..9700eca 100644 --- a/doc/expansion/rbl.json +++ b/doc/expansion/rbl.json @@ -1,4 +1,8 @@ { "description": "Module to check an IPv4 address against known RBLs.", - "requirements": ["dnspython3"] + "requirements": ["dnspython3: DNS python3 library"], + "input": "IP address attribute.", + "output": "Text with additional data from Real-time Blackhost Lists about the IP address.", + "references": ["[RBLs list](https://github.com/MISP/misp-modules/blob/8817de476572a10a9c9d03258ec81ca70f3d926d/misp_modules/modules/expansion/rbl.py#L20)"], + "features": "This module takes an IP address attribute as input and queries multiple know Real-time Blackhost Lists to check if they have already seen this IP address.\n\nWe display then all the information we get from those different sources." } diff --git a/doc/expansion/reversedns.json b/doc/expansion/reversedns.json index 96773ac..6934462 100644 --- a/doc/expansion/reversedns.json +++ b/doc/expansion/reversedns.json @@ -1,3 +1,7 @@ { - "description": "Simple Reverse DNS expansion service to resolve reverse DNS from MISP attributes." + "description": "Simple Reverse DNS expansion service to resolve reverse DNS from MISP attributes.", + "requirements": ["DNS python library"], + "input": "An IP address attribute.", + "output": "Hostname attribute the input is resolved into.", + "features": "The module takes an IP address as input and tries to find the hostname this IP address is resolved into.\n\nThe address of the DNS resolver to use is also configurable, but if no configuration is set, we use the Google public DNS address (8.8.8.8).\n\nPlease note that composite MISP attributes containing IP addresses are supported as well." } diff --git a/doc/expansion/securitytrails.json b/doc/expansion/securitytrails.json new file mode 100644 index 0000000..8541e4e --- /dev/null +++ b/doc/expansion/securitytrails.json @@ -0,0 +1,9 @@ +{ + "description": "An expansion modules for SecurityTrails.", + "logo": "logos/securitytrails.png", + "requirements": ["dnstrails python library", "An access to the SecurityTrails API (apikey)"], + "input": "A domain, hostname or IP address attribute.", + "output": "MISP attributes resulting from the query on SecurityTrails API, included in the following list:\n- hostname\n- domain\n- ip-src\n- ip-dst\n- dns-soa-email\n- whois-registrant-email\n- whois-registrant-phone\n- whois-registrant-name\n- whois-registrar\n- whois-creation-date\n- domain", + "references": ["https://securitytrails.com/"], + "features": "The module takes a domain, hostname or IP address attribute as input and queries the SecurityTrails API with it.\n\nMultiple parsing operations are then processed on the result of the query to extract a much information as possible.\n\nFrom this data extracted are then mapped MISP attributes." +} diff --git a/doc/expansion/shodan.json b/doc/expansion/shodan.json index 734d768..57241f0 100644 --- a/doc/expansion/shodan.json +++ b/doc/expansion/shodan.json @@ -1,4 +1,9 @@ { "description": "Module to query on Shodan.", - "logo": "logos/shodan.png" + "logo": "logos/shodan.png", + "requirements": ["shodan python library", "An access to the Shodan API (apikey)"], + "input": "An IP address MISP attribute.", + "output": "Text with additional data about the input, resulting from the query on Shodan.", + "references": ["https://www.shodan.io/"], + "features": "The module takes an IP address as input and queries the Shodan API to get some additional data about it." } diff --git a/doc/expansion/sigma_queries.json b/doc/expansion/sigma_queries.json new file mode 100644 index 0000000..f127ba4 --- /dev/null +++ b/doc/expansion/sigma_queries.json @@ -0,0 +1,9 @@ +{ + "description": "An expansion hover module to display the result of sigma queries.", + "logo": "logos/sigma.png", + "requirements": ["Sigma python library"], + "input": "A Sigma attribute.", + "output": "Text displaying results of queries on the Sigma attribute.", + "references": ["https://github.com/Neo23x0/sigma/wiki"], + "features": "This module takes a Sigma rule attribute as input and tries all the different queries available to convert it into different formats recognized by SIEMs." +} diff --git a/doc/expansion/sigma_syntax_validator.json b/doc/expansion/sigma_syntax_validator.json new file mode 100644 index 0000000..8e17ae0 --- /dev/null +++ b/doc/expansion/sigma_syntax_validator.json @@ -0,0 +1,9 @@ +{ + "description": "An expansion hover module to perform a syntax check on sigma rules.", + "logo": "logos/sigma.png", + "requirements": ["Sigma python library", "Yaml python library"], + "input": "A Sigma attribute.", + "output": "Text describing the validity of the Sigma rule.", + "references": ["https://github.com/Neo23x0/sigma/wiki"], + "features": "This module takes a Sigma rule attribute as input and performs a syntax check on it.\n\nIt displays then that the rule is valid if it is the case, and the error related to the rule otherwise." +} diff --git a/doc/expansion/sourcecache.json b/doc/expansion/sourcecache.json index 13c2a03..ab4669c 100644 --- a/doc/expansion/sourcecache.json +++ b/doc/expansion/sourcecache.json @@ -1,3 +1,8 @@ { - "description": "Module to cache web pages of analysis reports, OSINT sources. The module returns a link of the cached page." + "description": "Module to cache web pages of analysis reports, OSINT sources. The module returns a link of the cached page.", + "requirements": ["urlarchiver: python library to fetch and archive URL on the file-system"], + "input": "A link or url attribute.", + "output": "A malware-sample attribute describing the cached page.", + "references": ["https://github.com/adulau/url_archiver"], + "features": "This module takes a link or url attribute as input and caches the related web page. It returns then a link of the cached page." } diff --git a/doc/expansion/stix2_pattern_syntax_validator.json b/doc/expansion/stix2_pattern_syntax_validator.json new file mode 100644 index 0000000..2ea43b5 --- /dev/null +++ b/doc/expansion/stix2_pattern_syntax_validator.json @@ -0,0 +1,9 @@ +{ + "description": "An expansion hover module to perform a syntax check on stix2 patterns.", + "logo": "logos/stix.png", + "requirements": ["stix2patterns python library"], + "input": "A STIX2 pattern attribute.", + "output": "Text describing the validity of the STIX2 pattern.", + "references": ["[STIX2.0 patterning specifications](http://docs.oasis-open.org/cti/stix/v2.0/cs01/part5-stix-patterning/stix-v2.0-cs01-part5-stix-patterning.html)"], + "features": "This module takes a STIX2 pattern attribute as input and performs a syntax check on it.\n\nIt displays then that the rule is valid if it is the case, and the error related to the rule otherwise." +} diff --git a/doc/expansion/threatcrowd.json b/doc/expansion/threatcrowd.json index 83af5fd..99725b8 100644 --- a/doc/expansion/threatcrowd.json +++ b/doc/expansion/threatcrowd.json @@ -1,4 +1,8 @@ { "description": "Module to get information from ThreatCrowd.", - "logo": "logos/threatcrowd.png" + "logo": "logos/threatcrowd.png", + "input": "A MISP attribute included in the following list:\n- hostname\n- domain\n- ip-src\n- ip-dst\n- md5\n- sha1\n- sha256\n- sha512\n- whois-registrant-email", + "output": "MISP attributes mapped from the result of the query on ThreatCrowd, included in the following list:\n- domain\n- ip-src\n- ip-dst\n- text\n- md5\n- sha1\n- sha256\n- sha512\n- hostname\n- whois-registrant-email", + "references": ["https://www.threatcrowd.org/"], + "features": "This module takes a MISP attribute as input and queries ThreatCrowd with it.\n\nThe result of this query is then parsed and some data is mapped into MISP attributes in order to enrich the input attribute." } diff --git a/doc/expansion/threatminer.json b/doc/expansion/threatminer.json index da75784..d2f26bd 100644 --- a/doc/expansion/threatminer.json +++ b/doc/expansion/threatminer.json @@ -1,4 +1,8 @@ { "description": "Module to get information from ThreatMiner.", - "logo": "logos/threatminer.png" + "logo": "logos/threatminer.png", + "input": "A MISP attribute included in the following list:\n- hostname\n- domain\n- ip-src\n- ip-dst\n- md5\n- sha1\n- sha256\n- sha512", + "output": "MISP attributes mapped from the result of the query on ThreatMiner, included in the following list:\n- domain\n- ip-src\n- ip-dst\n- text\n- md5\n- sha1\n- sha256\n- sha512\n- ssdeep\n- authentihash\n- filename\n- whois-registrant-email\n- url\n- link", + "references": ["https://www.threatminer.org/"], + "features": "This module takes a MISP attribute as input and queries ThreatMiner with it.\n\nThe result of this query is then parsed and some data is mapped into MISP attributes in order to enrich the input attribute." } diff --git a/doc/expansion/urlscan.json b/doc/expansion/urlscan.json new file mode 100644 index 0000000..d847761 --- /dev/null +++ b/doc/expansion/urlscan.json @@ -0,0 +1,9 @@ +{ + "description": "An expansion module to query urlscan.io.", + "logo": "logos/urlscan.jpg", + "requirements": ["An access to the urlscan.io API"], + "input": "A domain, hostname or url attribute.", + "output": "MISP attributes mapped from the result of the query on urlscan.io.", + "references": ["https://urlscan.io/"], + "features": "This module takes a MISP attribute as input and queries urlscan.io with it.\n\nThe result of this query is then parsed and some data is mapped into MISP attributes in order to enrich the input attribute." +} diff --git a/doc/expansion/virustotal.json b/doc/expansion/virustotal.json index 8c203eb..9008003 100644 --- a/doc/expansion/virustotal.json +++ b/doc/expansion/virustotal.json @@ -1,4 +1,9 @@ { "description": "Module to get information from virustotal.", - "logo": "logos/virustotal.png" + "logo": "logos/virustotal.png", + "requirements": ["An access to the VirusTotal API (apikey)"], + "input": "A domain, hash (md5, sha1, sha256 or sha512), hostname or IP address attribute.", + "output": "MISP attributes mapped from the rersult of the query on VirusTotal API.", + "references": ["https://www.virustotal.com/"], + "features": "This module takes a MISP attribute as input and queries the VirusTotal API with it, in order to get additional data on the input attribute.\n\nMultiple recursive requests on the API can then be processed on some attributes found in the first request. A limit can be set to restrict the number of values to query again, and at the same time the number of request submitted to the API.\n\nThis limit is important because the default user VirusTotal apikey only allows to process a certain nunmber of queries per minute. As a consequence it is recommended to have a larger number of requests or a private apikey.\n\nData is then mapped into MISP attributes." } diff --git a/doc/expansion/vmray_submit.json b/doc/expansion/vmray_submit.json index b977203..ea6cf3f 100644 --- a/doc/expansion/vmray_submit.json +++ b/doc/expansion/vmray_submit.json @@ -1,4 +1,9 @@ { "description": "Module to submit a sample to VMRay.", - "logo": "logos/vmray.png" + "logo": "logos/vmray.png", + "requirements": ["An access to the VMRay API (apikey & url)"], + "input": "An attachment or malware-sample attribute.", + "output": "MISP attributes mapped from the result of the query on VMRay API, included in the following list:\n- text\n- sha1\n- sha256\n- md5\n- link", + "references": ["https://www.vmray.com/"], + "features": "This module takes an attachment or malware-sample attribute as input to query the VMRay API.\n\nThe sample contained within the attribute in then enriched with data from VMRay mapped into MISP attributes." } diff --git a/doc/expansion/vulndb.json b/doc/expansion/vulndb.json index a4fec3b..330a3eb 100644 --- a/doc/expansion/vulndb.json +++ b/doc/expansion/vulndb.json @@ -1,4 +1,9 @@ { "description": "Module to query VulnDB (RiskBasedSecurity.com).", - "logo": "logos/vulndb.png" + "logo": "logos/vulndb.png", + "requirements": ["An access to the VulnDB API (apikey, apisecret)"], + "input": "A vulnerability attribute.", + "output": "Additional data enriching the CVE input, fetched from VulnDB.", + "references": ["https://vulndb.cyberriskanalytics.com/"], + "features": "This module takes a vulnerability attribute as input and queries VulnDB in order to get some additional data about it.\n\nThe API gives the result of the query which can be displayed in the screen, and/or mapped into MISP attributes to add in the event." } diff --git a/doc/expansion/vulners.json b/doc/expansion/vulners.json new file mode 100644 index 0000000..f3f3026 --- /dev/null +++ b/doc/expansion/vulners.json @@ -0,0 +1,9 @@ +{ + "description": "An expansion hover module to expand information about CVE id using Vulners API.", + "logo": "logos/vulners.png", + "requirements": ["Vulners python library", "An access to the Vulners API"], + "input": "A vulnerability attribute.", + "output": "Text giving additional information about the CVE in input.", + "references": ["https://vulners.com/"], + "features": "This module takes a vulnerability attribute as input and queries the Vulners API in order to get some additional data about it.\n\nThe API then returns details about the vulnerability." +} diff --git a/doc/expansion/whois.json b/doc/expansion/whois.json index 7c5c119..938bad5 100644 --- a/doc/expansion/whois.json +++ b/doc/expansion/whois.json @@ -1,4 +1,8 @@ { "description": "Module to query a local instance of uwhois (https://github.com/rafiot/uwhoisd).", - "requirements": ["uwhois"] + "requirements": ["uwhois: A whois python library"], + "input": "A domain or IP address attribute.", + "output": "Text describing the result of a whois request for the input value.", + "references": ["https://github.com/rafiot/uwhoisd"], + "features": "This module takes a domain or IP address attribute as input and queries a 'Univseral Whois proxy server' to get the correct details of the Whois query on the input value (check the references for more details about this whois server)." } diff --git a/doc/expansion/wiki.json b/doc/expansion/wiki.json index 14c4451..d6de62b 100644 --- a/doc/expansion/wiki.json +++ b/doc/expansion/wiki.json @@ -1,4 +1,9 @@ { "description": "An expansion hover module to extract information from Wikidata to have additional information about particular term for analysis.", - "logo": "logos/wikidata.png" + "logo": "logos/wikidata.png", + "requirements": ["SPARQLWrapper python library"], + "input": "Text attribute.", + "output": "Text attribute.", + "references": ["https://www.wikidata.org"], + "features": "This module takes a text attribute as input and queries the Wikidata API. If the text attribute is clear enough to define a specific term, the API returns a wikidata link in response." } diff --git a/doc/expansion/xforceexchange.json b/doc/expansion/xforceexchange.json index 13d3622..bbe3c86 100644 --- a/doc/expansion/xforceexchange.json +++ b/doc/expansion/xforceexchange.json @@ -1,4 +1,9 @@ { "description": "An expansion module for IBM X-Force Exchange.", - "logo": "logos/xforce.png" + "logo": "logos/xforce.png", + "requirements": ["An access to the X-Force API (apikey)"], + "input": "A MISP attribute included in the following list:\n- ip-src\n- ip-dst\n- vulnerability\n- md5\n- sha1\n- sha256", + "output": "MISP attributes mapped from the result of the query on X-Force Exchange.", + "references": ["https://exchange.xforce.ibmcloud.com/"], + "features": "This module takes a MISP attribute as input to query the X-Force API. The API returns then additional information known in their threats data, that is mapped into MISP attributes." } diff --git a/doc/expansion/yara_query.json b/doc/expansion/yara_query.json new file mode 100644 index 0000000..408353d --- /dev/null +++ b/doc/expansion/yara_query.json @@ -0,0 +1,9 @@ +{ + "description": "An expansion & hover module to translate any hash attribute into a yara rule.", + "logo": "logos/yara.png", + "requirements": ["yara-python python library"], + "features": "The module takes a hash attribute (md5, sha1, sha256, imphash) as input, and is returning a YARA rule from it. This YARA rule is also validated using the same method as in 'yara_syntax_validator' module.\nBoth hover and expansion functionalities are supported with this module, where the hover part is displaying the resulting YARA rule and the expansion part allows you to add the rule as a new attribute, as usual with expansion modules.", + "input": "MISP Hash attribute (md5, sha1, sha256, imphash, or any of the composite attribute with filename and one of the previous hash type).", + "output": "YARA rule.", + "references": ["https://virustotal.github.io/yara/", "https://github.com/virustotal/yara-python"] +} diff --git a/doc/expansion/yara_syntax_validator.json b/doc/expansion/yara_syntax_validator.json index 891aa5a..93a96ee 100644 --- a/doc/expansion/yara_syntax_validator.json +++ b/doc/expansion/yara_syntax_validator.json @@ -1,4 +1,9 @@ { "description": "An expansion hover module to perform a syntax check on if yara rules are valid or not.", - "logo": "logos/yara.png" + "logo": "logos/yara.png", + "requirements": ["yara_python python library"], + "input": "YARA rule attribute.", + "output": "Text to inform users if their rule is valid.", + "references": ["http://virustotal.github.io/yara/"], + "features": "This modules simply takes a YARA rule as input, and checks its syntax. It returns then a confirmation if the syntax is valid, otherwise the syntax error is displayed." } diff --git a/doc/generate_documentation.py b/doc/generate_documentation.py index 5a59814..6be61de 100644 --- a/doc/generate_documentation.py +++ b/doc/generate_documentation.py @@ -24,7 +24,7 @@ def generate_doc(root_path): 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(): + for field, value in sorted(definition.items()): if value: value = ', '.join(value) if isinstance(value, list) else '{}'.format(value.replace('\n', '\n>')) markdown.append('- **{}**:\n>{}\n'.format(field, value)) diff --git a/doc/logos/bitcoin.png b/doc/logos/bitcoin.png new file mode 100644 index 0000000..e80ad6d Binary files /dev/null and b/doc/logos/bitcoin.png differ diff --git a/doc/logos/cve.png b/doc/logos/cve.png new file mode 100644 index 0000000..315ccd8 Binary files /dev/null and b/doc/logos/cve.png differ diff --git a/doc/logos/intelmq.png b/doc/logos/intelmq.png new file mode 100644 index 0000000..fad627c Binary files /dev/null and b/doc/logos/intelmq.png differ diff --git a/doc/logos/macaddress_io.png b/doc/logos/macaddress_io.png new file mode 100644 index 0000000..e77f455 Binary files /dev/null and b/doc/logos/macaddress_io.png differ diff --git a/doc/logos/maxmind.png b/doc/logos/maxmind.png new file mode 100644 index 0000000..8f8a6c6 Binary files /dev/null and b/doc/logos/maxmind.png differ diff --git a/doc/logos/Sigma.png b/doc/logos/sigma.png similarity index 100% rename from doc/logos/Sigma.png rename to doc/logos/sigma.png diff --git a/doc/logos/urlscan.jpg b/doc/logos/urlscan.jpg new file mode 100644 index 0000000..52e24e2 Binary files /dev/null and b/doc/logos/urlscan.jpg differ diff --git a/doc/logos/vulners.png b/doc/logos/vulners.png new file mode 100644 index 0000000..ef9bab4 Binary files /dev/null and b/doc/logos/vulners.png differ diff --git a/misp_modules/modules/expansion/__init__.py b/misp_modules/modules/expansion/__init__.py index 1534fda..daed1ca 100644 --- a/misp_modules/modules/expansion/__init__.py +++ b/misp_modules/modules/expansion/__init__.py @@ -1,3 +1,3 @@ from . import _vmray -__all__ = ['vmray_submit', 'asn_history', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns', 'geoip_country', 'wiki', 'iprep', 'threatminer', 'otx', 'threatcrowd', 'vulndb', 'crowdstrike_falcon', 'yara_syntax_validator', 'hashdd', 'onyphe', 'onyphe_full', 'rbl', 'xforceexchange', 'sigma_syntax_validator', 'stix2_pattern_syntax_validator', 'sigma_queries', 'dbl_spamhaus', 'vulners', 'yara_query'] +__all__ = ['vmray_submit', 'asn_history', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'dns', 'btc_steroids', 'domaintools', 'eupi', 'farsight_passivedns', 'ipasn', 'passivetotal', 'sourcecache', 'virustotal', 'whois', 'shodan', 'reversedns', 'geoip_country', 'wiki', 'iprep', 'threatminer', 'otx', 'threatcrowd', 'vulndb', 'crowdstrike_falcon', 'yara_syntax_validator', 'hashdd', 'onyphe', 'onyphe_full', 'rbl', 'xforceexchange', 'sigma_syntax_validator', 'stix2_pattern_syntax_validator', 'sigma_queries', 'dbl_spamhaus', 'vulners', 'yara_query', 'macaddress_io'] diff --git a/misp_modules/modules/expansion/countrycode.py b/misp_modules/modules/expansion/countrycode.py index 9f22c40..fb38fe4 100755 --- a/misp_modules/modules/expansion/countrycode.py +++ b/misp_modules/modules/expansion/countrycode.py @@ -29,12 +29,12 @@ def handler(q=False): if q is False: return False request = json.loads(q) - domain = request["domain"] + domain = request["domain"] if "domain" in request else request["hostname"] # Get the extension ext = domain.split(".")[-1] - # Check if if's a common, non country one + # Check if it's a common, non country one if ext in common_tlds.keys(): val = common_tlds[ext] else: diff --git a/misp_modules/modules/expansion/dbl_spamhaus.py b/misp_modules/modules/expansion/dbl_spamhaus.py index 306ea21..f372961 100644 --- a/misp_modules/modules/expansion/dbl_spamhaus.py +++ b/misp_modules/modules/expansion/dbl_spamhaus.py @@ -49,7 +49,7 @@ def handler(q=False): query_result = resolver.query(query, 'A')[0] result = "{} - {}".format(requested_value, dbl_mapping[str(query_result)]) except Exception as e: - result = e + result = str(e) return {'results': [{'types': mispattributes.get('output'), 'values': result}]} def introspection(): diff --git a/misp_modules/modules/expansion/hashdd.py b/misp_modules/modules/expansion/hashdd.py index beeaf8e..2ab346b 100755 --- a/misp_modules/modules/expansion/hashdd.py +++ b/misp_modules/modules/expansion/hashdd.py @@ -2,8 +2,8 @@ import json import requests misperrors = {'error': 'Error'} -mispattributes = {'input': ['md5'], 'output': ['text']} -moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']} +mispattributes = {'input': ['md5', 'sha1', 'sha256'], 'output': ['text']} +moduleinfo = {'version': '0.2', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']} moduleconfig = [] hashddapi_url = 'https://api.hashdd.com/' @@ -11,11 +11,15 @@ hashddapi_url = 'https://api.hashdd.com/' def handler(q=False): if q is False: return False + v = None request = json.loads(q) - if not request.get('md5'): - misperrors['error'] = 'MD5 hash value is missing missing' + for input_type in mispattributes['input']: + if request.get(input_type): + v = request[input_type].upper() + break + if v is None: + misperrors['error'] = 'Hash value is missing.' return misperrors - v = request.get('md5').upper() r = requests.post(hashddapi_url, data={'hash':v}) if r.status_code == 200: state = json.loads(r.text) diff --git a/misp_modules/modules/expansion/onyphe.py b/misp_modules/modules/expansion/onyphe.py index c9bca0e..e9c496a 100644 --- a/misp_modules/modules/expansion/onyphe.py +++ b/misp_modules/modules/expansion/onyphe.py @@ -9,7 +9,7 @@ except ImportError: misperrors = {'error': 'Error'} -mispattributes = {'input': ['ip-src', 'ip-dst', 'hostname', 'domains'], 'output': ['hostname', 'domain', 'ip-src', 'ip-dst','url']} +mispattributes = {'input': ['ip-src', 'ip-dst', 'hostname', 'domain'], 'output': ['hostname', 'domain', 'ip-src', 'ip-dst','url']} # possible module-types: 'expansion', 'hover' or both moduleinfo = {'version': '1', 'author': 'Sebastien Larinier @sebdraven', 'description': 'Query on Onyphe', diff --git a/misp_modules/modules/expansion/rbl.py b/misp_modules/modules/expansion/rbl.py index 6626760..bcdcec3 100644 --- a/misp_modules/modules/expansion/rbl.py +++ b/misp_modules/modules/expansion/rbl.py @@ -89,19 +89,17 @@ def handler(q=False): return misperrors listed = [] info = [] + ipRev = '.'.join(ip.split('.')[::-1]) for rbl in rbls: - ipRev = '.'.join(ip.split('.')[::-1]) query = '{}.{}'.format(ipRev, rbl) try: txt = resolver.query(query,'TXT') listed.append(query) - info.append(str(txt[0])) + info.append([str(t) for t in txt]) except Exception: continue - result = {} - for l, i in zip(listed, info): - result[l] = i - return {'results': [{'types': mispattributes.get('output'), 'values': json.dumps(result)}]} + result = "\n".join(["{}: {}".format(l, " - ".join(i)) for l, i in zip(listed, info)]) + return {'results': [{'types': mispattributes.get('output'), 'values': result}]} def introspection(): return mispattributes diff --git a/misp_modules/modules/expansion/securitytrails.py b/misp_modules/modules/expansion/securitytrails.py index 325fa13..7df2c87 100644 --- a/misp_modules/modules/expansion/securitytrails.py +++ b/misp_modules/modules/expansion/securitytrails.py @@ -45,11 +45,6 @@ def handler(q=False): if not api: misperrors['error'] = 'Onyphe Error instance api' - - ip = "" - dns_name = "" - - ip = '' if request.get('ip-src'): ip = request['ip-src'] return handle_ip(api, ip, misperrors) diff --git a/misp_modules/modules/expansion/urlscan.py b/misp_modules/modules/expansion/urlscan.py index 31c9230..021db92 100644 --- a/misp_modules/modules/expansion/urlscan.py +++ b/misp_modules/modules/expansion/urlscan.py @@ -22,7 +22,7 @@ moduleinfo = { moduleconfig = ['apikey'] misperrors = {'error': 'Error'} mispattributes = { - 'input': ['hostname', 'domain', 'url', 'hash'], + 'input': ['hostname', 'domain', 'url'], 'output': ['hostname', 'domain', 'ip-src', 'ip-dst', 'url', 'text', 'link', 'hash'] } @@ -49,8 +49,6 @@ def handler(q=False): r['results'] += lookup_indicator(client, request['hostname']) if 'url' in request: r['results'] += lookup_indicator(client, request['url']) - if 'hash' in request: - r['results'] += lookup_indicator(client, request['hash']) # Return any errors generated from lookup to the UI and remove duplicates diff --git a/misp_modules/modules/expansion/yara_query.py b/misp_modules/modules/expansion/yara_query.py index 9b24c88..3b85bcb 100644 --- a/misp_modules/modules/expansion/yara_query.py +++ b/misp_modules/modules/expansion/yara_query.py @@ -11,11 +11,12 @@ moduleinfo = {'version': '1', 'author': 'Christian STUDER', 'module-type': ['expansion', 'hover'], 'require_standard_format': True} moduleconfig = [] -mispattributes = {'input': ['md5', 'sha1', 'sha256', 'filename|md5', 'filename|sha1', 'filename|sha256'], 'output': ['yara']} +mispattributes = {'input': ['md5', 'sha1', 'sha256', 'filename|md5', 'filename|sha1', 'filename|sha256', 'imphash'], 'output': ['yara']} def get_hash_condition(hashtype, hashvalue): - condition = 'hash.{}(0, filesize) == "{}"'.format(hashtype, hashvalue.lower()) - return condition, 'hash' + hashvalue = hashvalue.lower() + required_module, params = ('pe', '()') if hashtype == 'imphash' else ('hash', '(0, filesize)') + return '{}.{}{} == "{}"'.format(required_module, hashtype, params, hashvalue), required_module def handler(q=False): if q is False: @@ -31,7 +32,7 @@ def handler(q=False): _, value = value.split('|') condition, required_module = get_hash_condition(attribute_type, value) import_section = 'import "{}"'.format(required_module) - rule_start = 'import "hash" \r\nrule %s_%s {' % (attribute_type.upper(), re.sub(r'\W+', '_', uuid)) if uuid else 'import "hash"\r\nrule %s {' % attribute_type.upper() + rule_start = '%s\r\nrule %s_%s {' % (import_section, attribute_type.upper(), re.sub(r'\W+', '_', uuid)) if uuid else '%s\r\nrule %s {' % (import_section, attribute_type.upper()) condition = '\tcondition:\r\n\t\t{}'.format(condition) rule = '\r\n'.join([rule_start, condition, '}']) try: diff --git a/misp_modules/modules/import_mod/threatanalyzer_import.py b/misp_modules/modules/import_mod/threatanalyzer_import.py index 2e3a507..c5d8ba3 100755 --- a/misp_modules/modules/import_mod/threatanalyzer_import.py +++ b/misp_modules/modules/import_mod/threatanalyzer_import.py @@ -15,7 +15,7 @@ misperrors = {'error': 'Error'} userConfig = {} inputSource = ['file'] -moduleinfo = {'version': '0.9', 'author': 'Christophe Vandeplas', +moduleinfo = {'version': '0.10', 'author': 'Christophe Vandeplas', 'description': 'Import for ThreatAnalyzer archive.zip/analysis.json files', 'module-type': ['import']} @@ -118,8 +118,15 @@ def process_analysis_json(analysis_json): # this will always create a list, even with only one item if isinstance(process['connection_section']['connection'], dict): process['connection_section']['connection'] = [process['connection_section']['connection']] + # iterate over each entry for connection_section_connection in process['connection_section']['connection']: + # compensate for absurd behavior of the data format: if one entry = immediately the dict, if multiple entries = list containing dicts + # this will always create a list, even with only one item + for subsection in ['http_command', 'http_header']: + if isinstance(connection_section_connection[subsection], dict): + connection_section_connection[subsection] = [connection_section_connection[subsection]] + if 'name_to_ip' in connection_section_connection: # TA 6.1 data format connection_section_connection['@remote_ip'] = connection_section_connection['name_to_ip']['@result_addresses'] connection_section_connection['@remote_hostname'] = connection_section_connection['name_to_ip']['@request_name'] diff --git a/tests/yara_hash_module_test.yara b/tests/yara_hash_module_test.yara new file mode 100644 index 0000000..4674eef --- /dev/null +++ b/tests/yara_hash_module_test.yara @@ -0,0 +1,7 @@ +import "hash" +rule oui { + condition: + hash.md5(0, filesize) == "8764605c6f388c89096b534d33565802" and + hash.sha1(0, filesize) == "46aba99aa7158e4609aaa72b50990842fd22ae86" and + hash.sha256(0, filesize) == "ec5aedf5ecc6bdadd4120932170d1b10f6cfa175cfda22951dfd882928ab279b" +} diff --git a/tests/yara_pe_module_test.yara b/tests/yara_pe_module_test.yara new file mode 100644 index 0000000..4998b84 --- /dev/null +++ b/tests/yara_pe_module_test.yara @@ -0,0 +1,5 @@ +import "pe" +rule my_pe { + condition: + pe.imphash() == "eecc824da5b175f530705611127a6b41" +} diff --git a/tests/yara_test.py b/tests/yara_test.py new file mode 100644 index 0000000..ea88f03 --- /dev/null +++ b/tests/yara_test.py @@ -0,0 +1,22 @@ +import sys +try: + import yara +except (OSError, ImportError): + sys.exit("yara is missing, use 'pip3 install -I -r REQUIREMENTS' from the root of this repository to install it.") + +# Usage: python3 yara_test.py [yara files] +# with any yara file(s) in order to test if yara library is correctly installed. +# (it is also validating yara syntax) +# +# If no argument is given, this script takes the 2 yara test rules in the same directory +# in order to test if both yara modules we need work properly. + +files = sys.argv[1:] if len(sys.argv) > 1 else ['yara_hash_module_test.yara', 'yara_pe_module_test.yara'] + +for file_ in files: + try: + yara.compile(file_) + status = "Valid syntax" + except Exception as e: + status = e + print("{}: {}".format(file_, status))