I have followed the guide to set up the taxii server and when i try to push the test file it shows HTTP Error: status code 500 error
I am using the default settings and have added misp url, key and also using the proper environment variables
opentaxii-run-dev shows
2021-01-13T12:33:03.751774Z [main] info: Posting STIX...
2021-01-13T12:33:03.775017Z [main] info: Building Event...
2021-01-13T12:33:03.775142Z [main] info: Using title STIX Import
2021-01-13T12:33:03.786428Z [main] info: STIX loaded succesfully.
2021-01-13T12:33:03.786544Z [main] info: Extracted ['198.51.100.2', '198.51.100.17', '203.0.113.19']
2021-01-13T12:33:03.786648Z [main] info: Checking for existence of 198.51.100.2
2021-01-13T12:33:03.918963Z [py.warnings] warning: /usr/lib/python3/dist-packages/urllib3/connectionpool.py:999: InsecureRequestWarning: Unverified HTTPS request is being made to host 'socshare.tvm.cdac.in'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
warnings.warn(
2021-01-13T12:34:45.482726Z [werkzeug] info: 127.0.0.1 - - [13/Jan/2021 12:34:45] "POST /services/inbox HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 2464, in call
return self.wsgi_app(environ, start_response)
File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/misp/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/misp/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/middleware.py", line 88, in wrapper
return _process_with_service(service)
File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/middleware.py", line 174, in _process_with_service
response_message = service.process(request.headers, taxii_message)
File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/taxii/services/abstract.py", line 82, in process
response_message = handler.handle_message(self, message)
File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/taxii/services/handlers/inbox_message_handlers.py", line 123, in handle_message
return InboxMessage11Handler.handle_message(service, request)
File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/taxii/services/handlers/inbox_message_handlers.py", line 59, in handle_message
service.server.persistence.create_content(
File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/persistence/manager.py", line 199, in create_content
CONTENT_BLOCK_CREATED.send(
File "/usr/lib/python3/dist-packages/blinker/base.py", line 266, in send
return [(receiver, receiver(sender, kwargs))
File "/usr/lib/python3/dist-packages/blinker/base.py", line 266, in
return [(receiver, receiver(sender, kwargs))
File "/var/www/MISP/MISP-Taxii-Server/misp_taxii_hooks/hooks.py", line 69, in post_stix
if search["response"]["Attribute"] != []:
KeyError: 'response'
I have followed the guide to set up the taxii server and when i try to push the test file it shows HTTP Error: status code 500 error I am using the default settings and have added misp url, key and also using the proper environment variables
opentaxii-run-dev shows 2021-01-13T12:33:03.751774Z [main] info: Posting STIX... 2021-01-13T12:33:03.775017Z [main] info: Building Event... 2021-01-13T12:33:03.775142Z [main] info: Using title STIX Import 2021-01-13T12:33:03.786428Z [main] info: STIX loaded succesfully. 2021-01-13T12:33:03.786544Z [main] info: Extracted ['198.51.100.2', '198.51.100.17', '203.0.113.19'] 2021-01-13T12:33:03.786648Z [main] info: Checking for existence of 198.51.100.2 2021-01-13T12:33:03.918963Z [py.warnings] warning: /usr/lib/python3/dist-packages/urllib3/connectionpool.py:999: InsecureRequestWarning: Unverified HTTPS request is being made to host 'socshare.tvm.cdac.in'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings warnings.warn(
2021-01-13T12:34:45.482726Z [werkzeug] info: 127.0.0.1 - - [13/Jan/2021 12:34:45] "POST /services/inbox HTTP/1.1" 500 - Traceback (most recent call last): File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 2464, in call return self.wsgi_app(environ, start_response) File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app response = self.handle_exception(e) File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception reraise(exc_type, exc_value, tb) File "/home/misp/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise raise value File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/misp/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise raise value File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/home/misp/.local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functionsrule.endpoint File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/middleware.py", line 88, in wrapper return _process_with_service(service) File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/middleware.py", line 174, in _process_with_service response_message = service.process(request.headers, taxii_message) File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/taxii/services/abstract.py", line 82, in process response_message = handler.handle_message(self, message) File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/taxii/services/handlers/inbox_message_handlers.py", line 123, in handle_message return InboxMessage11Handler.handle_message(service, request) File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/taxii/services/handlers/inbox_message_handlers.py", line 59, in handle_message service.server.persistence.create_content( File "/home/misp/.local/lib/python3.8/site-packages/opentaxii/persistence/manager.py", line 199, in create_content CONTENT_BLOCK_CREATED.send( File "/usr/lib/python3/dist-packages/blinker/base.py", line 266, in send return [(receiver, receiver(sender, kwargs)) File "/usr/lib/python3/dist-packages/blinker/base.py", line 266, in
return [(receiver, receiver(sender, kwargs))
File "/var/www/MISP/MISP-Taxii-Server/misp_taxii_hooks/hooks.py", line 69, in post_stix
if search["response"]["Attribute"] != []:
KeyError: 'response'