Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

ValueError: p must be exactly 1024, 2048, 3072, or 4096 bits long #813

Open
spiral009 opened this issue Oct 4, 2023 · 0 comments
Open

Comments

@spiral009
Copy link

root@localhost:~# crackmapexec ssh 192.168.0.150 -u admin -p rockyou.txt                ERROR:paramiko.transport:Unknown exception: p must be exactly 1024, 2048, 3072, or 4096 bits long                                                                               ERROR:paramiko.transport:Traceback (most recent call last):                             ERROR:paramiko.transport:  File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 2130, in run                                                                       ERROR:paramiko.transport:    self.kex_engine.parse_next(ptype, m)                       ERROR:paramiko.transport:  File "/usr/lib/python3/dist-packages/paramiko/kex_group1.py", line 75, in parse_next                                                                 ERROR:paramiko.transport:    return self._parse_kexdh_reply(m)                          ERROR:paramiko.transport:           ^^^^^^^^^^^^^^^^^^^^^^^^^^                          ERROR:paramiko.transport:  File "/usr/lib/python3/dist-packages/paramiko/kex_group1.py", line 120, in _parse_kexdh_reply                                                        ERROR:paramiko.transport:    self.transport._verify_key(host_key, sig)                  ERROR:paramiko.transport:  File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 1941, in _verify_key                                                               ERROR:paramiko.transport:    if not key.verify_ssh_sig(self.H, Message(sig)):           ERROR:paramiko.transport:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            ERROR:paramiko.transport:  File "/usr/lib/python3/dist-packages/paramiko/dsskey.py", line 154, in verify_ssh_sig                                                                ERROR:paramiko.transport:    ).public_key(backend=default_backend())                    ERROR:paramiko.transport:      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                    ERROR:paramiko.transport:  File "/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/asymmetric/dsa.py", line 199, in public_key                                      ERROR:paramiko.transport:    return ossl.load_dsa_public_numbers(self)                  ERROR:paramiko.transport:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                  ERROR:paramiko.transport:  File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/backend.py", line 864, in load_dsa_public_numbers                          ERROR:paramiko.transport:    dsa._check_dsa_parameters(numbers.parameter_numbers)       ERROR:paramiko.transport:  File "/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/asymmetric/dsa.py", line 271, in _check_dsa_parameters                           ERROR:paramiko.transport:    raise ValueError(                                          ERROR:paramiko.transport:ValueError: p must be exactly 1024, 2048, 3072, or 4096 bits long                                                                                      ERROR:paramiko.transport:                                                               Traceback (most recent call last):                                                        File "/usr/bin/crackmapexec", line 8, in <module>                                         sys.exit(main())                                                                                 ^^^^^^                                                                       File "/usr/lib/python3/dist-packages/cme/crackmapexec.py", line 257, in main              asyncio.run(                                                                          File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run                           return runner.run(main)                                                                        ^^^^^^^^^^^^^^^^                                                               File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run                           return self._loop.run_until_complete(task)                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                            File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete        return future.result()                                                                         ^^^^^^^^^^^^^^^                                                                File "/usr/lib/python3/dist-packages/cme/crackmapexec.py", line 105, in start_threadpool                                                                                          await asyncio.gather(*jobs)                                                           File "/usr/lib/python3/dist-packages/cme/crackmapexec.py", line 69, in run_protocol       await asyncio.wait_for(                                                               File "/usr/lib/python3.11/asyncio/tasks.py", line 442, in wait_for                        return await fut
           ^^^^^^^^^                                                                      File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run                  result = self.fn(*self.args, **self.kwargs)                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                           File "/usr/lib/python3/dist-packages/cme/connection.py", line 65, in __init__             self.proto_flow()                                                                     File "/usr/lib/python3/dist-packages/cme/connection.py", line 96, in proto_flow           if self.create_conn_obj():                                                                 ^^^^^^^^^^^^^^^^^^^^^^                                                             File "/usr/lib/python3/dist-packages/cme/protocols/ssh.py", line 47, in create_conn_obj                                                                                           self.conn.connect(self.host, port=self.args.port)                                     File "/usr/lib/python3/dist-packages/paramiko/client.py", line 421, in connect            t.start_client(timeout=timeout)                                                       File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 699, in start_client    raise e                                                                               File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 2130, in run            self.kex_engine.parse_next(ptype, m)                                                  File "/usr/lib/python3/dist-packages/paramiko/kex_group1.py", line 75, in parse_next      return self._parse_kexdh_reply(m)                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                     File "/usr/lib/python3/dist-packages/paramiko/kex_group1.py", line 120, in _parse_kexdh_reply                                                                                     self.transport._verify_key(host_key, sig)                                             File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 1941, in _verify_key    if not key.verify_ssh_sig(self.H, Message(sig)):                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                       File "/usr/lib/python3/dist-packages/paramiko/dsskey.py", line 154, in verify_ssh_sig     ).public_key(backend=default_backend())                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                               File "/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/asymmetric/dsa.py", line 199, in public_key                                                                   return ossl.load_dsa_public_numbers(self)                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                             File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/backend.py", line 864, in load_dsa_public_numbers                                                       dsa._check_dsa_parameters(numbers.parameter_numbers)                                  File "/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/asymmetric/dsa.py", line 271, in _check_dsa_parameters                                                        raise ValueError(                                                                   ValueError: p must be exactly 1024, 2048, 3072, or 4096 bits long                                                                                                               root@localhost:~#

That ssh wide compatibility is there

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant