SpiderLabs / ikeforce

235 stars 73 forks source link

Installation problems #7

Closed pepal00 closed 7 years ago

pepal00 commented 7 years ago

Hi, I'm trying to use ikeforce to enumerate groupnames and get valid PSKs for some Cisco devices. I installed pyip, pycrypto and pyopenssl When I try to run the program it says "Missing 'udp' library: install it with 'pip install pyip' then run again" I realised that I got a Segmentation fault error when installing pyopenssl. After some research it seems that package python-openssl (already installed in my system) was causing the problem. I uninstall it and installed pyopenssl again, ikeforce is still not working, but the error now is a traceback from ikeclient.py "OpenSSL not installed" I tried re-installing python-openssl and uninstalllling pyopenssl, but I get again the error "Missing 'udp' library: try installing pyip"; same if I re-install pyopenssl, (this time it installs without any problem)

Is there anything else that needs to be installed/removed? I'm running up-to-date 4.9.0-kali4-amd64

Any help is really appreciated, Cheers,

f0cker commented 7 years ago

sounds like multiple python version problems. you could setup a virtualenv and install/run from there, or check you are using the correct pip to install the pyip and openssl libs (the same as the version of python you are running ikeforce.py with).

pepal00 commented 7 years ago

Hello,

Thanks for the reply! I checked this before, pip in my system installs packages for python2.7 and pyip, pyopenssl and python-openssl are installed for python2.7

I tried creating a virtualenv, but have the same problem.

The libs installed in the virtualenv ikeforce-ve

**(ikeforce-ve)** user$ ls ikeforce-ve/lib/**python2.7**/site-packages/
asn1crypto/                   icmp.py                       OpenSSL/                      setuptools-36.2.7.dist-info/
asn1crypto-0.22.0.dist-info/  icmp.pyc                      ping.py                       six-1.10.0.dist-info/
cffi/                         idna/                         ping.pyc                      six.py
cffi-1.10.0.dist-info/        idna-2.6.dist-info/           pip/                          six.pyc
_cffi_backend.so              inetutils.py                  pip-9.0.1.dist-info/          traceroute.py
Crypto/                       inetutils.pyc                 pkg_resources/                traceroute.pyc
cryptography/                 ipaddress-1.0.18.dist-info/   pycparser/                    **udp.py**
cryptography-2.0.3.dist-info/ ipaddress.py                  pycparser-2.18.dist-info/     **udp.pyc**
easy_install.py               ipaddress.pyc                 pycrypto-2.6.1.dist-info/     wheel/
easy_install.pyc              ip.py                         pyip-0.7.dist-info/           wheel-0.29.0.dist-info/
enum/                         ip.pyc                        pyOpenSSL-17.2.0.dist-info/   
enum34-1.1.6.dist-info/       .libs_cffi_backend/           setuptools/ 

(ikeforce-ve) user $ sudo python ikeforce.py x.x.x.x -e -w wordlists/groupnames.dic -k PSK -t 7 2 1 2 Missing 'udp' library: install it with 'pip install pyip' then run again. Exiting...

Any other suggestions?

Cheers,

f0cker commented 7 years ago

can you import the libs manually in a python shell? (import udp, OpenSSL)

pepal00 commented 7 years ago

I can import them manually

(ikeforce-ve) user$ python
Python 2.7.13 (default, Jan 19 2017, 14:48:08) 
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import udp
>>> import OpenSSL

I've added the specific location where udp.py, udp.pyc are to the sys.path variable in ikeclient.py

import socket,OpenSSL,sys,struct
sys.path[0:0] = ["ikeforce-ve/lib/python2.7/site-packages/"]

Still not sure why is not picking it up by itself, but is working now inside the virtualenv. Thanks for the help!

f0cker commented 7 years ago

no worries

felmoltor commented 5 years ago

Same problem here. I had to use the manual solution proposed by @pepal00 in her last comment and it worked fine.

pepal00 commented 5 years ago

*her last comment ^^. Glad I was of any help.