EmpireProject / Empire

Empire is a PowerShell and Python post-exploitation agent.
http://www.powershellempire.com/
BSD 3-Clause "New" or "Revised" License
7.4k stars 2.81k forks source link

configure: error: Cannot build without libcrypto (OpenSSL) #720

Closed whoot closed 6 years ago

whoot commented 6 years ago

Empire Version

current

OS Information (Linux flavor, Python version)

uname -a Linux kali 4.12.0-kali2-amd64 #1 SMP Debian 4.12.12-2kali1 (2017-09-13) x86_64 GNU/Linux

python --version Python 2.7.13

Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.

Installation script should install every dependency and compile without error. However libssl1.0.0 can not be found and the xar path is not checked if it contains spaces.

/install.sh
--2017-09-25 11:44:15--  https://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.112.175
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.112.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1595408 (1.5M) [text/x-python]
Saving to: ‘get-pip.py’

get-pip.py                            100%[========================================================================>]   1.52M   381KB/s    in 4.1s    

2017-09-25 11:44:19 (376 KB/s) - ‘get-pip.py’ saved [1595408/1595408]

Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libssl1.0.0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libssl1.0.0' has no installation candidate

[...]

/usr/bin/ranlib lib/libxar.a 
sed -e s/@LIBXAR_SNAME@/libxar.so.1/ -e s/@LIBXAR_LNAME@/libxar.so/ -e s/@LIBXAR_ANAME@/libxar.a/ < lib/libxar.la.in > lib/libxar.la
gcc -Wall -g  -Iinclude -Iinclude -D_GNU_SOURCE -I/usr/include/libxml2 -c src/xar.c -o src/xar.o
gcc -Wall -g  -o src/xar src/xar.o -Wl,-rpath,/root/Desktop/Pentest/Tools/Windows Domain/Empire/setup/xar-1.5.2/lib -Llib  lib/libxar.a -lz -lcrypto -lacl  -lxml2
gcc: error: Domain/Empire/setup/xar-1.5.2/lib: No such file or directory
src/Makefile.inc:39: recipe for target 'src/xar' failed
make: *** [src/xar] Error 1

This will result in an unlimited generation of the following error when executing the Empire RESTApi:

 * Starting Empire RESTful API on port: 1337
 * RESTful API token: mny[.....]kk
[!] Error: cannot find certificate ./data/empire.pem

Any additional information

Seems like the "Empire/setup/xar-1.5.2/lib" can not be found because there is a space in the path ("/Windows Domain/"). Cloning and installing it in a directory without spaces will not throw this error.

SecurityAddicted commented 6 years ago

Same for me... The installer seems broken on Kali 2017.2.

gerrenmurphy commented 6 years ago

I'm getting the following after a fresh install: root@kali:/opt/Empire/setup# uname -a Linux kali 4.12.0-kali1-amd64 #1 SMP Debian 4.12.6-1kali6 (2017-08-30) x86_64 GNU/Linux

./install.sh [...] checking openssl/evp.h presence... yes checking for openssl/evp.h... yes checking for OpenSSL_add_all_ciphers in -lcrypto... no configure: error: Cannot build without libcrypto (OpenSSL) make: No targets specified and no makefile found. Stop. make: No rule to make target 'install'. Stop. Cloning into 'bomutils'... [...]

FWIW, I fixed the above error by replacing "libssl-dev" with "libssl1.0-dev" in the install script, but am not getting:

configure: error: Cannot build without libz make: No targets specified and no makefile found. Stop. make: No rule to make target 'install'. Stop.

SecurityAddicted commented 6 years ago

@gerrenmurphy I fixed the libz problem by installing the zlib package.

xorrior commented 6 years ago

@whoot those are actually two separate issues. The issue with the rest api and the pem file is fixed in the dev branch. Did any of the above suggestions work for you??

whoot commented 6 years ago

Pulling the current files fixed the issues. Thanks!

whoot commented 6 years ago

Getting the same issue now as @gerrenmurphy. Fixed it by installing zlib package and replacing 'libssl1.0.0 libssl-dev' with 'libssl1.0-dev' in install.sh.

Otherwise HTTPS Listeners wont work!

whoot commented 6 years ago

Made an pull request for this issue: #811

xorrior commented 6 years ago

@whoot We now have a docker build release. This should resolve issues with libcrypto. Please let me know if this works for you. #848

whoot commented 6 years ago

Alright, after debugging I can say that this is definitly an libssl issue. This error is shown when trying to configure 'xar-1.5.2'. After installing libssl1.0-dev instead of 'libssl-dev' everything works fine.

This was also mentioned in #521

ghost commented 6 years ago

Same problem with Ubuntu 18.04