1 00:00:00,000 --> 00:00:01,000 Hello, everyone. 2 00:00:02,360 --> 00:00:03,680 Hello, good night. 3 00:00:04,060 --> 00:00:05,360 Thanks a lot for your time. 4 00:00:05,460 --> 00:00:08,440 Thanks a lot for being here in this last talk. 5 00:00:08,540 --> 00:00:09,200 It's 7 p.m. 6 00:00:09,200 --> 00:00:10,140 It's a little bit late. 7 00:00:11,080 --> 00:00:12,880 And I appreciate your time. 8 00:00:14,480 --> 00:00:15,880 I'm Alejandro Hernandez. 9 00:00:16,740 --> 00:00:17,840 I will be presenting 10 00:00:19,300 --> 00:00:20,720 some interesting stuff 11 00:00:20,720 --> 00:00:21,940 that I have found in 12 00:00:21,940 --> 00:00:23,920 EEG technologies this last year. 13 00:00:25,760 --> 00:00:28,100 I would like to quickly introduce myself. 14 00:00:28,100 --> 00:00:30,460 I'm a consultant from IOactive. 15 00:00:30,660 --> 00:00:31,600 It's a security company. 16 00:00:33,900 --> 00:00:35,400 I do fuzzing. 17 00:00:35,500 --> 00:00:36,300 I love programming. 18 00:00:36,820 --> 00:00:38,740 I'm a security enthusiast. 19 00:00:38,840 --> 00:00:41,620 I've been for 12 years now 20 00:00:41,620 --> 00:00:43,080 in the security industry, 21 00:00:43,320 --> 00:00:44,000 in the hacking scene. 22 00:00:45,340 --> 00:00:47,760 I have a background 23 00:00:47,760 --> 00:00:49,580 from computer systems engineering. 24 00:00:49,780 --> 00:00:52,160 I didn't study any medical 25 00:00:52,160 --> 00:00:53,580 related career. 26 00:00:53,760 --> 00:00:55,660 Doctor of neuroscience or whatever. 27 00:00:55,860 --> 00:00:57,900 So I really apologize 28 00:00:58,100 --> 00:01:00,280 if I say something wrong 29 00:01:00,280 --> 00:01:01,580 technically in this 30 00:01:01,580 --> 00:01:03,360 because I started from scratch 31 00:01:03,360 --> 00:01:05,840 from just computer background 32 00:01:05,840 --> 00:01:07,900 in this new topic for me, right? 33 00:01:09,360 --> 00:01:11,200 So in this talk, 34 00:01:11,300 --> 00:01:12,640 I'm going to quickly 35 00:01:13,620 --> 00:01:15,840 start talking about neuroscience 101. 36 00:01:16,400 --> 00:01:18,280 What is EEG? 37 00:01:18,480 --> 00:01:19,360 What are brainwaves? 38 00:01:19,480 --> 00:01:21,640 And then we can jump 39 00:01:21,640 --> 00:01:23,280 into the insecurity aspects 40 00:01:23,280 --> 00:01:25,540 I have found in design, in cryptography, 41 00:01:25,680 --> 00:01:26,520 in authentication. 42 00:01:28,100 --> 00:01:29,700 And just the conclusions of this. 43 00:01:30,860 --> 00:01:32,260 This is not an invasive 44 00:01:32,260 --> 00:01:33,860 brain computer interface talk. 45 00:01:34,100 --> 00:01:36,020 So don't expect to be Johnny Mnemonic 46 00:01:36,020 --> 00:01:36,700 after this talk. 47 00:01:38,140 --> 00:01:39,360 So you remember 48 00:01:40,300 --> 00:01:42,020 Keanu Reeves using his brain 49 00:01:42,020 --> 00:01:43,220 as a hard drive, right? 50 00:01:43,360 --> 00:01:44,540 So this is not invasive. 51 00:01:44,940 --> 00:01:47,620 Sorry, if you expect to have a hard drive 52 00:01:47,620 --> 00:01:48,540 in your brain after this, 53 00:01:48,680 --> 00:01:49,640 this is not the talk. 54 00:01:51,940 --> 00:01:53,180 Why this talk? 55 00:01:53,340 --> 00:01:55,360 You might wonder why brainwaves? 56 00:01:55,460 --> 00:01:56,760 What's the purpose of this? 57 00:01:58,100 --> 00:02:00,320 Nowadays, we care about 58 00:02:00,320 --> 00:02:01,680 information security. 59 00:02:02,080 --> 00:02:03,320 Your mobile security, 60 00:02:03,680 --> 00:02:04,520 your car hacking, 61 00:02:04,680 --> 00:02:06,440 your internet of things. 62 00:02:06,800 --> 00:02:08,600 We put more attention in security 63 00:02:08,600 --> 00:02:10,660 of your coffee machine in your house 64 00:02:10,660 --> 00:02:11,240 or your fridge. 65 00:02:11,340 --> 00:02:12,740 But what about your bill signals? 66 00:02:13,140 --> 00:02:15,540 In this case, let's say EEG. 67 00:02:15,980 --> 00:02:18,180 What is the security in the acquisition, 68 00:02:18,560 --> 00:02:20,020 in the processing, in the storage 69 00:02:20,020 --> 00:02:22,040 and the transmission of your brainwaves 70 00:02:22,040 --> 00:02:26,380 to different digital mediums? 71 00:02:27,540 --> 00:02:28,080 So, 72 00:02:28,100 --> 00:02:29,400 this is very important for me. 73 00:02:29,580 --> 00:02:31,600 EEG tech is being adopted 74 00:02:31,600 --> 00:02:32,540 more and more. 75 00:02:32,700 --> 00:02:35,000 This is not only in clinical use nowadays. 76 00:02:35,360 --> 00:02:37,320 We will see some examples in a few minutes. 77 00:02:38,580 --> 00:02:39,960 Why is this becoming 78 00:02:39,960 --> 00:02:41,860 an important technology and we should 79 00:02:41,860 --> 00:02:43,420 and we must put security 80 00:02:43,420 --> 00:02:44,320 in that part. 81 00:02:45,120 --> 00:02:47,640 And sure, brain stuff is cool, isn't it? 82 00:02:47,780 --> 00:02:49,620 We've seen like a lot of movies recently, 83 00:02:49,900 --> 00:02:51,180 brain computer interfaces, 84 00:02:51,420 --> 00:02:53,920 so for me, playing a little bit with the brain 85 00:02:53,920 --> 00:02:55,620 and brainwaves is very interesting. 86 00:02:56,100 --> 00:02:57,840 Okay, in order to understand 87 00:02:58,100 --> 00:02:59,900 EEG technology, we need to understand 88 00:03:00,640 --> 00:03:02,680 where the waves come from, right? 89 00:03:02,920 --> 00:03:03,980 So basically, 90 00:03:04,180 --> 00:03:06,620 we have the outer layer 91 00:03:06,620 --> 00:03:07,460 of your brain. 92 00:03:07,800 --> 00:03:08,540 This is the cortex. 93 00:03:08,820 --> 00:03:12,120 And in there, there's many neurons, 94 00:03:12,480 --> 00:03:13,940 many connections between neurons, 95 00:03:14,080 --> 00:03:14,780 transmitting information, 96 00:03:15,240 --> 00:03:16,760 chemical information, electronic, 97 00:03:17,840 --> 00:03:18,700 electric information. 98 00:03:19,620 --> 00:03:21,600 And this information depends 99 00:03:21,600 --> 00:03:24,220 on the different regions of the brain. 100 00:03:24,380 --> 00:03:25,580 We have different lobes, 101 00:03:25,720 --> 00:03:26,600 the parietal lobes. 102 00:03:28,100 --> 00:03:29,020 The synapse has a different function. 103 00:03:29,140 --> 00:03:31,580 Every part of your brain is connected, 104 00:03:31,780 --> 00:03:33,380 is related to any of these 105 00:03:34,300 --> 00:03:35,460 different things, 106 00:03:35,680 --> 00:03:37,840 like sensory association, 107 00:03:38,340 --> 00:03:39,860 the smelling, the tasting, 108 00:03:40,180 --> 00:03:41,660 the motor things 109 00:03:41,660 --> 00:03:42,640 of your body. 110 00:03:44,540 --> 00:03:45,800 Neurons, they are connected 111 00:03:45,800 --> 00:03:47,740 between each other 112 00:03:47,740 --> 00:03:49,240 through electrical signals, 113 00:03:49,460 --> 00:03:50,380 chemical signals. 114 00:03:50,760 --> 00:03:52,460 And some of these signals, 115 00:03:52,580 --> 00:03:55,820 they are escaped between this synapse activity. 116 00:03:56,140 --> 00:03:57,760 And this is the things that 117 00:03:58,100 --> 00:03:58,820 we catch with EEG, 118 00:03:58,980 --> 00:04:01,320 with electroencephalography technologies, right? 119 00:04:01,740 --> 00:04:04,040 So, the synaptic activity 120 00:04:05,240 --> 00:04:06,160 is affected 121 00:04:06,160 --> 00:04:07,140 by external things, 122 00:04:07,340 --> 00:04:09,240 like if you have depression 123 00:04:09,240 --> 00:04:10,860 or if you are on drugs, 124 00:04:10,940 --> 00:04:12,780 on cocaine, or caffeine, 125 00:04:12,940 --> 00:04:13,580 or alcohol, 126 00:04:13,840 --> 00:04:16,020 your brain waves are different 127 00:04:16,020 --> 00:04:17,580 than from a baby sleeping, 128 00:04:17,780 --> 00:04:18,600 for example, right? 129 00:04:20,780 --> 00:04:23,600 In one year studying this new topic for me, 130 00:04:23,640 --> 00:04:24,640 I really understood 131 00:04:24,640 --> 00:04:26,540 why in the media, 132 00:04:28,100 --> 00:04:28,800 on Discovery Channel, 133 00:04:28,940 --> 00:04:30,560 they say that the human brain 134 00:04:30,560 --> 00:04:31,420 is super complex. 135 00:04:31,640 --> 00:04:33,980 After reading some books 136 00:04:33,980 --> 00:04:35,940 and a lot of articles on the internet, 137 00:04:36,060 --> 00:04:38,420 I found really complex information there. 138 00:04:38,840 --> 00:04:40,520 So, thank you neuroscience. 139 00:04:41,180 --> 00:04:43,480 They are doing really cool stuff 140 00:04:43,480 --> 00:04:44,060 in this area. 141 00:04:44,480 --> 00:04:46,920 Okay, what are brain waves? 142 00:04:47,220 --> 00:04:47,960 The brain waves, 143 00:04:48,120 --> 00:04:50,040 we need first to understand 144 00:04:50,040 --> 00:04:51,240 what's the difference between 145 00:04:51,240 --> 00:04:52,860 invasive and non-invasive 146 00:04:52,860 --> 00:04:54,100 computer interfaces. 147 00:04:58,100 --> 00:04:59,400 This is an implant here. 148 00:04:59,580 --> 00:05:01,960 This is the cortex of your brain. 149 00:05:02,080 --> 00:05:04,280 This is an electronic implant. 150 00:05:04,780 --> 00:05:05,780 This is invasive. 151 00:05:06,080 --> 00:05:08,320 And non-invasive is this electrode 152 00:05:08,320 --> 00:05:09,340 on your scalp, 153 00:05:10,040 --> 00:05:11,660 outside from your head. 154 00:05:13,820 --> 00:05:14,980 This is an active, 155 00:05:15,160 --> 00:05:17,160 an invasive brain computer interface. 156 00:05:17,420 --> 00:05:20,000 You have the implantation here 157 00:05:20,000 --> 00:05:20,760 in your head, 158 00:05:20,860 --> 00:05:23,200 and it's easier to get information 159 00:05:23,200 --> 00:05:23,900 from your brain, 160 00:05:23,920 --> 00:05:25,720 because you are getting information 161 00:05:28,300 --> 00:05:30,280 This is one of the most famous cases, 162 00:05:30,440 --> 00:05:30,840 BrainGate. 163 00:05:31,020 --> 00:05:32,100 This is the first woman 164 00:05:32,100 --> 00:05:35,540 controlling a mechanical arm, 165 00:05:35,660 --> 00:05:37,600 just thinking of the movements 166 00:05:37,600 --> 00:05:38,640 of the arm. 167 00:05:39,400 --> 00:05:40,520 On the other hand, 168 00:05:40,560 --> 00:05:42,340 we have the non-invasive technologies. 169 00:05:42,580 --> 00:05:43,840 The most famous one is EEG. 170 00:05:44,000 --> 00:05:46,200 EEG stands for electroencephalography. 171 00:05:47,160 --> 00:05:48,700 And basically are the electrodes 172 00:05:48,700 --> 00:05:49,620 in the scalp. 173 00:05:50,160 --> 00:05:51,640 And it looks like this. 174 00:05:52,120 --> 00:05:53,220 Basically it's the representation 175 00:05:58,100 --> 00:05:58,380 of the muscles, right? 176 00:05:59,380 --> 00:06:01,920 Represented over time. 177 00:06:03,780 --> 00:06:04,320 Now, 178 00:06:05,300 --> 00:06:07,840 this is a very easy to use method. 179 00:06:08,080 --> 00:06:09,960 It's been used in the clinical 180 00:06:10,540 --> 00:06:11,840 and the medical industry 181 00:06:11,840 --> 00:06:12,960 for years, for decades, 182 00:06:13,220 --> 00:06:16,180 in order to find different things 183 00:06:16,180 --> 00:06:17,440 that I will show you in a bit. 184 00:06:17,900 --> 00:06:19,540 However, the EEG technologies 185 00:06:19,540 --> 00:06:22,100 are susceptible to noise. 186 00:06:23,900 --> 00:06:25,200 I really like this quote 187 00:06:25,200 --> 00:06:27,100 from this famous neuroscience. 188 00:06:28,320 --> 00:06:29,400 John Donoghue, 189 00:06:29,910 --> 00:06:31,220 I don't know how to pronounce 190 00:06:31,220 --> 00:06:32,400 his last name, sorry. 191 00:06:33,960 --> 00:06:36,020 He said that current brain technologies 192 00:06:36,020 --> 00:06:38,200 is like trying to listen 193 00:06:38,200 --> 00:06:40,100 to a conversation in a football stadium 194 00:06:40,100 --> 00:06:40,780 from a blimp. 195 00:06:40,940 --> 00:06:42,900 A blimp is like this balloon 196 00:06:42,900 --> 00:06:44,800 flying over the stadium. 197 00:06:45,040 --> 00:06:46,800 That difficult is because 198 00:06:46,800 --> 00:06:49,240 your synaptic activity has to go through 199 00:06:49,240 --> 00:06:51,700 to the school, to different layers. 200 00:06:52,040 --> 00:06:53,760 So, in order to get 201 00:06:53,760 --> 00:06:55,400 a good EEG quality, 202 00:06:55,620 --> 00:06:57,200 you need amplifiers in between, 203 00:06:58,100 --> 00:06:58,900 encoders in between, 204 00:06:59,080 --> 00:07:00,040 filters, etc. 205 00:07:01,000 --> 00:07:01,560 Okay. 206 00:07:04,120 --> 00:07:04,840 This is, 207 00:07:05,020 --> 00:07:07,600 these are the main frequencies 208 00:07:07,600 --> 00:07:08,900 in brain waves. 209 00:07:10,000 --> 00:07:11,040 Every frequency 210 00:07:11,040 --> 00:07:13,820 is relaxed with different mind states. 211 00:07:14,140 --> 00:07:14,820 For example, 212 00:07:14,940 --> 00:07:16,880 the lower frequencies, theta, 213 00:07:17,100 --> 00:07:19,580 are for people who are completely 214 00:07:20,100 --> 00:07:22,020 sleeping or are really calm. 215 00:07:22,260 --> 00:07:23,320 On the other hand, 216 00:07:23,320 --> 00:07:24,700 you have like beta activity, 217 00:07:24,880 --> 00:07:26,940 which is when you're awake, when you're putting attention, 218 00:07:28,100 --> 00:07:28,400 you're like, oh, it's all you now. 219 00:07:28,560 --> 00:07:30,080 Thank you for your beta waves. 220 00:07:32,440 --> 00:07:33,660 Well, there are some 221 00:07:33,660 --> 00:07:34,920 standards in the industry, 222 00:07:35,120 --> 00:07:36,960 like this one, 1020 systems to put 223 00:07:36,960 --> 00:07:38,480 the electrodes in your scalp. 224 00:07:38,700 --> 00:07:40,080 This is very famous. 225 00:07:40,440 --> 00:07:42,520 So remember, the brain waves are analog. 226 00:07:42,820 --> 00:07:44,740 If you want to process it in computers, 227 00:07:44,960 --> 00:07:47,800 we need the ones and zeros, right? 228 00:07:47,980 --> 00:07:49,560 So we need to digitalize 229 00:07:49,560 --> 00:07:52,300 through amplifiers and converters. 230 00:07:52,940 --> 00:07:54,240 After we have the signals, 231 00:07:54,460 --> 00:07:55,760 they look like this. 232 00:07:56,500 --> 00:07:57,860 This is a real EEG 233 00:07:58,100 --> 00:07:59,180 recording. Every line 234 00:07:59,180 --> 00:08:01,460 is an electrode in your brain. 235 00:08:03,900 --> 00:08:05,840 You can find patterns. 236 00:08:06,700 --> 00:08:07,960 I mean, not you, not me, 237 00:08:08,040 --> 00:08:09,960 neuroscience people who study 238 00:08:09,960 --> 00:08:11,960 this, because the things that I see 239 00:08:11,960 --> 00:08:13,460 here, I don't understand. 240 00:08:13,660 --> 00:08:15,280 I only see waves. 241 00:08:15,500 --> 00:08:17,860 But, for example, there are doctors 242 00:08:17,860 --> 00:08:19,960 in neuroscience. I got a book 243 00:08:19,960 --> 00:08:20,860 by this book. 244 00:08:22,100 --> 00:08:22,860 This is 245 00:08:22,860 --> 00:08:24,920 basically an atlas. 246 00:08:25,400 --> 00:08:27,760 And inside, you might find 247 00:08:29,180 --> 00:08:30,720 interesting brain waves. 248 00:08:30,940 --> 00:08:32,080 Like I found, 249 00:08:32,160 --> 00:08:33,220 for example, a kid 250 00:08:33,220 --> 00:08:35,180 who had a lithium toxicity, 251 00:08:35,500 --> 00:08:37,060 and you can see his brain waves 252 00:08:37,060 --> 00:08:38,980 acting in a really weird 253 00:08:40,560 --> 00:08:41,140 way. 254 00:08:41,760 --> 00:08:43,160 I'll show you very quick. 255 00:08:44,280 --> 00:08:45,820 This is basically 256 00:08:45,820 --> 00:08:46,580 a big atlas. 257 00:08:46,820 --> 00:08:48,680 And they, the doctor, they explain 258 00:08:48,680 --> 00:08:50,540 you here what you can see 259 00:08:51,280 --> 00:08:52,460 in some cases. 260 00:08:53,120 --> 00:08:55,880 So it's very complex. 261 00:08:57,480 --> 00:08:58,060 And 262 00:08:58,100 --> 00:08:58,780 okay. 263 00:09:09,360 --> 00:09:11,600 This is the book that I showed you. 264 00:09:12,640 --> 00:09:13,120 Now, 265 00:09:13,780 --> 00:09:15,800 how did you acquire the brain waves? 266 00:09:16,780 --> 00:09:18,100 You can buy commercial 267 00:09:19,760 --> 00:09:20,240 hardware. 268 00:09:20,920 --> 00:09:21,980 I was talking with 269 00:09:22,460 --> 00:09:23,840 her a little bit, 270 00:09:23,960 --> 00:09:24,840 a few minutes ago. 271 00:09:25,260 --> 00:09:27,440 And she's agreed with me that 272 00:09:29,360 --> 00:09:30,320 it's very expensive 273 00:09:30,320 --> 00:09:31,720 hardware that is being used 274 00:09:31,720 --> 00:09:33,460 in hospitals, in the medical 275 00:09:34,180 --> 00:09:35,080 industry nowadays. 276 00:09:35,400 --> 00:09:36,480 Up to $1,000. 277 00:09:37,280 --> 00:09:38,460 However, there are 278 00:09:38,460 --> 00:09:40,680 these technologies being adopted 279 00:09:40,680 --> 00:09:41,640 and it's being 280 00:09:43,820 --> 00:09:45,460 implemented in these small devices. 281 00:09:45,780 --> 00:09:47,360 This is a mind wave. 282 00:09:47,520 --> 00:09:48,680 It's one of the cheapest ones. 283 00:09:48,840 --> 00:09:50,940 It's super simple. 100 bucks. 284 00:09:51,140 --> 00:09:53,520 And you have one electrode in your brain. 285 00:09:53,800 --> 00:09:54,940 I'll show you in a bit. 286 00:09:57,200 --> 00:09:58,520 On the other hand, 287 00:09:58,580 --> 00:09:59,540 you have the do it yourself. 288 00:09:59,720 --> 00:10:00,800 You have open source software. 289 00:10:00,920 --> 00:10:03,080 And there are many cool applications out there. 290 00:10:03,140 --> 00:10:04,700 Like really good stuff out there. 291 00:10:04,920 --> 00:10:06,360 Open EG, open BCI. 292 00:10:07,680 --> 00:10:09,480 This is the first demonstration. 293 00:10:09,600 --> 00:10:10,320 It's very quick. 294 00:10:10,480 --> 00:10:11,540 It's nothing complex. 295 00:10:11,680 --> 00:10:12,940 It's just the visualization 296 00:10:14,040 --> 00:10:15,560 of the brain waves. 297 00:10:33,360 --> 00:10:33,880 . 298 00:10:50,740 --> 00:10:52,920 So I'm very nervous 299 00:10:52,920 --> 00:10:54,540 and I'm sweating a little bit. 300 00:10:54,940 --> 00:10:56,660 So I'm not sure 301 00:10:56,660 --> 00:10:58,760 if it will get my brain 302 00:10:58,760 --> 00:10:59,320 activity now. 303 00:11:07,460 --> 00:11:08,420 It's turned on. 304 00:11:16,740 --> 00:11:18,760 I need to meditate a little bit. 305 00:11:18,900 --> 00:11:19,460 One sec. 306 00:11:20,520 --> 00:11:21,420 I think this is 307 00:11:21,420 --> 00:11:24,780 the hardest demo I've ever done. 308 00:11:24,940 --> 00:11:25,380 Seriously. 309 00:11:26,160 --> 00:11:28,260 This is the hardest demo I've ever done. 310 00:11:30,820 --> 00:11:31,140 . 311 00:11:34,300 --> 00:11:34,940 . 312 00:11:34,940 --> 00:11:35,040 . 313 00:11:35,040 --> 00:11:35,720 . 314 00:11:35,720 --> 00:11:36,040 . 315 00:11:42,240 --> 00:11:42,880 . 316 00:11:54,940 --> 00:11:55,480 . 317 00:11:58,480 --> 00:11:59,440 . 318 00:11:59,440 --> 00:12:00,200 . 319 00:12:07,720 --> 00:12:08,680 . 320 00:12:08,680 --> 00:12:08,740 . 321 00:12:08,740 --> 00:12:08,760 . 322 00:12:08,760 --> 00:12:09,240 . 323 00:12:09,240 --> 00:12:09,260 . 324 00:12:09,260 --> 00:12:09,460 . 325 00:12:09,460 --> 00:12:09,480 . 326 00:12:09,480 --> 00:12:09,500 . 327 00:12:11,620 --> 00:12:12,580 . 328 00:12:16,620 --> 00:12:17,580 . 329 00:12:18,500 --> 00:12:19,080 . 330 00:12:22,160 --> 00:12:22,740 . 331 00:12:35,080 --> 00:12:35,660 . 332 00:12:35,660 --> 00:12:36,060 . 333 00:12:36,640 --> 00:12:37,220 . 334 00:12:37,220 --> 00:12:37,260 . 335 00:12:37,260 --> 00:12:37,400 . 336 00:12:37,400 --> 00:12:37,580 . 337 00:12:37,580 --> 00:12:37,620 . 338 00:12:37,620 --> 00:12:38,420 . 339 00:12:38,420 --> 00:12:38,460 . 340 00:12:38,460 --> 00:12:38,500 . 341 00:12:38,500 --> 00:12:39,360 . 342 00:12:44,240 --> 00:12:45,640 . 343 00:12:52,060 --> 00:12:52,760 . 344 00:12:55,720 --> 00:12:57,120 . 345 00:12:57,120 --> 00:12:57,600 . 346 00:12:57,600 --> 00:12:58,500 . 347 00:12:59,380 --> 00:12:59,400 . 348 00:13:00,500 --> 00:13:01,320 . 349 00:13:01,320 --> 00:13:01,340 . 350 00:13:01,340 --> 00:13:01,360 . 351 00:13:03,300 --> 00:13:04,580 . 352 00:13:06,200 --> 00:13:07,480 . 353 00:13:07,480 --> 00:13:07,680 . 354 00:13:07,680 --> 00:13:08,900 . 355 00:13:08,900 --> 00:13:09,220 . 356 00:13:10,760 --> 00:13:12,040 . 357 00:13:12,040 --> 00:13:12,680 . 358 00:13:12,680 --> 00:13:12,700 . 359 00:13:12,700 --> 00:13:12,720 . 360 00:13:12,720 --> 00:13:13,000 . 361 00:13:15,200 --> 00:13:16,180 . 362 00:13:27,580 --> 00:13:28,560 . 363 00:13:28,560 --> 00:13:29,050 . 364 00:13:30,720 --> 00:13:31,700 . 365 00:13:31,700 --> 00:13:32,400 . 366 00:13:32,400 --> 00:13:32,420 . 367 00:13:32,420 --> 00:13:32,440 . 368 00:13:32,440 --> 00:13:32,460 . 369 00:13:32,460 --> 00:13:32,480 . 370 00:13:32,480 --> 00:13:32,800 . 371 00:13:40,440 --> 00:13:41,200 . 372 00:13:46,660 --> 00:13:47,420 . 373 00:13:47,420 --> 00:13:47,440 . 374 00:13:47,440 --> 00:13:47,460 . 375 00:13:47,460 --> 00:13:47,840 . 376 00:13:54,680 --> 00:13:55,440 . 377 00:13:59,720 --> 00:14:00,480 . 378 00:14:00,480 --> 00:14:00,500 . 379 00:14:00,500 --> 00:14:01,660 . 380 00:14:07,400 --> 00:14:08,800 . 381 00:14:15,280 --> 00:14:16,680 . 382 00:14:16,680 --> 00:14:16,700 . 383 00:14:16,700 --> 00:14:18,320 . 384 00:14:18,320 --> 00:14:18,800 . 385 00:14:18,800 --> 00:14:18,820 . 386 00:14:20,800 --> 00:14:22,200 . 387 00:14:22,200 --> 00:14:23,420 . 388 00:14:23,420 --> 00:14:23,440 . 389 00:14:23,440 --> 00:14:23,480 . 390 00:14:23,480 --> 00:14:23,500 . 391 00:14:23,500 --> 00:14:23,520 . 392 00:14:26,440 --> 00:14:27,140 . 393 00:14:27,140 --> 00:14:28,220 . 394 00:14:35,540 --> 00:14:36,660 . 395 00:14:43,100 --> 00:14:44,220 . 396 00:14:44,220 --> 00:14:44,380 . 397 00:14:44,380 --> 00:14:45,460 . 398 00:14:45,460 --> 00:14:45,480 . 399 00:14:45,480 --> 00:14:45,500 . 400 00:14:45,500 --> 00:14:45,520 . 401 00:14:45,520 --> 00:14:45,540 . 402 00:14:45,540 --> 00:14:45,560 . 403 00:14:45,560 --> 00:14:46,440 . 404 00:14:46,440 --> 00:14:47,360 . 405 00:14:49,620 --> 00:14:50,740 . 406 00:14:50,740 --> 00:14:50,980 . 407 00:14:50,980 --> 00:14:52,260 . 408 00:14:56,900 --> 00:14:58,300 . 409 00:15:01,440 --> 00:15:02,840 . 410 00:15:02,840 --> 00:15:04,380 . 411 00:15:04,380 --> 00:15:04,480 . 412 00:15:04,480 --> 00:15:04,540 . 413 00:15:04,540 --> 00:15:04,560 . 414 00:15:11,500 --> 00:15:12,900 . 415 00:15:21,040 --> 00:15:21,440 . 416 00:15:24,760 --> 00:15:25,160 . 417 00:15:29,500 --> 00:15:29,900 . 418 00:15:29,900 --> 00:15:30,520 . 419 00:15:30,520 --> 00:15:30,720 . 420 00:15:32,580 --> 00:15:32,980 . 421 00:15:32,980 --> 00:15:33,060 . 422 00:15:33,060 --> 00:15:33,080 . 423 00:15:33,080 --> 00:15:33,100 . 424 00:15:33,100 --> 00:15:33,140 . 425 00:15:33,140 --> 00:15:33,160 . 426 00:15:33,160 --> 00:15:43,820 to the car. In security, we know passwords. What about past thoughts? There is people doing 427 00:15:43,820 --> 00:15:48,860 research on this because they think that brain waves are unique to each individual. What could 428 00:15:48,860 --> 00:15:55,020 possibly go wrong if you can't do reply attacks, right? I will show you in a bit. There is 429 00:15:55,020 --> 00:16:02,940 people using EEG to identify cyber security threats in companies. Military use. Now they are 430 00:16:02,940 --> 00:16:08,980 using soldiers' thoughts to launch computer commands without human interaction, just their 431 00:16:08,980 --> 00:16:15,800 brain waves. This is a long-term research by the U.S. Army as well. They are showing to the 432 00:16:15,800 --> 00:16:22,020 soldiers different images. So they just see the images and they can find threatening 433 00:16:22,020 --> 00:16:28,480 scenarios after they put the results in the machine learning algorithm. They just see the 434 00:16:28,480 --> 00:16:32,920 pictures and perhaps in the future they will use the images to identify the threats. So 435 00:16:32,940 --> 00:16:40,120 they use this information to find potential threatening scenarios in the field. For 436 00:16:40,120 --> 00:16:48,840 relaxation, this is called neurofeedback. So you can control your breathing, control your mind. 437 00:16:49,140 --> 00:16:57,800 There are people like this Mexican, she is doing really cool stuff with art and EEG. She is 438 00:16:58,320 --> 00:17:02,920 doing art with some speakers, water and her brain waves. And she is using this information to 439 00:17:02,940 --> 00:17:03,840 jump off of YouTube, right? After we would use our brain, she is getting an investment of 440 00:17:03,840 --> 00:17:08,320 or something. This is the Может. This is an important case. I'm not sure about laws or 441 00:17:08,320 --> 00:17:15,920 regulations but now this murderer, this criminal, he defends, he ordered to do a quantitative 442 00:17:15,920 --> 00:17:26,740 EEG. So the result of an EEG scan could affect the outcome of the trial, right? People in 443 00:17:26,740 --> 00:17:32,520 video games. People doing their own ne where marketing to predict movie success. Neuraware, 444 00:17:32,640 --> 00:17:32,920 this is Alec act the old rule .. not likeッ™ it looks like this. Why is it so difficult? The 445 00:17:32,940 --> 00:17:38,100 this is really funny and really interesting thing is basically 446 00:17:38,100 --> 00:17:48,500 wearables with an EEG device. It has to be in Japan, right? 447 00:18:03,260 --> 00:18:12,760 So, based on their emotions, on their the EEG device is just 448 00:18:12,760 --> 00:18:21,120 basically measuring her attention levels or her relaxation levels, right? What about the 449 00:18:21,120 --> 00:18:29,200 21st century Tinder? Like connecting people through that's real. That's completely real. 450 00:18:30,990 --> 00:18:32,920 What about surfers in the coast of Mexico? 451 00:18:32,920 --> 00:18:38,760 In Mexico doing neuroscience, scanning brain waves. Sending your brain waves to the cloud. 452 00:18:40,660 --> 00:18:46,160 Neuromore is a new application that takes your brain waves and uploading it to the cloud for 453 00:18:46,160 --> 00:18:54,600 further research for different purposes. So, what possible attack scenarios do we have here? 454 00:18:55,940 --> 00:19:02,400 We can do theoretically now because the technology is new. Theoretically we could do replay attacks. 455 00:19:03,340 --> 00:19:09,720 We could control things, drones, and to bypass authentication if we can do replay 456 00:19:09,720 --> 00:19:16,380 attacks. What about if there is an attacker in the hospital network. And you can unauthorized 457 00:19:16,380 --> 00:19:23,720 update the record of a criminal or patient in the network. Because of the lack of encryption they 458 00:19:23,720 --> 00:19:30,860 have authentication right? Or what about as there are spamers now treating 3000 email addresses. 459 00:19:31,240 --> 00:19:32,900 What about trading efficiently and proving your... knowledge when it's about transmission with curse and snare不錯? 460 00:19:32,920 --> 00:19:36,440 data for behavioral analysis in neuromarketing. I just had this 461 00:19:36,440 --> 00:19:41,080 random ideas but this, you know, it could be, they could be real 462 00:19:41,080 --> 00:19:45,400 scenarios in five years. What about client-side attacks? Like 463 00:19:45,400 --> 00:19:48,500 in this software that I showed you a few minutes ago, if you 464 00:19:48,500 --> 00:19:53,640 corrupt some data, some metadata of the brain waves files, you 465 00:19:53,640 --> 00:19:58,000 can exploit, you can find bugs in client-side applications. 466 00:19:58,920 --> 00:20:02,420 Okay, the first one, design. There are some applications that 467 00:20:02,420 --> 00:20:06,640 include security in the design of their products, of their 468 00:20:06,640 --> 00:20:09,600 software. They put authentication, encryption, for 469 00:20:09,600 --> 00:20:12,300 example, I quickly checked neuromore and I found that they 470 00:20:12,300 --> 00:20:15,620 are uploading the data to an SSL channel, which is good, right? 471 00:20:16,860 --> 00:20:23,460 But on the other hand, in the 90% of the manuals and the 472 00:20:23,460 --> 00:20:26,180 specifications and brochure that I read from many different 473 00:20:26,180 --> 00:20:28,960 vendors, many different companies, I look for specific 474 00:20:28,960 --> 00:20:32,400 keywords, like secure, to find words that are secure. I look 475 00:20:32,420 --> 00:20:35,380 for words like security or secure or crypt or authentication or 476 00:20:35,380 --> 00:20:41,080 password. And in no one of them, 90% they are not implementing 477 00:20:41,530 --> 00:20:46,960 security in their design, right? If we go to the further, if we go 478 00:20:46,960 --> 00:20:52,420 further in encryption, in transit, many technologies, many 479 00:20:52,420 --> 00:20:57,660 vendors are using TCPIP as their communication channel. So brain 480 00:20:57,660 --> 00:21:02,100 waves on the wire, what could possibly go wrong again? If you 481 00:21:02,100 --> 00:21:05,460 go to Google and you just look for neuro acquisition or your 482 00:21:05,460 --> 00:21:08,840 product name and TCP port, you will find different products 483 00:21:08,840 --> 00:21:13,000 supporting TCPIP. These applications, for example, 484 00:21:13,040 --> 00:21:17,140 Siesta, is an ambulatory EEG device in hospitals, so the 485 00:21:17,140 --> 00:21:23,920 patient has a Wi-Fi enabled application with this high tech 486 00:21:23,920 --> 00:21:29,540 security web, wireless, whatever. Could you imagine a 487 00:21:29,540 --> 00:21:32,080 really attack scenario there? Just someone cracking the 488 00:21:32,100 --> 00:21:37,040 Wi-Fi easily and sniffing the network there. I'm not sure if 489 00:21:37,040 --> 00:21:41,160 this product has encryption or not, but in many, many vendors 490 00:21:41,160 --> 00:21:44,580 put this information, like this technology enables your computer 491 00:21:44,580 --> 00:21:47,900 and all the computers in the land to easily connect to this 492 00:21:47,900 --> 00:21:51,400 and blah, blah, blah. They don't mention security or 493 00:21:51,400 --> 00:21:54,500 authentication or something, right? There are many different 494 00:21:54,500 --> 00:22:01,040 products. This is a specific case, the first case, 495 00:22:01,040 --> 00:22:04,040 Neuralectrics, it's a company based in Barcelona. They're doing 496 00:22:04,040 --> 00:22:10,920 really cool stuff in this area. And in their manual, you will see 497 00:22:10,920 --> 00:22:15,400 that this is the software. This is the hardware and when the 498 00:22:15,400 --> 00:22:17,260 software connects to the hardware, this middleware 499 00:22:17,260 --> 00:22:23,380 software opens a TCP port, one, two, three, four, and when it's 500 00:22:23,380 --> 00:22:26,340 ready, you just connect to the port and you will be receiving 501 00:22:26,920 --> 00:22:30,860 the information on the channels in a raw data, right? That 502 00:22:30,860 --> 00:22:36,040 means that if someone is connected to this cap, anyone 503 00:22:36,040 --> 00:22:38,480 else could connect to this port and just receiving their brain 504 00:22:38,480 --> 00:22:44,220 waves, right? Because there is no encryption in here. This is a 505 00:22:44,220 --> 00:22:47,220 library. It's a very used library nowadays for different 506 00:22:47,220 --> 00:22:51,660 applications, LSL. I read a little bit of their source code 507 00:22:52,300 --> 00:22:57,680 and basically they're sending and receiving data through binary 508 00:23:00,840 --> 00:23:04,040 variables. I mean, they're just sending the data on the wire. 509 00:23:04,200 --> 00:23:08,480 They're not encrypting. They're not decrypting. And time for a 510 00:23:08,480 --> 00:23:11,620 demo. In the following demo, I will be using this very old and 511 00:23:11,620 --> 00:23:14,760 unmaintained software. It's NeuroServer. It's very old but 512 00:23:14,760 --> 00:23:18,040 it's still in use nowadays because it's being adopted by 513 00:23:18,040 --> 00:23:22,600 some other applications like Brain Bay. Basically, it's a 514 00:23:22,600 --> 00:23:27,260 server on TCP IP using the EDF format. I will talk about EDF in 515 00:23:27,260 --> 00:23:30,840 a bit. The normal scenario is this. This is a server that is 516 00:23:30,860 --> 00:23:36,260 using this software, the mind wave device, and I will be 517 00:23:36,260 --> 00:23:38,840 sending my brain waves to the EDF server. Remember the IP 518 00:23:38,840 --> 00:23:43,780 address. 149, the host name Daria. This is the server. After 519 00:23:43,780 --> 00:23:47,100 that, there will be an attacker in the middle. This is another 520 00:23:47,100 --> 00:23:53,360 virtual machine. It's an IP 60, right? Since it's over TCP IP, 521 00:23:53,580 --> 00:23:56,560 that means that, you know, TCP IP doesn't have security in 522 00:23:56,560 --> 00:24:00,660 design. Authentication or encryption. So with a basic 523 00:24:00,660 --> 00:24:04,820 R poisoning that all of you know how to do really easily, you 524 00:24:04,820 --> 00:24:08,820 can basically sniff brain waves, right? I'll show you. 525 00:24:37,120 --> 00:24:42,400 So here I have my ARP table, not poisoned yet. In this 526 00:24:42,400 --> 00:24:57,860 computer, this is the NeuroServer. This is the 527 00:24:57,860 --> 00:25:00,640 attacker computer. This is the attacker computer. This is the 528 00:25:11,640 --> 00:25:15,520 brain wave. So now the man in the middle attack is taking 529 00:25:15,520 --> 00:25:23,440 place. Now you see they are poisoned. This is another program. 530 00:25:23,640 --> 00:25:28,340 It's called brain wave. So you can design different signalings 531 00:25:28,340 --> 00:25:30,640 and different things. In this case, this is the brain wave. 532 00:25:30,660 --> 00:25:36,660 In this case, I have this com reader connecting to the com5, 533 00:25:36,820 --> 00:25:39,880 which is my Bluetooth device talking to the brain wave, 534 00:25:40,040 --> 00:25:44,580 right? So I'm going to connect to the device. Now it's 535 00:25:44,580 --> 00:26:00,640 connected. It's ready to receive waves. So I'm going to connect to 536 00:26:05,320 --> 00:26:09,120 the device. So the output of this channel, I will send this 537 00:26:09,120 --> 00:26:14,980 output to this basic oscilloscope just to visualize the waves. But 538 00:26:14,980 --> 00:26:18,980 on the other hand, I use the TCP sender. The TCP sender is 539 00:26:18,980 --> 00:26:22,180 sending my brain waves to the NeuroServer, which is this IP 540 00:26:22,180 --> 00:26:25,620 address, patient name, Alejandro Hernandez, and some extra 541 00:26:25,620 --> 00:26:30,640 information like sampling rates, et cetera. So this is the brain 542 00:26:30,640 --> 00:26:40,060 wave. Let's see the NeuroServer is ready. And I start the 543 00:26:40,060 --> 00:26:46,440 session. So these are my brain waves now. I will connect to the 544 00:26:46,440 --> 00:26:51,320 server. It's connected. And I will start sending my brain 545 00:26:51,320 --> 00:26:57,780 waves. 3,000 packets, many packets sent. NeuroServer 546 00:26:57,780 --> 00:26:59,740 received my information here. 547 00:27:01,020 --> 00:27:08,120 So it works, right? But here the attacker is receiving a copy. 548 00:27:08,380 --> 00:27:12,300 This is just the protocol of the NeuroServer protocol. There are 549 00:27:12,300 --> 00:27:15,400 different protocols, there are different file formats. And these 550 00:27:15,400 --> 00:27:19,860 OKs are from NeuroServer. It's not encrypted. These numbers, 551 00:27:20,060 --> 00:27:24,360 these minus numbers are my brain waves, my signals. My going 552 00:27:24,360 --> 00:27:28,740 back and forth, et cetera. So this is just a demonstration, a 553 00:27:28,740 --> 00:27:30,620 book. There is still a lot of data. So I'm going to connect to 554 00:27:30,640 --> 00:27:33,100 encryption in the product. It's very easy just to do many 555 00:27:33,100 --> 00:27:37,340 attacks and to receive and decode in the proper file format 556 00:27:37,340 --> 00:27:40,380 or protocol. It's very easy. All you need to know is the 557 00:27:40,380 --> 00:27:44,200 information. This information is going through the edf file 558 00:27:44,200 --> 00:27:50,880 format so it's quite simple to decode this information. OK. It 559 00:27:50,880 --> 00:27:55,400 was a first demo for encryption. Now, encryption in 560 00:27:55,400 --> 00:28:00,620 REST. In REST, EG data is in files, like in PDF or in the 561 00:28:00,620 --> 00:28:05,020 files or Word documents there is no encryption. So also I was 562 00:28:05,020 --> 00:28:08,860 wondering what about the cloud? How are these companies 563 00:28:08,860 --> 00:28:13,600 protecting your brain waves in the cloud, right? And I had this 564 00:28:13,600 --> 00:28:18,380 idea to use Shodan and looking for net bills shares on the 565 00:28:18,380 --> 00:28:22,780 internet. Just looking for specific product names like 566 00:28:22,780 --> 00:28:27,860 brain vision or neuro server and yeah, there is people sharing 567 00:28:28,820 --> 00:28:33,940 brain waves there. What about authentication? If you don't 568 00:28:33,940 --> 00:28:36,800 have authentication, okay, we need authentication between 569 00:28:36,800 --> 00:28:41,400 first, when you connect to a port you need to supply something 570 00:28:41,400 --> 00:28:45,240 before start receiving the information, right? Also there 571 00:28:45,240 --> 00:28:47,480 should be authentication between the acquisition device 572 00:28:47,480 --> 00:28:51,760 and the other point. For example between this device and the 573 00:28:51,760 --> 00:28:54,680 drone. Otherwise there will be anyone else just connecting 574 00:28:54,680 --> 00:28:57,840 through the drone theoretically and taking control of the 575 00:28:57,860 --> 00:28:59,520 feed. If there is no authentication, right, there 576 00:28:59,520 --> 00:29:02,400 should be something in between, I don't know, a password, a hash, 577 00:29:02,560 --> 00:29:08,320 something, an authentication mechanism. This is another case. 578 00:29:08,440 --> 00:29:11,220 It's the same that I described to you before. Just connect to 579 00:29:11,220 --> 00:29:15,720 the TCP port and it works. And the following demo is changing 580 00:29:15,720 --> 00:29:21,820 the patient name in the middle attack in the same scenario. So 581 00:29:22,900 --> 00:29:27,840 I will send the patient name, Alejandro Hernandez. I'm going to 582 00:29:27,860 --> 00:29:29,500 send the patient name. But if there is an attacker in between, 583 00:29:29,700 --> 00:29:33,040 in the following demo I will be changing my name for just John 584 00:29:33,040 --> 00:29:36,160 Connor. In the neuro server we will be receiving this name. 585 00:29:36,400 --> 00:29:40,600 This is a proof of concept. This is just a nasty change. But 586 00:29:41,060 --> 00:29:43,680 you can modify brain waves. Remember brain waves are just 587 00:29:44,400 --> 00:29:56,200 bytes. Remember, they are just bytes. So imagine that you are 588 00:29:56,200 --> 00:30:01,480 sending brain waves to a server which hikes spikes or low spikes 589 00:30:02,020 --> 00:30:04,120 and there is an attacker in between modifying this 590 00:30:04,120 --> 00:30:10,080 information to send fake brain waves to the other point, right? 591 00:30:10,380 --> 00:30:20,260 It works. So in this example, I will run neuro server again and 592 00:30:20,260 --> 00:30:25,720 in the attacker side I will modify the hacking tool, the 593 00:30:25,720 --> 00:30:31,940 main in the middle tool, in order to modify on the fly this 594 00:30:31,940 --> 00:30:32,480 information. 595 00:31:15,380 --> 00:31:16,780 . 596 00:31:20,260 --> 00:31:21,520 Okay, so. 597 00:31:21,640 --> 00:31:22,860 . 598 00:31:25,720 --> 00:31:31,380 the session. This is my brain waves. I open the TCP sender. 599 00:31:31,560 --> 00:31:34,920 Look, patient name, Alejandro Hernandez. I'm going to send 600 00:31:34,920 --> 00:31:41,160 this information to this server. I connect to it and I start 601 00:31:41,160 --> 00:31:43,860 sending the information. It's working, right? Sending the 602 00:31:43,860 --> 00:31:47,680 packets and everything. However, the server received junk owner 603 00:31:50,320 --> 00:31:55,440 and the attacker has like yeah, patient name replaced. This is 604 00:31:55,440 --> 00:31:58,860 the attacker, the man in the middle. He could change the raw 605 00:31:58,860 --> 00:32:01,780 brain waves, the patient names or any other information in 606 00:32:01,780 --> 00:32:07,380 between, right? So this is because of the lack of 607 00:32:07,380 --> 00:32:10,960 authentication. Now, passing to the next topic, resilience. 608 00:32:11,320 --> 00:32:13,960 Resilience basically is the ability to support or to recover 609 00:32:13,960 --> 00:32:19,740 from adversity, in this case denial of service attacks. I was 610 00:32:19,740 --> 00:32:24,720 impressed when I had this idea using 90s techniques and it's 611 00:32:24,720 --> 00:32:25,300 still killing. 612 00:32:29,320 --> 00:32:36,280 Seriously. Creating sockets, 10,000 connections, TCP IP. You 613 00:32:36,280 --> 00:32:39,600 couldn't believe it. But most of the application I tested, they 614 00:32:39,600 --> 00:32:43,600 died. So in the following demos, this will be the scenario. I'll 615 00:32:43,600 --> 00:32:47,780 have the brain device here sending to the server. And it's 616 00:32:47,780 --> 00:32:50,700 over TCP. There are many clients. In this case, could be, 617 00:32:50,820 --> 00:32:55,140 I don't know, in the hospital, a monitor showing in real time the 618 00:32:55,140 --> 00:32:59,860 brain waves or a doctor or a physician with a handheld 619 00:33:00,560 --> 00:33:04,280 connecting to the server, seeing the patient data in real time as 620 00:33:04,280 --> 00:33:09,340 well. But if it crashes, no one of the clients will be able to 621 00:33:10,020 --> 00:33:13,520 see the information, right? So for the following demo, I will 622 00:33:13,520 --> 00:33:17,340 be using this software, OpenBive. It's acquisition 623 00:33:17,340 --> 00:33:21,520 server remote denial of service. This is a software for real time 624 00:33:21,520 --> 00:33:25,120 neurosciences and brain computer interfaces. So this is the 625 00:33:52,720 --> 00:33:55,120 acquisition server. I have to send the data to the server, 626 00:33:55,140 --> 00:34:01,900 say that I will be using the NeuroSky mindset driver that is 627 00:34:01,900 --> 00:34:10,440 connected on the port COM5. Okay. And that I will be receiving 628 00:34:14,480 --> 00:34:20,700 this information, the electrode information. I connect to the 629 00:34:20,700 --> 00:34:26,300 driver. I start. Now these are my brain signals. It's just 630 00:34:26,880 --> 00:34:30,500 saying that it's ready. It's working, right? All you have to 631 00:34:30,500 --> 00:34:34,980 do is connect to the TCP port 1024. What is this listening? 632 00:34:35,440 --> 00:34:38,760 And I will be using the second part of the software. It's just 633 00:34:38,760 --> 00:34:42,840 a designer. Like in brain bay, like something like brain bay, 634 00:34:42,940 --> 00:34:46,820 you have different objects here like file readers, signals, 635 00:34:47,560 --> 00:34:50,680 processors. In this case I have a computer that I'm going to 636 00:34:50,680 --> 00:34:54,260 connect to an acquisition client. It's connecting to the 637 00:34:54,260 --> 00:34:59,580 port 1024. And it's sending the output to an oscilloscope quickly. 638 00:35:09,890 --> 00:35:20,180 One second. Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay. 639 00:35:22,740 --> 00:35:33,520 Okay. Here we go. This is my real time signals. This is the 640 00:35:33,520 --> 00:35:39,700 server. Working. Accepting new connections, but if we launch a 641 00:35:39,700 --> 00:35:50,240 basic attack, check it and see. It's still working, right? Now I 642 00:35:50,240 --> 00:35:50,660 have a generator on the illuminating. I can connect to the MIDI account or everything else in the port 1024. 643 00:35:50,680 --> 00:36:00,560 generic port stressor connecting to this port and I will be doing 10,000 connections. This is 644 00:36:00,560 --> 00:36:15,140 a 90s technique. After a few seconds, boom. Cannot connect. This cannot connect anymore to 645 00:36:15,140 --> 00:36:20,420 the server. It's just stopped. So no one else could connect to the server. And this just died. 646 00:36:20,600 --> 00:36:28,240 The application died. So this is a software bug. It's a denial of service attack. So it worked. 647 00:36:28,580 --> 00:36:40,140 I have another example. This is from another company. I have this recorded. So TCP 648 00:36:40,140 --> 00:36:45,120 server. A lot of clients here. Cannot connect. Cannot connect to the server. This is the 649 00:36:47,580 --> 00:36:53,100 same attack in a different port, in a different TCP port that is listening this application and 650 00:36:54,020 --> 00:37:00,900 in no one of the ports you will be able to connect anymore. So the application just hang. You 651 00:37:00,900 --> 00:37:06,680 have to close it because just hang. And this is a proof of my bad English. Hang, hang. I 652 00:37:06,680 --> 00:37:15,060 can't remember the word. Another example. Neuro server. This is some EDF head 653 00:37:15,140 --> 00:37:21,300 that I did. I read the specification which is very simple. You just have to send a malformed 654 00:37:23,380 --> 00:37:29,140 packet. I killed the server by triggering this assertion in programming. This is why it's a good 655 00:37:29,140 --> 00:37:33,600 idea. It's a good practice not to include your assertion in your final products, any kind of 656 00:37:33,600 --> 00:37:39,420 software. You all know this, right? So it was very easy to kill this. So for this I just write 657 00:37:39,420 --> 00:37:45,120 the quick proof of concept code in Python. This is neuro server. This is my code. This is my code. 658 00:37:51,540 --> 00:37:57,140 I'm just open it with GDB which is the debugger for Linux so I can see what happened. 659 00:38:13,620 --> 00:38:14,720 I'm just open it with GDB which is the debugger for Linux so I can see what happened. 660 00:38:17,040 --> 00:38:21,340 And the code is very simple. All you have to do is just send a malformed EDF. 661 00:38:21,900 --> 00:38:22,460 EDF. 662 00:38:42,520 --> 00:38:45,500 Neural server remote denial of service sending the 663 00:38:45,500 --> 00:38:48,280 malformed packet. Neural server should be dead now connecting. 664 00:38:48,280 --> 00:38:59,960 Neural server is down. Yep. Denial of service. This is 665 00:38:59,960 --> 00:39:04,620 another one. It's a memory corruption vulnerability. I 666 00:39:04,620 --> 00:39:08,020 don't have time. I have just five minutes more. So I will go 667 00:39:08,020 --> 00:39:18,100 quickly. It's the same. You have a segmentation fault and we 668 00:39:18,280 --> 00:39:21,040 can see while I was at GDB I was able to see that it was because 669 00:39:21,040 --> 00:39:24,560 of the mem set. This is a boundary checking. It's a normal 670 00:39:24,560 --> 00:39:28,660 security bug. Software bug. This topic is very interesting. 671 00:39:28,860 --> 00:39:33,760 Tower of Babel. Perhaps many of you know the story of Tower of 672 00:39:33,760 --> 00:39:41,140 Babel. Basically in the story of this tower is that humanity we 673 00:39:41,140 --> 00:39:45,860 all spoke the same language. And the humans wanted to reach 674 00:39:45,860 --> 00:39:48,260 the sky. Wanted to reach God. They wanted to reach the sky. 675 00:39:48,280 --> 00:39:56,080 to talk. So they started to create the tower. But when God realized that, he was like, no, I 676 00:39:56,080 --> 00:40:01,700 don't want you to come here. So he changed their languages of many of them. This is the 677 00:40:01,700 --> 00:40:10,340 origin of the languages. This is why we speak like Spanish, English, broken English. And yes, 678 00:40:11,080 --> 00:40:16,780 remember, the origin of EEG technologies is from clinical perspective, from the medicine 679 00:40:16,780 --> 00:40:21,420 perspective. So there are different vendors, many different companies doing products, many 680 00:40:21,420 --> 00:40:27,860 different developers. So there are many compatible formats. Most of them use proprietary 681 00:40:27,860 --> 00:40:32,600 formats. There were some efforts to do standardization, but back in 92, it's an old 682 00:40:32,600 --> 00:40:40,060 format. I spent, it took me weeks, seriously, it took me weeks to go through brochures, 683 00:40:40,100 --> 00:40:46,760 manuals, specification, to do this Excel document. So this helped me a lot. I was able to 684 00:40:46,780 --> 00:40:51,620 do this for my research in order to identify which is the most used file format in EEG 685 00:40:51,620 --> 00:41:00,880 technology. So my conclusion was that EDF, most of the products support EDF and EDF plus. And of 686 00:41:00,880 --> 00:41:07,960 course, they're proprietary formats, right? So that said, I just went and played with different 687 00:41:07,960 --> 00:41:16,240 with EDF format. And remember, parsing is parsing. It's just like parsing any other things. Like 688 00:41:16,780 --> 00:41:24,600 PDF document, parsing a picture. Or basically bytes in data structure. That means that if you 689 00:41:24,600 --> 00:41:32,440 don't put security, you have the same risks as in any other kind of software. You are prone to 690 00:41:32,440 --> 00:41:38,060 buffer overflows, arithmetic calculations, especially here, because here you have a lot of 691 00:41:38,060 --> 00:41:43,600 multiplications, lot of division between frequencies, between number of channels. There are 692 00:41:43,600 --> 00:41:46,760 many, many arithmetic problems here. And how does this change the way we do the data? I'm going to 693 00:41:46,760 --> 00:41:49,880 however the attack surface is very reduced because this file 694 00:41:49,880 --> 00:41:53,340 format is not mainstream. You're not sharing data with your 695 00:41:53,340 --> 00:41:59,580 friend, right? But still the problem is there. And this is 696 00:41:59,580 --> 00:42:03,660 just like this feeling that I have that I think that 697 00:42:03,660 --> 00:42:07,840 developers in this industry come from a different background. 698 00:42:08,160 --> 00:42:14,040 It's not like us that we come from IT background that we know 699 00:42:14,040 --> 00:42:17,980 some secure programming. Perhaps they're not fully aware 700 00:42:17,980 --> 00:42:21,580 of secure programming and they're still using many string 701 00:42:21,580 --> 00:42:27,340 copy basic. I'm not telling that they're insecure. It was just a 702 00:42:27,340 --> 00:42:30,740 quick look. They're really good programmers. They're amazing, 703 00:42:31,380 --> 00:42:39,760 really good. But still there are some insecure functions. But I 704 00:42:39,760 --> 00:42:42,300 haven't had time to go through them and check if they're false 705 00:42:42,300 --> 00:42:44,020 positives or if they're secure. So I'm not telling that they're 706 00:42:44,020 --> 00:42:50,920 security bugs. So I did trivial fuzzing. Just basic fuzzing. 707 00:42:51,020 --> 00:42:58,020 Dumb fuzzing using mangle.c from a colleague of mine. I also use 708 00:42:58,020 --> 00:43:05,200 Microsoft. The test cases there is this network. It's just a 709 00:43:05,660 --> 00:43:10,180 bunch of files from different formats. EDF files from real 710 00:43:10,180 --> 00:43:13,900 people. From patients for research purposes. So you are 711 00:43:14,020 --> 00:43:19,280 able to download different data sets from here to play with. And 712 00:43:19,280 --> 00:43:24,140 this is my fuzzing. I don't know how to say. Schedule my fuzzing 713 00:43:24,140 --> 00:43:27,040 results. I did different. I played with different samples, 714 00:43:27,260 --> 00:43:31,280 different fuzzers, different headers according to the 715 00:43:31,280 --> 00:43:38,900 specification. Percentage and output. And it was not fun. You 716 00:43:38,900 --> 00:43:41,420 know why? Because in the first test cases, most application 717 00:43:41,420 --> 00:43:44,000 broke. It's not this. Fuzzing is not good. It's not good. It's not 718 00:43:44,000 --> 00:43:47,320 not interesting unless you leave your faucet working for hours, 719 00:43:47,600 --> 00:43:50,280 right? And in the end you come the next morning and it's like 720 00:43:50,280 --> 00:43:54,680 hell yeah, I found a bug. But this was not the case. I found 721 00:43:54,680 --> 00:43:58,160 like many segmentation faults, many potential memory corruption 722 00:43:58,160 --> 00:44:02,520 bugs. I will show you quickly some demonstration in some 723 00:44:02,520 --> 00:44:08,700 commercial products and some open source software. This is one of 724 00:44:08,700 --> 00:44:12,020 the most used application inside too by Persyst. It's one of the 725 00:44:12,020 --> 00:44:16,240 most complete applications. It has like a lot of file formats 726 00:44:16,240 --> 00:44:19,900 supporting from different proprietary vendors from 727 00:44:19,900 --> 00:44:30,840 different vendors. And yeah. So this is sick viewer. This is a 728 00:44:30,840 --> 00:44:36,100 sleeping EEG data. This is a basic. So you basically open a 729 00:44:36,100 --> 00:44:42,000 file, sleeping, it's loading and it works, right? If you open 730 00:44:42,000 --> 00:44:57,360 a corrupted file. This one is first. Boom, it died. Let me see 731 00:44:57,360 --> 00:45:11,980 another one. This one is second. This one is third. This one is 732 00:45:21,080 --> 00:45:27,240 fourth. So that one is fifth. This one is fourth and then 733 00:45:27,240 --> 00:45:28,960 this one is fifth. This one is first. So you things like that. 734 00:45:28,960 --> 00:45:29,200 some open source software. It's basic instability kits which you 735 00:45:29,200 --> 00:45:30,140 is very similar to the one I was talking about that the ODA 736 00:45:30,140 --> 00:45:32,940 Google Potential Manager product that they offer more than an 737 00:45:32,940 --> 00:45:41,980 additional life cycleバ fly out anyways. So it's another other 738 00:45:41,980 --> 00:45:49,460 fust. It's opening. Boom. It died. It crashed. There are many segmentation fusts. There are 739 00:45:49,460 --> 00:45:56,160 many vulnerabilities in parsing here. The bugs are still there, you know. But as I said 740 00:45:56,160 --> 00:46:00,920 before, the attack surface is very reduced. This is very important research. This is not my 741 00:46:00,920 --> 00:46:05,720 research. I just, but it's the word to mention. It's like these guys from Berkeley and 742 00:46:05,720 --> 00:46:10,800 Oxford and Geneva, they did this amazing research on the feasibility of side channel attacks 743 00:46:10,800 --> 00:46:17,380 in brain computer interfaces. So basically from their population, they put, they measured the 744 00:46:17,380 --> 00:46:23,340 brain waves from different people. And they showed to these people different pictures from 745 00:46:23,340 --> 00:46:30,800 different banks. And they were just watching the pictures. For example, bank A, bank B, bank C. 746 00:46:31,200 --> 00:46:37,240 But unconsciously, your brain waves behave differently if you see the logo of your bank or 747 00:46:37,240 --> 00:46:40,780 if you see your pin code or if you see people that you know. You know, you know that 748 00:46:40,800 --> 00:46:48,840 your neighborhood in a map. Right? And the outcome of this amazing research is this. That the 749 00:46:48,840 --> 00:46:54,400 entropy of the private information is decreased on the average by approximately 50 to 40 percent 750 00:46:54,400 --> 00:47:02,860 compared to random guessing attacks. So that's really, really cool. Right? Now if we jump to 751 00:47:02,860 --> 00:47:10,440 regulatory compliance best practices for EEG, who is in charge of it? Hypa or I'm not the regular 752 00:47:10,800 --> 00:47:17,860 regulations guy. I don't have any idea. I just found this information on the internet. Also the 753 00:47:17,860 --> 00:47:22,700 FDA, the food and drugs administration is working together with the cybersecurity community to 754 00:47:23,340 --> 00:47:31,460 improve the security in these technologies. I also went to this website. It's some guidelines by 755 00:47:31,460 --> 00:47:40,460 the American clinical neurophysiology society. However, the guidelines are dated 2006, 2008. And 756 00:47:40,460 --> 00:47:45,880 for example, and this one, guidelines for recording EEG on digital media that'll do mentioning 757 00:47:45,880 --> 00:47:54,800 magnetic storage. So in conclusion of all these things definitely we need to put more 758 00:47:54,800 --> 00:48:02,880 security in mind for brain signal team in acquisition, in storage, in transmission. We 759 00:48:02,880 --> 00:48:08,420 needed to put more efforts in file format for more secure programming practices. We need to create or 760 00:48:08,420 --> 00:48:16,400 update best practices for EDG. We have a new terrain to play with networking and parsing. If 761 00:48:16,400 --> 00:48:21,180 you have a drone and you're using it for research, just play with some replay attacks, try 762 00:48:21,180 --> 00:48:27,540 to sniff the data. What if you save your brain waves and you reply this to, I don't know, to 763 00:48:27,540 --> 00:48:32,960 your processes. Would it work? Definitely it would work. If you don't have authentication and 764 00:48:32,960 --> 00:48:40,860 encryption, it will work. You need to test your medical devices and so forth if you are a 765 00:48:40,860 --> 00:48:48,780 vendor. This is for the research, just some other random ideas that I had. What if you scan the 766 00:48:48,780 --> 00:48:53,880 internet with ZMap and you scan for the ports used by non-EDG acquisition software and 767 00:48:53,880 --> 00:49:02,360 hardware? I have found a couple of them. I won't tell you. I was just sniffing brain waves from 768 00:49:02,360 --> 00:49:10,040 someone in the internet. I was just getting the signals from there. It worked. It works. Or I 769 00:49:10,040 --> 00:49:19,080 was thinking the other day, let's say that ten years ago, no one was talking about SCADA or 770 00:49:19,080 --> 00:49:24,240 industrial security. Only a few guys were talking about SCADA hacking and blah, blah, blah 771 00:49:24,240 --> 00:49:31,220 ten years ago. Nowadays we have physical firewalls that goes with deep inspection through 772 00:49:31,220 --> 00:49:37,040 layer seven applications in SCADA. For example, Modbus. So they can go inside the protocol 773 00:49:37,040 --> 00:49:43,100 and detect potential attacks, potential malformed data. So what if we have the same 774 00:49:43,800 --> 00:49:49,400 biosignals, not only for brains, like for other kind of signals from your body. Biosignals are 775 00:49:49,400 --> 00:49:55,760 firewalls or IPS with the same level of inspection in the future. I don't know. I can imagine a 776 00:49:55,760 --> 00:50:01,200 future in hospitals where there are firewalls for this, that all the data back and forth, you know, 777 00:50:01,200 --> 00:50:08,200 from your body to the servers are going in the proper way. This is it. I hope you liked the 778 00:50:08,200 --> 00:50:09,040 presentation. Thank you.