-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofuzzbench_exec_all.sh
executable file
·374 lines (265 loc) · 14.9 KB
/
profuzzbench_exec_all.sh
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
#!/bin/bash
export NUM_CONTAINERS="${NUM_CONTAINERS:-4}"
export TIMEOUT="${TIMEOUT:-3600}"
export SKIPCOUNT="${SKIPCOUNT:-5}"
export TEST_TIMEOUT="${TEST_TIMEOUT:-5000}"
export TARGET_LIST=$1
export FUZZER_LIST=$2
if [[ "x$TARGET_LIST" == "x" ]] || [[ "x$FUZZER_LIST" == "x" ]]
then
echo "Usage: $0 TARGET FUZZER"
exit 1
fi
echo
echo "# NUM_CONTAINERS: ${NUM_CONTAINERS}"
echo "# TIMEOUT: ${TIMEOUT} s"
echo "# SKIPCOUNT: ${SKIPCOUNT}"
echo "# TEST TIMEOUT: ${TEST_TIMEOUT} ms"
echo "# TARGET LIST: ${TARGET_LIST}"
echo "# FUZZER LIST: ${FUZZER_LIST}"
echo
for FUZZER in $(echo $FUZZER_LIST | sed "s/,/ /g")
do
for TARGET in $(echo $TARGET_LIST | sed "s/,/ /g")
do
echo
echo "***** RUNNING $FUZZER ON $TARGET *****"
echo
##### FTP #####
if [[ $TARGET == "lightftp" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-lightftp
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh lightftp $NUM_CONTAINERS results-lightftp aflnet out-lightftp-aflnet "-P FTP -D 10000 -q 3 -s 3 -E -K -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh lightftp-stateafl $NUM_CONTAINERS results-lightftp stateafl out-lightftp-stateafl "-P FTP -D 10000 -q 3 -s 3 -E -K -m none -u /home/ubuntu/experiments/LightFTP/Source/Release/fftp -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh lightftp $NUM_CONTAINERS results-lightftp aflnwe out-lightftp-aflnwe "-D 10000 -K -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
if [[ $TARGET == "bftpd" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-bftpd
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh bftpd $NUM_CONTAINERS results-bftpd aflnet out-bftpd-aflnet "-m none -P FTP -D 10000 -q 3 -s 3 -E -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh bftpd-stateafl $NUM_CONTAINERS results-bftpd stateafl out-bftpd-stateafl "-m none -P FTP -D 10000 -q 3 -s 3 -E -K -u /home/ubuntu/experiments/bftpd/bftpd -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh bftpd $NUM_CONTAINERS results-bftpd aflnwe out-bftpd-aflnwe "-m none -D 10000 -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
if [[ $TARGET == "proftpd" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-proftpd
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh proftpd $NUM_CONTAINERS results-proftpd aflnet out-proftpd-aflnet "-m none -P FTP -D 10000 -q 3 -s 3 -E -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh proftpd-stateafl $NUM_CONTAINERS results-proftpd stateafl out-proftpd-stateafl "-m none -P FTP -D 10000 -q 3 -s 3 -E -K -u /home/ubuntu/experiments/proftpd/proftpd -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh proftpd $NUM_CONTAINERS results-proftpd aflnwe out-proftpd-aflnwe "-m none -D 10000 -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
if [[ $TARGET == "pure-ftpd" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-pure-ftpd
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh pure-ftpd $NUM_CONTAINERS results-pure-ftpd aflnet out-pure-ftpd-aflnet "-m none -P FTP -D 10000 -q 3 -s 3 -E -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh pure-ftpd-stateafl $NUM_CONTAINERS results-pure-ftpd stateafl out-pure-ftpd-stateafl "-m none -P FTP -D 10000 -q 3 -s 3 -E -K -u /home/ubuntu/experiments/pure-ftpd/src/pure-ftpd -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh pure-ftpd $NUM_CONTAINERS results-pure-ftpd aflnwe out-pure-ftpd-aflnwe "-m none -D 10000 -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
##### SMTP #####
if [[ $TARGET == "exim" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-exim
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh exim $NUM_CONTAINERS results-exim aflnet out-exim-aflnet "-P SMTP -D 10000 -q 3 -s 3 -E -K -W 100 -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh exim-stateafl $NUM_CONTAINERS results-exim stateafl out-exim-stateafl "-P SMTP -D 10000 -q 3 -s 3 -E -K -W 100 -m none -u /home/ubuntu/experiments/exim/src/build-Linux-x86_64/exim -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh exim $NUM_CONTAINERS results-exim aflnwe out-exim-aflnwe "-D 10000 -K -W 100 -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
##### DNS #####
if [[ $TARGET == "dnsmasq" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-dnsmasq
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh dnsmasq $NUM_CONTAINERS results-dnsmasq aflnet out-dnsmasq-aflnet "-P DNS -D 10000 -K -R -q 3 -s 3 -E -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh dnsmasq-stateafl $NUM_CONTAINERS results-dnsmasq stateafl out-dnsmasq-stateafl "-P DNS -D 10000 -K -R -q 3 -s 3 -E -m none -u /home/ubuntu/experiments/dnsmasq/src/dnsmasq -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh dnsmasq $NUM_CONTAINERS results-dnsmasq aflnwe out-dnsmasq-aflnwe "-D 10000 -K -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
##### RTSP #####
if [[ $TARGET == "live555" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-live555
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh live555 $NUM_CONTAINERS results-live555 aflnet out-live555-aflnet "-P RTSP -D 10000 -q 3 -s 3 -E -K -R -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh live555-stateafl $NUM_CONTAINERS results-live555 stateafl out-live555-stateafl "-P RTSP -D 10000 -q 3 -s 3 -E -K -R -m none -u /home/ubuntu/experiments/live555/testProgs/testOnDemandRTSPServer -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh live555 $NUM_CONTAINERS results-live555 aflnwe out-live555-aflnwe "-D 10000 -K -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
##### SIP #####
if [[ $TARGET == "kamailio" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-kamailio
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh kamailio $NUM_CONTAINERS results-kamailio aflnet out-kamailio-aflnet "-m none -P SIP -l 5061 -D 50000 -q 3 -s 3 -E -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh kamailio-stateafl $NUM_CONTAINERS results-kamailio stateafl out-kamailio-stateafl "-m none -P SIP -l 5061 -D 50000 -q 3 -s 3 -E -K -u /home/ubuntu/experiments/kamailio/src/kamailio -U /home/ubuntu/experiments/kamailio/ -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh kamailio $NUM_CONTAINERS results-kamailio aflnwe out-kamailio-aflnwe "-m none -D 50000 -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
##### SSH #####
if [[ $TARGET == "openssh" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-openssh
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh openssh $NUM_CONTAINERS results-openssh aflnet out-openssh-aflnet "-P SSH -D 10000 -q 3 -s 3 -E -K -W 10 -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh openssh-stateafl $NUM_CONTAINERS results-openssh stateafl out-openssh-stateafl "-P SSH -D 10000 -q 3 -s 3 -E -K -W 10 -l 30000 -e 20000 -m none -u /home/ubuntu/experiments/openssh/sshd -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh openssh $NUM_CONTAINERS results-openssh aflnwe out-openssh-aflnwe "-D 10000 -K -W 10 -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
##### TLS #####
if [[ $TARGET == "openssl" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-openssl
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh openssl $NUM_CONTAINERS results-openssl aflnet out-openssl-aflnet "-P TLS -D 10000 -q 3 -s 3 -E -K -R -W 100 -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh openssl-stateafl $NUM_CONTAINERS results-openssl stateafl out-openssl-stateafl "-P TLS -D 10000 -q 3 -s 3 -E -K -R -W 100 -m none -u /home/ubuntu/experiments/openssl/apps/openssl -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh openssl $NUM_CONTAINERS results-openssl aflnwe out-openssl-aflnwe "-D 10000 -K -W 100 -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
##### DTLS #####
if [[ $TARGET == "tinydtls" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-tinydtls
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh tinydtls $NUM_CONTAINERS results-tinydtls aflnet out-tinydtls-aflnet "-P DTLS12 -D 10000 -q 3 -s 3 -E -K -W 30 -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh tinydtls-stateafl $NUM_CONTAINERS results-tinydtls stateafl out-tinydtls-stateafl "-P DTLS12 -D 10000 -q 3 -s 3 -E -K -W 30 -m none -u /home/ubuntu/experiments/tinydtls/tests/dtls-server -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh tinydtls $NUM_CONTAINERS results-tinydtls aflnwe out-tinydtls-aflnwe "-D 10000 -K -W 30 -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
##### DICOM #####
if [[ $TARGET == "dcmtk" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-dcmtk
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh dcmtk $NUM_CONTAINERS results-dcmtk aflnet out-dcmtk-aflnet "-P DICOM -D 10000 -E -K -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh dcmtk-stateafl $NUM_CONTAINERS results-dcmtk stateafl out-dcmtk-stateafl "-P DICOM -D 10000 -E -K -m none -u /home/ubuntu/experiments/dcmtk/build/bin/dcmqrscp -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh dcmtk $NUM_CONTAINERS results-dcmtk aflnwe out-dcmtk-aflnwe "-D 10000 -K -m none -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
##### DAAPD #####
if [[ $TARGET == "forked-daapd" ]] || [[ $TARGET == "all" ]]
then
cd $PFBENCH
mkdir results-forked-daapd
if [[ $FUZZER == "aflnet" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh forked-daapd $NUM_CONTAINERS results-forked-daapd aflnet out-forked-daapd-aflnet "-P HTTP -D 200000 -m none -q 3 -s 3 -E -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "stateafl" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh forked-daapd-stateafl $NUM_CONTAINERS results-forked-daapd stateafl out-forked-daapd-stateafl "-P HTTP -D 200000 -m none -q 3 -s 3 -E -K -u /home/ubuntu/experiments/forked-daapd/src/forked-daapd -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
if [[ $FUZZER == "aflnwe" ]] || [[ $FUZZER == "all" ]]
then
profuzzbench_exec_common.sh forked-daapd $NUM_CONTAINERS results-forked-daapd aflnwe out-forked-daapd-aflnwe "-D 200000 -m none -K -t ${TEST_TIMEOUT}" $TIMEOUT $SKIPCOUNT
fi
fi
if [[ $TARGET == "all" ]]
then
# Quit loop -- all fuzzers and targets have already been executed
exit
fi
done
done