chackco / tm-misp

[Due to Trend Micro release official MISP integration, this project will decide to sustain mode] TM-MISP project was created to joint Trend Micro CTD with MISP platform which will serve as bridge to synchronize IOC object from MISP to Trend Micro Apex Central (i.e. SHA-1 hash, URL, IP or Domain) and Deep Security/Cloud One Workload Security (i.e. SHA256). It can also synchronize virtual analyzer suspicious object back to MISP platform via CSV feed (SHA-1, SHA256, URL, IP and Domain)
GNU Lesser General Public License v2.1
4 stars 1 forks source link

Connection errors #1

Open Deadshot-MISP opened 2 years ago

Deadshot-MISP commented 2 years ago

Hello,

I am trying to connect MISP to our deep discovery director, I am at the first part of your guide, I edited the key.py file and ran python3 last.py -l 1h, and I get the below errors.

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen chunked=chunked, File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn conn.connect() File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 348, in connect conn = self._new_conn() File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 172, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f3aec011ef0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='misp.companysite.com', port=443): Max retries exceeded with url: /servers/getPyMISPVersion.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3aec011ef0>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/pymisp-2.4.144-py3.6.egg/pymisp/api.py", line 160, in init response = self.recommended_pymisp_version File "/usr/local/lib/python3.6/site-packages/pymisp-2.4.144-py3.6.egg/pymisp/api.py", line 216, in recommended_pymisp_version response = self._prepare_request('GET', 'servers/getPyMISPVersion.json') File "/usr/local/lib/python3.6/site-packages/pymisp-2.4.144-py3.6.egg/pymisp/api.py", line 3490, in _prepare_request return self.__session.send(prepped, timeout=self.timeout, settings) File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, kwargs) File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='misp.companysite.com', port=443): Max retries exceeded with url: /servers/getPyMISPVersion.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3aec011ef0>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "last.py", line 35, in misp = ExpandedPyMISP(misp_url, misp_key, misp_verifycert, cert=misp_client_cert) File "/usr/local/lib/python3.6/site-packages/pymisp-2.4.144-py3.6.egg/pymisp/api.py", line 181, in init raise PyMISPError(f'Unable to connect to MISP ({self.root_url}). Please make sure the API key and the URL are correct (http/https is required): {e}') pymisp.exceptions.PyMISPError: Unable to connect to MISP (https://misp.companysite.com/). Please make sure the API key and the URL are correct (http/https is required): HTTPSConnectionPool(host='misp.companysite.com', port=443):

chackco commented 2 years ago

from your error , it seem tm-misp cannot connect to target , please check, for example you need connect to ddd you need to allow connection port 443 from your misp host to ddd

Deadshot-MISP commented 2 years ago

I am not at that part, the connection I have only edited the keys.py file with the misp url and misp key, and then ran the last.py test. It is failing to connect to itself(the misp URL)