-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.txt
130 lines (92 loc) · 6.05 KB
/
BUILD.txt
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
118
119
120
121
122
123
124
125
126
127
128
129
130
BUILD
=====
The build of this application is also based on another tool of mine <https://github.com/rafael-santiago/hefesto>. If you
want to build the application by running the whole tests you need 'Hefesto', otherwise you are on your own and you do not
need this document for any help.
Now, supposing that you have installed 'Hefesto' in your build environment. You need to clone another repo of mine called
'Helios' so execute the following commands:
-----------------------------------------------------------------------
you@Hellfire:~/src# git clone https://github.com/rafael-santiago/helios
you@Hellfire:~/src# cd helios
you@Hellfire:~/src/helios# hefesto --install=forge-bootstrapper,\
> lnx-module-toolset,freebsd-module-toolset,netbsd-module-toolset,\
> gnu-c-toolset,clang-c-toolset,c-dep-scanner
you@Hellfire:~/src/helios# cd ..
you@Hellfire:~/src# rm -rf helios
you@Hellfire:~/src# _
-----------------------------------------------------------------------
You need (of course) to clone this repo:
-------------------------------------------------------------------------------------
you@Hellfire:~/src# git clone https://github.com/rafael-santiago/blackcat --recursive
you@Hellfire:~/src# _
-------------------------------------------------------------------------------------
Now it is only about launching the build:
-----------------------------------------
you@Hellfire:~/src# cd blackcat/src
you@Hellfire:~/src/blackcat/src# hefesto
-----------------------------------------
Go walk your dog, because it can take a while at first time. Once well-succeeded you can use the binary under
'blackcat/bin'. However, I would recommend you to install it and make 'blackcat' accessible in your entire system.
If you have some restriction (personal or legal) related to usage of some available cipher you should pull out this cipher
from the build option '--with-ciphers'. By default, all ciphers are included, anyway, you should watch your restrictions.
In order to know what ciphers are currently available use the build option
'--avail-ciphers':
--------------------------------------------------------
you@Hellfire:~/src/blackcat/src# hefesto --avail-ciphers
--------------------------------------------------------
To overwrite the default '--with-ciphers' option you should pass this option when calling the build by passing (of course)
your desired (available) ciphers:
------------------------------------------------------------------------
you@Hellfire:~/src/blackcat/src# hefesto --with-ciphers=aes,des,blowfish
------------------------------------------------------------------------
If you do not have the sources of your operating system in order to compile the device driver or simply you do not want
it, use the build option '--no-dev'.
-------------------------------------------------
you@Hellfire:~/src/blackcat/src# hefesto --no-dev
-------------------------------------------------
In NetBSD you need to create the device node and also define by yourself the major number of the device. The default
number is 210 if you want to define a different one use the build option --dev-major=<number>. In this case, if a previous
/dev/blackcat node exists, it will be deleted and a new node will be created.
Building some modules only is possible by using the build option 'modules':
--------------------------------------------------------------
you@Hellfire:~/src/blackcat/src# hefesto --modules=base,fs,cmd
--------------------------------------------------------------
The blackcat's modules are some sub-directories under the toplevel src directory.
If you want to build the socket module as a no thread safe library, just use the option '--no-thread-safe':
--------------------------------------------------------------------------
you@Hellfire:~/src/blackcat/src# hefesto --modules=socket --no-thread-safe
--------------------------------------------------------------------------
or simply
---------------------------------------------------------
you@Hellfire:~/src/blackcat/src# hefesto --no-thread-safe
---------------------------------------------------------
In NetBSD the socket module is no-thread-safe by default and there is no option for a thread-safe library.
If you want to skip the net module tests:
---------------------------------------------------------
you@Hellfire:~/src/blackcat/src# hefesto --skip-net-tests
---------------------------------------------------------
To skip any keyboard related test use the build option '--skip-kbd-tests':
---------------------------------------------------------
you@Hellfire:~/src/blackcat/src# hefesto --skip-kbd-tests
---------------------------------------------------------
In order to install:
--------------------------------------------------
you@Hellfire:~/src/blackcat/src# hefesto --install
--------------------------------------------------
Inside the toplevel 'src' sub-directory you will find two plain files:
- BCDEV_PLATFORMS
- SKIP_NET_TESTS
- BAD_FUNCS
The BCDEV_PLATFORMS file lists all platforms which have support to blackcat device driver features. Thus, the device
driver will be built when '--no-dev' is undefined and it will be tested when '--blackcat-dev-tests' is defined.
The SKIP_NET_TESTS lists all platforms where the net command system tests should be skipped. Currently, Windows do not has
support for net command.
By default blackcat disallows the usage of functions considered 'bad' due to hooking issues (bad people can use it in
order to steal passwords). After building a module blackcat's build will verify if some bad function is being referenced.
If at least one reference to any of them is found the build will break. The verifying process can take some time. It is
possible to skip it by using the build option '--allow-bad-funcs'. Anyway, if you are building your final blackcat's
copy, a best practice would be verify if some bad function is being used. All functions considered 'bad' are listed in
the file BAD_FUNCS.
If you want to force the re-build of all modules, use the build option '--clean-modules'.
The re-build of everything: '--forge-anyway'.
You done here, now you should read the file 'doc/MANUAL.txt'.