Time to time, we have a new speaker that has made it through the gauntlet of call for papers. And they've been sort of vetted. And we really appreciate their effort and their work and their research. There's a lot of work. And we really want to congratulate our new speakers for making it through and for having the guts and figuring it out for the first time. It's all down from here. So give Josh Mitchell a big round of applause. Cheers. I think that makes four. I'm sorry. So Josh is here to talk about some critical issues with police bodyguards. And he's going to talk about some of the big cameras and ride-along adventures. Yeah. It's cool. Hello. Hi. Welcome. Welcome. Oh. Welcome. All right. So this is what we're going to be talking about today. Yes. We have to have this up front. You guys can read that. Okay. So here's some of the things we're going to be talking about. I'm going to go a little bit. A little bit of an introduction. Say hi to everybody. Let's talk about some of the technology involved in these devices. I have five specific models to talk about. I had seven, but due to circumstances out of my control, I can only talk about five. And then we'll cover some industry-wide issues that I think apply to all of the devices. I see some impact that's kind of important. And then have some questions. So here, this is me. And yes, that is a hamburger phone. I've been doing this for quite a while. Former military. Then. Oh. I specialized in electronic warfare. Then got into doing a little bit of malware stuff because it's fun. And then I became a professional exploit developer for a number of devices. That was a number of years. And now I do security research at Nuix. So there are approximately, I've categorized 77 different devices out there in the wild. You have the big ones, Panasonic, Motorola, Patrolize. Now these devices, they have a wide range. variety of technology kind of forced into them. Wi-Fi, Bluetooth, some support NFC, some devices have triggers, event triggers you can use. Some do live streaming direct over GSM. Those are really popular in Europe. And other ones have proprietary RF communications and they ride along, they piggyback on the walkabout radios that police are using. And it's very important to note that these devices were primarily designed for transparency versus secrecy, although that may be a bit of a vendor line because of some of the issues that I've found. And we'll play a little game, feature versus volume, as we go through this presentation. All right. Again, so these devices, they interact, they have an entire ecosystem surrounding them. It's not just the camera, which I'll show you more about this one later. They have desktop software. Some of them use blended storage. So you have on-site storage. You have cloud repositories. Some even have smart devices. These are the kind of devices that are really good for working with the camera. So you have dedicated docking stations that use an embedded Linux Distro and they create like an IP sec tunnel back to a cloud repository. And most of the ones that are interesting have smart phone applications that allow officers in the field to annotate videos and review the contents of the camera, which we'll get into in a minute. So, to later, it's quite bad. So this is the first device I kind of started looking at back in January. And it's sold on Amazon. Anyone can go and buy it, pick it up. It's sold under the CESC people. But advanced plus is actually the manufacturer of the device. And this is located in China. And I wanted to mention really quick, I did get in contact with the vendor. And they have given me firmware and desktop application. But I didn't get a chance to review it because it happened last week. So anyways, so this particular device got it, took it apart, took the remote apart, trying to figure out how the remote is interacting with the computer. So I went to the camera and, you know, had to go and look at some chips and see what frequency it's operating. It's actually 433. And RTL 433 identifies it as a smoke detector, which is kind of interesting. And the neat thing about the remote and why I wanted to get this device is because the remote can be used to trigger multiple different cameras, not just one. You can actually update the remote so that it's not just one device. You can actually use it to, you know, set up a� it triggers a wide variety of cameras. And so we can kind of be annoying with that because this is the simple signal that's being transmitted. There's no rolling codes. There's none of that. So if you want to, you can sit there with a RTL-SDR, receive the signals, replay it with something more powerful than a HackerRF because, well, it doesn't have much power. The other interesting thing about this device is when I was getting in contact with the manufacturer, they told me about their RF certification and it was not FCC certified. So there's that. Wow. Another thing about it is it's essentially a USB drive. So anything that you have. You know, when it records the videos, it drops them down onto the dedicated storage on the device. You plug it into your computer. You pull the things off just like a USB storage. So if I wanted to put autorun.inf or take advantage of some link vulnerabilities that have been popular in the past, that's completely possible with this camera. All right, so here's another camera. This is the on-call OCP Pro. You see the architecture of the system down there in big. But unfortunately, because of the one I got, nothing really works. So I got it. I think the USB was broken. It wouldn't maintain a USB connection. So everything changed. To your right of the arrows, I didn't get a chance to test out. But there were enough glaring issues on the other part that it's fun to talk about. It uses an RTOS called ECOS. There hasn't been very many updates on that particular website in quite a while. So that's a good thing. And you can see that we've triggered the Wi-Fi on it through a button press. It comes up as Firecam, and that is the default password. And yes, it has a wonderful embedded ECOS HTTP server that I thought would be fun to kind of poke at. But you'll see that it wasn't really necessary. All right. Yes. So this is the contents of the movie folder. And you see all the videos. It's coming up as 2014 because, again, I never got a good time sync from my laptop. But these are all the saved videos. And you see you can remove them, download them, upload files. You can actually even upload arbitrary HTML and serve that in the browser. That's not good. Yeah, so totally unprotected, 100%. No, nothing, nothing at all preventing anyone from downloading these videos or uploading ones to kind of overwrite these. And I have some tools that use Git and Post to overwrite files and download all the contents. It also has a nice settings file that you can download as well that has all of the relevant information about the camera in it, which is interesting. Okay. So here's the first kind of big device, widely kind of used device that I had a chance to look at. So this particular device has... It has a smartphone application that you can go and download available on the Play Store. It has desktop software that is available for download on the manufacturer or the reseller's website. And I say reseller because we will show... I'll show you this in a moment. And the firmware is also available for anyone to go ahead and pull down and browse and look through because it's not signed and it's not encrypted, which is awesome. Right. So smartphone application is primarily used to access the RTSP server that is not protected from anyone. And you can view the saved videos on the device. And the desktop software is used to authenticate with the camera and download the video files off of the camera. So the desktop software, as you see there... It's a simple wrapper around the DMT10.dll. And that is... Actually, the name of that, I think, comes from the Chinese manufacturer because they sell the DMT10 version of this camera. The admin and general user passwords are six characters. They have to be exactly six characters. No more or no less. It has the SSID, as you see, for AMBA boss. And that's not something that you can change. And I'll get into that, why that's kind of a big deal later. And you have some other things you can mess with. And this is the administrative interface. As with all of the other desktop software that I have looked at, it's missing a lot. Of the exploitation prevention mechanisms, like ASLR. And that's kind of across the board. You see here this little clip from IDA. The verify password routine coming from DMT10. And then you have the set password export that's called from... It's available in DMT10 as well. As you can see there, there's no correlation between the two. That means that I can set the password without having to verify the password. So that's awesome. Yeah. Okay. Again, it comes with a smartphone application if you want to go find it. There it is. And that is primarily used to view saved videos and live stream whatever. Whatever the camera is looking at. And I want to be sure to mention all of these cameras, except I think for the next one. When you activate the Wi-Fi on these devices, they create an access point. Right? They act as a Wi-Fi hotspot without Internet connectivity. So that's kind of important. Because if anyone's wanting to review videos, they create a... Essentially a beacon upon themselves that anyone can kind of find and play with. And we'll talk more about that part later. Right. So, again, this device, it's running a little bit of an older version of Linux. That's not really bad. And, again, it has a JSON messaging server, which I was really surprised about. And RTSP and DNS. And after I got to poke around on the system, I found out that it was incredibly similar to a talk GoPro or get the fuck out. That if you want to know anything more about how this system operates, I would really recommend going and reading and looking through that. Because it has a lot... It goes through a lot in depth about the messaging subsystem. And I wish I would have found that out, right? When I was looking at this. But I didn't need to because it has root telnet exposed with no password required. And I wrote a wrapper script around pi telnet that allows you to upload and download files if you don't feel like using telnet. Again, here's the contents of the... The... The... Media... Yeah, the media folder. So any videos that you make are saved into here. This directory is mounted when you use the desktop software to download and upload videos. And it essentially sends a trigger to the camera. And we can then... It treats it as a removable media drive. So if you wanted to upload, again, link files or any type of... Windows-based exploits to take advantage of the back-end digital evidence storage repository where these videos will be saved and, you know, have something nice like WannaCry, you could definitely do that. What... Yeah. So there we go. So this is... This device, the Digital Ally FirstView HD, is architecturally different than all of the other cameras. It treats... It is a client, okay? And it has other devices in its ecosystem that act as servers. For example, the rear-view mirror in a cop car will act as a Wi-Fi access point. When this device is within range, it will automatically connect to that Wi-Fi access point. And then, you know, interact through that. It's also how, if you're able... If you turn on the sirens, it will automatically start recording. It has event triggers, that kind of technology. And again, it supports... Has its own desktop software that I tried to purchase three months... Two months ago, and I did not get. Which is unfortunate. It has a smartphone application that anyone can download. Firmware is available and easy to look through. So literally talk... Well, unpack the firmware. And it does have a docking station that, you know, you can take the camera out and plug it in, and it will download stuff. But, interestingly enough, it does come with a minimal software bundle on the device for anyone who gets a hold of it and wants to... Minimum configuration manager and the minimum software viewer to... To view the contents and see whatever's going on on the device. You can also... It also has, like, readmes on there about how the device is supposed to work. So that's very, very user-friendly and kind of nice. So here is a picture of the... The minimum... The minimum viewer that comes packaged... On the device, right? The software, ViewVault, I've tried to purchase. And hopefully it will get here eventually. Because there's a lot of features that I wasn't able to interact with and play around with because I didn't have that. One of those main features being you turn the device into a wireless client. I couldn't do that because you have to pay the $800 for the desktop software. But we received... We were still able to get some good stuff out of it. So the packaged installer is written in C-sharp, which is awesome because it's really easy to decompile and play around with. The configuration manager generates two types of files. The WM config, and that's for wireless. It also generates the device config. And that is a binary format that you can use to set the time and stuff like that. Now, the viewer, which is used for evidence review and making comments and clipping videos and stuff, generates three types of files. The DAS file, which is the digital ally zip file. The metadata file, and the VM2 file, which is XML. So... And we'll go into those right now. So, the WM config file is quite interesting because it is something that you're supposed to generate through the configuration software and then put on the device. And it configures the device on how to interact with police networks and police systems, right? So that would be important. So that would not be a good thing to have that XOR. As the way to decode it. And you can see here that it's configured to look for the SSID that is associated with the police network. It has the PSK that is just text encoded. And the password for FTP logins so that it can upload and download whatever media is on the device as it goes. Then the device config file is... Again, to insert time and other information on to the device. That has a couple lines worth of an XOR, but it basically is an equivalent to hex 88 XOR. So that's cool. Oh, and the 001 is before, and then the small one is after when you decode it with XOR. Here's the DAS file. The DAS file is generated through the viewer application when you have the AVI and the metadata file. You insert that into the viewer application, and then you mess around with the video, and you save it out, and it creates this DAS file and all this other stuff. The VM2 file here is included in the zip file. And you see it has a huge amount of metadata associated with how this camera was operating and how, you know, like what sensors were used, what's the GPS cords, all of this kind of stuff, right? And you see here it uses AES-128 CBC, and the file name is the decryption key. You see here we have... Like in this, we would have D0-01-8-0-0-2, and then we just basically make that Unicode, and we have the IV and the decryption key for our AES, whatever. That's awesome. Right, so since Digital Ally was so nice to include an unsigned installer on their application, I thought it would be fun. To insert a backdoor into that, because I can overwrite it, download it, modify it, push it back, overwrite it. And then if anybody wants to install it, they give me a nice shell. So you see here at the top, that's the normal entry point. I just hand jammed this assembly, and all that does is that creates a thread on the section that I added to the application, and that section is oh noes. And then underneath, I simply put in some Metasploit for our shell, shell code. And this is the, here we have the install shield, and down here we have the shell that's generated. I had to cut a lot of videos for time, so that's really bad. Right, so again, the Android application, which you can download on the Play Store, is used to basically use the configuration manager, and you sideload config files onto it, and that will turn your phone into an access point that the camera can then talk to. Now I was hoping that after two months, I would get the software that I purchased. And so I didn't bother to reverse engineer it with Frida, but I might have to soon. Or get my money back. I don't know. Right. So again, here is the firmware that you can get from the manufacturer. Again, binwalk and tar is really all you need. But as you're going through the firmware, because once it gets extracted, it has some really interesting features. There's some interesting things going on in there that I think I'm going to put in version two of this talk. There's some serious unbounded memory copy operations going on. But anyways, if you don't want to debug anything running on the device, if you create a nice little log file on the camera, it creates, after every operation here, we have this, this log stuff going on, after every, in every function, it generates that. So there's tons of logging information and stuff. And all you have to do is create the log file, and it's good to go. The GUI application in the MDVR, mobile DVR, I'm pretty sure what that means, is what's used to do all of this interesting stuff. And it does some really interesting stuff. Because there's lots of Wi-Fi triggers and peer-to-peer operations going on with all this stuff. And all of these devices, when they're within the same network. And there's a lot of unbounded memory copying operations going on on these devices in their peer-to-peer network. But yeah, I think I'll save that for the next version. Ah, this guy. I wanted to spend some time on this because this camera is used in some pretty big departments. Again, it has the smartphone application. It has the awesome desktop software. It even has docking station, and it supports cloud storage. And you can get the firmware. And they tried to be, have a pretty professionalized operation. Again, smartphone for live streaming and viewing media, which we'll talk about later. And desktop software for actually very few people. And they're verifying that the media files that are coming from the device are valid. And we'll talk about that later, too. So here's the desktop software. It is a fat client. Right? So essentially you have a SQL database install. And then you have some two fat clients for admin. One for admin and one for officers. Right? And it's used to, the admin app is used to configure the cameras. And then assign them to various officers. And then the client application is used to upload, download video. And that's essentially it. Right? You can add comments. But really uploading and downloading videos from the cameras, exporting them from the fat client is essentially it. But another application that is installed with this is the import export tool. And there's two types of authentication. You have the authentication and the passwords that are created for, through the admin app that is, that are used to interact with the software and with the contents of the database. Now, then you have the Windows authentication mechanism, which is actually used by the import export tool to authenticate with the database. Bypassing all of the. Vview off and use a straight Windows off. So if I am local admin somewhere out there on a desktop that is used, that the officer is using the client app to upload and download videos. I can then connect and export videos. But I'll show you that in a minute. Other things associated with this we have. We have lots of the install folders. It kind of spreads out everywhere when you install it on your box. And we have logs about the communication between your computer and this device. It communicates over USB. Creates a com serial over USB. Attaches to the file. And then starts writing stuff out to it. It also has downloaded metadata. Like downloaded videos are cached on the computers. So bypass, you have access to the downloaded metadata by bypassing the upload client by just looking into the correct folder. Yeah, and again, if you go there, you can see all the cached videos. So domain credentials, what I was kind of talking about earlier. Are used to export the database. Instead of the application credentials that you use when you create users. And that is the admin user super. For supervisor, I suppose. And that's the SHA-1 of 1, 2, 3, 4, 5, 6. Which is the default password for all of the admin. Yeah, for the supervisor, for the admin interface. Right? And they try to, when you install this, you start it up. This is how I found it. It requires, they ask you to contact their help and support system to configure the desktop software. Really, it's so that they can upsell you. Right? So I was like, well, no, I don't want to do that. Because it probably wouldn't be good having Josh at his house contact the support people. And so I was clicking on it. I was looking around and found the import export tool. And Googled the password. And then I was able to have admin on their software. Which also you have to buy. Another issue with this is when you download videos off of the camera, you can play those videos through the interface. Right? Through the admin or the client interface, you can review the videos. And to do that, it comes bundled with FFmpeg. And it also uses FFmpeg to create thumbnails based on the video. So not only when you just play the video does it use FFmpeg, but when you upload all of the videos at the time of upload, it uses FFmpeg. It uses this to create thumbnails of the videos. Which is important because it's processing videos with a version of FFmpeg that is from 2014 and has over 122 public CVEs out there for this version of FFmpeg. So if I could modify those videos beforehand, insert an exploit, I know I have a really, really vulnerable piece of software that's going to process those videos. Which would then give me, gain me access to the evidence storage repository where these videos are stored. Ah. So here we have the admin interface of the Vera Patrol software. And you see here we have several videos that have been uploaded by supervisor. And their durations are. You know, in there. And they have valid digital signatures. And then we have over here, we have making a copy of the video and exporting it and stuff. And there's an important video that we need to look at right there. It has a time length of zero. And a valid digital signature. So as we export these AVI files from the interface. We have. We just pick an output folder and it creates the AVI file and then it has the log file that requires all the comments put in there. And it saves them to wherever you want. And again it says this file has a valid digital signature. A valid digital signature. So this is the contents of that AVI file that has a valid digital signature. That holds up in a court of law, right? That is used to prosecute people and put them in jail. And I'll show you how I did that in a moment. Again, so we have the interaction with this device. It has, you know, we create our log files that are nice and kind of peruse through those. It uses serial communications over USB. To upload, download files, update firmware. And do all that kind of nice fancy stuff. Well, the other day when I noticed when I was downloading those files which were quite big. It actually just tells the device to mount. The application just tells the device to mount itself as a removable media drive. And then downloads the files. So if you want to write an application to interact with this. We see that the command system is incredibly complex right here. And very difficult to modify. And we can see right here that the device gets mounted as the E drive. And then it begins to upload the files. So as I see this random drive pop up on my computer. I'm like, oh, what's an E? Let me open that. And then you can just download the files off of that. Completely bypassing all of the evidence collection software. This is awesome. Right, again, so we have the smartphone application. That is supposed to interact with this device in the field. And it uploads metadata to each video based off with JSON. Which is pretty standard. You can also download any file off of this device. Right? So and then you can live stream with RTSP. So the only thing you need to do is if you found one of these in the wild. Is download the app. And you can see anything on it. Also if you're within proximity of some police officers and you'd like to see what they see. You can see that over RTSP. There was some pretty good talks a little while ago about the SunPlus format. And there's some tools out there that I definitely use that converts the SunPlus firmware burn format to IDB. Which is great. It's freaking awesome. You should check that out. I love it. So you don't have to unpack firmware or do anything like that. It's just ready to get to go. Now this device has several services that are available on it. And it is this one right here. It has FTP. It has the photo transfer protocol. And it has RTSP. FTP is used for uploading and downloading files. It's also used for with the smartphone. It's used to upload and download metadata. So you can download any video off the device. You can also assign any type of metadata through the JSON interface. Now for you to be able to get for the smartphone to get directory listing of which files are available. It uses the photo transfer protocol. Which there's some really great Git repos out there about using PTP over Wi-Fi. And that's going to be important in a minute. And then of course RTSP which you just use VLC. So if I wanted to see what I wanted to see. I wanted all the video that was stored on this device. You simply use PTP. And we can see here that we have some AVI files that were filled with A's earlier. Available in our PTP directory listing. Now for us to interact with that incredibly sophisticated FTP software. And overwrite files that should be digitally signed. And used to put people in. And put people in jail. We use FTP. And we have some passwords. Wi-Fi cam. And username Wi-Fi cam. It actually accepts any combination. So if you don't remember Wi-Fi cam. You can try any other combination. And it will work. Then we have. We just use type 1. And then we enter passive mode. I was playing around here trying to delete video files. It wouldn't let me delete preexisting video files. But it would let me overwrite them with whatever I wanted. And that is how we got A. In that digitally signed valid evidence file. From earlier. Okay. So we have like a little demo. I'll show you here. Just turn this guy on. Cool. It's on. All right. So another thing that I wrote. Was a tool to identify these cameras in the wild. Based on their MAC addresses. And their wireless access points. Because I said I was in the military. And I think a very, very important. Yet often overlooked thing. Is the ability to locate something. Like a camera. Like in the fields. And be able to identify the emitter with the platform. The platform being the police. And the emitter being the camera. And if I know that's V view. I go and look in the OUID database. And I see the MAC addresses that are associated with this company. That is published by the I triple E. And I can say that this company only makes cameras. And if I pick up a MAC address. Or a SSID. That's associated with that. Guess what it's only going to do. It's only going to be this. Right? And as a bad guy. You might want to know that. Maybe find out about cops running around. In our area. Let's see if this is working. I don't know. Yep. Live demos. Ass. Let's see if it's connected. Okay. You'll see. Okay. Yeah. There it is right there. Let's see if my buggy software works. Nope. It's not working right now. Oh well. This is a two part demo. Right. So everybody knows that like USB, Wi-Fi and Linux is shit. It's been the story of my life. Trying to get one interface that works right. But anyways. If you wanted. It's supposed to identify this guy right here. That we see. And the password is 1234567890. It's very complicated. Anyways. So here. Again. No. Nothing really protecting. Anything that's going on. We'll just go ahead. And we can just use VLC. It's that easy. It takes a while. Ta-da. Hi Defcon. Yay. So again. Again. Feature. Feature. Right? This is a feature. That is awful. Right? Anybody that would be like. Yeah. I would like to live stream some video off of a police officer whenever I want. That's a feature. Oh and the manufacturers like to say that. Oh it's only supposed to be right here. Yeah. Because Wi-Fi antennas can't pick up stuff from a mile away. Like that hasn't been proven years ago. Right? Okay. And we can change the default password on this. To give it something very complex. Because crack doesn't exist. And neither does that Wi-Fi thing the other day. Where you could get the key without even needing a client on the WPA2 network. If you guys haven't read that. I highly encourage doing it. Okay. So where's my presentation? Come back. All right. Here we are. Bang. Okay. So cool. Industry wide issues. Okay. All right. So I analyzed many cameras. I can talk about five. And an industry wide issue is digital signatures are not applied to the multimedia coming off of the device before it touches anything else. Which means that if anyone is able to get in between that being either being on the desktop or interacting with the device in the field. Okay. You can corrupt any kind of evidentiary information on that device. And that is supposed to stand up in a court of law. And put people in jail. Again. Unencrypted firmware. Unsigned firmware. Unsigned. Your smart phone signs this firmware. Right? How much does that cost? How much do these things cost? About the same. Right? So you can peruse. You can see anything you want. You can roll your own malware. Drop it on there. And then as soon as it gets synced back in the back end, you own them. Done. Three minutes? Okay. Cool. And again, localization. Being able to find stuff out there. I war walk, find cops. Cool. Why it's important. Because this happened here last year. Right? And the guy had cameras in the hallways. And he was targeting police. If he knew about this, he'd be able to do that a lot better. Okay. Thanks. Thanks to Saha and everyone in the basement. And I think I have a couple minutes. I got questions. I got time for questions. One question. What time is it? It's Team Grime time. Yes. Does the device show that it's connected? Some do. Some don't. Some you can actually configure to always be on the Wi-Fi. Always have Wi-Fi on. Some use Bluetooth. No. This doesn't show anything. It's just on. It's still connected to my laptop. Have you tried to notify the device? I have. OK. Thank you. How long's it taking you to touch it? I've been using it for a month and I'm not sure if it's working. I'm testing it. It's still working. So, I've been using it for about 5 minutes. How long is it? Well, not too long. I haven't been using it for about four months. Oh. So it's on. So, it's on. And so, we're running out of time. I love you.