pull/266/head
Sascha Rommelfangen 2018-11-26 15:56:33 +01:00
commit d5eb34270a
66 changed files with 1085 additions and 108 deletions

View File

@ -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.

File diff suppressed because it is too large Load Diff

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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/"]
}

View File

@ -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/"]
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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"
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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"
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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)."
}

View File

@ -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."
}

View File

@ -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."
}

View File

@ -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"]
}

View File

@ -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."
}

View File

@ -24,7 +24,7 @@ def generate_doc(root_path):
markdown.append('\n<img src={} height=60>\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))

BIN
doc/logos/bitcoin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
doc/logos/cve.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
doc/logos/intelmq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
doc/logos/macaddress_io.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
doc/logos/maxmind.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

BIN
doc/logos/urlscan.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
doc/logos/vulners.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -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']

View File

@ -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:

View File

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

View File

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

View File

@ -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',

View File

@ -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

View File

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

View File

@ -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

View File

@ -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:

View File

@ -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']

View File

@ -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"
}

View File

@ -0,0 +1,5 @@
import "pe"
rule my_pe {
condition:
pe.imphash() == "eecc824da5b175f530705611127a6b41"
}

22
tests/yara_test.py Normal file
View File

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