aboutsummaryrefslogtreecommitdiffstats
path: root/test/test.sh
blob: 5fe01eb2a82f3ed0b35169f0628aeb0c2b833ba9 (plain) (blame)
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
#!/bin/bash

./chk_config.exp

./fscheck.sh

echo "TESTING: version"
./option_version.exp

echo "TESTING: help"
./option_help.exp

echo "TESTING: man"
./option_man.exp

echo "TESTING: list"
./option_list.exp

echo "TESTING: tree"
./option_tree.exp

if [ -f /proc/self/uid_map ];
then
	echo "TESTING: noroot"
	./noroot.exp
else
	echo "TESTING: user namespaces not available"
fi

echo "TESTING: doubledash"
mkdir -- -testdir
touch -- -testdir/ttt
cp -- /bin/bash -testdir/.
./doubledash.exp
rm -fr -- -testdir

echo "TESTING: trace1"
./option-trace.exp

echo "TESTING: trace2"
rm -f index.html*
./trace.exp
rm -f index.html*

echo "TESTING: extract command"
./extract_command.exp

echo "TESTING: rlimit"
./option_rlimit.exp

echo "TESTING: shutdown"
./option-shutdown.exp

echo "TESTING: join"
./option-join.exp

echo "TESTING: firejail in firejail"
./firejail-in-firejail.exp

echo "TESTING: chroot overlay"
./option_chroot_overlay.exp

echo "TESTING: tmpfs"
./option_tmpfs.exp

echo "TESTING: blacklist directory"
./option_blacklist.exp

echo "TESTING: blacklist file"
./option_blacklist_file.exp

echo "TESTING: bind as user"
./option_bind_user.exp

if [ -d /home/bingo ];
then
	echo "TESTING: home sanitize"
	./option_version.exp
fi

echo "TESTING: chroot as user"
./fs_chroot.exp

echo "TESTING: /sys"
./fs_sys.exp

echo "TESTING: readonly"
ls -al > tmpreadonly
./option_readonly.exp
sleep 5
rm -f tmpreadonly

echo "TESTING: name"
./name.exp

echo "TESTING: zsh"
./shell_zsh.exp

echo "TESTING: csh"
./shell_csh.exp

which dash
if [ "$?" -eq 0 ];
then
        echo "TESTING: dash"
        ./shell_dash.exp
else
        echo "TESTING: dash not found"
fi

which firefox
if [ "$?" -eq 0 ];
then
	echo "TESTING: firefox"
	./firefox.exp
else
	echo "TESTING: firefox not found"
fi

which midori
if [ "$?" -eq 0 ];
then
	echo "TESTING: midori"
	./midori.exp
else
	echo "TESTING: midori not found"
fi

which chromium-browser
if [ "$?" -eq 0 ];
then
	echo "TESTING: chromium"
	./chromium.exp
else
	echo "TESTING: chromium not found"
fi

which opera
if [ "$?" -eq 0 ];
then
	echo "TESTING: opera"
	./opera.exp
else
	echo "TESTING: opera not found"
fi

which transmission-gtk
if [ "$?" -eq 0 ];
then
	echo "TESTING: transmission-gtk"
	./transmission-gtk.exp
else
	echo "TESTING: transmission-gtk not found"
fi

which transmission-qt
if [ "$?" -eq 0 ];
then
	echo "TESTING: transmission-qt"
	./transmission-qt.exp
else
	echo "TESTING: transmission-qt not found"
fi

which evince
if [ "$?" -eq 0 ];
then
	echo "TESTING: evince"
	./evince.exp
else
	echo "TESTING: evince not found"
fi

echo "TESTING: PID"
./pid.exp

echo "TESTING: output"
./output.exp

echo "TESTING: profile no permissions"
./profile_noperm.exp

echo "TESTING: profile syntax"
./profile_syntax.exp

echo "TESTING: profile syntax 2"
./profile_syntax2.exp

echo "TESTING: profile rlimit"
./profile_rlimit.exp

echo "TESTING: profile read-only"
./profile_readonly.exp

echo "TESTING: profile tmpfs"
./profile_tmpfs.exp

echo "TESTING: profile applications"
./profile_apps.exp

echo "TESTING: private"
./private.exp `whoami`

echo "TESTING: private directory"
rm -fr dirprivate
mkdir dirprivate
./private_dir.exp
rm -fr dirprivate

echo "TESTING: private directory profile"
rm -fr dirprivate
mkdir dirprivate
./private_dir_profile.exp
rm -fr dirprivate

echo "TESTING: private keep"
./private-keep.exp

uname -r | grep "3.18"
if [ "$?" -eq 0 ];
then
	echo "TESTING: overlayfs on 3.18 kernel"
	./fs_overlay.exp
fi

grep "openSUSE" /etc/os-release
if [ "$?" -eq 0 ];
then
	echo "TESTING: overlayfs"
	./fs_overlay.exp
fi

grep "Ubuntu" /etc/os-release
if [ "$?" -eq 0 ];
then
	echo "TESTING: overlayfs"
	./fs_overlay.exp
fi

echo "TESTING: seccomp debug"
./seccomp-debug.exp

echo "TESTING: seccomp su"
./seccomp-su.exp

echo "TESTING: seccomp ptrace"
./seccomp-ptrace.exp

echo "TESTING: seccomp chmod (seccomp lists)"
./seccomp-chmod.exp

echo "TESTING: seccomp chmod profile (seccomp lists)"
./seccomp-chmod-profile.exp

echo "TESTING: seccomp empty"
./seccomp-empty.exp

echo "TESTING: seccomp bad empty"
./seccomp-bad-empty.exp

echo "TESTING: read/write /var/tmp"
./fs_var_tmp.exp

echo "TESTING: read/write /var/lock"
./fs_var_lock.exp

echo "TESTING: read/write /dev/shm"
./fs_dev_shm.exp

echo "TESTING: local network"
./net_local.exp

echo "TESTING: no network"
./net_none.exp

echo "TESTING: network IP"
./net_ip.exp

echo "TESTING: network MAC"
./net_mac.exp

echo "TESTING: network bad IP"
./net_badip.exp

echo "TESTING: network no IP test 1"
./net_noip.exp

echo "TESTING: network no IP test 2"
./net_noip2.exp

echo "TESTING: network default gateway test 1"
./net_defaultgw.exp

echo "TESTING: network default gateway test 2"
./net_defaultgw2.exp

echo "TESTING: network default gateway test 3"
./net_defaultgw3.exp

echo "TESTING: netfilter"
./net_netfilter.exp

echo "TESTING: 4 bridges ARP"
./4bridges_arp.exp

echo "TESTING: 4 bridges IP"
./4bridges_ip.exp

echo "TESTING: login SSH"
./login_ssh.exp

echo "TESTING: ARP"
./net_arp.exp

echo "TESTING: DNS"
./dns.exp

echo "TESTING: firemon --arp"
./firemon-arp.exp

echo "TESTING: firemon --route"
./firemon-route.exp

echo "TESTING: firemon --seccomp"
./firemon-seccomp.exp

echo "TESTING: firemon --caps"
./firemon-caps.exp