Empire icon indicating copy to clipboard operation
Empire copied to clipboard

M2cryoto error Linux

Open corruptedkernel opened this issue 6 years ago • 8 comments

Hey guys, I’m trying to figure out why Empire isn’t working for my kali Linux machine. I have both python2, and python3 installed, I did the “pip install -r requirements” no problems and did the install.sh.

After install and running ./empire it’s giving me the error M2crypto module "No module name __m2crypto,

After that when when trying to do “pip2 install m2crypto”, and "pip3 install m2crypto" it says its satisifed for both. I’ve also tried deleting the entire empire folder and downloading from git again, and nothing.

Error: Traceback (most recent call last): File "./empire", line 13, in from lib.common import empire, helpers File "/root/Tricks/Empire/lib/common/empire.py", line 34, in import agents File "/root/Tricks/Empire/lib/common/agents.py", line 68, in import encryption File "/root/Tricks/Empire/lib/common/encryption.py", line 27, in import M2Crypto File "/usr/local/lib/python2.7/dist-packages/M2Crypto/init.py", line 22, in import _m2crypto File "/usr/local/lib/python2.7/dist-packages/M2Crypto/_m2crypto.py", line 17, in __m2crypto = swig_import_helper() File "/usr/local/lib/python2.7/dist-packages/M2Crypto/_m2crypto.py", line 16, in swig_import_helper return importlib.import_module('__m2crypto') File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) ImportError: No module named __m2crypto

Anyone have any ideas.

corruptedkernel avatar Sep 04 '18 22:09 corruptedkernel

I am having this same issue. I was using Empire last around July, but now I'm back to some lab work, and this error has come up. I've tried master branch, dev branch. I've done similar procedures above: pip and pip3 install of m2crypto. tried running ./reset.sh, have removed the Empire directory, and attempted again. pip install -r 'requirements.txt' has also been done

Apologize for newbie question, thanks in advance for any assistance

kapshure avatar Oct 02 '18 16:10 kapshure

I ran into this earlier this morning when setting up Empire on fedora for the first time. You are likely missing other dependencies related to m2crypto and swig. You can try manually installing the packages with your local package manager if pip is unable to compile them.

I resolved the issue by installing them manually to my system like so (dnf for fedora, but same deal for debian-like systems)
sudo apt-get install m2crypto swig

rerun sudo pip2 install -r requirements.txt and rerun the ./install.sh script as root and attempt to restart empire.

Script-Nomad avatar Oct 04 '18 16:10 Script-Nomad

I ran into this earlier this morning when setting up Empire on fedora for the first time. You are likely missing other dependencies related to m2crypto and swig. You can try manually installing the packages with your local package manager if pip is unable to compile them.

I resolved the issue by installing them manually to my system like so (dnf for fedora, but same deal for debian-like systems) sudo apt-get install m2crypto swig

rerun sudo pip2 install -r requirements.txt and rerun the ./install.sh script as root and attempt to restart empire.

Hmmm that's the thing, the system already shows these as being installed : python-m2crypto is already the newest version (0.27.0-6). swig is already the newest version (3.0.12-1.2).

and then running pip2 install -r requirements results in every package stated as "requirement already satisfied"

kapshure avatar Oct 04 '18 16:10 kapshure

Can you try running setup/install.sh from the dev branch? Some fixes for kali have been added there.

mr64bit avatar Nov 28 '18 14:11 mr64bit

Had this working, haven't used it since mid-Oct, came back today to launch Empire, and back to the same message about "m2crypto" missing. Have tried everything already in this issue listing: dev branch vs master, apt installs of the package, pip install on requirements, reran setup, reran db setup, etc.

am on kali 2019.1 4.19.0-kali1-amd64 #1 SMP Debian 4.19.13-1kali1 (2019-01-03) x86_64 GNU/Linux

ideas?

kapshure avatar Mar 03 '19 03:03 kapshure

@kapshure Is this a fresh Kali image? I just tested on 2019.1 and everything went smoothly. Can you show me the output of setup/install.sh?

mr64bit avatar Mar 05 '19 12:03 mr64bit

no, and after I posted that last comment, I seem to have recalled having to go deploy another kali VM to make that work. Let me try that before asking for further assistance, and/or spinning unnecessary cycles.

kapshure avatar Mar 07 '19 00:03 kapshure

I have the same issue on my Kali. I tried on a new install of Kali and then there is no issue like this.

truesamurai avatar Oct 30 '19 22:10 truesamurai