Skip to content

Commit

Permalink
Fixes #286: Added name param, fixed ssl verification if using empty p…
Browse files Browse the repository at this point in the history
…ath.
  • Loading branch information
3c7 committed Jun 11, 2018
1 parent 8f12343 commit 9880c86
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 31 deletions.
82 changes: 52 additions & 30 deletions analyzers/MISP/MISP.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,60 @@
"url": "https://github.com/BSI-CERT-Bund/cortex-analyzers",
"version": "2.0",
"description": "Query multiple MISP instances for events containing an observable.",
"dataTypeList": ["domain", "ip", "url", "fqdn", "uri_path","user-agent", "hash", "email", "mail", "mail_subject" , "registry", "regexp", "other", "filename"],
"dataTypeList": [
"domain",
"ip",
"url",
"fqdn",
"uri_path",
"user-agent",
"hash",
"email",
"mail",
"mail_subject",
"registry",
"regexp",
"other",
"filename"
],
"baseConfig": "MISP",
"command": "MISP/misp.py",
"configurationItems": [
{
"name": "url",
"description": "URL of MISP servers",
"type": "string",
"multi": true,
"required": true
},
{
"name": "key",
"description": "API key for each server",
"type": "string",
"multi": true,
"required": true
},
{
"name": "cert_check",
"description": "Verify server certificate",
"type": "boolean",
"multi": false,
"required": true,
"defaultValue": true
},
{
"name": "cert_path",
"description": "Path to the CA on the system used to check server certificate",
"type": "string",
"multi": true,
"required": false
}
{
"name": "name",
"description": "Name of MISP servers",
"multi": true,
"required": false,
"type": "string"
},
{
"name": "url",
"description": "URL of MISP servers",
"type": "string",
"multi": true,
"required": true
},
{
"name": "key",
"description": "API key for each server",
"type": "string",
"multi": true,
"required": true
},
{
"name": "cert_check",
"description": "Verify server certificate",
"type": "boolean",
"multi": false,
"required": true,
"defaultValue": true
},
{
"name": "cert_path",
"description": "Path to the CA on the system used to check server certificate",
"type": "string",
"multi": true,
"required": false
}
]
}
6 changes: 5 additions & 1 deletion analyzers/MISP/misp.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ def __init__(self):
# Fixes #94. Instead of None, the string Unnamed should be passed to MISPClient constructor
name = self.get_param('config.name', 'Unnamed')
if self.get_param('config.cert_check', True):
ssl = self.get_param('config.cert_path', True)
ssl_path = self.get_param('config.cert_path', None)
if not ssl_path or ssl_path == '':
ssl = True
else:
ssl = ssl_path
else:
ssl = False
try:
Expand Down

0 comments on commit 9880c86

Please sign in to comment.