forked from rbsec/sslscan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
117 lines (78 loc) · 3.74 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Requirements:
OpenSSL 0.9.8o or better
Makefile build:
make
make install (as root)
Manual Build:
sslscan can be built manually using the following
commands:
gcc -lssl -o sslscan sslscan.c
clang -lssl -o sslscan sslscan.c
----
There are three ways to build a Windows executable:
1.) By cross-compiling on a Linux build machine using MinGW or Mingw-w64.
2.) By compiling on a Windows build machine using MinGW or Mingw-w64.
3.) By compiling on a Windows build machine using Visual Studio 2013
(other versions may also work, but are untested).
If you have a Debian-like Linux machine (such as Ubuntu or Kali), option
#1 is BY FAR the easiest. Note that installing Visual Studio and additional
tools requires downloading gigabytes of data!
In any case, it is necessary to compile OpenSSL to ensure that all
protocols and algorithms are enabled (note that some systems that package
OpenSSL have some deprecated features such as SSLv2 turned off for safety
reasons; we actually need those to test with).
I. Cross-compiling from Linux
A. Building a 64-bit Windows executable
0.) Install Mingw-w64. On Debian-like systems, this can be done with:
apt-get install mingw-w64
1.) Download and compile OpenSSL with the following:
git clone https://github.com/openssl/openssl
git checkout OpenSSL_1_0_2-stable
./Configure --cross-compile-prefix=x86_64-w64-mingw32- \
-fstack-protector-all -D_FORTIFY_SOURCE=2 mingw64 shared
make
2.) Compile sslscan with the path to the OpenSSL directory:
make -f Makefile.mingw OPENSSL_PATH=../path/to/openssl
B. Building a 32-bit Windows executable
0.) Install MinGW. On Debian-like systems, this can be done with:
apt-get install mingw32
1.) Download and compile OpenSSL with the following:
git clone https://github.com/openssl/openssl
git checkout OpenSSL_1_0_2-stable
./Configure --cross-compile-prefix=i586-mingw32msvc- \
-fstack-protector-all -D_FORTIFY_SOURCE=2 mingw shared
make
2.) Compile sslscan with the path to the OpenSSL directory:
DEFINES="-DWONKY_LINUX_MINGW=1" make -f Makefile.mingw \
OPENSSL_PATH=../path/to/openssl
II. Compiling on Windows using Mingw
A. Building a 64-bit Windows executable
0.) Install Mingw-w64 from http://mingw-w64.sourceforge.net/. Install
MSYS from http://www.mingw.org/.
1.) In an MSYS shell, compile OpenSSL with the following:
./Configure mingw64 -fstack-protector-all -D_FORTIFY_SOURCE=2 shared
make
2.) In an MSYS shell, compile sslscan with the path to the OpenSSL
directory:
make -f Makefile.mingw OPENSSL_PATH=../path/to/openssl
B. Building a 32-bit Windows executable
0.) Install MinGW and MSYS from http://www.mingw.org/.
1.) In an MSYS shell, compile OpenSSL with the following:
./Configure mingw -fstack-protector-all -D_FORTIFY_SOURCE=2 shared
make
2.) In an MSYS shell, compile sslscan with the path to the OpenSSL
directory:
make -f Makefile.mingw OPENSSL_PATH=../path/to/openssl
III. Compiling on Windows using Visual Studio 2013 Express for Windows Desktop
A. Install Visual Studio 2013 Express for Windows Desktop:
http://go.microsoft.com/?linkid=9832280
B. Install the Windows Driver Kit 8.1:
http://go.microsoft.com/fwlink/p/?linkid=393659
C. Install ActivePerl Community Edition:
http://www.activestate.com/activeperl/downloads
D. In the VS2013 x64 Cross Tools Command Prompt, compile OpenSSL with:
perl Configure VC-WIN64A
ms\do_win64a
nmake -f ms\nt.mak
E. Inside the sslscan folder, compile sslscan with:
nmake -f Makefile.vs OPENSSL_PATH=path/to/openssl