00:00:00.067,00:00:04.238 >>Please help me welcome to the stage Truman Kain [applause] >>Thank you. And I just go my 00:00:04.238,00:00:09.243 uhh, hacker tracker notification, so thank you to the hacker tracker people as 00:00:16.717,00:00:22.623 well. Had to subscribe to my own talk, I mean, come on. Uhm my name is Truman Kain I’m a-a- Pen 00:00:22.623,00:00:25.893 tester at a- Tevora we’re located in Southern California, we are based in Southern 00:00:25.893,00:00:31.865 California and I conduct a social engineering pen test there fishing, phishing physical 00:00:31.865,00:00:36.870 a- so. We’re gonna get into the a- TLDR which is that Autopilot cameras are good for a lot more 00:00:39.039,00:00:45.445 than driving. So are Teslas that’s the end of my fanboy rant. No its not. a- and the 00:00:45.445,00:00:50.751 next slide is gonna be my referral code. No, [audience laughter] not. So the huge 00:00:50.751,00:00:54.655 disclaimer on this is use your own risk everything I’m going to talk about is for educational 00:00:54.655,00:00:58.759 purposes only. Of course check your local and state laws to make sure you’re not breaking 00:00:58.759,00:01:03.697 any laws if you decide to check out this framework. Last year a- Psy and Agent X had a talk on a 00:01:06.066,00:01:10.571 surveillance counter surveillance surveillance detection route that is somewhat 00:01:10.571,00:01:15.676 of what inspired me to submit this talk I spoke with Psy after ahm..a-a around the closing 00:01:15.676,00:01:21.515 ceremony last year about the potential possibility of using phones or something like that 00:01:21.515,00:01:26.520 uhm to basically in real time a- do some kind of license plate detection or to aid in SDRs and 00:01:29.323,00:01:32.826 it just didn’t really seem possible but a- with a- Tesla and Sentry mode is just kind of 00:01:32.826,00:01:38.131 a natural fit and I’ll get into. Uh- why Tesla a- for this kind of framework. So why Tesla, 00:01:38.131,00:01:42.669 there are three cameras built in and really there are eight in the newer vehicles potentially 00:01:42.669,00:01:47.674 all of them uhm- but Tesla gives you access to three feeds. The front camera, the left basically 00:01:50.077,00:01:54.348 what the left right mirrors see as well. So if you plug in a flash drive you’re able to get 00:01:54.348,00:01:57.818 essentially all that video uh- so that’s uh- that built in you don’t have to mount any dash 00:01:57.818,00:02:04.758 cams. Uhm- second is the detailed vehicle and owner API. Basically we can Ping roughly 00:02:04.758,00:02:08.462 every second, we can do it more but you probably get- get- really limited or potentially 00:02:08.462,00:02:12.799 blocked so I’m not really taking any chances with that but every second I can get vehicle 00:02:12.799,00:02:18.505 location data, heading data, how fast I’m going, and so that’s really well you can even, you 00:02:18.505,00:02:22.175 can even program it to honk at people if you want to. Uhm- but- I don’t want to make anyone 00:02:22.175,00:02:27.180 angry. So using that data we are able to correlate with the video makes person uhm- interesting 00:02:29.483,00:02:34.454 use cases. The other part is that its an electric vehicle, sentry mode is uh if you have it 00:02:34.454,00:02:39.092 enabled means that the car is always on. Its not really gonna be using too much extra battery 00:02:39.092,00:02:44.664 uhm- to keep that on. Uhm- so that’s awesome because with a gas vehicle you have to either 00:02:44.664,00:02:48.702 keep the car running if that’s powering your devices or you have to have huge battery pack 00:02:48.702,00:02:52.172 that you have to worry about switching out and charging that type of thing. Uhm- the next 00:02:52.172,00:02:57.778 part is the in car web browser which makes it extremely easy to see these real time 00:02:57.778,00:03:02.783 notifications if uhm- I a follow vehicle is detected. Uhm- of course that’s not completely 00:03:02.783,00:03:08.955 necessary uh- but uh- it definitely helps. So again the basics of what surveillance 00:03:08.955,00:03:14.528 detections scout is, the real-time license plate rec- uh recognition,f- face detection 00:03:14.528,00:03:17.097 those are pretty self explanatory so I’m not gonna go on to those but on the next 00:03:17.097,00:03:22.335 slide I’ll get into what real time it means in this context. Uhm- recon and pattern of life 00:03:22.335,00:03:28.608 querying is essentially just rejecting or just u-using some operators on that data that’s 00:03:28.608,00:03:33.613 found and of course this is uhm- open source and locally deployed. I was very tempted to 00:03:36.283,00:03:41.288 use S3 or AWS service for this type of thing but I definitely decided that was a bad idea uhm- 00:03:44.591,00:03:49.863 because I just feel like its going to end with people getting their uhm footage dumped 00:03:49.863,00:03:55.135 basically. So, highly recommend running this locally and that’s why its not you know what 00:03:55.135,00:04:00.073 natively integrated with s3. So, let’s get into what real-time is. Every minute Tesla is 00:04:02.909,00:04:07.914 writing three mp4 files to this flash drive and so you have a san- and and they’re ro-roughly 00:04:10.484,00:04:14.488 three megs each so every minute you have roughly ninety- ninety megs of video to search through 00:04:14.488,00:04:20.260 as soon as those mp4s hit the flash drive which its not a flash drive we-were using like a 00:04:20.260,00:04:24.397 computer type device to act as the flash drive in this case we’ll talk more about that in a 00:04:24.397,00:04:30.737 second. But as soon as the device hit this disk, I know its not disk its solid state drive 00:04:30.737,00:04:35.342 inference is gonna start uhm right before that we’re just pulling just the I frames to get 00:04:35.342,00:04:40.881 us down from what is the uhm- thirty six frames per second on a normal uhm- video as soon as 00:04:40.881,00:04:45.085 it's written to four frames per second and so we’re getting rid of a lot of those blurred frames 00:04:45.085,00:04:49.156 that we’re not gon- most likely we’re not gonna get anything out of anyway uhm- in you settings 00:04:49.156,00:04:53.927 you can adjust that so. It’s not gonna you know, it’s gonna take longer to run the inference but 00:04:53.927,00:04:57.397 you’re going to have more accurate detections and and more detections so that’s all 00:04:57.397,00:05:02.802 adjustable. But that’s what we might real time to find as soon as the you know files hit the 00:05:02.802,00:05:07.040 disk we start running the inference and then it ends up being pretty fast if you opt for 00:05:07.040,00:05:12.612 the higher quality hardware so. Then it just come down to uhm- to uh- cost uhm- savings persp- 00:05:12.612,00:05:19.619 perspective. So let’s talk about some of the counter surveillance scenarios. If you’re parked you 00:05:19.619,00:05:24.224 wanna know, you know, which cars or people uh- er- which cars or people are loitering near my 00:05:24.224,00:05:30.363 house or my car uhm- you’re not really gonna see any faces while you’re driving, the cameras just 00:05:30.363,00:05:35.235 aren’t on that level yet and I’m sure you could if you use third party dash cams and this sof- 00:05:35.235,00:05:39.639 the software components of this could be modified to work with third part dash cams absolutely. 00:05:39.639,00:05:44.811 But its just not gonna be as natural of a fit. Uhm- during your drive, things like how long 00:05:44.811,00:05:48.915 has been the car behind me or have I seen that car before and the last one is one that I 00:05:48.915,00:05:55.422 really want to highlight. Is the fact that this device isn’t going to take the place of an 00:05:55.422,00:05:59.693 actual standard surveillance detection after someone is running and someone is still is 00:05:59.693,00:06:03.730 gonna have to remain highly vigilant if they’re in a situation where they’re 00:06:03.730,00:06:09.436 seriously ru- running a surveillance detection routes daily. Uhm- But the computer is 00:06:09.436,00:06:14.574 not gonna forget for months, years or decades. And not to say that cars should be following 00:06:14.574,00:06:20.914 you for year maybe I’m the only one I don’t know, but the computer is not gonna forget and 00:06:20.914,00:06:25.518 that’s what makes it ahm- really helpful ahm- to look at it from a like a big data perspective. 00:06:25.518,00:06:32.459 Later on we will look into that ah- in a demo. So some recon query scenarios this basically 00:06:32.459,00:06:37.864 means so from a physical pen testing or red teaming perspective. You can essentially 00:06:37.864,00:06:42.569 park outside of an office that you’re gonna run a physical pen test on. Leave it there- for a 00:06:42.569,00:06:47.574 day later on ge-the and-and you can put them on hotspot there if you wanna build a you know- like 00:06:49.809,00:06:56.049 a wifi some type of myfi thing to real time remotely access the data that’s there or you could 00:06:56.049,00:07:00.420 just pick it up later and run these recon queries to see when the first person arrive in the 00:07:00.420,00:07:04.524 moring, when the last person leave at night. You could scrape linked in for like a company 00:07:04.524,00:07:07.961 that you would be running physical pentest on, get these photos load them into your 00:07:07.961,00:07:14.134 database and then run facial recognition again for such photos. Ah so its somewhat scary 00:07:14.134,00:07:19.806 but ah- definitely extremely powerful tool from a physical ah- and in just perspective as 00:07:19.806,00:07:26.713 well. So the Web Stack is not super important ah because you could modify this however you 00:07:26.713,00:07:31.718 want. Vue is just a framework that I prefer ahm- and then Mongo DB again because I wasn’t 00:07:35.088,00:07:41.461 to put this on fire base ah- I just, I’m not, I just want to keep everything local, specially 00:07:41.461,00:07:46.466 when I’m testing this with all my drive data. The computer Vision Stack I expected this 00:07:49.703,00:07:54.708 might change a little bit but I’ll give you a little bit of a back story. I tried to initially 00:07:56.776,00:08:01.381 build this out myself, I was like, ok, AI, computer vision I’m gonna train these model. So 00:08:01.381,00:08:06.286 I just started labeling them left and right and probably spent close to 20 hours just 00:08:06.286,00:08:10.490 going through gigs of ahm- video footages and just cutting out frames, dragging the little 00:08:10.490,00:08:14.227 boxes of the license plates, I even rope in some of the interns which I appreciate you guys. Did 00:08:14.227,00:08:19.232 not end up using it. I will, ahm- the off the shelf frameworks er- so there’s a L 00:08:22.435,00:08:28.308 -eh- a -uh Github repo ahm with a name ALPR dash unconstrained that’s the one where I looked 00:08:28.308,00:08:35.248 through a few and just right -a right out of the box it was able to classify ahm correctly half 00:08:35.248,00:08:40.253 of the, the license plate images that I gave to it. So that was huge. And you can- you can, 00:08:42.722,00:08:49.362 modify or fine tune this setup with those labeled images. So I will be making use of any 00:08:49.362,00:08:54.367 manually labelled ahm- ahm- you know- training ah- images. But the short story, the short 00:08:57.103,00:09:03.309 version is that, I’m not a some expert in AI, I took off the shelf tools that are freely 00:09:03.309,00:09:08.314 available online and just knowing Nest or Ring Cameras that have facial recognition, 00:09:10.650,00:09:15.255 there are faciu- facial recognition software and open source software out there is 00:09:15.255,00:09:21.628 becoming a lot easier to use and I know there’s a license plate recognition software out there 00:09:21.628,00:09:26.633 as well and just putting the two- two and two together. Let me get a drink of water. So, 00:09:33.640,00:09:40.180 I’m- I’m using ahm YOLO V three which is based off Darknet to run the ahm- the license plate 00:09:40.180,00:09:45.185 ahm- detection and then I’m using face net for the ahm facial recognition ahm- 00:09:47.353,00:09:53.927 features. With the devices I’m gonna get to, next, I’m making use of tensor RT which is a way 00:09:53.927,00:09:59.566 to use TensorFlow on these ehm- video devices so they run super fast. And again, this 00:09:59.566,00:10:06.573 potentially will change, I’m just gonna be fine tuning testing if you submit a poor 00:10:06.573,00:10:13.546 quest in its just better than we would implement. Here are the hardware options, now this ahm- 00:10:13.546,00:10:19.285 one of the things that originally inspire this was github repo that was a, that’s a 00:10:19.285,00:10:24.290 Tesla USB basically a-a- a guy took a pi zero W and- and- and uhm- modify or scribed it so 00:10:27.861,00:10:34.367 that the Tesla, which treated as a flash drive ah and so when you pull then to your garage at home 00:10:34.367,00:10:40.139 connects to the wifi you will be able to move that video over extremely slowly, so very happy 00:10:40.139,00:10:45.144 to move off the Pi Zero W. But with the Pi four coming out, you could potentially run inference 00:10:47.413,00:10:52.886 on this but really the top two options are going to be for if you just want to be capture all 00:10:52.886,00:10:59.292 of the video by default Tesla is only gonna be able to, is only gonna give you saved events 00:10:59.292,00:11:02.595 where you either have to manually save an event by clicking a button on the screen 00:11:02.595,00:11:08.268 or when a sentry mode event would ahm- was detected. Basically when an enhanced car 00:11:08.268,00:11:12.705 alarm would would go off that’s when you get an event. Quite a few false positives in there as 00:11:12.705,00:11:19.178 well. Ahm- but, you’d use either of these top options if you want to save all of that video. So, 00:11:19.178,00:11:26.085 the- the bottomline two options are the Jetson Nano which is its only under a hundred dollars its 00:11:26.085,00:11:32.525 extremely affordable. That’s this one here, and the Jetson Xavier, which is this one here, 00:11:32.525,00:11:35.662 are going to be ones you’re gonna wanna run ah, use if you’re running inference if you 00:11:35.662,00:11:39.766 want to be notified in real time with the other two you’re just gonna upload that a- video or 00:11:39.766,00:11:44.604 data to your computer, run inference on it later. So really, for all my testing I use 00:11:44.604,00:11:49.609 the Jetson Xavier. Ah- as far as the benchmarks, the Xavier is gonna be almost double as fast 00:11:52.278,00:11:55.848 now is definitely double the price but seven hundred dollars, I think is still affordable 00:11:55.848,00:12:01.588 especially if. I just think its ,I just think its, worth it. But a- you’re gonna get things, its 00:12:01.588,00:12:05.425 not, its not really gonna be real time if you go with the Jetson Nano, so if you want real 00:12:05.425,00:12:10.663 time you, you need to go with the Xavier. And again I expect these uhm- fps benchmarks to ah- 00:12:10.663,00:12:15.668 to change as well. Alright let’s get to the demo. Okay, so , here’s basically the recently 00:12:23.810,00:12:29.048 detected dashboard. This is when you, what you, what you see first in. As you can see, a lot 00:12:29.048,00:12:32.885 of plate detector this is a very small sample but a lot of plate are detected in them in a very 00:12:32.885,00:12:38.691 short amount of time. And you can search by the car make or model which is pretty cool, but 00:12:38.691,00:12:41.861 this isn’t really gonna help tell you if you’re being followed. You can’t really make 00:12:41.861,00:12:45.698 use of the data in this way so. We can click to on all detected plates, those are fake license 00:12:45.698,00:12:50.169 plates by the way, and click on detected plates and now we can start make better use of these 00:12:50.169,00:12:53.873 plates and now we can start to make better use of the data, we can really study the data here 00:12:53.873,00:12:59.012 uhm. At the top, you’ll see this link to friend, basically we are able to tag something as a 00:12:59.012,00:13:02.982 benign finding. Uhm- if we notice like maybe, we, we’re looking at the video later 00:13:02.982,00:13:06.486 maybe, we now think its a, its a coworking neighbor friend something like that. You know 00:13:06.486,00:13:11.491 why is this high risk with only four detections down here. Well if you wanna see a ahm- a video 00:13:13.626,00:13:18.631 of the real time, live, in car notification, there’s a wired article and or just youtube 00:13:21.901,00:13:26.906 video that I’m just gonna post that will have a link to that video. So basically you’re able 00:13:30.777,00:13:33.980 to set your settings on your notifications you’re able to set your thresholds do I want to be 00:13:33.980,00:13:39.452 notified when a car is detected x number of times in x number of minutes do I want to be notified 00:13:39.452,00:13:44.991 when the, vehicle, the same vehicle is detected over a number of days, ah- maybe within 00:13:44.991,00:13:49.395 a geographical area and the outside of that geographical area. That’s what you ca- what 00:13:49.395,00:13:55.234 you can do from a threshold perspective and that’s why this high risk rating is here when 00:13:55.234,00:14:01.741 there where only four detections its because I had set something up to where if a car is seen, 00:14:01.741,00:14:07.847 the same car is seen over four days ah- over four days like you know if its seen everyday over 00:14:07.847,00:14:12.852 four days let me know, essentially. And it was. We’re gonna go on the next part here. 00:14:19.392,00:14:24.564 So we can click in this range rover to figure out what the deal is, we, we know an alert 00:14:24.564,00:14:27.867 was triggered and I wanna know why. You can turn on satellite mode if it makes it easier to 00:14:27.867,00:14:32.739 see. Basically here we see in the search bar that we search this license plate, the place 00:14:32.739,00:14:37.443 marker is gonna show the photos of the actual ah- detection took place. We can click into one and 00:14:37.443,00:14:41.013 we can see at the time at this detection took place, the speed we we’re going the power usage 00:14:41.013,00:14:46.018 of the car, what gear we’re in and we can click into play video if we want a- to a- be back on 00:14:49.489,00:14:54.761 time to when is this actually incurred. On the bottom left you see the car driving by, that’s 00:14:54.761,00:14:59.766 the front camera there in the middle, and we can fast forward a few seconds here. And now we 00:15:02.168,00:15:08.508 can see in real time how fast we are going along with this video and with along with this ahm the 00:15:08.508,00:15:13.212 place marker map data so out put. You were able to get it together in a really cool way 00:15:13.212,00:15:20.186 ah- that’s makes it useful. Ahm- to, to examine. Now let’s see what’s next here, so we’re gonna 00:15:20.186,00:15:25.591 get into the ahm- face detection. Essentially we know that this is a male late 00:15:25.591,00:15:32.064 twenties is the same male, we’re able to click or unclick, we are able to train the model 00:15:32.064,00:15:38.004 basically, you see the video of the detection. This is very similar with a Nest camera or 00:15:38.004,00:15:42.975 Ring camera if you’re familiar with. Fill out the name of this person, save it. And now we can 00:15:42.975,00:15:49.949 search for this person’s name and we see Truman has been detected. Snooping around my 00:15:49.949,00:15:54.954 car. And that is essentially it for the demo. [applause] So what’s next. Remote live view 00:16:08.901,00:16:13.573 again this is gonna come down to the whole real time thing I’m try- I’m working on a way to 00:16:13.573,00:16:17.376 start running inferences on those frames as being written to them before if anyone want to 00:16:17.376,00:16:20.446 help with that that would be awesome, that would be greatly appreciated but that would take 00:16:20.446,00:16:23.382 you down. It will take you from zero to sixty seconds if you’re waiting to start the inference 00:16:23.382,00:16:29.856 to rest soon as the the frame is written essentially. Third party dashcams are another, well its 00:16:29.856,00:16:35.061 not much of a natural fit so its uh- its not gonna be uh- super high priority but I could 00:16:35.061,00:16:38.564 definitely see why people want to make use of the software side of this. Gait recognition is 00:16:38.564,00:16:43.569 something that I think is really cool and we just add just from it because its interesting. I 00:16:43.569,00:16:47.240 would like to point that and ah- more objects to actually might have seen that little button of 00:16:47.240,00:16:53.913 filter there which is for pets. I took aie- I took oh- google open images uh- data set and I 00:16:53.913,00:17:00.152 made it only see license plates. So, so it will be faster. So I removed, thousands of different 00:17:00.152,00:17:05.358 objects that already could have been detected there and I just thought it would be interesting 00:17:05.358,00:17:12.164 when I was you know, starting with this project. Like what, just to see okay, cat, black 00:17:12.164,00:17:16.536 cat, how many black cats has my car seen like you can do that with any object in any of these 00:17:16.536,00:17:21.307 data sets, it’s just really interesting to me that you can make use of the data that way. 00:17:21.307,00:17:25.545 And then your request here your submit or request your issue with if- if you think on a- on 00:17:25.545,00:17:29.548 Github if you think something else should be added. I wish I can spend more time on the 00:17:29.548,00:17:35.555 privacy implications of this haha but basically Teslas are out there there are a lot of 00:17:35.555,00:17:39.692 cars that are starting to implement self driving ffe- features and uhm- almost all of 00:17:39.692,00:17:44.964 them are making use of cameras I mean, essentially, the amount of cameras out on the road is just 00:17:44.964,00:17:50.369 exponentially increase, very very quickly, uhm- private corporations and governments are 00:17:50.369,00:17:53.906 gonna wanna make use of this data, insurance companies, everyone is gonna want this data 00:17:53.906,00:17:59.979 uhm- market research firms, so if you think about breaches in the next few years, I, I feel 00:17:59.979,00:18:04.116 like a lot of them are going to include these type of data. Because it I- I- think its gonna 00:18:04.116,00:18:10.389 be extremely valuable. And a- that’s it. Thank you very much [applause] you can check out the 00:18:10.389,00:18:15.428 link there if you want to see the code. Uh- the build materials is on there now, the 00:18:15.428,00:18:20.433 code uhm- for all of this is gonna be added later today. Thank you very much, thanks. 00:18:23.269,00:18:26.872 [applause]