00:00:00.133-->00:00:06.874 >>From time to time we have a new speaker that has uh, made it through the gauntlet of uh, call 00:00:06.874-->00:00:11.879 for papers. And um, they’ve been sort of vetting. And um, we, we really appreciate their effort, 00:00:15.716-->00:00:21.221 and their work, and their research and their, their uh, this is a lot of work! And we, 00:00:21.221-->00:00:27.394 we really want to congratulate our new speakers for making it through and for having the guts 00:00:27.394-->00:00:34.067 and figuring it out for the first time. It get, it’s all down from here. [laughter] So, 00:00:34.067-->00:00:39.072 um, give Josh Mitchell a big round of proplause. [audience applauds] >>Cheers. I think that 00:00:46.480-->00:00:51.485 makes, 4. >>I’m sorry. [audience laughs] Um, so, Josh is here to talk about uh, some critical 00:00:58.558-->00:01:03.497 issues with police body cameras and ride along adventures. >>Yeah. It’s cool. [speaker 00:01:06.033-->00:01:11.038 laughs] Hello. Hi. Welcome. Welcome. Oh. Welcome. [speaker laughs] Alright, so, uh. This is 00:01:13.206-->00:01:18.211 what we’re gonna be talking about today. Um, yes. I have to have this up front. You guys can 00:01:20.580-->00:01:25.586 read that. K. So here’s uh some of the things we’re gonna be talking about. I’m gonna go with 00:01:28.855-->00:01:35.062 a little bit of an introduction, say hi to everybody. Um, talk about some of the technology 00:01:35.062-->00:01:40.067 involved in these devices. Uh, I have 5 specific models to talk about. Um, I had 7 but, due to 00:01:44.137-->00:01:49.409 circumstances out of my control, I can only talk about 5. Uh, and then we’ll cover some industry 00:01:49.409-->00:01:54.414 wide issues that I think apply to uh, all of the devices. Uh have some, see some impact 00:01:57.184-->00:02:03.924 that’s kind of important and then have some questions. So here, this is me. And yes that 00:02:03.924-->00:02:08.929 is a hamburger phone. Uh, I’ve been, been doing this for quite awhile. Uh, Former military. Um, 00:02:11.965-->00:02:16.970 then [audience applauds/cheers] Uh, I specialized in uh, electronic warfare. Uh, then got 00:02:19.106-->00:02:24.111 into doing a little bit of malware stuff, cause it’s fun. Uh, and then I became a 00:02:26.480-->00:02:32.953 professional exploit developer for a number of years and now I do security research uh, at 00:02:32.953-->00:02:37.958 Nuix. So [speakers clears throat] there are approximately, I’ve, I’ve categorized 77 00:02:43.563-->00:02:48.568 different devices, um, out there in the wild. [speaker laughs] Uh, you have the big ones, 00:02:52.172-->00:02:59.179 Panasonic, Motorola, uh, PatrolEyes. Now these, these devices they have uh, a wide 00:02:59.179-->00:03:04.117 variety of technology. Um, kind of forced into them. Uh, it’s wifi, bluetooth, some support 00:03:07.821-->00:03:12.826 NFC that uh, some devices have um, triggers. Event, event triggers you can use. Um, some 00:03:16.229-->00:03:21.902 do live streaming direct over GSM. Uh, those are really popular in Europe. And other 00:03:21.902-->00:03:27.908 ones have uh, proprietary RF communications and they ride along, uh, they, they, they 00:03:27.908-->00:03:34.081 piggyback on the, the walkabout radios that uh, police are using. Alright and it’s very 00:03:34.081-->00:03:40.754 important to note that these devices were primarily designed for transparency versus secrecy, 00:03:40.754-->00:03:47.027 although, that may be uh, a bit of a vendor line. Uh, because of some of the issues that I’ve 00:03:47.027-->00:03:53.900 found. And we’ll play a little, little game uh, feature versus vuln um, as we go through this 00:03:53.900-->00:03:58.905 presentation. So. Alright, again, um, so these devices they, they interact um, the, 00:04:03.777-->00:04:09.950 they have an entire ecosystem surrounding them. It’s not just the camera, which, I’ll show you 00:04:09.950-->00:04:14.955 more about this one later. Um, it’s, they, they have, they have desktop software. Um, some of 00:04:17.057-->00:04:22.062 them use a blended, uh storage. So you have onsite storage, you have cloud repositories, um, 00:04:24.364-->00:04:29.369 some even have a dedicated uh, docking stations that use um, an embedded Linux disko, and they 00:04:32.172-->00:04:37.177 create, like, a IPSec tunnel back to a cloud repository. Um, and uh, most of the ones that 00:04:39.746-->00:04:46.520 are interesting um, have smartphone applications that allow, uh, that allow officers 00:04:46.520-->00:04:51.525 in the field to annotate uh, videos, uh, and review the contents of the camera. Which 00:04:54.628-->00:04:59.633 we’ll get into later, it’s quite bad. Um, so this is the first, first device. Uh, I kinda 00:05:02.169-->00:05:07.174 started looking at um, back in January, um, and uh it’s, it’s sold on Amazon. Anyone can go 00:05:11.745-->00:05:16.750 and buy it, pick it up. Um, it’s sold under this, the CEESC people but, uh, Advanced Plus is 00:05:21.154-->00:05:27.594 actually the manufacturer of the device. And um, they, they’re located in China. Uh, and, I 00:05:27.594-->00:05:34.367 wanted to mention really quick that I did get in contact with the vendor and they have given 00:05:34.367-->00:05:39.839 me firmware and desktop, desktop application, uh, but I didn’t get a chance to review it 00:05:39.839-->00:05:44.845 because it happened, uh, last week. So. Anyways um, so this, this uh particular device, um, 00:05:48.481-->00:05:54.087 got it. Took it apart, took the remote apart. Trying to figure out how the remote is, is 00:05:54.087-->00:06:00.160 interacting with the, the camera. Um, and uh, you know, had to, had to go and look at 00:06:00.160-->00:06:05.165 some chips and see what, what frequency it’s operating. It’s actually 433 uh, and RTL 4D, 433 00:06:07.667-->00:06:13.139 identifies it as smoke detector which is kind of interesting. Um, and the, the neat thing 00:06:13.139-->00:06:18.845 about the remote and why I wanted to get these, this device is because, um, the remote uh, 00:06:18.845-->00:06:22.682 can be used to be used to trigger multiple different cameras, not just one. You, you 00:06:22.682-->00:06:24.684 can actually um, update the remote so that it, it triggers like, a wide variety of cameras. 00:06:24.684-->00:06:26.686 Um, and so we can kind of be annoying with that. Because this is the simple signal that’s 00:06:26.686-->00:06:28.688 being transmitted. It’s uh, there’s no rolling codes, there’s none of that. Um, so, if 00:06:28.688-->00:06:30.991 you want to you can, you can sit there with the RTLSTR or receive the signals. Replay it with 00:06:30.991-->00:06:35.395 something more powerful than the hackrf because, well it doesn’t have much power. Um, uh the 00:06:35.395-->00:06:40.400 other interesting thing about this device is when I was getting in contact with the 00:06:47.674-->00:06:49.676 manufacturer, um, they told me about their RF certification and it was not FCC certified. So, 00:06:49.676-->00:06:51.678 there’s that. Uh, [speaker laughs] wow. Another thing about it is it’s essentially a USB 00:06:51.678-->00:06:56.683 drive. So anything that you have uh, you know, records the videos, it drops’em down onto 00:07:13.767-->00:07:18.772 the, the, the dedicated storage on the device. You plug it in to your computer uh, you pull the, 00:07:30.583-->00:07:35.588 the things off just like a, a, a USB storage. So if I wanted to put autorun dot inf, or take 00:07:38.224-->00:07:42.696 advantage of some link vulnerabilities that have been popular in the past, uh, that’s 00:07:42.696-->00:07:47.701 completely possible with this camera. Alright so here’s another, nother camera, this is 00:07:51.071-->00:07:56.076 the uh, on call OC P Pro. Um, as you see the architecture of the system uh, down there in big uh, 00:08:01.181-->00:08:06.186 but uh, unfortunately uh, because of the, one I got, um nothing really works. [speaker 00:08:09.956-->00:08:14.961 laughs] Uh, so, I, I got it, um, it, it, I think the USB was broken. It wouldn't, wouldn't 00:08:17.397-->00:08:22.402 maintain the USB connection. Um, so everything to the uh, to, to your, your right of the arrows I 00:08:25.538-->00:08:30.543 didn't get a chance to test out. Uh, but there were enough glaring issues um, on the other 00:08:33.646-->00:08:38.651 part that it's fun to talk about. Um it uses an RTOS called eCos. Uh, that’s um, hasn’t, 00:08:42.422-->00:08:48.561 there has, there hasn’t been very many updates on that, that particular um, website in, in 00:08:48.561-->00:08:54.734 quite awhile. Uh, when you trigger the wifi on it through a button press, um, it comes up as 00:08:54.734-->00:08:59.739 FIRE-CAM and that is the default password. Uh, [audience laughs] and yes, and it, it has a uh, a 00:09:03.977-->00:09:08.982 wonderful embedded eCos HTTP server, um, that I thought would be kind of fun to poke at, but, 00:09:12.285-->00:09:17.290 you’ll see that it wasn’t really necessary. [audience laughs] Um, yes, so, so this is the contents 00:09:20.460-->00:09:25.465 of the uh, the movie folder. Um, and you see the, all the videos. But it’s coming up as 2014 00:09:28.468-->00:09:34.707 because I kinda never got a good time sync for my, for my laptop. Um, but these are all the same 00:09:34.707-->00:09:39.979 videos, and you see you can remove them, download them, upload files. Um, you can 00:09:39.979-->00:09:44.984 actually even uh, upload arbitrary HTML and serve that in the browser. That’s not good. 00:09:53.026-->00:09:56.963 [audience laughs] [speaker clears throat] Um, yea, so. Totally unprotected. 100 00:09:56.963-->00:10:02.702 percent. No, nothing. Nothing at all, preventing anyone from downloading these videos or 00:10:02.702-->00:10:07.707 uploading ones in, um, ones to uh, kind of overwrite these. Um, and uh, I have a, uh, I wrote 00:10:11.578-->00:10:17.884 some tools that use GITs and posts, um, to overwrite files and download all of the 00:10:17.884-->00:10:22.889 contents. Um, It also has a, uh, a nice settings file, uh, that’s, um, you can download as 00:10:26.526-->00:10:32.332 well that has all of the relevant information about the camera in it. Which is 00:10:32.332-->00:10:38.505 interesting. Okay. So here’s the first, kind of, big device uh, widely kind of used. A device 00:10:38.505-->00:10:43.510 that I had, had a chance to, to look at. So this, this particular device, has, has um, 00:10:48.681-->00:10:52.318 smart, um it has a smartphone application that you can go and download on, available on the 00:10:52.318-->00:10:58.458 playstore. Um, it has desktop software that is, is available for download on the 00:10:58.458-->00:11:03.429 manufacturer, or the, the resellers website. And I say reseller because we will, we 00:11:03.429-->00:11:08.535 will show, I’ll show you this in a moment. Alright, and the firmware is also available for 00:11:08.535-->00:11:13.673 anyone to go ahead and pull down, and browse, and look through because it’s not signed 00:11:13.673-->00:11:19.579 and it’s not encrypted. Which is awesome. Uh, right, so smartphone application is 00:11:19.579-->00:11:26.252 primarily used to access the RTSP server that is not protected from anyone. Uh, and, 00:11:26.252-->00:11:31.257 um, you can view the saved videos on the device. And the, the desktop software is, is used 00:11:34.260-->00:11:40.934 to um, to authenticate with the camera. Uh, and, and download the video files off of the 00:11:40.934-->00:11:45.939 camera. So, uh the desktop software, as you see there, is the, it’s simple, it's a simple 00:11:49.475-->00:11:54.480 um, wrapper around the DMT10 dot DLL. Um, and that is uh, actually, the, the name of that 00:12:00.119-->00:12:05.725 comes, I think, comes from um, the Chinese manufacturer cause they sell the DMT10 version of 00:12:05.725-->00:12:10.730 this camera. The admin and general user passwords are, uh, 6 characters, they have to be 00:12:14.667-->00:12:19.672 exactly 6 characters. No more or no less. Um, it has the SSID as you see for amba boss. Uh, and 00:12:24.811-->00:12:28.915 that’s not something that you can change. And I’ll, I’ll get into that, why that’s, that’s 00:12:28.915-->00:12:35.388 kind of a big deal later. Um, and you have some other things you can, can mess with in the, 00:12:35.388-->00:12:40.393 this is the administrative interface. Um, as with all of the other desktop software that 00:12:42.629-->00:12:47.634 I have looked at, um, it’s missing a lot of the uh, exploitation prevention 00:12:49.802-->00:12:54.807 mechanisms, like, ASOR. Uh, um. And that, that’s kind of across the board. Uh you see here, 00:12:58.645-->00:13:03.583 there’s little bit, a little clip from IDA, uh, to verify password. Um, routine, coming 00:13:07.720-->00:13:12.725 from DMT10. Uh, and then you have the set password, uh export that’s called from uh, that’s 00:13:16.696-->00:13:23.369 available in DMT10 as well. Uh, and you can see that there’s no correlation between the two. 00:13:23.369-->00:13:28.508 That means that I can set the password without having to verify the password, and, yeah. 00:13:28.508-->00:13:33.513 So that’s awesome. [audience laughs] [speaker laughs] Yeah. K. Again, it comes with a 00:13:36.449-->00:13:42.055 smartphone application. If you wanted to go find it, there, there it is. Uh, and that is 00:13:42.055-->00:13:47.593 primarily used to uh, view said videos and livestream whatever the, the camera is looking at. 00:13:47.593-->00:13:54.500 Um, and the uh, I want to, be sure to, to mention all of these cameras except, I think, for the 00:13:54.500-->00:13:59.505 next one uh, when you activate the wifi on these devices they um, they create a access point. 00:14:02.508-->00:14:07.513 Right? They act as, as a wifi like, hotspot without internet connectivity. Um, so, uh, so 00:14:09.849-->00:14:15.988 that, that’s kind of important because if anyone’s wanting to review videos they created 00:14:15.988-->00:14:22.528 essentially a beacon upon themselves that uh, anyone can kind of find and play with. And 00:14:22.528-->00:14:27.533 we’ll talk more about that part later. Right, so, again, this, this device um, it’s running a 00:14:30.636-->00:14:37.310 little bit of an older version of Linux. That’s, that’s not really bad. Um, again, it has, 00:14:37.310-->00:14:42.315 has a JSON messaging server which I was really surprised about. Um, and the RTSP and, and 00:14:44.717-->00:14:49.722 DNS and, and after um, after uh, I got to poke around on the system, I found out that it was 00:14:52.325-->00:14:57.330 incredibly simi, similar to um, a talk GoPro or a get the f**k out. Um, that uh, if you wanna 00:14:59.932-->00:15:05.638 know anything more about how this system operates I would uh, really recommend going reading 00:15:05.638-->00:15:09.942 and looking through that cause it has a lot um, it goes to a lot in, in depth about the 00:15:09.942-->00:15:14.547 messaging subsystem. Um, and I wish I would have found that out [speaker laughs] right? When I, 00:15:14.547-->00:15:19.552 when I was looking at this. But uh, I didn't need to because it has root telnet exposed with no 00:15:23.156-->00:15:28.161 password required. [audience laughs and applauds] And I, I wrote a wrapper script a bit 00:15:35.067-->00:15:41.140 around pi Telnet that allows you to upload and download files if you don’t feel like using 00:15:41.140-->00:15:46.145 Telnet. Um, again, here’s the contents of the, the uh, media um, yea the media folder. So any 00:15:50.216-->00:15:56.222 videos that you make are saved into here. Um, this directory is mounted when you use the desktop 00:15:56.222-->00:16:01.160 software um, to download and upload videos. Um, and it, it essentially sends a uh, a 00:16:03.396-->00:16:09.735 trigger to the camera uh, and we can then, it’s like it, it treats it as a, as a removable 00:16:09.735-->00:16:14.740 media drive. So, if you wanted to upload, again, link files or any type of Windows based 00:16:17.276-->00:16:24.150 exploits um, to take advantage of the back end digital evidence storage repository where these 00:16:24.150-->00:16:30.990 videos will be saved and, you know, have something nice like, wanna cry, um, you could 00:16:30.990-->00:16:35.995 definitely do that. Uh, what, yea. So, there we go. So this is um, uh, this device, the Digital 00:16:39.298-->00:16:44.303 Ally FirstVu HD, is architecturally different than all of the other cameras. Um, it 00:16:49.141-->00:16:54.146 treats it, it is a client. K? And it has other devices in its ecosystem that uh, that act as 00:16:59.051-->00:17:03.990 servers. For example, the um, the rearview mirror in a cop car will act as a wifi access point. 00:17:08.227-->00:17:14.667 When this device is within rage, it will automatically connect to that wifi access point. And then 00:17:14.667-->00:17:19.805 um, you know, interact uh, through that. It’s also how if you’re able, if you turn on the 00:17:19.805-->00:17:25.044 sirens uh, it will automatically start recording. It has event triggers. That kind of 00:17:25.044-->00:17:30.816 technology. Uh, and again it sm, it supports, has its own desktop software that I tried to 00:17:30.816-->00:17:37.723 purchase 3 month uh, 2 months ago and I did not get. Which was unfortunate. It has a smartphone 00:17:37.723-->00:17:43.262 application that anyone can download. Um, firmware is available and easy to look 00:17:43.262-->00:17:48.267 through. Literally Tar. We’ll unpack the firmware uh, and it uh, does have a, a docking 00:17:51.704-->00:17:56.509 station um, that, you know, you can, you take the camera out and plug it in and it will download 00:17:56.509-->00:18:01.447 stuff. Um, but, interestingly enough, it does come with a minimal software bundle um, on 00:18:04.550-->00:18:11.223 the device, for anyone who, who gets ahold of it and wants to uh, [clip glitches] minimum 00:18:11.223-->00:18:16.228 configuration manager and a minimum software viewer to uh, to view the contents and, and 00:18:18.364-->00:18:24.503 um, see whatever’s going on on the device. You can also um, yeah it also has a, like, uh, 00:18:24.503-->00:18:29.508 read me’s on there about how the device is supposed to work. So it’s very, very usler, user 00:18:31.644-->00:18:36.649 friendly. And kind of nice. Um, so here is a picture of the uh, it’s a, um, the minimum, the 00:18:40.753-->00:18:47.093 like, the minim, minimal viewer that comes packaged on the device. Right? Uh, the software 00:18:47.093-->00:18:53.132 VuVault I tried to purchase um, and, well hopefully it will get here eventually. Because there 00:18:53.132-->00:18:58.137 was a lot of features that I wasn't able to um, interact with and, and play around with 00:19:00.473-->00:19:06.245 because I didn't have that. Uh, one of those main features being you turn the hot, you turn the 00:19:06.245-->00:19:10.516 device into a wireless client, right? I couldn't, I couldn't do that because you have to pay the 00:19:10.516-->00:19:17.390 800 dollars for the desktop software. Um, but we were still, we were still able to um, get 00:19:17.390-->00:19:22.395 some good stuff out of it. So the uh, the packaged installer is written in C sharp, which is 00:19:24.530-->00:19:29.535 awesome because it’s really easy to uh, decompile and play around with. Uh, the configuration 00:19:33.773-->00:19:38.778 manager uh, generates 2 types of files. The wum, WUM config, and that’s for wireless. Uh, it also 00:19:42.181-->00:19:47.186 generates the device config and that is a binary format that’s um, that you can uh, use to set 00:19:50.823-->00:19:57.696 the time and stuff like that. Now the uh, the viewer um, which is used for evidence review and 00:19:57.696-->00:20:03.636 making comments and, and uh clipping videos and stuff generates 3 types of files. The 00:20:03.636-->00:20:08.641 DAZ file, which is the digital ally zip file. Uh, the metadata file and then the VM2 file which 00:20:12.645-->00:20:17.650 is XML. Uh, and we, we’ll go into those right now. So, the WUM config file is quite 00:20:21.587-->00:20:25.458 interesting because it does something that you’re supposed to generate through the 00:20:25.458-->00:20:31.163 configuration uh, software and then put on the device. And it configures the device on how to 00:20:31.163-->00:20:37.937 interact with uh, police networks and police cam, um, like, systems, right? So that 00:20:37.937-->00:20:42.942 would be important. So that would not be a good thing to have that uh, XOR as, as the way 00:20:45.744-->00:20:51.650 to decode it. Uh, and you can see here that the, it’s configured to use the, to look 00:20:51.650-->00:20:56.655 for the, the SSID that is associated with a police network and has the PSK um, that is just 00:20:59.425-->00:21:04.363 text encoded. Uh, and the password for FTP logins um, so that it can upload and download 00:21:06.532-->00:21:11.537 whatever media is on the device as it goes. Um, then the, the device config file is, again, to 00:21:14.507-->00:21:19.512 um, to insert time and other information onto the device. Uh, that, um, has uh, couple lines 00:21:23.215-->00:21:28.220 worth of an X mark, but it basically is an equivalent to a X88 XOR. So that’s, that’s cool. 00:21:30.523-->00:21:35.528 Oh and um, 001 is before and then the small one is after when you decode it uh, with, with 00:21:41.267-->00:21:46.272 XOR. Uh, here is the DAZ file. The DAZ file is generated through the viewer application 00:21:49.508-->00:21:54.513 when you, you have, so you have the, the AVI and the metadata file. You insert that into the 00:21:57.449-->00:22:03.088 viewer application, and then you mess around with vid, with the video and you save it out and it 00:22:03.088-->00:22:08.093 creates this DAZ file and all this other stuff. Um, the, the VM2 file here is included in 00:22:11.530-->00:22:18.470 the, in the ZIP file. Uh, and it, you see it has a huge amount of metadata associated with how 00:22:18.470-->00:22:23.475 this, this camera was operating. Um, and how um, you know, like, what sensors were used, what’s 00:22:26.512-->00:22:31.917 the GPS cords, all of this kind of stuff, right? And you see here it uses AES128CBC. And the 00:22:31.917-->00:22:36.922 final name is the decryption key. [audience laughs] See here, we have it, it like, in, in this 00:22:41.227-->00:22:46.232 we would have D0018002 and then we just basically make that unicode and we have the IV and 00:22:52.671-->00:22:57.676 the decryption key for our AES uh, whatever. That’s, that’s awesome. [audience laughs] 00:23:02.281-->00:23:08.287 [speaker laughs] Right. So since uh, since the digital ally was so nice to include an unsigned 00:23:08.287-->00:23:13.292 installer on their application, uh, I thought it would be fun to um, insert a back door into 00:23:15.427-->00:23:21.400 that. Because, I can override it, uh download it, modify it, push it back, override it, and 00:23:21.400-->00:23:27.973 then if anybody wants to install it, they, they give me a nice shell. Uh, so. Uh, you see here 00:23:27.973-->00:23:34.580 the um, top IDA, that’s the normal entry point. I just hand jammed this assembly. And all 00:23:34.580-->00:23:40.986 that does is it creates a thread on the, uh, on the section that I added to the application. And 00:23:40.986-->00:23:47.893 that section is oh noes. Uh, and then underneath [light audience laughter] I, uh, simply put in 00:23:47.893-->00:23:53.432 some metasploit, reverse shell shellcode. And this is the uh, here, we have the install 00:23:53.432-->00:23:59.672 shield. Uh, and down here we have the shell. Um, that’s generated. I had to cut a lot of 00:23:59.672-->00:24:04.610 videos. So, for time. But. So that’s really bad. [audience laughs] [speaker laughs] Right. 00:24:08.247-->00:24:14.953 So um, again, the, the android application, which you can download on playstore, um, is 00:24:14.953-->00:24:21.794 used to uh, basically use the configuration manager and use Sideload Config Files onto it. 00:24:21.794-->00:24:27.266 And that will turn your, your phone into um, into an access point that the camera can then 00:24:27.266-->00:24:33.238 talk to. Now I was hoping that after 2 months I would get the software that I purchased. Uh, 00:24:33.238-->00:24:38.243 and so I didn't bother to reverse engineer it on, with Frida. Um, but I might have to 00:24:41.146-->00:24:46.151 soon. Or get my money back. I don't know, like [speaker laughs] Right. So, again, uh, 00:24:50.189-->00:24:55.194 here is the firmware that you can get from the, from, from the manufacturer. Um, again, binwalk 00:24:59.298-->00:25:04.236 and Tar is really all you need. Um, but as you’re going through the uh, the firmware, cause one, 00:25:07.806-->00:25:12.745 once it gets extracted it has some, some really interesting, uh interesting things going on 00:25:12.745-->00:25:18.450 in there. Um, but I think I'm gonna put in version 2 of this talk. There’s some serious 00:25:18.450-->00:25:23.455 unbounded memory copy operations going on. Uh, but anyways if, if you don’t um, want to uh, uh 00:25:29.461-->00:25:35.768 debug anything running on the device we create a nice little log file on the, on the, the 00:25:35.768-->00:25:40.773 camera. Um, it creates every, after every operation here, we have this, this log stuff going 00:25:43.308-->00:25:48.580 on after ev, in every function, it generates that. So there’s tons of login information and 00:25:48.580-->00:25:52.918 stuff. And all you gotta do is create the log file and [speaker makes fart sound] it’s good to 00:25:52.918-->00:25:57.923 go. Uh, the Gui application in the MDVR, mobile DVR, pretty sure what that means. Uh, is 00:26:00.225-->00:26:05.864 what’s used to do all of this interesting stuff. And it does some really interesting stuff. 00:26:05.864-->00:26:11.570 Because there’s lots of wifi triggers and peer to peer operations going on with all of 00:26:11.570-->00:26:17.876 these devices when they’re within the same network. Uh, and there’s a lot of unbounded 00:26:17.876-->00:26:22.314 memory copying operations going on on these devices. [audience laughs] And they are peer to 00:26:22.314-->00:26:27.319 peer network. Um, but yea I think I’ll, I’ll save that for the next version. Ah! This guy. 00:26:30.355-->00:26:37.296 I wanted to spend some time on this because um, this camera is used uh, uh in some pretty big 00:26:37.296-->00:26:42.301 um, in some pretty big departments. Uh, again it has the smartphone application, it 00:26:45.704-->00:26:50.943 has the awesome desktop software, uh, it even has docking station and, and it 00:26:50.943-->00:26:57.149 supports cloud storage. And you can get the firmware. Um, and they tried, they tried to be uh, 00:26:57.149-->00:27:03.155 have a pretty professionalized uh, operation. Um, again, smartphone for live streaming 00:27:03.155-->00:27:09.461 and viewing media which we’ll talk about later. And uh, desktop software for actually 00:27:09.461-->00:27:14.466 verifying that the media files that are coming from the device are valid. And we’ll talk about 00:27:18.837-->00:27:23.842 that later too. So here is the desktop software. It is a fat client, right? So, essentially 00:27:26.979-->00:27:32.384 you have a sequel database install and then you have some, 2 fat clients for admin. 1 for 00:27:32.384-->00:27:39.358 admin and 1 for officers, right? Uh, and it’s used to um, the admin app is used to configure 00:27:39.358-->00:27:44.930 the cameras and then assign them to, to, to various officers. Uh, and then the client application 00:27:44.930-->00:27:50.569 is used to upload, download video uh, and, and that’s essentially it. Right? You can 00:27:50.569-->00:27:55.407 add comments but really uploading, downloading videos from the cameras, exporting them 00:27:55.407-->00:28:02.114 from the, the, the fat client is essentially it. Um, but another application that is installed 00:28:02.114-->00:28:07.119 with this is the import export tool. Um, and, there’s, there's 2 types of authentication going 00:28:10.455-->00:28:15.561 on here. You have the authentication and then the passwords that are created for, 00:28:15.561-->00:28:20.566 through the admin app that is, that are used to uh, interact with the, the software and with 00:28:22.734-->00:28:27.739 the, the contents of the database. Now, then you have the uh, Windows authentication 00:28:31.843-->00:28:37.182 mechanism which is actually used by the import export tool, to authenticate with the database 00:28:37.182-->00:28:42.187 bypassing all of the um, uh VieVu at auth and uses straight uh, Windows auth. So if I am 00:28:45.424-->00:28:50.429 local admin, somewhere out there, on a desktop that is used, that the officer is using 00:28:53.365-->00:28:58.370 the client app to upload and download videos, I can then connect and uh, export videos 00:29:01.106-->00:29:06.044 but uh, I’ll show you that in a minute. There are other things associated with this. We have 00:29:06.044-->00:29:10.515 um, we have lots of the install folders that kind of spreads out everywhere when you install it 00:29:10.515-->00:29:15.520 on your, on your box. Um, and we have logs about the, the uh, communication between your 00:29:18.390-->00:29:23.395 computer and this device. Um, it communicates over uh, USB. Creates a calm serial over USB. 00:29:26.365-->00:29:31.370 Uh, it attaches to the, the, uh file and then starts writing stuff out to it. Um it also uh, 00:29:35.374-->00:29:37.376 has, has a downloaded metadata that like, downloaded videos that are cached on the 00:29:37.376-->00:29:39.378 computers. So uh, bypass download, you have access to the downloaded metadata by boss, 00:29:39.378-->00:29:44.383 bypassing the upload client by just looking into the, the correct folder. Um, yea. And, 00:29:54.993-->00:29:59.998 and again, if you go there you can see all the cached videos. K, so domain credentials. What I 00:30:02.601-->00:30:07.606 was kind of talking about earlier. Uh, I used to export the database instead of the 00:30:10.609-->00:30:15.614 application credentials that you use when you uh, create users. Um, and that is the uh, admin 00:30:19.518-->00:30:24.523 user super. For supervisor I suppose. Uh, and that’s the SHA 1 of 1, 2, 3, 4, 5, 6. Which is 00:30:27.959-->00:30:32.964 the default password uh, for all of the uh, admin um, yeah. For the, for the supervisor for the 00:30:35.667-->00:30:41.406 admin interface, right? Um, and they, they try to, when you install this you start it up 00:30:41.406-->00:30:47.946 but, this is how I found it. Uh, it requires, they ask you to, to contact their help and support 00:30:47.946-->00:30:53.251 system to configure the desktop software. Really it’s so that they can upsell you. Right? And 00:30:53.251-->00:30:59.991 so I was like, well no I don’t want to do that um, because it probably wouldn’t be good having 00:30:59.991-->00:31:04.996 Josh at his house contacting support people. Um, and, and so I was clicking around and found 00:31:08.366-->00:31:13.371 the import export tool and Googled the password. Uh, and then I was able to have admin on 00:31:16.308-->00:31:23.115 their software. Which, also, you have to buy, so. [audience laughs] Uh, ah! Another issue 00:31:23.115-->00:31:28.120 with this, is when you download videos off of the camera um, you, it, it uh, you can, you can 00:31:31.590-->00:31:36.328 play those videos through the interface. Right? Through, through the uh, um, the admin or 00:31:36.328-->00:31:41.333 the client interface you can review the videos. Um, and to do that it comes bundled with 00:31:43.969-->00:31:48.974 ffmpeg. Uh, and um it also uses ffmpeg to uh, to create thumbnails based on the videos. 00:31:53.245-->00:31:59.785 So, not only when you just play the video does it use ffmpeg, uh, but when you uh, when you 00:31:59.785-->00:32:05.490 upload all of the videos at, at the time of upload it uses this to create thumbnails of the 00:32:05.490-->00:32:11.496 videos. Which is important because it’s processing videos with a version of ffmpeg that is 00:32:11.496-->00:32:16.501 from 2014 and has over 122 public CVEs out there for this version of ffmpeg. So if I could 00:32:21.706-->00:32:26.711 modify those version, those videos beforehand, insert and exploit, I know I have a really, 00:32:28.914-->00:32:33.418 really vulnerable piece of software that’s gonna process those videos, which would then 00:32:33.418-->00:32:38.890 give me, uh, gain me access to the evidence storage repository where these, these videos are 00:32:38.890-->00:32:43.895 stored. Ah, so here we have the, the admin interface um, of the, of the Veripatrol software. Uh, 00:32:54.139-->00:32:59.144 and you see here we have, we have several videos that have been uploaded by supervisor and 00:33:01.246-->00:33:03.348 their durations are, you know, in there, and they have valid digital signatures. Alright and 00:33:03.348-->00:33:08.353 then we have over, over here we have it making a copy of the video and exporting it and 00:33:11.623-->00:33:15.594 stuff. And there’s an important video that we need to look at right there it has a time length 00:33:15.594-->00:33:20.599 of 0 and a valid digital signature. So, [speaker clears throat] as we export these AVI 00:33:28.406-->00:33:34.546 files from the interface, uh we have, we, you know, just pick a, pick an output folder and it 00:33:34.546-->00:33:39.951 creates the AVI file and then it has the log file that uh, that requires all the comments put in 00:33:39.951-->00:33:44.589 there. Uh and it saves them to wherever you want, and again it says this file has a valid 00:33:44.589-->00:33:49.594 digital signature. A valid digital signature. [audience laughs] So this is the contents 00:33:52.230-->00:33:56.935 of that AVI file that has a valid digital signature. [audience laughs] >>That holds 00:33:56.935-->00:34:01.873 up in a court of law, right? >>That is used to prosecute people and put them in jail. 00:34:07.078-->00:34:13.518 [audience laughs] Uh, and I’ll, I’ll show you how I did that, uh, in a moment. Again, so we 00:34:13.518-->00:34:20.492 have the interaction uh, with this device. Um, it has uh, you know, when we created our log, 00:34:20.492-->00:34:26.064 it has a lot of files that are nice and kind of cruise through those. Uh, it uses serial 00:34:26.064-->00:34:32.570 communications over USB uh to upload download files, update firmware, uh, and do all that 00:34:32.570-->00:34:37.042 kind of nice fancy stuff. Well the other day when I noticed when I was downloading those 00:34:37.042-->00:34:42.047 files, which were quite big, uh, it actually just tells the device to mount uh, uh this, 00:34:44.582-->00:34:49.587 the, the application just tells the device to mount itself as a removable media drive. And then 00:34:54.059-->00:34:59.965 downloads the files. So if, if you want to write an application to interact with this we see 00:34:59.965-->00:35:04.903 that, that the command system is incredibly complex right here. [audience laughs] Uh, and very 00:35:08.340-->00:35:14.646 difficult to modify. And we can see right here that the device gets mounted as the e drive. Uh, 00:35:14.646-->00:35:21.353 and then it begins to upload the files so as I see this random drive pop up on my computer I'm 00:35:21.353-->00:35:26.124 like, oh! What’s in e? [audience laughs] Let me, let me open that. And then you can just 00:35:26.124-->00:35:32.831 download the files off of that, completely bypassing all of the evidence collection software. 00:35:32.831-->00:35:37.836 [audience laughs] So, awesome. [audience laughs] Uh, right. Again so we have the, the uh 00:35:40.605-->00:35:46.678 smartphone application um, that is supposed to interact with this device in the field. Um, 00:35:46.678-->00:35:53.118 and it uploads metadata to each video based off, with JSON, which is pretty standard. You 00:35:53.118-->00:35:58.123 can also download any file off of this device, right? So, uh, and then you can live stream uh, 00:36:00.592-->00:36:05.597 with RTSP. So the only thing you need to do is if, if you found one of these in the wild, is 00:36:09.134-->00:36:16.007 download the app. And you can see anything on it. Also if you‘re within proximity of some 00:36:16.007-->00:36:22.247 police officers and you’d like to see what they see, you can see, you can see that over RTSP. 00:36:22.247-->00:36:27.252 Um, there was some pretty good talk a little while ago about the sunplus format. Uh, and 00:36:30.088-->00:36:35.927 there’s some tools out there that I definitely used. I conversed the sunplus uh, burn 00:36:35.927-->00:36:40.932 firmware burn format to uh, to IDB, which is great. Uh, it’s freaking awesome. You should 00:36:43.601-->00:36:49.140 check that out. I love it. Uh, so you don’t have to unpacked or unpack firmware or do anything 00:36:49.140-->00:36:53.511 like that, it’s just ready. Good to go. Now this device has several services that are 00:36:53.511-->00:36:58.516 available on it. And it is this 1 right here. Uh, uh it has FTP uh, it has the photo transfer 00:37:01.653-->00:37:06.658 protocol and it has RTSP. FTP is used for uploading downloading files. it's also used for, with 00:37:09.160-->00:37:14.466 the smartphone it’s used to, you know, upload and download metadata. So you can download 00:37:14.466-->00:37:19.771 any video off the device. You can also sign um, you know, any type of metadata through the 00:37:19.771-->00:37:26.745 JSON interface. Now, for you to be able to get um, for, for the smartphone to get a directory 00:37:26.745-->00:37:32.250 listing of which files are available, uh, it uses the photo transfer protocol which um, 00:37:32.250-->00:37:37.255 there’s some really great git repos out there about using PTP over wifi. Um, and that’s gonna 00:37:40.492-->00:37:45.497 be important in a minute. And then of course RTSP which, you know you just use VLC. So, if I 00:37:48.533-->00:37:54.806 wanted to see what all of the, what all of the, uh video that was stored on this device, you 00:37:54.806-->00:38:01.513 simply use PTP. Uh, and we can see here that we have some AVI files that were filled with A’s 00:38:01.513-->00:38:06.518 earlier available in our PTP directory listing. Now for us to interact with that incredibly 00:38:10.989-->00:38:15.994 sophisticated uh, FTP software and overwrite files that should be digitally signed and use to 00:38:19.597-->00:38:24.602 uh, put people in jail, uh, we use FTP and we have some passwords Wificam and username 00:38:28.706-->00:38:33.711 wificam. It actually accepts any combination. [audience laughs] So if you don’t remember 00:38:36.214-->00:38:41.219 wificam, you can try any other combination and it will work. Uh, then we have uh, we, we just 00:38:43.621-->00:38:49.194 use type 1 and then we uh, we enter pass, passive mode. I was playing around here trying to 00:38:49.194-->00:38:55.200 delete video files, it wouldn’t let me delete the preexisting video files, but it would let e 00:38:55.200-->00:39:01.439 overwrite them with whatever I wanted. [audience laughs] And that is how we got A uh, in that 00:39:01.439-->00:39:06.444 digitally signed valid evidence file from earlier. Okay so we have like, a little demo we’ll 00:39:10.281-->00:39:15.286 show you here. Let’s turn this guy on. Cool, it’s on. Alright. So another thing that I, I 00:39:20.792-->00:39:25.797 wrote, um was a tool to uh, identify these cameras in the wild based on their Mac address 00:39:31.736-->00:39:38.509 and their wireless access points. As I said, I was in the military and I, I think a very, 00:39:38.509-->00:39:43.514 very important yet often overlooked thing uh, is the ability to, to locate something 00:39:47.819-->00:39:52.557 [speaker clears through] uh, like in the field and be able to identify the emitter with the 00:39:52.557-->00:39:58.162 platform. The platform being the police, and the emitter being the camera. Uh, and if I know 00:39:58.162-->00:40:04.902 that VieVu, I and look in the OUI database, and I see the Mac addresses that are associated 00:40:04.902-->00:40:10.475 with this company, that is published by the I triple E. Uh, and I can say that this company 00:40:10.475-->00:40:15.480 only makes cameras. If I pick up a Mac address or a SSID that’s associated with that, well guess 00:40:18.149-->00:40:23.821 what it’s only gonna be? It’s only gonna be this. Right? And uh, as a bad guy, you might want 00:40:23.821-->00:40:28.826 to know that. Right? Maybe find out about cops running around in their area. Let’s see if this is 00:40:31.162-->00:40:36.167 working. I don’t know. Yep. Live demo’s a**. Let’s see if it’s connected. Okay. Let’s see. Okay 00:40:48.646-->00:40:55.486 yeah there it is right there. See if my bugging software works. Nope! It’s not working 00:40:55.486-->00:41:00.425 right now. Oh well! This is a 2 part demo. [audience laughs] Alright so everybody knows that, 00:41:03.127-->00:41:10.068 like, USB, wifi and Linux is s**t. It’s been the story of my life trying to get one interface 00:41:10.068-->00:41:15.273 that works right. Um, but anyways uh, if you want it’s supposed to identify this guy 00:41:15.273-->00:41:20.678 right here that we see. Uh, and we can just connect to that. Um, and then the password is 00:41:20.678-->00:41:25.683 1234567890. It's very complicated. Anyways so here um, again, no, nothing really 00:41:32.557-->00:41:37.562 protecting uh, anything that’s going on. We’ll just go ahead and we can just use VLC. It’s 00:41:41.666-->00:41:46.671 that easy. Takes awhile. Ta da! [audience applauds] Hi Defcon! Heeeey. So again, again, 00:41:57.782-->00:42:02.720 feature, feature right? This is a, this is a feature. >>I don’t want that feature. >>That is 00:42:11.596-->00:42:17.535 awful, right? [audience laughs] Anybody that would be like, yeah I would like to live stream some 00:42:17.535-->00:42:22.340 video off of a police officer whenever I want. That’s a feature. Oh and the 00:42:22.340-->00:42:27.245 manufacturer’s like just say that, oh it’s only supposed to be right here. Yeah cause, cause 00:42:27.245-->00:42:32.583 wifi antennas can’t pick up stuff from a mile away, like, that hasn’t been proven years 00:42:32.583-->00:42:38.823 ago, right? Okay. And, and we can change the default password on this to give it something 00:42:38.823-->00:42:44.429 very complex because crack doesn’t exist. And neither does that wifi uh, thing the other 00:42:44.429-->00:42:49.434 day where um, you could, you could get the, the key without even needing a client on the WPA 00:42:52.036-->00:42:57.041 to uh, uh network. If you guys haven't read that I highly encourage doing it. Okay so 00:42:59.977-->00:43:04.982 where’d my presentation, come back. Alright. Here we are. Bang. Okay. So, cool. Industry 00:43:08.119-->00:43:13.124 wide issues. Right? So I analyze many cameras, I can talk about 5. Uh and an industry wide issue 00:43:18.896-->00:43:23.901 is digital signatures are not applied to the multimedia coming off of the device before it 00:43:26.904-->00:43:31.909 touches anything else. Which means that if anyone is able to get in between that being, 00:43:35.346-->00:43:41.118 either being on the desktop or interacting with the device in the field, you can corrupt any 00:43:41.118-->00:43:47.024 kind of evident trait in information on that device. And that is supposed to stand up in 00:43:47.024-->00:43:52.029 a court of law and out people in jail. Again, unencrypted firmware, unsigned firmware. 00:43:56.901-->00:44:01.973 Unsigned. Your smartphone signs as firmware, right? That, how much does that cost? How much do 00:44:01.973-->00:44:07.712 these things cost? About the same. Right? So you can cruise, you can see anything you want. 00:44:07.712-->00:44:12.316 If you have physical access to the device you could roll your own malware, drop it on there 00:44:12.316-->00:44:16.154 and then as soon as it gets synced back in the back end [speaker snaps fingers] you own 00:44:16.154-->00:44:21.325 them. Done. 3 minutes? Okay. Cool. Uh and again, localization. Being able to find 00:44:21.325-->00:44:23.327 stuff out there, I wore walk, find cops. Cool? Why it’s important? Uh because this 00:44:23.327-->00:44:25.329 happened here last year. Right? And the guy had cameras in the hallways and he was targeting 00:44:25.329-->00:44:30.334 police. If he knew about this, he’d be able to do that a lot better. K. Thanks. Thanks to 00:44:41.646-->00:44:46.651 SAHA and everyone at basement brotherhood. [audience applauds and cheers] Uh, Nuix CTAT. Cool. 00:44:50.021-->00:44:55.259 And I think I have a couple minutes, I got questions? I got time for questions? Like 1, 1 00:44:55.259-->00:44:59.430 question. >>I gotta question, what time is it?! >>It’s team grind time, Tim. >>That’s right 00:44:59.430-->00:45:03.968 baby! That’s right! [speaker laughs] >>Yes. >>[inaudible question from audience member] 00:45:03.968-->00:45:10.374 >>Some do, some don’t. Some you can actually configure to always be on the wifi. Always have wifi 00:45:10.374-->00:45:15.880 on. Some use bluetooth. >>[inaudible question from audience member] >>No. This 00:45:15.880-->00:45:20.885 doesn’t show anything. It’s just on. It’s still connected to my laptop. >>Have you tried to 00:45:23.888-->00:45:27.825 [indiscernible] >>I have but it’s very difficult to get any response at all back and they 00:45:27.825-->00:45:34.298 don't publish who uh, you know, who they’re selling these things to. Except for the NYP, you can 00:45:34.298-->00:45:37.335 go to these guys’ websites, they have a couple of their big contracts on there. >>Yeah they 00:45:37.335-->00:45:40.438 won’t even send you the software you purchased. >>No they won’t even send me the software I 00:45:40.438-->00:45:45.443 bought. [laughter] So, cool. [music outro] [applause]