peass-ng / PEASS-ng

PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)
https://book.hacktricks.xyz
Other
15.73k stars 3.05k forks source link

Build not working in parrot OS #333

Closed I7Z3R0 closed 1 year ago

I7Z3R0 commented 1 year ago

Hello,

I tried to build the linpeas on my parrot and i am getting this error. It was working before without any issues but now i am facing this.

➜ linPEAS git:(master) ✗ python3 -m builder.linpeas_builder [+] Building temporary linpeas_base.sh... [+] Building variables... [+] Building finds... [+] Building storages... [+] Building finds... [+] Checking duplicates... [+] Building autocheck sections... [+] Building regexes searches... [+] Building linux exploit suggesters... Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 411, in connect self.sock = ssl_wrapsocket( File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.9/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.9/ssl.py", line 1040, in _create self.do_handshake() File "/usr/lib/python3.9/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL] unknown error (_ssl.c:1123)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/user/.local/lib/python3.9/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh (Caused by SSLError(SSLError(1, '[SSL] unknown error (_ssl.c:1123)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/user//Desktop//thm/boxes/pratice/wonderland/www/PEASS-ng/linPEAS/builder/linpeas_builder.py", line 33, in main() File "/home/user//Desktop//thm/boxes/pratice/wonderland/www/PEASS-ng/linPEAS/builder/linpeas_builder.py", line 20, in main lbuilder.build() File "/home/user//Desktop//thm/boxes/pratice/wonderland/www/PEASS-ng/linPEAS/builder/src/linpeasBuilder.py", line 95, in build les_b64, les2_b64 = self.__get_linux_exploit_suggesters() File "/home/user//Desktop//thm/boxes/pratice/wonderland/www/PEASS-ng/linPEAS/builder/src/linpeasBuilder.py", line 338, in __get_linux_exploit_suggesters r1 = requests.get("https://raw.githubusercontent.com/mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh") File "/home/user/.local/lib/python3.9/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, kwargs) File "/home/user/.local/lib/python3.9/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "/home/user/.local/lib/python3.9/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "/home/user/.local/lib/python3.9/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, kwargs) File "/home/user/.local/lib/python3.9/site-packages/requests/adapters.py", line 563, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh (Caused by SSLError(SSLError(1, '[SSL] unknown error (_ssl.c:1123)')))

nobodynate commented 1 year ago

@I7Z3R0 and I chatted about this issue a bit and it seems to be an issue with DNS. For some reason, raw.githubusercontent.com is not working during build OR via a browser. This issue should probably be closed as it's a network issue, not a code issue.

I7Z3R0 commented 1 year ago

It seems like an issue with the DNS.

I7Z3R0 commented 1 year ago

Apologies for the inconvenience caused from my side... Thank you @nobodynate for your guidance i appreciate the time you took to dig the issue..

g33xter commented 1 year ago

Is there any workaround for this error?

nobodynate commented 1 year ago

@g33xter from what I can tell the error is caused by the failure to resolve raw.githubusercontent.com to an appropriate IP address. You could manually resolve the hostname and add a static mapping to /etc/hosts as a workaround. Unfortunately, this is untested but should work in this case.