TheHive-Project / TheHive-Project/Cortex
MISP analyzer does not work, Unverified HTTPS request is being made
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
Request Type
Bug
Work Environment
| Question | Answer |
|---|---|
| OS version (server) | Ubuntu |
| OS version (client) | Ubuntu |
| Cortex version / git hash | 3.0.1-1 |
| Package Type | Binary |
| Browser type & version | Firefox 74.0 |
Problem Description
MISP instance state:self-signed certificate, can invoke Cortex analyzers;
But in Cortex, after configuration, MISP analyzer does not work, status: Failure.
Steps to Reproduce
- Analyzers Config:
{"config":{"name":["misp"],"url":["https://192.168.233.233:8443/"],"key":["Lk5VTaB*****wiRiCf7qe7chsM7SzTE8*****BH4"],"cert_check":false,"cert_path":[null]}}
- Analyzers ->
Enable->save - New Analysis -> status: Failure
Complementary information
InsecureRequestWarning)
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:860: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Traceback (most recent call last):
File "/opt/Cortex-Analyzers/analyzers/MISP/misp.py", line 80, in <module>
MISPAnalyzer().run()
File "/opt/Cortex-Analyzers/analyzers/MISP/misp.py", line 68, in run
response = self.misp.search_ip(self.get_data())
File "/opt/Cortex-Analyzers/analyzers/MISP/mispclient.py", line 276, in search_ip
return self.__search(type_attribute=self.__mispiptypes(), value=searchterm)
File "/opt/Cortex-Analyzers/analyzers/MISP/mispclient.py", line 235, in __search
'result': self.__clean(misp_response)})
File "/opt/Cortex-Analyzers/analyzers/MISP/mispclient.py", line 208, in __clean
for event in misp_response.get('response', []):
AttributeError: 'list' object has no attribute 'get'
How can i solve this problem?
thanks.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with analyzers/MISP/misp.py and analyzers/MISP/mispclient.py, following the run, search_ip, __search, and __clean calls shown in the traceback. Reproduce the failure with the provided analyzer configuration and inspect the response passed to __clean; done means the MISP analysis completes successfully instead of raising the reported AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100