Help me welcome to the stage, Truman Cain. Thank you. And I just got my hacker tracker notification, so thank you to the hacker tracker people as well. Had to subscribe to my own talk, I mean, come on. My name is Truman Cain, I'm a pen tester at Tavora. We're located in Southern California, or based in Southern California, and I conduct, uh, social engineering pen tests there, phishing, phishing, physical. Uh, so, we're gonna get into the, uh, TLDR, which is that autopilot cameras are good for a lot more than driving. So our test list, that's the end of my fanboy rant. No, it's not. Next slide's gonna be my referral code. No, it's not. Um, so, the huge disclaimer on this is use your own risks. Everything I'm gonna talk about is for educational purposes only, of course, check your local and state laws to make sure you're not breaking any laws if you decide to check out, uh, this framework. Last year, uh, Cy and Agent X had a talk on, uh, surveillance, counter surveillance, surveillance detection routes, and that is somewhat of what inspired me to submit this talk. I spoke with Cy after, um, around the closing ceremonies last year about the potential plausibility of using phones or something like that, um, to, to basically in real time, uh, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to, to do some type of license plate detection or to aid in SDRs. And it just didn't really seem plausible, but, uh, with Tesla and, and Sensreamote, it's kind of a natural fit and I'll get into, uh, why Tesla, uh, for this type of framework. So, why Tesla? There are three cameras built in and really there are eight in the newer vehicles, potentially all of them, um, but Tesla gives you access to three feeds. The front camera, the left, basically what the left and right mirrors see as well. So if you plug in a flash drive, you're able to get, essentially all all that video. Uh, so that's, that's built in. You don't have to mount any dash cams. Uh, second is the detailed vehicle and owner API. Basically we can ping roughly every second. We could do it more but you probably get, get rate limited or potentially blocked. So I'm not really taking chances with that. But every second I can get a vehicle location data, heading data, how fast I'm going and so that's really, well you could even, you could even program it to honk at people if you want to. Um, but I don't want to make anyone angry. So, using that data we're able to correlate with that video. It makes for some, um, interesting use cases. Um, the other part is that it's an electric vehicle. Sentry mode is, uh, if you have it enabled means that the car is always on. It's not really going to be using too much extra battery, um, to, to keep that on. Um, so that's awesome because with a gas vehicle you have to either keep the car running if that's how you're powering your devices or you have to have a huge battery pack that you have to worry about switching out and charging that type of thing. Uh, the next part is the in-car, uh, web browser which makes it extremely easy to see these, uh, real time notifications if, um, a follow vehicle is detected. Uh, of course that's not, um, completely necessary, uh, but it definitely helps. So, to get into the basics of what surveillance detection scout is, uh, the real time license plate rec, uh, recognition, face detection, those are pretty self-explanatory so I'm not going to go into those but on the next slide I'll get into what real time, uh, means. In this context, um, recon and pattern of light querying is essentially just regexing or just using some operators on that data that's found and, uh, of course this is, um, open source and locally deployed. I was very tempted to use S3 or an AWS service for this type of thing but I definitely decided that was a, a bad idea, um, because I just feel like it's going to end with people getting their, um, footage dumped, basically. So, highly recommend running this locally and, and that's why it's not, you know, natively integrated with S3. So, let's get into what real time is. Um, every minute Tesla is writing three MP4 files to this flash drive and, so, you have essentially, and they're, they're roughly 30 megs each, so every minute you have roughly 90, 90 megs of video to search through. As soon as those MP4s hit the flash drive, uh, which, it's not a flash drive, uh, we're, we're using like a computer type device to act as the flash drive in this case and we'll talk more about that in a second, but as soon as the device hits disk, and I know it's not disk, it's a solid state drive, inference is going to start. Um, right before that, we're pulling just the iframes to get us down from, what is it, um, 36 frames per second on a normal, uh, video as soon as it's written to 4 frames per second and, so we're getting rid of a lot of those blurred frames that we're not going to, most likely not going to be able to get anything out of anyway. Um, in your settings you can adjust that, so, it's not going to, you know, it's going to take longer to run the inference, but you're going to have more accurate detections and, and more detections, so that's all adjustable, but that's what we mean by real time defined. As soon as the, you know, files hit the disk, we start running the inference and it ends up being pretty fast if you opt for the higher quality hardware, so then it's just going to come down to, um, uh, cost, um, savings perspe- perspective. So let's talk about some of the counter, uh, surveillance scenarios. If you're parked, you want to know, you know, which cars are people, uh, are, which cars are people are loitering near my house or my car. Um, you're not really going to be able to see any faces while you're driving, the cameras just aren't at that level yet. I'm sure you could if you used third party dash cams and this, the software component of this could be modified to work with third party dash cams, absolutely, but it's just not going to be as, as natural of a fit. Um, during your drive, things like how long has the car been behind me or have I seen that car before and the last one is one that I really want to highlight is the fact that this device isn't going to take the place of an actual standard surveillance detection route that someone is running and someone is still going to have to remain highly vigilant if they're in a situation where they're seriously running surveillance detection routes daily. Um, but the computer isn't going to forget over months, years, decades. And not to say that a car should be following you for years. Maybe I'm the only one. I don't know. Um, but it's, it's, it's, it's, it's, it's, it's a great tool. I don't know. But the computer's not going to forget and that's what makes it, uh, really helpful, um, to look at it from like a big data perspective, uh, later on and we'll, and we'll look into that, uh, in, in the demo. So some recon query scenarios. This basically means, so, from a physical pen testing or red teaming perspective. You can essentially park the car outside of an office that you're going to run a physical pen test on, leave it there for a day, and later on you get the, and, and you could put a mobile hot dog in there, and you can put a mobile hotspot there if you want to be able to, you, like a, you know, wifi hub, some type of mifi thing to, in real time, remotely access the data that's there. Or you can just pick it up later and run these recon queries to see when the first person arrives in the morning, when the last person leaves at night. You could scrape LinkedIn for the company that you're going to be running the physical pen test on, get these photos, load them into your database, and then run facial recognition against those photos. Uh, so, somewhat scary, but, uh, definitely a extremely, um, powerful tool from a physical, uh, pen testing perspective as well. So, the web stack is not super important, uh, because you could, you could modify this however you want. Vue is just the JavaScript framework that I prefer. Um, and then MongoDB again, because I wasn't about to put this on Firebase. Uh, I just am not, I, I just wanted to keep everything local, especially when I was testing this with all my drive data. The computer vision stack, I expect that this might change a little bit, but I'll give you a little bit of a back story. I tried to initially just build this out myself. I was like, okay, AI, computer vision, I'm going to train this model, I'm going to, so I just started labeling images left and right. I probably spent close to 20 hours just going through gigs of, um, video footage and just cutting out frames, dragging the little box over the license plates. I even roped in some of the interns, which I appreciate you guys, didn't end up using it. I will. Um, the off the shelf frameworks, so there's a AL, uh, there's a GitHub repo, um, with the name ALPR-Unconstrained. That's the one where I looked through a few and just right out, right out of the box it was able to classify, um, correctly half of the license plate images that I gave to it. So, that, that was huge. And you can, you can, you can, you can, you can, you can, you can, you can, you can, you can, um, modify or fine tune this setup with those labeled images. So, I will be making use of any manually labeled, um, um, you know, training, uh, images. But the short story, the short version is that I'm not some expert in AI. I took off the shelf tools that are freely available online and it's just knowing, you know, Nest or Ring cameras have facial recognition, there's facial recognition software and open source software out there. It's becoming a lot easier to use. And, um, I know that there's license plate recognition open source software out there as well. And just putting the two, two and two together. I'm gonna get a drink of water. So, I, I'm using, um, Yolo V3 which is based off of Darknet to run the, um, license plate, um, detection. And, um, then I'm using Facenet for the, um, facial, uh, recognition, um, features. With the devices that I'm gonna get to next, um, I'm making use of TensorRT which is a way to use Tensorflow on these NVIDIA devices so that they run super fast. And, again, this potentially will change. I'm just going to be fine tuning testing if you submit a pull request and it's just better than we would implement it. Here are the hardware options. I'm going to be using, um, I'm going to be using, um, this, um, one of the things that originally inspired this was, uh, GitHub repo that was, uh, that's, uh, Tesla USB. Basically, uh, a guy took a Pi Zero W and, and, and, and modified it or scripted it so that the Tesla would treat it as a flash drive. And so, when you pulled into your garage at home, connected to Wi-Fi, you were able to move that video over extremely slowly. I was very happy to get off of the Pi Zero W. Uh, I'm going to be using, uh, uh, with the Pi, uh, 4 coming out. You could potentially run inference on this, but really the top two options are going to be for if you just want to be able to capture all of the video. Um, by default, Tesla is only going to be able to, uh, is only going to give you saved events where either you manually saved an event by clicking a button on the screen or, uh, when a sentry mode event, uh, was detected. Basically, when the enhanced car alarm would go off, that's when you get an event. Quite a few false positives in there as well. Um, but you would use either of these two top options if you wanted to save all of that video. So, the, the, the bottom two options are the Jetson Nano, which is, it's only $100, it's extremely affordable. That's this one here. And the, uh, Jetson Xavier, which is this one here, are going to be the ones that you're going to want to run, uh, use if you're running inference, if you want to be notified in real time. With the other two, you're just going to upload that, uh, video, uh, to, uh, the Pi Zero W. Uh, I'm going to run the data to your computer and run inference on it later. So, really, for all my testing, I used the Jetson Xavier. Uh, as far as, uh, benchmarks, the Xavier's going to be re- almost double as fast. Now, uh, it's definitely more than double the price, but $700, I think, is still affordable, especially if, I just think it's, I just think it's worth it. Um, but the, you're going to get things, it's not, it's not really going to be, uh, real time if you go with the Jetson Nano. So, if you want real time, you, you need to go with the Xavier. And again, I expect these, um, uh, FPS benchmarks to, uh, change as well. Alright, let's get to the demo. Okay, so, here's basically the recently detected dashboard. This is when you, what you, what you see first. And as you can see, a lot of plates are detected. This is a very small sample, but a lot of plates are detected in a very short amount of time. And you can search by carmaker model, which is pretty cool. Uh, but this isn't really going to be able to help tell you if you're being followed. You can't really make use of the data in this way. So, we can click on all detected plates. Those were fake license plates, by the way. Click on all detected plates, and now we can start to make better use of this data. We can really study the data here. Um, at the top, you'll see this link to friend. Basically, we are able to tag something as a benign finding. Um, if we notice, like, maybe, we, we're looking at the video later, we notice, like, it's a, it's a coworker, neighbor, friend, something like that. Now, why is this high risk with only four, uh, detections down here? Well, uh, if you want to see a, um, a video of the real time live in-car notification, there's a Wired article and or just YouTube video that I'll post that will, um, have a link to that video. So, basically, you're able to set your settings on notification. You're able to set your thresholds. Do I want to be notified when a car is detected X number of times in X number of minutes? Do I want to be notified when a vehicle, the same vehicle is detected over a certain number of days? Uh, maybe within a geographical area and then outside of that geographical area? That's what you, what you can do from a threshold perspective, and that's why this high risk, uh, rating is here when there were only, uh, four detections. It's because I had set something up to where if a car is seen, the same car is seen, the same car is seen over four, uh, over four days. Like, you know, if it's seen every day for four days, let me know, essentially. And, and it was. We're gonna go to the next part here. So we can click into this Range Rover to figure out what the deal is. We, we know an alert was triggered. We want to know why. We can turn on satellite mode if it makes it easier to see. But basically here we see in the search bar that we search this license plate. The place marker is gonna show the photos of the actual, uh, detection that took place. We can click into one and we can see at the time that this detection took place, the speed that we were going, the power usage of the car, what gear we were in. And we can click into, uh, play video if we want to, um, be brought back in time to when this detection occurred. So in the bottom left you see the car driving by. That's the front camera there in the middle. And we can fast forward a few seconds here. And, and we can see the car, the and now we can see in real time how fast we're going along with this video and along with um you know the place marker map data. So uh you're able to put all this data together in a really cool way uh that just makes it useful um to to examine. Now let's see what's next here. So we're gonna get into the um face detection. Essentially we know that this is a male, late twenties, it's the same male. Uh we're able to click or unclick if we're able to train the model basically. You see a video of the detection. This is very similar to like a nest camera or a ring camera if you're familiar. So we're able to name this person, save it, and now we can search uh for this person's name and we see that Truman has been detected snooping around my car. And that is essentially it for this video. Thank you. So what's next? Remote live view. Again this is going to come down to that whole real time thing. I'm trying, I'm working on a way to start running inference on those frames as they're being written to the MP4. If anyone wants to help out with that, that would be awesome. That would be greatly appreciated but that would take you down, take you from zero to 60 seconds that you're waiting to start the inference to you know rest. So that would be awesome. So that would be great as soon as the, the frame is written essentially. Third party dash cams is another one. It's just not as much of a natural fit so it's uh it's not going to be a super high priority but I could definitely see why people would want to make use of the software side of this. Gate recognition is something that I think is really cool and would just uh just from, because it's interesting I would like to implement that. And uh more object detection. You might have seen that little button or filter there that was for pets. I took uh the, I took a Google Open Images uh data set and I made it only, I made it, I made it, I made it, I made it, I made it. I made it so I could see license plates so it would be faster. So I removed thousands of different objects that already could have been detected there. And I just, I just thought it would be interesting when I was, you know, starting with this project like what, just to see okay cat, black cat, how many black cats does my car seem like. You can do that with any object in any of these data sets. That's just really interesting to me that you can make use of the data in that way. And then your request here. Submit a full request or issue if you think on GitHub if you think something else should be added. I wish I could spend more time on the privacy implications of this but basically Teslas are out there, there are a lot of cars that are starting to implement self-driving features and uh almost all of them are making use of cameras. I mean essentially the amount of cameras out on the road is just going to exponentially increase very very quickly. Um private corporations and governments are going to want to make use of this data, insurance companies, everyone is going to want this data. Um market research firms, so if you think about breaches in the next few years I, I feel like a lot of them are going to include this type of data because it, I, I think it's going to be extremely valuable. And that's it, thank you very much. You can check out the link there if you want to see the code. Uh the bill of materials is on there now, the code um for all of this is going to be um added later today. Thank you very much. Thanks. Thank you very much.