1 00:00:00,000 --> 00:00:01,560 Hello everyone. 2 00:00:03,220 --> 00:00:24,100 For our last talk of the day, we have Anthony Kava, who is a lifelong hacker and works for the sheriff office in Iowa, doing digital forensics, investigating the geekier aspects of crime and fighting with vendors, convince them to improve security of their products. 3 00:00:24,400 --> 00:00:34,280 And one, another thing that seems interesting, is that he has no police powers in Nevada, so no problems. 4 00:00:36,060 --> 00:00:42,760 He's going to talk about how bad could it be inside law enforcement and local government APSEC. 5 00:00:42,920 --> 00:00:45,220 Give him a round of applause please. 6 00:00:50,630 --> 00:00:53,050 Alright, I think this is working. 7 00:00:54,150 --> 00:00:55,290 Good afternoon. 8 00:00:55,290 --> 00:00:59,710 Thank you for choosing this, or maybe there were no other seats available at other ones, that's cool too. 9 00:01:00,070 --> 00:01:01,590 I'll take it either way. 10 00:01:03,110 --> 00:01:05,170 Let's get, you can see all that right? 11 00:01:05,170 --> 00:01:05,650 Good. 12 00:01:10,650 --> 00:01:13,810 In a step I probably should have taken earlier, we didn't test the audio. 13 00:01:13,810 --> 00:01:14,430 Don't worry about that. 14 00:01:14,430 --> 00:01:22,650 It was supposed to be the final countdown, so if anyone could sing that, or at least... Oh, right, there might be an audio plug. 15 00:01:24,830 --> 00:01:27,090 We won't worry, we won't worry about that. 16 00:01:27,090 --> 00:01:28,430 It'll be alright, probably. 17 00:01:28,710 --> 00:01:39,530 Alright, so you saw in the front slide, you've got my name and my handle Carver, so that's kind of a self-dox, you know who I am now. 18 00:01:39,530 --> 00:01:41,710 I've got my picture on here too, I look like this. 19 00:01:42,050 --> 00:01:47,850 The most important thing I want to stress as we begin this, is that I am off-duty at this time. 20 00:01:48,070 --> 00:01:56,070 It's actually 1800 back where I am, I'm off-duty, so... Yeah, hang on. 21 00:01:57,630 --> 00:02:04,590 Oh, in order to make it official though, I'm going to do something real quick. 22 00:02:04,590 --> 00:02:06,630 Let's see if we can point this out. 23 00:02:08,370 --> 00:02:10,550 County 7875, 10-42. 24 00:02:14,570 --> 00:02:18,450 I don't know if you heard that or not. 25 00:02:21,290 --> 00:02:25,710 I had to get a dispatcher to do that, so I feel like I have to play it even if I screwed up the audio here. 26 00:02:27,450 --> 00:02:31,310 I'm off-duty, I have effective limits on my freedom of speech. 27 00:02:31,470 --> 00:02:36,710 So we'll try to stay within those, because I happen to love my job and my employer, especially since this is recorded. 28 00:02:38,150 --> 00:02:43,110 Here's the disclaimer, these are my views, they don't belong to my employer or anyone else. 29 00:02:43,110 --> 00:02:47,010 I'm not going to BS you, I will tell you the truth even if it hurts me or anyone else. 30 00:02:47,490 --> 00:02:49,050 Please don't get me fired or sued. 31 00:02:49,670 --> 00:02:50,570 That's my request. 32 00:02:50,970 --> 00:02:59,930 Full disclosure, in the interest of full disclosure, since there will be a lot of disclosure here, this talk, or a version of it, was rejected by Black Hat, and DefCon, and RomCon. 33 00:02:59,970 --> 00:03:03,910 So, you know what you're getting. 34 00:03:04,530 --> 00:03:12,170 This slide is just as a reminder to myself, if you're familiar with the lyrics of Drake, it's because I need a picture for our local paper. 35 00:03:12,170 --> 00:03:14,630 So I don't know, are you taking still photos during this or anything? 36 00:03:14,630 --> 00:03:20,730 If not, if you take one and send it to my, send me that on Twitter, I can send it to my paper and then that'll make them happy. 37 00:03:20,850 --> 00:03:22,710 And they're 500 readers. 38 00:03:24,190 --> 00:03:25,710 Oh, they'll see that recording too. 39 00:03:26,610 --> 00:03:29,890 I really like the idea, the theme this year versus last year. 40 00:03:29,890 --> 00:03:30,990 Last year was kind of a downer. 41 00:03:30,990 --> 00:03:32,810 This year it's technology's promise. 42 00:03:32,930 --> 00:03:39,030 And I kind of, I guess, tried to imbibe that theme over the last six months. 43 00:03:39,030 --> 00:03:41,670 I've listened to nothing but Kraftwerk. 44 00:03:42,050 --> 00:03:45,090 And, you know, I've been to Vegas a few times. 45 00:03:45,090 --> 00:03:46,730 I want to remind you, stay hydrated. 46 00:03:46,730 --> 00:03:48,170 This is my safety slide. 47 00:03:49,170 --> 00:03:50,830 This is my fourth DefCon. 48 00:03:50,830 --> 00:03:52,830 So we already had the poll question earlier. 49 00:03:52,830 --> 00:03:54,430 I went to 13, 14. 50 00:03:54,430 --> 00:03:55,590 I took 12 years off. 51 00:03:55,590 --> 00:03:56,570 Came here last year. 52 00:03:56,570 --> 00:04:02,030 And I'm just really thankful to be part of the inaugural AppSec village. 53 00:04:02,030 --> 00:04:03,410 This is kind of amazing. 54 00:04:04,610 --> 00:04:06,870 I thought it was a joke when I got the acceptance email. 55 00:04:06,870 --> 00:04:08,990 So I had to check the headers and all that. 56 00:04:10,250 --> 00:04:11,110 Here's our agenda. 57 00:04:11,110 --> 00:04:12,590 You're experiencing the intro right now. 58 00:04:12,590 --> 00:04:14,790 We're going to get into the things you see here. 59 00:04:14,790 --> 00:04:15,670 Let's get into them. 60 00:04:16,610 --> 00:04:19,110 I usually have a lot of detours and tangents in my talks. 61 00:04:19,110 --> 00:04:22,830 I can't do that because they're going to flash signs at me and tell me I have to get off. 62 00:04:22,830 --> 00:04:24,250 So I'll be careful about that. 63 00:04:25,010 --> 00:04:28,570 Again, full disclosure, I'll tell you, I work in law enforcement and I'm a hacker. 64 00:04:28,570 --> 00:04:30,490 I am a hacker and I carry a badge. 65 00:04:32,310 --> 00:04:38,170 And so I know that there are some of you who probably subscribe to our gatekeeping that will say that's impossible. 66 00:04:38,170 --> 00:04:39,910 You can't be a hacker and a cop. 67 00:04:39,910 --> 00:04:41,310 Or you can't be a cop who's a hacker. 68 00:04:41,410 --> 00:04:45,170 And I say, well, I think you can. 69 00:04:45,210 --> 00:04:49,650 And we already made it clear, I don't have any police powers here in Nevada, so do what you need to do. 70 00:04:50,450 --> 00:04:55,410 The idea for this talk kind of came to me last year. 71 00:04:55,410 --> 00:05:08,110 I was at the loft panel, I was listening to them, and they were talking about ways that we can engage with the government and engage with authorities, which is kind of like, you know, that's a big difference after missing DEF CON for a dozen years. 72 00:05:08,110 --> 00:05:10,130 It felt a little bit different to hear that. 73 00:05:11,550 --> 00:05:27,130 I've got a quote up here from Space Rogue and I won't read it to you verbatim, but the idea is he was calling you to get involved in the legislative process, talk to your lawmakers at the state level, at the federal level, and try to give them the hacker's perspective on some of these things that they're enacting. 74 00:05:27,610 --> 00:05:29,530 I think that was important work. 75 00:05:29,970 --> 00:05:39,990 At DC21, and I wasn't there, but I saw it on YouTube, Mudge actually spoke about being a hacker in the federal government and had some experiences there. 76 00:05:39,990 --> 00:05:42,270 And he quoted this tweet that was sent to him. 77 00:05:42,370 --> 00:05:46,130 He kind of tweeted asking the Twitterverse about whether I should do this talk or not. 78 00:05:46,130 --> 00:05:46,930 And I thought this was great. 79 00:05:46,930 --> 00:05:50,630 I think communication, understanding, this is going to join communities together. 80 00:05:50,630 --> 00:05:53,210 You can join hacking and law enforcement together. 81 00:05:53,210 --> 00:05:54,290 I think it's possible. 82 00:05:54,290 --> 00:05:55,390 It's going to be a heck of a struggle. 83 00:05:55,390 --> 00:05:56,410 But I think we can do it. 84 00:05:56,790 --> 00:06:01,310 For those of you who don't know who Mudge is, this is a recent photo. 85 00:06:01,610 --> 00:06:02,630 I thought that would get more laughs. 86 00:06:02,630 --> 00:06:03,790 Did you not see this on Twitter? 87 00:06:04,730 --> 00:06:08,370 In any case, he's not actually at Thunderdown ARPA over at the Excalibur. 88 00:06:10,310 --> 00:06:12,850 I'm going to give you some reasons to hate me so we can get him out of the way. 89 00:06:12,850 --> 00:06:14,230 I do work in law enforcement. 90 00:06:14,230 --> 00:06:15,290 It's been established. 91 00:06:15,490 --> 00:06:18,830 Yeah, this is a bit cyberpunk for this year's theme, so I have an alternate version. 92 00:06:20,730 --> 00:06:22,570 How many of you in here work in law enforcement? 93 00:06:22,570 --> 00:06:23,470 Is there anyone in here? 94 00:06:23,730 --> 00:06:24,750 All right, you. 95 00:06:24,750 --> 00:06:25,530 Oh, wonderful. 96 00:06:25,530 --> 00:06:26,530 This is amazing. 97 00:06:26,570 --> 00:06:27,810 How many of you work in UC? 98 00:06:29,130 --> 00:06:29,710 No? 99 00:06:30,130 --> 00:06:32,310 You cowards. 100 00:06:34,070 --> 00:06:38,390 You can tell by the cruddy facial hair because they haven't had a lot of practice with it. 101 00:06:39,310 --> 00:06:46,970 If you do work in law enforcement, or you're somebody who wants, who's interested in the dialogue with law enforcement, there's a website, hackers.blue, go there. 102 00:06:46,970 --> 00:06:47,990 There's a form you can fill out. 103 00:06:47,990 --> 00:06:50,190 I'm trying to get people talking to each other. 104 00:06:50,250 --> 00:06:51,810 If you're interested in that, go for it. 105 00:06:51,810 --> 00:06:52,810 If you're not, ignore. 106 00:06:53,790 --> 00:06:58,030 And this slide is because there are literally dozens of us here. 107 00:06:58,370 --> 00:07:03,210 And so I'm going to talk a little bit more about that stuff on Sunday at Sky Talks. 108 00:07:03,310 --> 00:07:04,610 I'm a Perlmonger. 109 00:07:04,690 --> 00:07:05,670 I have been for years. 110 00:07:05,670 --> 00:07:06,870 I know that's an old person's language. 111 00:07:06,870 --> 00:07:08,070 You're developers in here, right? 112 00:07:08,070 --> 00:07:12,790 I mean, everybody knows PCRE, but you don't actually do Perl, I hope. 113 00:07:12,970 --> 00:07:15,150 I hold some of those certifications that you hate. 114 00:07:16,490 --> 00:07:18,350 I've actually been on Dateline once. 115 00:07:18,550 --> 00:07:19,870 It's my claim to fame, I guess. 116 00:07:19,870 --> 00:07:23,370 But Dateline has a weird relationship with DEF CON, as you know. 117 00:07:23,370 --> 00:07:24,850 I did not try to infiltrate DEF CON. 118 00:07:24,850 --> 00:07:25,830 I'm here, you know. 119 00:07:26,710 --> 00:07:29,850 I also didn't realize that the guy interviewing me is the popcorn meme guy. 120 00:07:30,190 --> 00:07:31,610 So I wasn't star struck. 121 00:07:31,930 --> 00:07:34,030 I'm not a Fed asterisk. 122 00:07:34,030 --> 00:07:35,730 I do work federal cases. 123 00:07:35,870 --> 00:07:40,690 And the coolest part of federal testimony I've ever given was this one where I was on the stand being cross-examined. 124 00:07:40,690 --> 00:07:45,730 And the defense attorney started saying, Deputy Cava, you're an expert in pornography. 125 00:07:45,730 --> 00:07:48,890 And before he could finish his question, I just said, thank you. 126 00:07:48,890 --> 00:07:50,410 Because then it goes in the transcript. 127 00:07:58,200 --> 00:08:00,440 And now it's on my CV. 128 00:08:03,040 --> 00:08:04,540 So you know where I'm coming from. 129 00:08:04,540 --> 00:08:06,520 I'm not going to get super political here come Sunday. 130 00:08:06,600 --> 00:08:10,440 But I'm not going to get super political here, but I am firmly against cryptographic back doors. 131 00:08:10,440 --> 00:08:14,800 I would love it if I could dump every phone that I get in the lab, but I don't want to give up our privacies for that. 132 00:08:15,380 --> 00:08:22,500 I also don't think this should be a political statement, but all people deserve to feel safe, to be fed, to be taken care of. 133 00:08:22,500 --> 00:08:24,200 So that's where I'm coming from in this. 134 00:08:25,240 --> 00:08:27,200 I'm trying to convince you I'm not a jerk, but we'll see. 135 00:08:28,060 --> 00:08:30,320 I work for a county sheriff. 136 00:08:30,320 --> 00:08:32,720 So I work for a sheriff's office in a certain state. 137 00:08:32,720 --> 00:08:34,100 Not shown here, it's redacted. 138 00:08:34,560 --> 00:08:40,600 In that state, I'm part of the Internet Crimes Against Children Task Force. 139 00:08:40,600 --> 00:08:41,860 We'll have to redact that part. 140 00:08:43,400 --> 00:08:49,800 And so when I go and talk to kids at schools, I tell them that we go after people who go after bad guys on the Internet. 141 00:08:49,800 --> 00:08:50,540 I go after kids. 142 00:08:50,540 --> 00:08:51,780 So we're the good guys. 143 00:08:52,420 --> 00:08:54,400 Sneakers reference for those of you of a certain age. 144 00:08:55,700 --> 00:09:00,160 So anyway, I spent, in our county's IT department, I spent about 15 years working in the IT department. 145 00:09:00,160 --> 00:09:03,280 I did some security type stuff there towards the last half of that. 146 00:09:03,320 --> 00:09:06,160 And then the last eight years of that, I moonlighted as a special deputy. 147 00:09:06,160 --> 00:09:07,440 It's a reserve deputy in our sheriff's office. 148 00:09:07,440 --> 00:09:11,120 So for a dollar a year, in addition to my day job, I did digital forensics. 149 00:09:11,480 --> 00:09:14,600 And then for the last two years, I've done that full time as my day job. 150 00:09:14,600 --> 00:09:17,220 And then I go out and do some special deputy stuff on the side. 151 00:09:18,120 --> 00:09:21,400 Yeah, I redacted the county, but even the most cursory Internet search. 152 00:09:21,400 --> 00:09:22,360 This isn't the S.E. 153 00:09:22,360 --> 00:09:22,900 Village. 154 00:09:24,660 --> 00:09:27,020 I still do a little bit of light IT work. 155 00:09:27,380 --> 00:09:29,020 Digital forensics, though, is my day job. 156 00:09:29,020 --> 00:09:30,440 I've dumped a lot of Nexus phones. 157 00:09:30,440 --> 00:09:32,080 I do not retire replicants. 158 00:09:32,620 --> 00:09:43,440 So this is all introductory because I feel like it's, there is a natural animosity between the hacking community and law enforcement community, sometimes for good reason. 159 00:09:43,720 --> 00:09:49,440 And I'm hoping that we can get past that because I think that we can be the same community, or some of us are thinking that way anyway. 160 00:09:49,520 --> 00:09:51,960 It'll take some winning over of the others. 161 00:09:51,980 --> 00:09:54,240 But we're really not that different, you and I. 162 00:09:54,240 --> 00:09:55,240 We have a lot in common. 163 00:09:55,240 --> 00:09:57,740 I think first game console was an Atari 2600. 164 00:09:57,820 --> 00:10:00,320 I started out with Commodore 64, Apple II. 165 00:10:00,360 --> 00:10:02,840 My first computer that I could actually call my own was a PC Junior. 166 00:10:02,840 --> 00:10:04,940 And if you haven't heard of that, it's crap. 167 00:10:06,140 --> 00:10:12,800 I ended up with three of them a few years ago, and I gave two of them to a local high school, and it's in their computer lab now. 168 00:10:12,800 --> 00:10:15,460 And the first thing we hooked up, the kids asked, where's the mouse? 169 00:10:18,120 --> 00:10:20,160 And the third one went to Foon. 170 00:10:20,160 --> 00:10:23,000 So if you are into retro computing stuff, this is my Friday follow. 171 00:10:23,000 --> 00:10:24,440 Follow Foon on the Twitter. 172 00:10:25,760 --> 00:10:29,680 Yeah, so this kid spent a lot of time on computers, probably wasted. 173 00:10:29,680 --> 00:10:36,020 This kid, this is how bad security was back in the 80s and 90s, like late 80s, early 90s, is that this kid got rude on a lot of stuff. 174 00:10:36,480 --> 00:10:40,860 Spent a lot of time on bulletin board systems, read anarchist text files. 175 00:10:42,480 --> 00:10:43,480 Aren't they all? 176 00:10:43,660 --> 00:10:50,220 The Jolly Rogers cookbook was the knockoff anarchist's cookbook, and all that I had available to me. 177 00:10:51,100 --> 00:11:05,260 Ended up on some bulletin boards, underground ones, the ones where there's a door game that looks like a door game, but it's actually taken to the real bulletin board, until I got busted because I didn't realize how phone traces worked, and resulted in a ban for a couple of years. 178 00:11:05,260 --> 00:11:11,080 Then I got my first paper out so that I could buy a 486 so I could run Cracker Jack, crack hashes. 179 00:11:11,260 --> 00:11:16,080 Spent more time doing LAN parties than doing homework , which explains why I barely graduated. 180 00:11:17,000 --> 00:11:21,660 And all that led to the ability to do the job that I love today. 181 00:11:21,660 --> 00:11:26,360 So I think now that we've got the common ground laid out here, there's only 10 minutes left, right? 182 00:11:27,780 --> 00:11:32,840 I want to give you some of the commonalities, some of the general principles in local.gov appsec. 183 00:11:32,840 --> 00:11:38,060 That's my fun name for local government until somebody actually registers the domain, then I'll screw that up. 184 00:11:39,260 --> 00:11:41,260 Your local governments, everybody's got one, right? 185 00:11:41,260 --> 00:11:46,840 You live in a city or a town or a county somewhere, and they vary in size. 186 00:11:46,840 --> 00:11:50,500 So you've got the small ones, a population of like 1,000 people or 500 or something like that. 187 00:11:50,500 --> 00:11:53,700 You've got big ones at Los Angeles County, you've got populations of millions. 188 00:11:53,840 --> 00:12:03,720 And so the thing is that the smallest organizations, they can get by on Excel spreadsheets and access databases for their information systems, sometimes pen and paper, even today. 189 00:12:04,820 --> 00:12:07,580 And the largest ones, they're true enterprises. 190 00:12:07,580 --> 00:12:10,800 So they might have something developed in-house or they've got some really expensive thing. 191 00:12:10,800 --> 00:12:11,780 And there's people stuck in the middle. 192 00:12:11,780 --> 00:12:13,120 My county's stuck in the middle. 193 00:12:13,120 --> 00:12:15,000 We're a population of 90,000. 194 00:12:15,100 --> 00:12:18,320 And so we're too big to get by on Excel spreadsheets. 195 00:12:18,320 --> 00:12:19,800 Not that you should do that anyway. 196 00:12:20,660 --> 00:12:23,380 But we're too small to use the really cool enterprise stuff. 197 00:12:23,380 --> 00:12:24,320 We can't afford it. 198 00:12:24,320 --> 00:12:30,980 So you end up in this weird... you get this niche software that's made just for these size organizations. 199 00:12:31,280 --> 00:12:35,300 And the problem is there's not a lot of incentive on the vendors to look at application security. 200 00:12:35,320 --> 00:12:38,800 By the way, imposter syndrome , I don't actually know what AppSec means. 201 00:12:39,680 --> 00:12:41,860 I'm talking about vulnerabilities in applications . 202 00:12:41,860 --> 00:12:43,200 Does that qualify? 203 00:12:43,240 --> 00:12:44,260 You're the professionals? 204 00:12:44,680 --> 00:12:45,780 Okay, you're gonna let it go? 205 00:12:45,780 --> 00:12:46,600 All right, good. 206 00:12:46,860 --> 00:12:49,000 The rest of this will be... anyway. 207 00:12:49,520 --> 00:13:00,180 Midsize governments, the applications don't get looked at because it's not like it's Microsoft Office where there's thousands and thousands of installs out there and there's people actively looking for it. 208 00:13:00,180 --> 00:13:01,880 And there's bug bounty programs or whatever else. 209 00:13:01,880 --> 00:13:02,980 There's none of that. 210 00:13:03,020 --> 00:13:05,160 People don't look at what's under the hood. 211 00:13:05,200 --> 00:13:09,700 A lot of these governments, even if they have an IT department, they don't have a security function. 212 00:13:09,700 --> 00:13:12,300 There's no one there that's looking into security actively. 213 00:13:12,300 --> 00:13:13,400 And in our state, we're lucky. 214 00:13:13,400 --> 00:13:20,020 Our state actually will come in and give you an IDS and will come in and do vulnerability scanning for you and stuff like that. 215 00:13:20,020 --> 00:13:22,380 They'll help you out if you ask. 216 00:13:22,400 --> 00:13:27,260 But the problem is that the places that are lucky enough to have IT, that's great. 217 00:13:27,260 --> 00:13:33,360 Some places their IT person is like there's an auditor's clerk who happens to have a copy of Norton Utilities. 218 00:13:33,840 --> 00:13:36,980 And so... true story. 219 00:13:36,980 --> 00:13:41,880 And so that person ends up being your IT person, being your go-to person. 220 00:13:41,880 --> 00:13:46,940 And that person is also, at the same time, trying to run elections and finances and real estate stuff. 221 00:13:47,040 --> 00:13:50,720 And in their spare time, they try to hold off nation-state actors. 222 00:13:50,720 --> 00:13:53,080 So it's a losing battle. 223 00:13:53,480 --> 00:14:00,720 All these organizations need help and need advice with technology because they don't have the internal resources for it. 224 00:14:01,080 --> 00:14:06,080 And the reality is that a lot of the advice that they do get is going to come from vendors. 225 00:14:06,380 --> 00:14:08,360 Does anyone here sell stuff for a living? 226 00:14:08,700 --> 00:14:09,340 Okay. 227 00:14:10,340 --> 00:14:16,820 In one way or another... man, I didn't... this isn't ethics or philosophy, is it? 228 00:14:17,420 --> 00:14:18,440 But yeah, you're right. 229 00:14:18,440 --> 00:14:23,820 In one way or another... but the vendors that are giving a sales pitch oftentimes recommend a product. 230 00:14:23,820 --> 00:14:25,040 Sometimes it's their own. 231 00:14:25,440 --> 00:14:27,220 That's where they get most of their advice. 232 00:14:27,220 --> 00:14:28,580 And that can be kind of a trap . 233 00:14:28,580 --> 00:14:33,240 So in terms of the technology's promise, imagine if citizens were providing that kind of advice . 234 00:14:33,240 --> 00:14:34,780 Just food for thought. 235 00:14:35,640 --> 00:14:37,060 And here's another one. 236 00:14:37,060 --> 00:14:39,680 And I'll answer this, I guess, for you in a minute. 237 00:14:39,680 --> 00:14:45,340 How many vulnerabilities could you find if you were looking for them in your local government software if you spent like a day or two with it? 238 00:14:45,400 --> 00:14:47,120 Just looked at the cursory stuff. 239 00:14:48,060 --> 00:14:49,140 We're gonna find out. 240 00:14:49,880 --> 00:14:52,000 So I'm not a professional at this. 241 00:14:52,000 --> 00:14:54,240 And it's not even a major part of my job. 242 00:14:54,240 --> 00:14:58,520 So the things I'll show you, if I could do them, then anybody could find it. 243 00:14:58,600 --> 00:15:00,500 But I want to go over why this is important. 244 00:15:02,200 --> 00:15:03,480 You paid for it. 245 00:15:03,480 --> 00:15:05,520 Your tax dollars paid for all the software. 246 00:15:05,520 --> 00:15:06,560 They pay for the services. 247 00:15:06,560 --> 00:15:07,920 They pay for these things. 248 00:15:08,060 --> 00:15:17,540 If there is a ransomware infection or some other problem with the system, your tax dollars will also pay for the fix for that. 249 00:15:17,540 --> 00:15:18,440 They're gonna pay for the ransom. 250 00:15:18,440 --> 00:15:20,080 They're gonna pay for the incident response. 251 00:15:22,000 --> 00:15:22,580 Yeah. 252 00:15:23,460 --> 00:15:30,400 These are systems that handle things like 911 calls, dispatching firefighters and medics and police to emergencies. 253 00:15:30,400 --> 00:15:31,940 This is life and death stuff. 254 00:15:32,060 --> 00:15:35,180 They also record the worst days of people's lives. 255 00:15:35,180 --> 00:15:40,040 I mean, this is where a police report goes that's gonna have a narrative that describes bad stuff that happens. 256 00:15:40,040 --> 00:15:40,940 People call 911. 257 00:15:40,940 --> 00:15:42,360 It's not usually just to say hello. 258 00:15:42,360 --> 00:15:44,020 It's because something's going on. 259 00:15:44,360 --> 00:15:51,160 And if you think about it, there's crime scene photos, all sorts of stuff that you wouldn't want it to get out. 260 00:15:51,160 --> 00:15:52,500 It doesn't need to be on pastebin. 261 00:15:53,700 --> 00:16:03,380 And I know that those of you who read those anarchist text files might consider that blowing all that up would be kind of cool because then you can't prosecute people. 262 00:16:03,380 --> 00:16:05,180 But you know, you would throw out the good with the bad. 263 00:16:05,180 --> 00:16:07,120 And there are people that actually really need prison. 264 00:16:07,120 --> 00:16:10,240 So anyway, I think this is important stuff to watch. 265 00:16:10,240 --> 00:16:17,060 Every vendor that you work with in this space, and probably all spaces, they tell us that we need to have a secure environment. 266 00:16:17,440 --> 00:16:22,060 And what that is code for is that like, hey, we didn't do anything with security on this. 267 00:16:22,060 --> 00:16:24,620 So you better be watching everything for us. 268 00:16:25,440 --> 00:16:29,900 If they have cryptography, it's going to be zero to bad somewhere in there. 269 00:16:30,120 --> 00:16:32,080 There's a lot of hard coded credentials. 270 00:16:32,080 --> 00:16:35,680 There's a client-side enforcement of privileges, stuff like that. 271 00:16:35,840 --> 00:16:45,440 And client-side vulnerabilities are not considered to be a problem because, well, as we know, in 2019, all attacks are straight at the firewall towards the internet. 272 00:16:45,520 --> 00:16:48,100 Everything's, you know, a direct attack. 273 00:16:48,100 --> 00:16:49,700 There's no phishing, anything like that. 274 00:16:50,360 --> 00:16:56,420 The thing is that they tell you that if an attacker got to your client, and I've heard this from multiple people, that that's your fault. 275 00:16:56,420 --> 00:17:00,940 You didn't, your client got, you know, somebody's on there and now they're looking at our software and they find the hole. 276 00:17:00,940 --> 00:17:02,480 Well, it's your fault for letting them on there. 277 00:17:02,480 --> 00:17:04,480 So no reason to secure the application. 278 00:17:05,720 --> 00:17:07,080 Who's in charge of security? 279 00:17:07,120 --> 00:17:10,000 There are some places when we ask, they say, we can't tell you. 280 00:17:10,000 --> 00:17:11,600 Like it's some sort of secret. 281 00:17:11,600 --> 00:17:12,320 It's a trade secret. 282 00:17:12,320 --> 00:17:13,580 We can't tell you who's in charge of security. 283 00:17:13,580 --> 00:17:14,540 I'll get into that. 284 00:17:18,760 --> 00:17:21,040 And yeah, we take security seriously. 285 00:17:21,200 --> 00:17:23,980 If I took a drink every time, I wouldn't have made it to the talk today. 286 00:17:28,780 --> 00:17:30,080 Let's talk about the dangers. 287 00:17:31,200 --> 00:17:33,440 So we've already kind of established these local governments. 288 00:17:33,440 --> 00:17:40,640 If you've got one IT person, if you've got one IT person, no IT person, they can't look under the hood. 289 00:17:40,640 --> 00:17:44,460 They just don't have the capabilities, don't have the skill set, they don't have the resources to do it, even if they want to. 290 00:17:44,460 --> 00:17:45,340 They're too small. 291 00:17:46,860 --> 00:17:49,980 Yeah, and a lot of these places are lucky to even have an IT person. 292 00:17:53,520 --> 00:17:56,040 So we need people that can and will look under the hood. 293 00:17:56,660 --> 00:18:00,500 And I'll give you some particular cases to try to show that. 294 00:18:01,040 --> 00:18:04,040 I've redacted the names because I love my job. 295 00:18:04,080 --> 00:18:05,920 And I love not being sued. 296 00:18:06,160 --> 00:18:09,260 These vulnerabilities have all been reported one to five years ago. 297 00:18:09,260 --> 00:18:10,960 So some of these are pretty ancient. 298 00:18:10,960 --> 00:18:14,220 They've either been addressed, notice it doesn't say fixed, it says addressed. 299 00:18:14,400 --> 00:18:19,600 Either addressed, sometimes they decided we should accept the risk, they just tell us that. 300 00:18:20,060 --> 00:18:24,080 But they've either been addressed or the products have been retired, assume that. 301 00:18:25,320 --> 00:18:26,780 Yeah, how bad could it be? 302 00:18:27,940 --> 00:18:29,420 Oh, and by the way, this is what I was getting at. 303 00:18:29,420 --> 00:18:30,920 I'm not an AppSec professional. 304 00:18:31,120 --> 00:18:34,600 I had to look it up on Wikipedia to know what it was before I put the CFP in. 305 00:18:34,720 --> 00:18:38,480 But I did this in my spare time. 306 00:18:38,620 --> 00:18:44,220 For the last, I guess, 17 years, I've worked on a salary, so I get to work as many hours as I want. 307 00:18:44,740 --> 00:18:56,680 And so after I... So after I've done all the stuff that's supposed to be my primary part of my job, this is where I was like, I'd really like to know what the heck is going on on these things and started looking into them. 308 00:18:56,680 --> 00:18:59,460 So if you did this as a job, imagine what you'd find. 309 00:18:59,800 --> 00:19:01,860 I didn't do any real reverse engineering. 310 00:19:01,860 --> 00:19:03,080 A, because I'm not smart enough. 311 00:19:03,080 --> 00:19:06,020 B, because it might violate our EULAs. 312 00:19:06,100 --> 00:19:08,860 And I didn't want to do that because I'm a good student, I love my job. 313 00:19:08,980 --> 00:19:10,320 And the people of my county. 314 00:19:12,040 --> 00:19:18,040 So the tools I used were really advanced stuff like Strings, Grep, some Perl, obviously. 315 00:19:18,460 --> 00:19:21,800 I spied on some API calls, which I think is okay. 316 00:19:21,800 --> 00:19:27,380 I used Wireshark and Burp Suite and looked at some traffic, but didn't do any real reverse engineering stuff. 317 00:19:27,840 --> 00:19:30,840 So now part three, a tale of three vendors. 318 00:19:30,840 --> 00:19:32,140 Notice the Triforce. 319 00:19:33,480 --> 00:19:34,940 Start off with Vendor A. 320 00:19:34,940 --> 00:19:40,160 Vendor A sells a suite of software to local governments and it runs all sorts of stuff. 321 00:19:40,160 --> 00:19:50,000 It'll do your finances, so your accounts payable, accounts receivable, your direct deposit for banking, human resources stuff, payroll, your real estate taxes, all that stuff's in there. 322 00:19:50,000 --> 00:19:54,600 And they will sell you law enforcement management stuff too, so your records and everything else. 323 00:19:55,500 --> 00:20:02,440 So when we start looking at this, the immediate things that pop out are the SQL creds that are baked into the client install. 324 00:20:02,740 --> 00:20:08,380 So there's an XML, there's an XML config file and it has a username and password for SQL. 325 00:20:08,380 --> 00:20:13,580 The password is not plain text, the password is encrypted, but to use it, it's got to be reversible encryption, right? 326 00:20:14,080 --> 00:20:23,640 And it turns out that the username, well the password is a leet speak version of the username, so you could probably pretty well guess it. 327 00:20:23,640 --> 00:20:26,620 And it has SA on the SQL server. 328 00:20:26,920 --> 00:20:32,620 So every client that's installed includes a free login to your SQL server with SA. 329 00:20:33,800 --> 00:20:38,140 And this is the bonus part, it's the same at every customer site. 330 00:20:38,660 --> 00:20:47,160 I verified this, I was a little bit afraid to do it, but I slacked somebody at a different county and I said, hey, just real quick, do you think your password is this? 331 00:20:47,660 --> 00:20:49,520 And they said, holy crap. 332 00:20:52,680 --> 00:20:55,720 That wasn't me, that was the computer. 333 00:20:55,760 --> 00:21:01,860 The API traffic, this thing has a client server infrastructure, which is more than I can say for some of these apps. 334 00:21:05,980 --> 00:21:09,180 It's also had authentication tokens. 335 00:21:09,180 --> 00:21:11,640 When you log in, you get a token that never expires. 336 00:21:11,640 --> 00:21:14,820 I can't say never, but I tried it for weeks. 337 00:21:15,460 --> 00:21:18,460 So six weeks later, that auth token still worked. 338 00:21:18,460 --> 00:21:26,960 Another nice thing is that there's rules-based permissions, but they're not enforced at the API level, they're only enforced at the client. 339 00:21:26,960 --> 00:21:34,400 So if you get that token, which is sent in the clear, you can reuse it for weeks and weeks, maybe years, and do anything you want on the system. 340 00:21:34,400 --> 00:21:43,840 So I can get into that system and I can go look at my payroll and see what my pay stub is going to look like, but once I get the token, I can look at everyone's payroll and maybe pull their bank account numbers. 341 00:21:44,580 --> 00:21:45,540 That's a problem. 342 00:21:45,540 --> 00:21:47,060 But wait, there's more. 343 00:21:48,200 --> 00:21:50,000 What about their payroll website? 344 00:21:50,080 --> 00:22:03,280 So this company also hosts a payroll website where you can turn in your time sheet, an internet-facing website, and there's an API that connects between your local app server and their website. 345 00:22:03,940 --> 00:22:10,380 And that API traffic, when I went to go look at it, turned out to be in the clear, they were doing HTTP and XML that was not encrypted. 346 00:22:10,800 --> 00:22:14,540 It has all sorts of PII in there, and I'll tell you a little bit more about that in a second. 347 00:22:14,660 --> 00:22:15,980 And it was that way for weeks. 348 00:22:15,980 --> 00:22:22,000 Now what happened was when we first implemented it, I did check, and it was HTTPS, and you know, I felt okay about that. 349 00:22:22,080 --> 00:22:27,080 And then when I went to check back on it to look at the API traffic, I thought I'd have to intercept it, I didn't. 350 00:22:27,240 --> 00:22:31,980 I mean, I thought I'd have to man in the middle of it, but in any case, they turned it off for debugging. 351 00:22:31,980 --> 00:22:36,520 They were debugging one site, and they turned it off for every customer, as far as I can tell. 352 00:22:37,120 --> 00:22:38,760 And forgot to turn it back on. 353 00:22:39,360 --> 00:22:42,600 And so I brought it to their attention, and they did turn it back on. 354 00:22:43,100 --> 00:22:46,120 Also there's cross-site scripting, because there's like announcements in there. 355 00:22:46,120 --> 00:22:51,860 I can go put an announcement in for all employees when you log into your time sheet, and it was vulnerable to cross-site scripting. 356 00:22:51,860 --> 00:22:56,980 They said those aren't security vulnerabilities, even though it pops up when you log in. 357 00:22:58,800 --> 00:23:06,680 So I made some requests that this particular vendor asked them, would you please tell customers about that time when their stuff was not encrypted, and I think they deserve to know. 358 00:23:07,320 --> 00:23:09,720 And I got, that's a locus, but it's supposed to be a grasshopper. 359 00:23:09,720 --> 00:23:11,520 That was what I heard, grasshoppers after that. 360 00:23:11,580 --> 00:23:13,160 Or sorry, crickets, crickets. 361 00:23:14,340 --> 00:23:19,180 I also asked them if they would stop using Google Analytics in the inside of this website. 362 00:23:19,180 --> 00:23:20,540 I don't know, does this feel weird to you? 363 00:23:20,540 --> 00:23:27,580 I need a professional opinion, but when you log into this payroll thing, the internal parts of Google Analytics, so they're bringing in JavaScript from an outside site. 364 00:23:27,580 --> 00:23:29,200 It's Google, and you can trust Google. 365 00:23:29,200 --> 00:23:38,480 But they said no, because they use it to decide what pages you're looking at, and I thought, couldn't you parse the logs or do something that didn't require that? 366 00:23:38,480 --> 00:23:40,840 But anyway, I didn't get any motion on that. 367 00:23:41,840 --> 00:23:45,180 They did have our social security numbers on there, and dates of birth. 368 00:23:45,180 --> 00:23:56,060 So when you log into your time sheet, you can also click a little button that says profile, and it'll show me my full name, my home address, my emergency contact, my date of birth, my social security number, my ethnicity, my race. 369 00:23:56,500 --> 00:23:58,500 It's like, I don't know what they didn't have on there. 370 00:23:58,800 --> 00:24:03,720 And we asked, could we please at least get the social security number, full social security number, by the way, not just last four. 371 00:24:03,880 --> 00:24:06,480 And at first they said, eh, some people like it, so no. 372 00:24:06,480 --> 00:24:10,100 And then eventually they gave us a little checkbox so we could say, no, we don't want to show that. 373 00:24:10,100 --> 00:24:13,240 So we suppressed that, but they didn't let us take off the date of birth and all the other stuff. 374 00:24:14,420 --> 00:24:20,400 My argument was that if I don't know my date of birth, I don't go to the website to check it. 375 00:24:24,990 --> 00:24:30,310 We brought that thing about the hard-coded login that's the same everywhere with an SA account. 376 00:24:30,310 --> 00:24:32,050 We asked them to change that, and they did change that. 377 00:24:32,050 --> 00:24:39,750 They revamped their software updater, their client updater, and they pushed out a big update to every site that broke some of them, and I told them that's my fault. 378 00:24:39,910 --> 00:24:44,770 And they changed the passwords at every site for this account, and they took away SA. 379 00:24:44,770 --> 00:24:48,070 The account still exists and still does some stuff that I guess they needed to do. 380 00:24:48,070 --> 00:24:50,370 They need to re-architect the whole thing to get rid of it. 381 00:24:50,370 --> 00:24:54,570 But at least it's not SA, at least the password is different at different sites. 382 00:24:56,390 --> 00:25:03,190 The payroll website with the timesheets did not support password complexity, expiry, or lockouts. 383 00:25:03,270 --> 00:25:08,050 And when they come out to your place and they set you up, they give you four digit pins. 384 00:25:08,350 --> 00:25:16,670 And without lockouts, if you can guess my first initial last name, you can try 10,000 combinations and you'll get into my payroll account. 385 00:25:16,670 --> 00:25:17,370 So that's cool too. 386 00:25:17,370 --> 00:25:19,170 With all my social security number and all that stuff. 387 00:25:20,150 --> 00:25:27,170 The last thing I ask, and this is the biggest ask, is put somebody in charge of security and audit your stuff. 388 00:25:28,290 --> 00:25:31,410 And believe it or not, this story, Vendor A, has a happy ending. 389 00:25:32,550 --> 00:25:35,050 This is the timeline for this story. 390 00:25:37,610 --> 00:25:43,190 I first reported the vulnerabilities back in March of 2014. 391 00:25:43,550 --> 00:25:46,930 And I gave them, here's what I have so far, and I think there's going to be more. 392 00:25:46,930 --> 00:25:50,190 And they said, okay, we'll look into it, it doesn't sound very serious. 393 00:25:50,470 --> 00:25:54,710 And they said, why don't you just give us a list of every vulnerability you find? 394 00:25:54,830 --> 00:25:56,390 Why don't you do a free audit of our software? 395 00:25:56,630 --> 00:26:00,430 And so I did, in a time frame that worked for me, which was about a year. 396 00:26:01,530 --> 00:26:04,390 And I didn't do it on purpose, I really wanted to get it done quicker, but about a year. 397 00:26:04,390 --> 00:26:09,150 So July of 2015 is when I came back to them and said, here's a list of like two dozen things. 398 00:26:09,190 --> 00:26:10,890 And some of them are really bad. 399 00:26:11,010 --> 00:26:14,370 And they, again, weren't super excited about it. 400 00:26:14,470 --> 00:26:27,390 What I thought was funny is I went back to my emails to look at this to see what happened, but I sent that, they weren't super excited about it, and then a month later I started getting automated emails from them telling me to do Microsoft patches as new CVEs were released and stuff. 401 00:26:27,390 --> 00:26:29,010 So I thought they were taunting me. 402 00:26:30,410 --> 00:26:37,590 And then a year goes on, every few months I'm pestering them, I'm trying to go up the chain, I'm going to LinkedIn and looking up the boss of the boss of the boss. 403 00:26:37,750 --> 00:26:43,690 And I'm reaching out to anybody I can, and I didn't think anything was really going to happen at that point, we weren't getting a lot of traction. 404 00:26:44,630 --> 00:26:54,730 Until a month later, August 2016, this was great, we found the one person in their organization, this is a big company, Fortune, whatever, one person that cared about the software and the security of it. 405 00:26:54,730 --> 00:27:06,910 And they weren't even in that side of it, they were in the operations IT side running this website, and they started looking at all these things, and they started actually doing stuff with it, and they were able to get an actual audit started a few months later. 406 00:27:06,910 --> 00:27:12,350 So by December 2016, still two and a half years after the initial reports, they started auditing their stuff. 407 00:27:12,350 --> 00:27:16,410 They even found vulnerabilities I couldn't find because they got access to the source code and the logs and everything. 408 00:27:17,610 --> 00:27:29,990 And then the real happy ending to this is that the next year, that one person who cared, Paul Harvey voice, was promoted into their first security position auditing this stuff regularly. 409 00:27:30,090 --> 00:27:31,610 And so, good outcome. 410 00:27:31,610 --> 00:27:33,790 It took three years, but good outcome. 411 00:27:33,970 --> 00:27:39,030 A lot of these things were fixed, and they put somebody in charge who will actually make sure that they don't happen again in the future. 412 00:27:39,050 --> 00:27:39,930 That's a good story. 413 00:27:39,930 --> 00:27:41,110 Let's do some other stories. 414 00:27:41,110 --> 00:27:42,910 How am I on time? 415 00:27:44,150 --> 00:27:45,110 I think I'm okay. 416 00:27:45,110 --> 00:27:45,730 I don't. 417 00:27:46,770 --> 00:27:48,070 Oh, all right. 418 00:27:48,290 --> 00:27:48,870 We're going to speed up. 419 00:27:48,870 --> 00:27:50,710 I drank a lot of coffee, so we should be good. 420 00:27:51,830 --> 00:27:54,210 Vendor B, they do a 911 dispatch system. 421 00:27:54,210 --> 00:27:56,330 It's called CAD, computer aided dispatch. 422 00:27:56,330 --> 00:28:07,150 It's where you take your 911 calls, you send out police, firefighters, medics, that sort of thing, records management, jail management, all your inmate information, including medical information, and mobile CAD stuff and communications. 423 00:28:07,150 --> 00:28:12,330 So that's in your car, you've got this computer in there, usually a Passock Toughbook they've cloned at the market. 424 00:28:12,670 --> 00:28:17,110 But anyway, that thing interfaces with the CAD system where your dispatchers are. 425 00:28:18,050 --> 00:28:24,110 I'd say it's 90% serverless, way ahead of its time since the 90s, because they didn't do a client -server architecture. 426 00:28:27,920 --> 00:28:33,820 All the clients do direct SQL, direct SQL, and every user has to have a SQL account. 427 00:28:33,820 --> 00:28:35,020 This was a management nightmare. 428 00:28:35,020 --> 00:28:39,760 We already gave them AD accounts, why do we also have to have a SQL user for them, local SQL user? 429 00:28:39,760 --> 00:28:44,440 But we did, and each one of those SQL users gets DBO on all their stuff. 430 00:28:44,440 --> 00:28:46,840 Database owner can delete everything, whatever. 431 00:28:46,840 --> 00:28:50,320 So if you use the GUI, it doesn't let you do stuff you're not supposed to do. 432 00:28:50,320 --> 00:28:54,120 But if you open up Microsoft Access and make an ODBC connection, you can do whatever the hell you want. 433 00:28:55,240 --> 00:29:08,520 They have one component in this suite that has its own users table, it doesn't rely on the SQL users, and of that particular component is a web-based records management interface. 434 00:29:08,520 --> 00:29:12,420 It's for you to go log in, they said put it on the internet, we did not put it on the internet. 435 00:29:13,100 --> 00:29:19,600 And they said you have your people log in, you can look at reports, you can look at in-main information, all that stuff, it's really cool. 436 00:29:19,600 --> 00:29:22,720 Plain text passwords, we complained about that, they upgraded to XOR. 437 00:29:24,440 --> 00:29:31,280 Trivial SQL injection, I mean like single quote or one and you're in to bypass the authentication on this thing. 438 00:29:31,320 --> 00:29:33,880 Cross-site scripting is not a vulnerability, we know that. 439 00:29:34,420 --> 00:29:37,140 Bonus, ampersands break your system. 440 00:29:37,140 --> 00:29:43,000 So because they were displaying it in HTML, if you put an ampersand in a record field, it broke the display on the page. 441 00:29:43,000 --> 00:29:47,600 So I did write a Perl script that every five minutes checked for ampersands and changed them to the word AND. 442 00:29:48,620 --> 00:29:49,540 True story. 443 00:29:51,640 --> 00:29:57,040 Their mobile CAD software in the cars, it goes over a radio network so you want it to be secured, right? 444 00:29:57,040 --> 00:30:00,280 So they said don't worry about VPN, we rolled our own crypto. 445 00:30:01,360 --> 00:30:04,080 So we used OpenVPN on top of theirs. 446 00:30:04,740 --> 00:30:07,600 Their crypto is based on 64 bit blocks, I know that much. 447 00:30:07,660 --> 00:30:13,880 And there's some questionable padding stuff going on, I'll tell you a little more about that in the next slide, because they also use it for passwords. 448 00:30:13,980 --> 00:30:22,320 And here's what's interesting about, I mean it's all interesting to me anyway, but the key that they use for this mobile communication is hard-coded in the install. 449 00:30:22,380 --> 00:30:25,620 I shouldn't say hard-coded, you can change it, but most people don't. 450 00:30:25,620 --> 00:30:32,400 And so we asked to change it and it was a big pain in the neck to hit every client after the deployment to do this, but we changed ours. 451 00:30:32,400 --> 00:30:38,980 And I know they have hundreds of other customers that did not, so if you know the password that comes with the client installer, you can read all their traffic. 452 00:30:39,480 --> 00:30:45,180 So the passwords for the mobile login, they're stored with this reversible encryption, not hashed. 453 00:30:45,740 --> 00:30:49,460 And it's based on 64 bit blocks, which you know, 8 characters. 454 00:30:49,460 --> 00:30:51,440 So if you, and they give you up to 12 for a password. 455 00:30:51,440 --> 00:30:55,700 I think they did VARCHAR12 back in the 90s and they just stuck with it for 20 years. 456 00:30:55,720 --> 00:31:01,080 But anyway, if your password's longer than 8 characters, the last 4 characters are in plain text. 457 00:31:02,300 --> 00:31:04,800 It's padded with spaces, but those are plain text too. 458 00:31:05,680 --> 00:31:17,080 So we wanted help, we wanted a tool, this is related to this, we wanted a tool in our IT department so that our IT people could go to an intranet page and reset passwords, unlock accounts in the system, but we didn't know how the encryption worked. 459 00:31:17,260 --> 00:31:22,740 So I went to them and I said, well, you should know, this thing has a console application that stays up all the time. 460 00:31:22,740 --> 00:31:25,160 We had to lock the screen and use VNC to get to this thing. 461 00:31:25,160 --> 00:31:26,700 And that's how you set passwords. 462 00:31:26,920 --> 00:31:31,880 And so we went to them and said, hey, could you give us something to help us make this intranet feature? 463 00:31:31,880 --> 00:31:37,240 They just updated their password expiry feature and all of our users' passwords expired the same day. 464 00:31:37,560 --> 00:31:47,140 So that first 90-day cycle, 3 shifts, law enforcement usually works 24 hours, they're supposed to, 3 shifts of lockouts and on-call IT stuff. 465 00:31:47,140 --> 00:31:51,900 So wanted to give our guys something, guys and gals, something to change those. 466 00:31:51,900 --> 00:31:53,540 I asked the vendor, can we get a recipe? 467 00:31:53,540 --> 00:31:54,820 Just tell us, how does encryption work? 468 00:31:54,840 --> 00:31:56,640 What's the cipher mode? 469 00:31:56,640 --> 00:31:58,340 Give us the parameters, we'll do it ourselves. 470 00:31:58,440 --> 00:31:59,780 Or give us a little bit of code. 471 00:31:59,780 --> 00:32:02,640 I know they aren't going to do that, but give us a little bit of code, we'll redevelop it. 472 00:32:02,640 --> 00:32:04,840 Or give us a tool, a command line tool that we can use. 473 00:32:04,840 --> 00:32:05,540 That would work. 474 00:32:05,540 --> 00:32:07,480 They said, okay, we can't do the first two. 475 00:32:07,560 --> 00:32:08,940 We can develop the tool. 476 00:32:08,940 --> 00:32:10,740 We're doing a feasibility study now. 477 00:32:10,740 --> 00:32:13,500 We're going to have a project manager assigned. 478 00:32:13,740 --> 00:32:18,020 Estimate 6 months development, $10,000, give or take, probably give. 479 00:32:19,820 --> 00:32:24,840 So I got to thinking, I looked at it, they have a DLL that does all this stuff, right? 480 00:32:24,920 --> 00:32:30,000 So what would it cost is $10,000 or about $1,000 per line of Python. 481 00:32:31,120 --> 00:32:34,320 We can do it in a dozen lines of Python and just use their DLL. 482 00:32:34,320 --> 00:32:38,780 I still to this day don't know how their encryption works, but I don't need to because I'll just use their library to do it. 483 00:32:38,840 --> 00:32:42,900 And you can see the hard-coded key up there with the B. 484 00:32:44,080 --> 00:32:47,680 I obfuscated some of the other stuff, but that's the actual key. 485 00:32:48,600 --> 00:32:50,780 Good news is they retired this product. 486 00:32:50,780 --> 00:32:52,280 This is a football reference. 487 00:32:52,300 --> 00:32:55,380 I'm not a sports person, but I understand this guy's retired. 488 00:32:57,100 --> 00:33:00,240 Vendor C, our final vendor, does the same kind of stuff. 489 00:33:00,240 --> 00:33:02,180 I own dispatch, mobile, everything. 490 00:33:02,600 --> 00:33:09,620 We were shopping for vendors and I asked the sales engineer dude, I said, how are the creds stored? 491 00:33:09,620 --> 00:33:14,260 And he said, we're not dumb, but he said it a different, more demeaning way. 492 00:33:14,260 --> 00:33:15,400 I thought it was terrible. 493 00:33:16,580 --> 00:33:19,580 But then I went to look because I thought, okay, let's see what they do. 494 00:33:19,780 --> 00:33:23,540 Unsalted MD5 hashes in 20-something. 495 00:33:25,000 --> 00:33:26,680 At least they could do Active Directory, right? 496 00:33:26,680 --> 00:33:28,680 So we don't have to worry too much about that. 497 00:33:28,980 --> 00:33:29,520 Oops. 498 00:33:30,660 --> 00:33:32,120 We turned on Active Directory. 499 00:33:32,120 --> 00:33:33,780 They said, okay, Active Directory is now enabled. 500 00:33:33,780 --> 00:33:34,860 Log in with your AD accounts. 501 00:33:34,860 --> 00:33:35,940 And I didn't. 502 00:33:36,000 --> 00:33:37,500 But I did ask our IT department. 503 00:33:37,500 --> 00:33:41,800 At this point, I didn't work in our IT department anymore, so I couldn't do the Wireshark stuff myself. 504 00:33:41,800 --> 00:33:46,000 So I said, could you guys look at the LDAP traffic and just make sure that they encrypted that? 505 00:33:46,040 --> 00:33:47,320 And sure enough, it was not. 506 00:33:47,320 --> 00:33:49,700 They forgot the S in LDAPs. 507 00:33:49,700 --> 00:33:51,780 So plain text passwords going across. 508 00:33:51,780 --> 00:33:58,840 Our IT department did better disclosure on some of these vendors because I said, hey, could you go look at the logs and see which users have logged in since they turned this on and let them know to change their password? 509 00:33:58,840 --> 00:33:59,600 And they did. 510 00:34:00,660 --> 00:34:01,920 So AD works. 511 00:34:02,100 --> 00:34:03,260 And that mitigates some of the problems. 512 00:34:03,260 --> 00:34:06,720 Once you put the S in LDAPs, at least it's encrypted on the wire. 513 00:34:06,960 --> 00:34:11,040 But for some reason, they started storing our passwords in MD5 hashes anyway. 514 00:34:11,060 --> 00:34:17,360 I went and looked at the database after that, and I found mine in there, and I started cracking some of them, and I found something in common. 515 00:34:17,440 --> 00:34:19,320 They were all lower case. 516 00:34:19,400 --> 00:34:20,360 I'm like, what the heck's happening here? 517 00:34:20,360 --> 00:34:21,360 My password's mixed case. 518 00:34:21,360 --> 00:34:24,920 It has to be for the AD rules, but it's stored in this hash that's all lower case. 519 00:34:24,920 --> 00:34:30,080 Well, it turns out they're doing std lower, MD5, no salt, and throwing it in the database. 520 00:34:31,440 --> 00:34:36,060 This dog looks so sad, so I actually, I got a happier dog for this. 521 00:34:37,060 --> 00:34:40,480 But I also found out that they don't validate the TLS certs. 522 00:34:40,480 --> 00:34:44,240 So when they do that after direct connection, or when you do an API connection, they take any cert. 523 00:34:44,240 --> 00:34:45,620 That's why I can look at their stuff. 524 00:34:46,540 --> 00:34:50,520 They have this messaging system built in, this messaging platform in case you don't want to do email. 525 00:34:50,760 --> 00:34:52,540 And it's, it's rich text. 526 00:34:52,540 --> 00:34:57,340 If you put a hyperlink in there, you put the mouse over it, it does not show you the URL you're about to go to. 527 00:34:57,420 --> 00:34:58,280 It's blind. 528 00:34:58,280 --> 00:34:59,760 So I thought that was kind of dangerous. 529 00:34:59,760 --> 00:35:00,980 They took it under advisement. 530 00:35:01,900 --> 00:35:03,240 AD auth's only done once. 531 00:35:03,240 --> 00:35:04,780 Well, any auth if you log into the thing. 532 00:35:04,780 --> 00:35:10,400 So if my account's locked out or expires or something while I'm logged in, as long as I never log out of their software, I'm good. 533 00:35:10,400 --> 00:35:11,980 I've been logged in for three years now. 534 00:35:12,300 --> 00:35:15,840 Um, their updater doesn't need admin rights. 535 00:35:15,840 --> 00:35:16,400 That's good. 536 00:35:16,400 --> 00:35:19,000 And they have a really decent updater actually for their system. 537 00:35:19,000 --> 00:35:24,540 But the reason it works is because everyone is given full control on a program files directory for their clients. 538 00:35:24,540 --> 00:35:30,480 So any, you know, you get into a shared computer with 20 users, any of them could infect your EXE and then you run it under your profile. 539 00:35:30,660 --> 00:35:32,540 They use rsync, which is kind of cool. 540 00:35:32,540 --> 00:35:34,220 They use some open source stuff. 541 00:35:34,420 --> 00:35:38,160 Um, but they only check the size and the modify time of the file. 542 00:35:38,820 --> 00:35:43,800 And also rsync was statically linked, uh, which would upset, uh, Stallman. 543 00:35:43,900 --> 00:35:45,100 Uh, but they fixed that. 544 00:35:45,120 --> 00:35:49,240 Uh, client, surprise, surprise, does direct SQL for auth. 545 00:35:49,240 --> 00:35:51,140 This surprised the heck out of me because they didn't need to. 546 00:35:51,140 --> 00:35:52,680 They have a server component and API. 547 00:35:52,680 --> 00:35:53,860 Why does it have to do this? 548 00:35:53,860 --> 00:35:56,420 Well, it was some sort of backwards compatibility or something, whatever. 549 00:35:56,940 --> 00:36:02,720 Um, the, the SQL user is ROT13 protected, so we, we weren't too worried. 550 00:36:03,560 --> 00:36:11,520 And the client not only does its own authentication, it also makes its own inserts for the audit trail, uh, to log your login. 551 00:36:12,680 --> 00:36:21,620 So if you're a Perl-ish or you're into PCRE, as you know I am, uh, you can write a Perl script that, uh, patches a DLL with this regex. 552 00:36:21,640 --> 00:36:24,360 And this will get you in with any password you want. 553 00:36:24,920 --> 00:36:28,840 Um, you don't need admin rights because everybody can write to that DLL. 554 00:36:29,120 --> 00:36:29,780 I'm a 10? 555 00:36:29,780 --> 00:36:30,960 Oh, we, we're gonna be good. 556 00:36:30,960 --> 00:36:32,380 There's gonna be question time and everything. 557 00:36:32,500 --> 00:36:33,820 I'm gonna slow down. 558 00:36:33,940 --> 00:36:37,060 Um, you can do this by hand with a hex editor. 559 00:36:37,060 --> 00:36:39,640 The first time I did it that way, or you can use the Perl script. 560 00:36:39,720 --> 00:36:41,700 Um, you're just changing that SQL query. 561 00:36:42,020 --> 00:36:46,140 Uh, the size of the file has to be the same, so pad it out with nulls. 562 00:36:46,240 --> 00:36:50,900 And the modify time has to be the same, or rsync will override it so you can just change the mod time. 563 00:36:51,060 --> 00:36:56,080 Um, then you can bypass authentication, you can bypass auditing, and I have a redacted demo for you. 564 00:36:56,080 --> 00:36:57,520 It's about a minute and five seconds. 565 00:36:58,660 --> 00:37:00,440 The music may be difficult to hear. 566 00:37:00,980 --> 00:37:02,920 But it doesn't add to the, thanks. 567 00:37:06,780 --> 00:37:10,920 So this is when you first, this is when you first start the program and it starts updating. 568 00:37:11,500 --> 00:37:12,420 Bye bye music. 569 00:37:12,560 --> 00:37:14,720 Um, it starts doing its update. 570 00:37:14,720 --> 00:37:17,960 This is rsync running and getting my client up to date except for the DLL. 571 00:37:17,960 --> 00:37:20,000 It's not gonna overwrite that I modified. 572 00:37:22,520 --> 00:37:24,800 You're right, I probably could have edited this to make it shorter. 573 00:37:26,140 --> 00:37:33,840 But, there we go, it takes about half a minute or whatever and then I'm gonna get this cool login prompt with logos for all of the agencies that use it. 574 00:37:33,960 --> 00:37:36,100 Because it's a multi -agency system. 575 00:37:37,800 --> 00:37:46,090 And my login's there, first name, first initial last, my password is not A and yet, I'm in. 576 00:37:47,070 --> 00:38:00,810 So that's cool, but, there is a super user used by the vendor whose password's also not A and it can do things I can't do with my account and now I'm in as the super user. 577 00:38:02,050 --> 00:38:02,590 Yeah. 578 00:38:03,790 --> 00:38:17,650 So here's the, that video was, I hope you liked it and I know some people that hated it because all these things have been reported but nobody was doing anything about it, nobody was really interested at the vendor until I sent that video out to them and copied all of our commanders from these various agencies. 579 00:38:23,200 --> 00:38:35,660 I love, this is, you're my people and I love being here, I don't have to explain what SQL means and stuff like that, but to our commanders in that, until they saw this, you know, that video, it was hard to understand all the stupid nerd stuff I was saying. 580 00:38:36,880 --> 00:38:38,960 Soon thereafter, stuff starts getting fixed. 581 00:38:39,500 --> 00:38:43,940 I did a presentation to our commanders and the first slide was this. 582 00:38:46,460 --> 00:38:49,360 There's some other stuff they did, they decided not to resolve or whatever. 583 00:38:49,360 --> 00:38:50,380 I was impressed. 584 00:38:50,380 --> 00:38:59,160 I reported to them that all lowercase md5 hash that was in the database was also in memory and I said, hey, I can proc dump this process and get that hash out of it and crack it pretty easily. 585 00:38:59,180 --> 00:39:02,960 They got rid of that, that doesn't get in the dump anymore, so pretty cool. 586 00:39:03,460 --> 00:39:11,840 The downside to this vendor is that I ask who's in charge of security and they, initially they say all the product managers for all these different products, they're in charge of their own security. 587 00:39:11,840 --> 00:39:13,000 They're QA people do it. 588 00:39:14,460 --> 00:39:17,500 And then I say, well, is there one person, you know, who's a CSO or whatever? 589 00:39:17,500 --> 00:39:19,100 They said, we cannot tell you. 590 00:39:19,160 --> 00:39:20,640 Like, it's a trade secret. 591 00:39:20,820 --> 00:39:22,200 And I kept bugging them. 592 00:39:22,200 --> 00:39:24,120 I said, you got to have somebody, who's in charge of this stuff? 593 00:39:24,120 --> 00:39:25,060 Is it the president? 594 00:39:25,580 --> 00:39:29,280 And then they said, we've convened a special committee. 595 00:39:31,620 --> 00:39:37,080 So after all the vulnerabilities, they convened a committee and it's a secret committee because I asked, who's on it? 596 00:39:37,080 --> 00:39:38,100 I cannot tell you. 597 00:39:38,100 --> 00:39:40,240 I said, okay, how often do they meet? 598 00:39:40,240 --> 00:39:41,220 Can't tell you that. 599 00:39:41,380 --> 00:39:45,720 Can you give me any concrete initiatives that they've undertaken, this secret committee? 600 00:39:45,720 --> 00:39:47,440 And he said, no, trade secrets. 601 00:39:47,460 --> 00:39:50,500 So, this committee, as you might have figured out, probably doesn't exist. 602 00:39:50,500 --> 00:39:54,760 But every time I send an email now, I say, please forward this to the secret committee members. 603 00:39:58,220 --> 00:39:59,980 I also asked them to audit their software. 604 00:39:59,980 --> 00:40:02,540 I said, if I, I'm not, am I five? 605 00:40:02,900 --> 00:40:04,380 Five, five-ish. 606 00:40:04,380 --> 00:40:04,820 All right. 607 00:40:04,820 --> 00:40:08,620 So, I told them, I'm not, this isn't what I do for a living. 608 00:40:08,620 --> 00:40:12,100 If I can find this stuff in my spare time, what could somebody who is actually good at this do? 609 00:40:12,100 --> 00:40:13,560 What could everybody in this room do? 610 00:40:14,760 --> 00:40:18,600 Time to conclude, because I've got five minutes left and part four is that. 611 00:40:19,260 --> 00:40:22,640 So anyway, niche software doesn't get a lot of eyes on it. 612 00:40:23,340 --> 00:40:25,700 You could put your eyes on this stuff, I think. 613 00:40:25,780 --> 00:40:34,460 Because the thing is that these , your local government, if they're, you know, if they don't have the resources internally, there's no reason you couldn't reach out to an elected official. 614 00:40:34,460 --> 00:40:45,060 And if you don't want to look at this stuff directly, you're afraid of getting sued or whatever, asking them questions or giving them questions to ask their people and their vendors and that might help out. 615 00:40:46,340 --> 00:40:49,900 And the leverage that we have, we don't, we're not a big place, we're not a big customer. 616 00:40:49,900 --> 00:40:52,940 We're one of a lot of customers and we don't put a lot of money in for them. 617 00:40:52,940 --> 00:40:56,220 So we didn't have a lot of leverage on this vendor, but the bulldogging worked. 618 00:40:56,220 --> 00:40:59,760 They wanted to ignore it and stop responding to stuff and they went a year to that one vendor. 619 00:40:59,760 --> 00:41:04,620 If you keep on them, eventually they either have to do something or they get tired of listening to you and they do. 620 00:41:04,820 --> 00:41:07,160 The magic part of this is the herd immunity. 621 00:41:07,160 --> 00:41:14,220 Because if you can fix these vulnerabilities, just like anywhere else, you fix the vulnerability at one of these governments, there's a thousand other customers out there running the same software. 622 00:41:14,220 --> 00:41:15,560 They're going to get the update that fixes it, too. 623 00:41:15,560 --> 00:41:17,460 You fix stuff across the country. 624 00:41:18,520 --> 00:41:28,820 This is, personally, if you were interested in this stuff and you were looking for, you know, want to run ideas by anybody or you're looking for anybody to help you with an intro or something like that, non-monetary, because I work in government my whole life. 625 00:41:28,820 --> 00:41:30,660 I don't know how to make money or what to do with it. 626 00:41:32,720 --> 00:41:34,000 So I can't help you there. 627 00:41:34,000 --> 00:41:37,320 But I would love to talk to you about it if you're into this sort of thing. 628 00:41:37,560 --> 00:41:38,840 And there we go. 629 00:41:38,840 --> 00:41:44,700 The special thanks to the people that gave me notes or encouragement on CFPs that got rejected and got accepted. 630 00:41:44,700 --> 00:41:46,100 So thank you to all of them. 631 00:41:46,100 --> 00:41:47,120 And here's my contact info. 632 00:41:47,120 --> 00:41:48,100 And thank you for listening. 633 00:41:48,100 --> 00:41:49,260 Transcribed by https://otter.ai