Double-checking VPN implementation.
[pingpong.git] / Code / Projects / PacketLevelSignatureExtractor / execute_vpn_smarthome_all_detection.sh
1 #!/bin/bash
2
3 #set -x # echo invoked commands to std out
4
5 # Base dir should point to the experimental_result folder which contains the subfolders:
6 # - 'smarthome' which contains the traces collected while other devices are idle
7 # - 'standalone' which contains signatures and the traces used to generate the signatures.
8 BASE_DIR=$1
9 readonly BASE_DIR
10
11 OUTPUT_DIR=$2
12 readonly OUTPUT_DIR
13
14 PCAPS_BASE_DIR="$BASE_DIR/smarthome"
15 readonly PCAPS_BASE_DIR
16
17 SIGNATURES_BASE_DIR="$BASE_DIR/standalone"
18 readonly SIGNATURES_BASE_DIR
19
20 VPNCMD="-vpn"
21
22 # ==================================================== AMAZON PLUG =====================================================
23 PCAP_FILE="$PCAPS_BASE_DIR/amazon-plug/vpn/amazon-plug.eth1.stpvpn.pcap"
24
25 # DEVICE SIDE
26 ON_ANALYSIS="$SIGNATURES_BASE_DIR/amazon-plug/analyses/amazon-plug-onClusters-device-side.cls"
27 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/amazon-plug/analyses/amazon-plug-offClusters-device-side.cls"
28 ON_SIGNATURE="$SIGNATURES_BASE_DIR/amazon-plug/signatures/amazon-plug-onSignature-device-side.sig"
29 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/amazon-plug/signatures/amazon-plug-offSignature-device-side.sig"
30 RESULTS_FILE="$OUTPUT_DIR/amazon-plug/amazon-plug.eth0.detection.pcap___device-side.detectionresults"
31 SIGNATURE_DURATION="4990"
32 EPSILON="10.0"
33 ON_SKIPPED_PACKETS="-1"
34 OFF_SKIPPED_PACKETS="-1"
35 VPN="b0:b9:8a:73:69:8f"
36
37 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
38 #./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
39 # ======================================================================================================================
40
41 # ==================================================== ARLO CAMERA =====================================================
42 PCAP_FILE="$PCAPS_BASE_DIR/arlo-camera/vpn/arlo-camera.eth1.stpvpn.pcap"
43
44 # Has no device side signature.
45
46 # PHONE SIDE (TODO: may possibly be the .incomplete signatures)
47 ON_ANALYSIS="$SIGNATURES_BASE_DIR/arlo-camera/analyses/arlo-camera-onClusters-phone-side.cls"
48 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/arlo-camera/analyses/arlo-camera-offClusters-phone-side.cls"
49 ON_SIGNATURE="$SIGNATURES_BASE_DIR/arlo-camera/signatures/arlo-camera-onSignature-phone-side.sig"
50 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/arlo-camera/signatures/arlo-camera-offSignature-phone-side.sig"
51 RESULTS_FILE="$OUTPUT_DIR/arlo-camera/arlo-camera.eth0.detection.pcap___phone-side.detectionresults"
52 SIGNATURE_DURATION="548"
53 EPSILON="10.0"
54 ON_SKIPPED_PACKETS="-1"
55 #ON_SKIPPED_PACKETS="8"
56 #OFF_SKIPPED_PACKETS="10"
57 OFF_SKIPPED_PACKETS="-1"
58 VPN="b0:b9:8a:73:69:8f"
59
60 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
61 #./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
62 # ======================================================================================================================
63
64 # ============================================= BLOSSOM SPRINKLER QUICK RUN ============================================
65 PCAP_FILE="$PCAPS_BASE_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/vpn/blossom-sprinkler-quickrun.eth1.stpvpn.pcap"
66
67 # DEVICE SIDE
68 ON_ANALYSIS="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/analyses/blossom-sprinkler-quickrun-onClusters-device-side.cls"
69 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/analyses/blossom-sprinkler-quickrun-offClusters-device-side.cls"
70 ON_SIGNATURE="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/signatures/blossom-sprinkler-quickrun-onSignature-device-side.sig"
71 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/signatures/blossom-sprinkler-quickrun-offSignature-device-side.sig"
72 RESULTS_FILE="$OUTPUT_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/blossom-sprinkler-quickrun.eth0.detection.pcap___device-side.detectionresults"
73 SIGNATURE_DURATION="9274"
74 EPSILON="10.0"
75 ON_SKIPPED_PACKETS="-1"
76 #ON_SKIPPED_PACKETS="9"
77 #ON_SKIPPED_PACKETS="11" - from detection PCAP
78 #OFF_SKIPPED_PACKETS="4"
79 OFF_SKIPPED_PACKETS="-1"
80 VPN="b0:b9:8a:73:69:8f"
81
82 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
83 ./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
84
85 # PHONE SIDE
86 ON_ANALYSIS="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/analyses/blossom-sprinkler-quickrun-onClusters-phone-side.cls"
87 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/analyses/blossom-sprinkler-quickrun-offClusters-phone-side.cls"
88 ON_SIGNATURE="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/signatures/blossom-sprinkler-quickrun-onSignature-phone-side.sig"
89 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/signatures/blossom-sprinkler-quickrun-offSignature-phone-side.sig"
90 RESULTS_FILE="$OUTPUT_DIR/blossom-sprinkler/blossom-sprinkler-quickrun/blossom-sprinkler-quickrun.eth0.detection.pcap___phone-side.detectionresults"
91 SIGNATURE_DURATION="3670"
92 EPSILON="10.0"
93 ON_SKIPPED_PACKETS="-1"
94 #ON_SKIPPED_PACKETS="28"
95 #ON_SKIPPED_PACKETS="30" - from detection PCAP
96 #OFF_SKIPPED_PACKETS="8"
97 OFF_SKIPPED_PACKETS="-1"
98 VPN="b0:b9:8a:73:69:8f"
99
100 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
101 ./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
102 # ======================================================================================================================
103
104 # ============================================== BLOSSOM SPRINKLER MODE ================================================
105 PCAP_FILE="$PCAPS_BASE_DIR/blossom-sprinkler/blossom-sprinkler-mode/vpn/blossom-sprinkler-mode.eth1.stpvpn.pcap"
106
107 # PHONE SIDE
108 ON_ANALYSIS="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-mode/analyses/blossom-sprinkler-mode-onClusters-phone-side.cls"
109 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-mode/analyses/blossom-sprinkler-mode-offClusters-phone-side.cls"
110 ON_SIGNATURE="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-mode/signatures/blossom-sprinkler-mode-onSignature-phone-side.sig"
111 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/blossom-sprinkler/blossom-sprinkler-mode/signatures/blossom-sprinkler-mode-offSignature-phone-side.sig"
112 RESULTS_FILE="$OUTPUT_DIR/blossom-sprinkler/blossom-sprinkler-mode/blossom-sprinkler-mode.eth0.detection.pcap___phone-side.detectionresults"
113 SIGNATURE_DURATION="1977"
114 EPSILON="10.0"
115 ON_SKIPPED_PACKETS="-1"
116 OFF_SKIPPED_PACKETS="-1"
117 VPN="b0:b9:8a:73:69:8f"
118
119 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
120 ./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
121 # ======================================================================================================================
122
123 # ==================================================== D-LINK PLUG =====================================================
124 PCAP_FILE="$PCAPS_BASE_DIR/dlink-plug/vpn/dlink-plug.eth1.stpvpn.pcap"
125
126 # DEVICE SIDE
127 ON_ANALYSIS="$SIGNATURES_BASE_DIR/dlink-plug/analyses/dlink-plug-onClusters-device-side.cls"
128 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/dlink-plug/analyses/dlink-plug-offClusters-device-side.cls"
129 ON_SIGNATURE="$SIGNATURES_BASE_DIR/dlink-plug/signatures/dlink-plug-onSignature-device-side.sig"
130 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/dlink-plug/signatures/dlink-plug-offSignature-device-side.sig"
131 RESULTS_FILE="$OUTPUT_DIR/dlink-plug/dlink-plug.eth0.detection.pcap___device-side.detectionresults"
132 SIGNATURE_DURATION="8866"
133 EPSILON="10.0"
134 #ON_SKIPPED_PACKETS="33"
135 ON_SKIPPED_PACKETS="-1"
136 #OFF_SKIPPED_PACKETS="33"
137 OFF_SKIPPED_PACKETS="-1"
138 VPN="b0:b9:8a:73:69:8f"
139
140 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
141 ./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
142
143 # PHONE SIDE
144 ON_ANALYSIS="$SIGNATURES_BASE_DIR/dlink-plug/analyses/dlink-plug-onClusters-phone-side.cls"
145 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/dlink-plug/analyses/dlink-plug-offClusters-phone-side.cls"
146 ON_SIGNATURE="$SIGNATURES_BASE_DIR/dlink-plug/signatures/dlink-plug-onSignature-phone-side.sig"
147 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/dlink-plug/signatures/dlink-plug-offSignature-phone-side.sig"
148 RESULTS_FILE="$OUTPUT_DIR/dlink-plug/dlink-plug.eth0.detection.pcap___phone-side.detectionresults"
149 SIGNATURE_DURATION="193"
150 EPSILON="10.0"
151 ON_SKIPPED_PACKETS="-1"
152 #ON_SKIPPED_PACKETS="2"
153 #ON_SKIPPED_PACKETS="4" - from detection PCAP
154 #OFF_SKIPPED_PACKETS="4"
155 OFF_SKIPPED_PACKETS="-1"
156 VPN="b0:b9:8a:73:69:8f"
157
158 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
159 ./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
160 # ======================================================================================================================
161
162 # ==================================================== D-LINK SIREN ====================================================
163 PCAP_FILE="$PCAPS_BASE_DIR/dlink-siren/vpn/dlink-siren.eth1.stpvpn.pcap"
164
165 # PHONE SIDE
166 ON_ANALYSIS="$SIGNATURES_BASE_DIR/dlink-siren/analyses/dlink-siren-onClusters-phone-side.cls"
167 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/dlink-siren/analyses/dlink-siren-offClusters-phone-side.cls"
168 ON_SIGNATURE="$SIGNATURES_BASE_DIR/dlink-siren/signatures/dlink-siren-onSignature-phone-side.sig"
169 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/dlink-siren/signatures/dlink-siren-offSignature-phone-side.sig"
170 RESULTS_FILE="$OUTPUT_DIR/dlink-siren/dlink-siren.eth0.detection.pcap___phone-side.detectionresults"
171 SIGNATURE_DURATION="71"
172 EPSILON="10.0"
173 #ON_SKIPPED_PACKETS="3"
174 #OFF_SKIPPED_PACKETS="5"
175 ON_SKIPPED_PACKETS="-1"
176 OFF_SKIPPED_PACKETS="-1"
177 VPN="b0:b9:8a:73:69:8f"
178
179 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
180 ./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
181 # ======================================================================================================================
182
183 # =============================================== ECOBEE THERMOSTAT HVAC ===============================================
184 PCAP_FILE="$PCAPS_BASE_DIR/ecobee-thermostat/ecobee-thermostat-hvac/vpn/ecobee-thermostat-hvac.eth1.stpvpn.pcap"
185
186 # PHONE SIDE
187 ON_ANALYSIS="$SIGNATURES_BASE_DIR/ecobee-thermostat/ecobee-thermostat-hvac/analyses/ecobee-thermostat-hvac-onClusters-phone-side.cls"
188 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/ecobee-thermostat/ecobee-thermostat-hvac/analyses/ecobee-thermostat-hvac-offClusters-phone-side.cls"
189 ON_SIGNATURE="$SIGNATURES_BASE_DIR/ecobee-thermostat/ecobee-thermostat-hvac/signatures/ecobee-thermostat-hvac-onSignature-phone-side.sig"
190 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/ecobee-thermostat/ecobee-thermostat-hvac/signatures/ecobee-thermostat-hvac-offSignature-phone-side.sig"
191 RESULTS_FILE="$OUTPUT_DIR/ecobee-thermostat/ecobee-thermostat-hvac/ecobee-thermostat-hvac.eth0.detection.pcap___phone-side.detectionresults"
192 SIGNATURE_DURATION="733"
193 EPSILON="10.0"
194 ON_SKIPPED_PACKETS="-1"
195 OFF_SKIPPED_PACKETS="-1"
196 VPN="b0:b9:8a:73:69:8f"
197
198 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
199 ./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
200
201 # ======================================================================================================================
202
203 # =============================================== ECOBEE THERMOSTAT FAN ================================================
204 PCAP_FILE="$PCAPS_BASE_DIR/ecobee-thermostat/ecobee-thermostat-fan/vpn/ecobee-thermostat-fan.eth1.stpvpn.pcap"
205
206 # PHONE SIDE
207 ON_ANALYSIS="$SIGNATURES_BASE_DIR/ecobee-thermostat/ecobee-thermostat-fan/analyses/ecobee-thermostat-fan-onClusters-phone-side.cls"
208 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/ecobee-thermostat/ecobee-thermostat-fan/analyses/ecobee-thermostat-fan-offClusters-phone-side.cls"
209 ON_SIGNATURE="$SIGNATURES_BASE_DIR/ecobee-thermostat/ecobee-thermostat-fan/signatures/ecobee-thermostat-fan-onSignature-phone-side.sig"
210 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/ecobee-thermostat/ecobee-thermostat-fan/signatures/ecobee-thermostat-fan-offSignature-phone-side.sig"
211 RESULTS_FILE="$OUTPUT_DIR/ecobee-thermostat/ecobee-thermostat-fan/ecobee-thermostat-fan.eth0.detection.pcap___phone-side.detectionresults"
212 SIGNATURE_DURATION="1953"
213 EPSILON="10.0"
214 ON_SKIPPED_PACKETS="-1"
215 OFF_SKIPPED_PACKETS="-1"
216 VPN="b0:b9:8a:73:69:8f"
217
218 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
219 #./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
220
221 # ======================================================================================================================
222
223 # ================================================= KWIKSET DOORLOCK ===================================================
224 PCAP_FILE="$PCAPS_BASE_DIR/kwikset-doorlock/vpn/kwikset-doorlock.eth1.stpvpn.pcap"
225
226 # Has no device side signature.
227
228 # PHONE SIDE
229 ON_ANALYSIS="$SIGNATURES_BASE_DIR/kwikset-doorlock/analyses/kwikset-doorlock-onClusters-phone-side.cls"
230 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/kwikset-doorlock/analyses/kwikset-doorlock-offClusters-phone-side.cls"
231 ON_SIGNATURE="$SIGNATURES_BASE_DIR/kwikset-doorlock/signatures/kwikset-doorlock-onSignature-phone-side.sig"
232 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/kwikset-doorlock/signatures/kwikset-doorlock-offSignature-phone-side.sig"
233 RESULTS_FILE="$OUTPUT_DIR/kwikset-doorlock/kwikset-doorlock.eth0.detection.pcap___phone-side.detectionresults"
234 SIGNATURE_DURATION="3161"
235 EPSILON="10.0"
236 #ON_SKIPPED_PACKETS="12"
237 #OFF_SKIPPED_PACKETS="6"
238 #OFF_SKIPPED_PACKETS="33" - from detection PCAP
239 ON_SKIPPED_PACKETS="-1"
240 OFF_SKIPPED_PACKETS="-1"
241 VPN="b0:b9:8a:73:69:8f"
242
243 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
244 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
245 # ======================================================================================================================
246
247 # ================================================= NEST THERMOSTAT ====================================================
248 PCAP_FILE="$PCAPS_BASE_DIR/nest-thermostat/vpn/nest-thermostat.eth1.stpvpn.pcap"
249
250 # Has no device side signature.
251
252 # PHONE SIDE
253 ON_ANALYSIS="$SIGNATURES_BASE_DIR/nest-thermostat/analyses/nest-thermostat-onClusters-phone-side.cls"
254 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/nest-thermostat/analyses/nest-thermostat-offClusters-phone-side.cls"
255 ON_SIGNATURE="$SIGNATURES_BASE_DIR/nest-thermostat/signatures/nest-thermostat-onSignature-phone-side.sig"
256 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/nest-thermostat/signatures/nest-thermostat-offSignature-phone-side.sig"
257 RESULTS_FILE="$OUTPUT_DIR/nest-thermostat/nest-thermostat.eth0.detection.pcap___phone-side.detectionresults"
258 SIGNATURE_DURATION="1179"
259 EPSILON="10.0"
260 #ON_SKIPPED_PACKETS="12"
261 #OFF_SKIPPED_PACKETS="39"
262 ON_SKIPPED_PACKETS="-1"
263 OFF_SKIPPED_PACKETS="-1"
264 VPN="b0:b9:8a:73:69:8f"
265
266 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
267 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
268 # ======================================================================================================================
269
270 # ============================================== RACHIO SPRINKLER QUICK RUN ============================================
271 PCAP_FILE="$PCAPS_BASE_DIR/rachio-sprinkler/rachio-sprinkler-quickrun/vpn/rachio-sprinkler-quickrun.eth1.stpvpn.pcap"
272
273 # DEVICE SIDE
274 ON_ANALYSIS="$SIGNATURES_BASE_DIR/rachio-sprinkler/rachio-sprinkler-quickrun/analyses/rachio-sprinkler-quickrun-onClusters-device-side.cls"
275 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/rachio-sprinkler/rachio-sprinkler-quickrun/analyses/rachio-sprinkler-quickrun-offClusters-device-side.cls"
276 ON_SIGNATURE="$SIGNATURES_BASE_DIR/rachio-sprinkler/rachio-sprinkler-quickrun/signatures/rachio-sprinkler-quickrun-onSignature-device-side.sig"
277 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/rachio-sprinkler/rachio-sprinkler-quickrun/signatures/rachio-sprinkler-quickrun-offSignature-device-side.sig"
278 RESULTS_FILE="$OUTPUT_DIR/rachio-sprinkler/rachio-sprinkler-quickrun/rachio-sprinkler-quickrun.eth0.detection.pcap___device-side.detectionresults"
279 SIGNATURE_DURATION="2695"
280 EPSILON="10.0"
281 ON_SKIPPED_PACKETS="-1"
282 OFF_SKIPPED_PACKETS="-1"
283 VPN="b0:b9:8a:73:69:8f"
284
285 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
286 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
287 # ======================================================================================================================
288
289 # ================================================= RACHIO SPRINKLER MODE ==============================================
290 PCAP_FILE="$PCAPS_BASE_DIR/rachio-sprinkler/rachio-sprinkler-mode/vpn/rachio-sprinkler-mode.eth1.stpvpn.pcap"
291
292 # DEVICE SIDE
293 ON_ANALYSIS="$SIGNATURES_BASE_DIR/rachio-sprinkler/rachio-sprinkler-mode/analyses/rachio-sprinkler-mode-onClusters-device-side.cls"
294 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/rachio-sprinkler/rachio-sprinkler-mode/analyses/rachio-sprinkler-mode-offClusters-device-side.cls"
295 ON_SIGNATURE="$SIGNATURES_BASE_DIR/rachio-sprinkler/rachio-sprinkler-mode/signatures/rachio-sprinkler-mode-onSignature-device-side.sig"
296 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/rachio-sprinkler/rachio-sprinkler-mode/signatures/rachio-sprinkler-mode-offSignature-device-side.sig"
297 RESULTS_FILE="$OUTPUT_DIR/rachio-sprinkler/rachio-sprinkler-mode/rachio-sprinkler-mode.eth0.detection.pcap___device-side.detectionresults"
298 SIGNATURE_DURATION="2791"
299 EPSILON="10.0"
300 ON_SKIPPED_PACKETS="-1"
301 OFF_SKIPPED_PACKETS="-1"
302 VPN="b0:b9:8a:73:69:8f"
303
304 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
305 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
306 # ======================================================================================================================
307
308 # ===================================================== RING ALARM =====================================================
309 PCAP_FILE="$PCAPS_BASE_DIR/ring-alarm/vpn/ring-alarm.eth1.stpvpn.pcap"
310
311 # DEVICE SIDE
312 ON_ANALYSIS="$SIGNATURES_BASE_DIR/ring-alarm/analyses/ring-alarm-onClusters-device-side.cls"
313 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/ring-alarm/analyses/ring-alarm-offClusters-device-side.cls"
314 ON_SIGNATURE="$SIGNATURES_BASE_DIR/ring-alarm/signatures/ring-alarm-onSignature-device-side.sig"
315 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/ring-alarm/signatures/ring-alarm-offSignature-device-side.sig"
316 RESULTS_FILE="$OUTPUT_DIR/ring-alarm/ring-alarm.eth0.detection.pcap___device-side.detectionresults"
317 SIGNATURE_DURATION="665"
318 EPSILON="10.0"
319 ON_SKIPPED_PACKETS="-1"
320 OFF_SKIPPED_PACKETS="-1"
321 VPN="b0:b9:8a:73:69:8f"
322 VPN="b0:b9:8a:73:69:8f"
323
324 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
325 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
326 # ======================================================================================================================
327
328 # ================================================= ROOMBA VACUUM ROBOT ================================================
329 PCAP_FILE="$PCAPS_BASE_DIR/roomba-vacuum-robot/vpn/roomba-vacuum-robot.eth1.stpvpn.pcap"
330
331 # PHONE SIDE
332 ON_ANALYSIS="$SIGNATURES_BASE_DIR/roomba-vacuum-robot/analyses/roomba-vacuum-robot-onClusters-phone-side.cls"
333 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/roomba-vacuum-robot/analyses/roomba-vacuum-robot-offClusters-phone-side.cls"
334 ON_SIGNATURE="$SIGNATURES_BASE_DIR/roomba-vacuum-robot/signatures/roomba-vacuum-robot-onSignature-phone-side.sig"
335 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/roomba-vacuum-robot/signatures/roomba-vacuum-robot-offSignature-phone-side.sig"
336 RESULTS_FILE="$OUTPUT_DIR/roomba-vacuum-robot/roomba-vacuum-robot.eth0.detection.pcap___phone-side.detectionresults"
337 SIGNATURE_DURATION="5959"
338 EPSILON="10.0"
339 ON_SKIPPED_PACKETS="-1"
340 OFF_SKIPPED_PACKETS="-1"
341 VPN="b0:b9:8a:73:69:8f"
342
343 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
344 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
345 # ======================================================================================================================
346
347 # =============================================== SENGLED BULB ON/OFF ==================================================
348 PCAP_FILE="$PCAPS_BASE_DIR/sengled-bulb/sengled-bulb-onoff/vpn/sengled-bulb-onoff.eth1.stpvpn.pcap"
349
350 # PHONE SIDE
351 ON_ANALYSIS="$SIGNATURES_BASE_DIR/sengled-bulb/sengled-bulb-onoff/analyses/sengled-bulb-onoff-onClusters-phone-side.cls"
352 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/sengled-bulb/sengled-bulb-onoff/analyses/sengled-bulb-onoff-offClusters-phone-side.cls"
353 ON_SIGNATURE="$SIGNATURES_BASE_DIR/sengled-bulb/sengled-bulb-onoff/signatures/sengled-bulb-onoff-onSignature-phone-side.sig"
354 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/sengled-bulb/sengled-bulb-onoff/signatures/sengled-bulb-onoff-offSignature-phone-side.sig"
355 RESULTS_FILE="$OUTPUT_DIR/sengled-bulb/sengled-bulb-onoff/sengled-bulb-onoff.eth0.detection.pcap___phone-side.detectionresults"
356 SIGNATURE_DURATION="10045"
357 EPSILON="10.0"
358 ON_SKIPPED_PACKETS="-1"
359 OFF_SKIPPED_PACKETS="-1"
360 VPN="b0:b9:8a:73:69:8f"
361
362 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
363 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
364 # ======================================================================================================================
365
366 # =============================================== SENGLED BULB INTENSITY ===============================================
367 PCAP_FILE="$PCAPS_BASE_DIR/sengled-bulb/sengled-bulb-intensity/vpn/sengled-bulb-intensity.eth1.stpvpn.pcap"
368
369 # PHONE SIDE
370 ON_ANALYSIS="$SIGNATURES_BASE_DIR/sengled-bulb/sengled-bulb-intensity/analyses/sengled-bulb-intensity-onClusters-phone-side.cls"
371 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/sengled-bulb/sengled-bulb-intensity/analyses/sengled-bulb-intensity-offClusters-phone-side.cls"
372 ON_SIGNATURE="$SIGNATURES_BASE_DIR/sengled-bulb/sengled-bulb-intensity/signatures/sengled-bulb-intensity-onSignature-phone-side.sig"
373 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/sengled-bulb/sengled-bulb-intensity/signatures/sengled-bulb-intensity-offSignature-phone-side.sig"
374 RESULTS_FILE="$OUTPUT_DIR/sengled-bulb/sengled-bulb-intensity/sengled-bulb-intensity.eth0.detection.pcap___phone-side.detectionresults"
375 SIGNATURE_DURATION="7888"
376 EPSILON="10.0"
377 ON_SKIPPED_PACKETS="-1"
378 OFF_SKIPPED_PACKETS="-1"
379 VPN="b0:b9:8a:73:69:8f"
380
381 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
382 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
383 # ======================================================================================================================
384
385 # ====================================================== ST PLUG =======================================================
386 PCAP_FILE="$PCAPS_BASE_DIR/st-plug/vpn/st-plug.eth1.stpvpn.pcap"
387
388 # Has no device side signature.
389
390 # PHONE SIDE
391 ON_ANALYSIS="$SIGNATURES_BASE_DIR/st-plug/analyses/st-plug-onClusters-phone-side.cls"
392 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/st-plug/analyses/st-plug-offClusters-phone-side.cls"
393 ON_SIGNATURE="$SIGNATURES_BASE_DIR/st-plug/signatures/st-plug-onSignature-phone-side.sig"
394 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/st-plug/signatures/st-plug-offSignature-phone-side.sig"
395 RESULTS_FILE="$OUTPUT_DIR/st-plug/st-plug.eth0.detection.pcap___phone-side.detectionresults"
396 SIGNATURE_DURATION="2445"
397 #ON_SKIPPED_PACKETS="136"
398 #OFF_SKIPPED_PACKETS="9"
399 ON_SKIPPED_PACKETS="-1"
400 OFF_SKIPPED_PACKETS="-1"
401 VPN="b0:b9:8a:73:69:8f"
402
403 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
404 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
405 # ======================================================================================================================
406
407 # ==================================================== TP-LINK PLUG ====================================================
408 PCAP_FILE="$PCAPS_BASE_DIR/tplink-plug/vpn/tplink-plug.eth1.stpvpn.pcap"
409
410 # DEVICE SIDE OUTBOUND (contains only those packets that go through the WAN port, i.e., only the 556, 1293 sequence)
411 ON_ANALYSIS="$SIGNATURES_BASE_DIR/tplink-plug/analyses/tplink-plug-onClusters-device-side.cls"
412 OFF_ANALYSIS="$SIGNATURES_BASE_DIR/tplink-plug/analyses/tplink-plug-offClusters-device-side.cls"
413 ON_SIGNATURE="$SIGNATURES_BASE_DIR/tplink-plug/signatures/tplink-plug-onSignature-device-side-outbound.sig"
414 OFF_SIGNATURE="$SIGNATURES_BASE_DIR/tplink-plug/signatures/tplink-plug-offSignature-device-side-outbound.sig"
415 RESULTS_FILE="$OUTPUT_DIR/tplink-plug/tplink-plug.eth0.detection.pcap___device-side-outbound.detectionresults"
416 SIGNATURE_DURATION="224"
417 EPSILON="10.0"
418 #ON_SKIPPED_PACKETS="3"
419 #OFF_SKIPPED_PACKETS="4"
420 ON_SKIPPED_PACKETS="-1"
421 OFF_SKIPPED_PACKETS="-1"
422 VPN="b0:b9:8a:73:69:8f"
423
424 PROGRAM_ARGS="'$PCAP_FILE' '$ON_ANALYSIS' '$OFF_ANALYSIS' '$ON_SIGNATURE' '$OFF_SIGNATURE' '$RESULTS_FILE' '$SIGNATURE_DURATION' '$EPSILON' '$ON_SKIPPED_PACKETS' '$OFF_SKIPPED_PACKETS' '$VPNCMD' '$VPN'"
425 ##./gradlew run -DmainClass=edu.uci.iotproject.detection.layer2.Layer2SignatureDetector --args="$PROGRAM_ARGS"
426
427 # Phone side does not make sense as it is merely a subset of the device side and does not differentiate ONs from OFFs.
428 # ======================================================================================================================