Giter Site home page Giter Site logo

Comments (20)

AddaxSoft avatar AddaxSoft commented on May 25, 2024 4

update:

I finally (after 48 hrs) managed to solve all issues.
this is the solution step by step:

# remove old libssl-dev (1.0) 
apt remove libssl-dev

# install openssl 1.10h from source
wget http://www.openssl.org/source/openssl-1.1.0h.tar.gz
tar -xvzf openssl-1.1.0h.tar.gz
cd openssl-1.1.0h/
./config && make && make install && ldconfig
openssl version -a #should report 1.1.0h now

# compile ncrack
/path/to/ncrack/configure && make && make install

Apparently during my process to fix the issue with ssllib I managed to mess the system structure; somehow removing ssllib-dev then installing openssl fixed the issue

this can be closed now

from ncrack.

ithilgore avatar ithilgore commented on May 25, 2024

Please try compiling with openssl 1.1 and above. You are probably linking with an older version of openssl

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

sanity check: you mean libssl-dev 1.1?

from ncrack.

ithilgore avatar ithilgore commented on May 25, 2024

Yes, but since your ubuntu version might not have 1.1 as a package, you can also try getting it directly from https://www.openssl.org/

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

I compiled and installed openssl 1.1, but

I'm getting this error on ./configure now:

checking OpenSSL header version... 1010006f (OpenSSL 1.1.0f  25 May 2017)
checking OpenSSL library version... not found
configure: error: OpenSSL library not found.
configure: error: ./configure failed for opensshlib
openssl version
OpenSSL 1.1.0f  25 May 2017

from ncrack.

ithilgore avatar ithilgore commented on May 25, 2024

Did you also try uninstalling the libssl-dev package from previously to avoid any conflicts?

from ncrack.

ithilgore avatar ithilgore commented on May 25, 2024

Also make sure that in /etc/ld.so.conf, there is a "/usr/local/lib" before the end of the file.
Then: sudo ldconfig

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

same error, hmmm do I have to rebuild and install openssl after I remove ssllib?

from ncrack.

ithilgore avatar ithilgore commented on May 25, 2024

You can also try installing openssl using the --prefix /usr when you invoke ./config so that it's not at the /usr/local/ (might also need to change the --openssldir) See: https://github.com/openssl/openssl/blob/master/INSTALL

from ncrack.

ithilgore avatar ithilgore commented on May 25, 2024

One more thing to try is when you run ./configure from Ncrack try specifying the openssl library location using --with-openssl=

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

wow I spent so much time on this and I still cannot get it right. I did compile openssl 1.1 and installed it but it doesn't recognize its own library.

On one box I have:

OpenSSL 1.1.0g  2 Nov 2017 **(Library: OpenSSL 1.1.0h  27 Mar 2018)**
built on: reproducible build, date unspecified
platform: debian-amd64
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/lib/ssl\"" -DENGINESDIR="\"/usr/lib/x86_64-linux-gnu/engines-1.1\""
OPENSSLDIR: "/usr/lib/ssl"
ENGINESDIR: "/usr/lib/x86_64-linux-gnu/engines-1.1"

on the other where nrack fails I have:

OpenSSL 1.1.0h  27 Mar 2018
built on: reproducible build, date unspecified
platform: linux-x86_64
options:  bn(64,64) rc4(16x,int) des(int) idea(int) blowfish(ptr)
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\""  -Wa,--noexecstack
OPENSSLDIR: "/usr/local/ssl"
ENGINESDIR: "/usr/local/lib/engines-1.1"

What am I missing here? why is openssl not recognizing its own library making ncrack fail

from ncrack.

ithilgore avatar ithilgore commented on May 25, 2024

Kali should be installing openssl 1.1 and above when you install libssl-dev - that is why it works there. The latest version of Ubuntu 18.14 also now installs openssl 1.1.g (https://packages.ubuntu.com/bionic/libssl-dev) when you install the libssl-dev package (and Ncrack compiles out of the box there without having to install openssl manually)

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

@denevin

but I'm not on kali, I'm on Ubuntu (see uname -a command outputs above)

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

after all the efforts I'm still getting the same issue.

my ldconfig -v reports ssllib1.1 being in the path of libs

/usr/local/lib:
        libssl.so.1.1 -> libssl.so.1.1
        libcrypto.so.1.1 -> libcrypto.so.1.1

openssl version -a reports the correct version, yet ncrack still fails to configure with error:

checking OpenSSL header version... 1010008f (OpenSSL 1.1.0h  27 Mar 2018)
checking OpenSSL library version... not found
configure: error: OpenSSL library not found.
configure: error: ./configure failed for opensshlib

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

half solution:

compile and install openssl 1.1 from source

wget http://www.openssl.org/source/openssl-1.1.0h.tar.gz
tar -xvzf openssl-1.1.0h.tar.gz
cd openssl-1.1.0h/
./config && make && make install && ldconfig
openssl version -a #should report 1.1h now

then go back to ncrack dir, and run make clean
after it's done run the following:

./configure --with-openssl=/usr/local
make && make install

now make fails at:

In file included from cipher.c:46:0:
cipher.h:69:17: error: field ‘evp’ has incomplete type
  EVP_CIPHER_CTX evp;
                 ^
Makefile:71: recipe for target 'cipher.o' failed
make[1]: *** [cipher.o] Error 1

from ncrack.

ithilgore avatar ithilgore commented on May 25, 2024

There is no --with-ssl-dir switch in the configure of Ncrack. This will be ignored by the configure script. As I mentioned above the correct one is: --with-openssl. So try: ./configure --with-openssl=/usr/local

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

I updated my solution, but the script still fails now see #43

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

I'm back at square one now, the configure scriptt fails at

checking OpenSSL header version... 1010008f (OpenSSL 1.1.0h  27 Mar 2018)
checking OpenSSL library version... not found
configure: error: OpenSSL library not found.
configure: error: ./configure failed for opensshlib

I tried everything so far

  • ldconfig trick
  • reinstalling openssl 1.10h (default)
  • adding --wth-openssl=/usr/dir

?????????

from ncrack.

ithilgore avatar ithilgore commented on May 25, 2024

do a cat /etc/issue for me

I ll try to replicate it in the same ubuntu version and come back to you with the steps

from ncrack.

AddaxSoft avatar AddaxSoft commented on May 25, 2024

Ubuntu 16.04.4 LTS \n \l (google cloud image)

I tried to do the same on another same ubuntu image and it worked same steps as I described in my 'half solution' (#42 (comment))

I'm not sure what did I mess up while doing this, because at some point I Got it working then it failed with #43 but now I'm back at square one.

from ncrack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.