Skip to content

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jul 27, 2021
2 parents 57d53df + cba7ef9 commit 480dc9f
Show file tree
Hide file tree
Showing 487 changed files with 19,909 additions and 3,198 deletions.
1 change: 0 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ steps:
- analyzers/analyzers-stable.json
- responders/responders.json
- responders/responders-stable.json
- analyzers/report-templates.zip
strip_components: 1
when:
event: [tag]
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ lib64
pyvenv.cfg
share

test-doc
analyzers/*/input
analyzers/*/output
responders/*/input
responders/*/output
analyzers/*/cortexutils
16 changes: 15 additions & 1 deletion analyzers/AbuseIPDB/AbuseIPDB.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,19 @@
"check_tlp": true,
"max_tlp": 2,
"auto_extract": false
}
},
"registration_required": true,
"subscription_required": true,
"free_subscription": true,
"service_homepage": "https://www.abuseipdb.com/",
"service_logo": {
"path": "assets/abuseipdb.png",
"caption": "abuseipdb logo"
},
"screenshots": [
{
"path": "assets/long_report.png",
"caption": "AbuseIPDB: Long report template"
}
]
}
10 changes: 10 additions & 0 deletions analyzers/AbuseIPDB/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### AbuseIPDB
[AbuseIPDB](https://www.abuseipdb.com/) is a project dedicated to helping combat the spread of hackers, spammers, and abusive activity on the internet.

The analyzer comes in only one flavor.

#### Requirements
You need a valid AbuseIPDB API integration subscription to use the analyzer:

- Provide your API key as a value for the `key` parameter.
- Set the `days` parameter to limit temporal range in search
Binary file added analyzers/AbuseIPDB/assets/abuseipdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added analyzers/AbuseIPDB/assets/long_report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 30 additions & 10 deletions analyzers/Abuse_Finder/Abuse_Finder.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
{
"name": "Abuse_Finder",
"version": "3.0",
"author": "CERT-BDF",
"url": "https://github.com/TheHive-Project/Cortex-Analyzers",
"license": "AGPL-V3",
"description": "Find abuse contacts associated with domain names, URLs, IPs and email addresses.",
"dataTypeList": ["ip", "domain", "fqdn", "url", "mail"],
"baseConfig": "Abuse_Finder",
"command": "Abuse_Finder/abusefinder.py"
}
"name": "Abuse_Finder",
"version": "3.0",
"author": "CERT-BDF",
"url": "https://github.com/TheHive-Project/Cortex-Analyzers",
"license": "AGPL-V3",
"description": "Find abuse contacts associated with domain names, URLs, IPs and email addresses.",
"dataTypeList": [
"ip",
"domain",
"fqdn",
"url",
"mail"
],
"baseConfig": "Abuse_Finder",
"command": "Abuse_Finder/abusefinder.py",
"registration_required": false,
"subscription_required": false,
"free_subscription": false,
"service_homepage": "https://github.com/certsocietegenerale/abuse_finder",
"service_logo": {
"path": "",
"caption": ""
},
"screenshots": [
{
"path": "assets/abuse_finder_longreport.png",
"caption": "Abuse_Finder: Long report template"
}
]
}
9 changes: 9 additions & 0 deletions analyzers/Abuse_Finder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Abuse_Finder
Use CERT-SG's [Abuse Finder](https://github.com/certsocietegenerale/abuse_finder)
to find abuse contacts associated with domain names, URLs, IPs and email addresses.

The analyzer comes in only one flavor.

No configuration is required. It can be used out of the box.

This Analyzer can only be run as a docker container or as process with Python <= 3.6.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions analyzers/AnyRun/AnyRun_Sandbox_Analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"multi": false,
"required": false
},
{
"name": "privacy_type",
"description": "Define the privacy setting (Allowed values: public, bylink, owner)",
"type": "string",
"multi": false,
"required": true,
"defaultValue": "bylink"
},
{
"name": "verify_ssl",
"description": "Verify SSL certificate",
Expand All @@ -24,5 +32,24 @@
"required": true,
"defaultValue": true
}
],
"registration_required": true,
"subscription_required": true,
"free_subscription": false,
"service_homepage": "https://any.run/",
"service_logo": {
"path": "assets/anyrun.png",
"caption": "AnyRun logo"
},
"screenshots": [
{
"path": "assets/short_report.png",
"caption": "AnyRun: Short report template"
},

{
"path": "assets/long_report.png",
"caption": "AnyRun: Long report template"
}
]
}
15 changes: 15 additions & 0 deletions analyzers/AnyRun/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### AnyRun
[ANY.RUN](https://any.run/) is a malware sandbox service in the cloud. By using this analyzer, an analyst can submit a suspicious file or URL to the service for analysis and get a report. The report can contain various information such as:

- Interactive access
- Research threats by filter in public submissions
- File and URL dynamic analysis
- Mitre ATT&CK mapping
- Detailed malware reports

#### Requirements
You need a valid AnyRun API integration subscription to use the analyzer. Free plan does not provide API access.

- Provide your API token as a value for the `token` parameter.
- Define the privacy setting in `privacy_type` parameter.
- Set `verify_ssl` parameter as false if you connection requires it
7 changes: 5 additions & 2 deletions analyzers/AnyRun/anyrun_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def __init__(self):
Analyzer.__init__(self)
self.url = "https://api.any.run/v1"
self.token = self.get_param("config.token", None, "Service token is missing")
self.privacy_type = self.get_param("config.privacy_type", None, "Privacy type is missing")
self.verify_ssl = self.get_param("config.verify_ssl", True, None)
if not self.verify_ssl:
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
Expand Down Expand Up @@ -49,9 +50,11 @@ def run(self):
while status_code in (None, 429) and tries <= 15:
with open(filepath, "rb") as sample:
files = {"file": (filename, sample)}
data = {"opt_privacy_type": self.privacy_type}
response = requests.post(
"{0}/analysis".format(self.url),
files=files,
data=data,
headers=headers,
verify=self.verify_ssl,
)
Expand All @@ -68,7 +71,7 @@ def run(self):
self.error(response.json()["message"])
elif self.data_type == "url":
url = self.get_param("data", None, "Url is missing")
data = {"obj_type": "url", "obj_url": url}
data = {"obj_type": "url", "obj_url": url, "opt_privacy_type": self.privacy_type}
while status_code in (None, 429) and tries <= 15:
response = requests.post(
"{0}/analysis".format(self.url),
Expand Down Expand Up @@ -127,4 +130,4 @@ def run(self):


if __name__ == "__main__":
AnyRunAnalyzer().run()
AnyRunAnalyzer().run()
Binary file added analyzers/AnyRun/assets/AnyRun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added analyzers/AnyRun/assets/long_report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added analyzers/AnyRun/assets/short_report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions analyzers/CIRCLHashlookup/CIRCLHashlookup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "CIRCLHashlookup",
"author": "Mikael Keri",
"license": "AGPL-V3",
"url": "https://github.com/TheHive-Project/Cortex-Analyzers",
"version": "1.0",
"description": "CIRCL Hashlookup is a public service to lookup hash values against known database of good files",
"dataTypeList": ["hash"],
"baseConfig": "CIRCLHashlookup",
"config": {
"check_tlp": true,
"max_tlp": 2,
"check_pap": true,
"max_pap": 2
},
"command": "CIRCLHashlookup/circlhashlookup_analyzer.py",
"registration_required": false,
"subscription_required": false,
"free_subscription": true,
"service_homepage": "https://hashlookup.circl.lu/",
"service_logo": {"path":"assets/circlhashlookup_logo.png", "caption": "logo"},
"screenshots": [
{
"path": "assets/circlhashlookup_long_report.png",
"caption:":"CIRCL Hashlookup analyzer full report"
},
{
"path": "assets/circlhashlookup_verdict.png",
"caption:":"CIRCL Hashlookup analyzer verdict"
}]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions analyzers/CIRCLHashlookup/circlhashlookup_analyzer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env python3
# encoding: utf-8

import requests
from cortexutils.analyzer import Analyzer

class CIRCLHashlookupAnalyzer(Analyzer):
def __init__(self):
Analyzer.__init__(self)
self.url = 'https://hashlookup.circl.lu'

def summary(self, raw):
taxonomies = []
namespace = "CIRCLHashlookup"

if raw.get('CRC32'):
verdict = "safe"
result = "known"
else:
verdict = "info"
result = "unkown"

taxonomies.append(self.build_taxonomy(
verdict,
namespace,
'Result',
result,
))

return {"taxonomies": taxonomies}

def run(self):
if self.data_type == 'hash':
data = self.get_param('data', None, 'Data is missing')

headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
session = requests.Session()
if len(data) == 32:
s = session.get(self.url + '/lookup/md5/' + data, headers=headers)
elif len(data) == 40:
s = session.get(self.url + '/lookup/sha1/' + data, headers=headers)
else:
self.error('Unsupported hash type')

s.close()
response = s.json()
try:
self.report(response)
except Exception as e:
self.error('Invalid data type')
else:
self.error('Invalid data type')

if __name__ == '__main__':
CIRCLHashlookupAnalyzer().run()
1 change: 1 addition & 0 deletions analyzers/CIRCLHashlookup/requirments.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cortexutils
72 changes: 47 additions & 25 deletions analyzers/CIRCLPassiveDNS/CIRCLPassiveDNS.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,49 @@
{
"name": "CIRCLPassiveDNS",
"author": "Nils Kuhnert, CERT-Bund",
"license": "AGPL-V3",
"url": "https://github.com/BSI-CERT-Bund/cortex-analyzers",
"version": "2.0",
"description": "Check CIRCL's Passive DNS for a given domain or URL.",
"dataTypeList": ["domain", "url", "ip"],
"baseConfig": "CIRCL",
"command": "CIRCLPassiveDNS/circl_passivedns.py",
"configurationItems": [
{
"name": "user",
"description": "Username",
"type": "string",
"multi": false,
"required": true
"name": "CIRCLPassiveDNS",
"author": "Nils Kuhnert, CERT-Bund",
"license": "AGPL-V3",
"url": "https://github.com/BSI-CERT-Bund/cortex-analyzers",
"version": "2.0",
"description": "Check CIRCL's Passive DNS for a given domain or URL.",
"dataTypeList": [
"domain",
"url",
"ip"
],
"baseConfig": "CIRCL",
"command": "CIRCLPassiveDNS/circl_passivedns.py",
"configurationItems": [
{
"name": "user",
"description": "Username",
"type": "string",
"multi": false,
"required": true
},
{
"name": "password",
"description": "Password",
"type": "string",
"multi": false,
"required": true
}
],
"registration_required": true,
"subscription_required": true,
"free_subscription": true,
"service_homepage": "https://www.circl.lu/services/passive-dns/",
"service_logo": {
"path": "assets/passivedns.png",
"caption": "logo"
},
{
"name": "password",
"description": "Password",
"type": "string",
"multi": false,
"required": true
}
]
}
"screenshots": [
{
"path": "assets/sc-short-circlpassivedns.png",
"caption": "CIRCLPassiveDNS: short report"
},
{
"path": "assets/sc-long-circlpassivedns.png",
"caption": "CIRCLPassiveDNS: long report"
}
]
}
19 changes: 19 additions & 0 deletions analyzers/CIRCLPassiveDNS/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### CIRCLPassiveDNS

Check [CIRCL's Passive DNS](https://www.circl.lu/services/passive-dns/) for a
given domain.

This analyzer comes in only one flavor.

#### Requirements

Access to CIRCL Passive DNS is only allowed to trusted partners in Luxembourg
and abroad. [Contact CIRCL](https://www.circl.lu/contact/) if you would like
access. Include your affiliation and the foreseen use of the Passive DNS
data.

If the CIRCL positively answers your access request, you'll obtain a username
and password which are needed to make the analyzer work.

supply your username as the value for the `user` parameter and your password
as the value for the `password` parameter.
Binary file added analyzers/CIRCLPassiveDNS/assets/passivedns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 480dc9f

Please sign in to comment.