1 00:00:00,000 --> 00:00:09,920 I am Joe Grand. I'm Jay Kappelbaum. And we are talking about smart parking meters. Just to 2 00:00:09,920 --> 00:00:14,820 give you a little bit of background, I'm an electrical engineer, hardware hacker. I live and 3 00:00:14,820 --> 00:00:19,720 breathe electronics. I love this stuff. And the reason I got into looking at parking meters is 4 00:00:20,160 --> 00:00:25,520 there's a lot of them in San Francisco where I live. And I use them all the time. And I said, 5 00:00:25,520 --> 00:00:29,940 hey, these things are electronic. They look fun. Let's, you know, maybe do something security 6 00:00:29,940 --> 00:00:36,820 related. I don't know. I guess that's about it for me. I designed the DEF CON badge this year. 7 00:00:38,300 --> 00:00:46,700 I'm interested in photography and BDSM. Chris isn't here today. He was here with us at Black 8 00:00:46,700 --> 00:00:52,760 Hat. But for various reasons, he's gone. But he's an amazing hardware hacker. He's one of the 9 00:00:52,760 --> 00:00:55,420 best, right? You want to decap a chip or dump something from it. 10 00:00:55,520 --> 00:01:02,160 You talk to him. Yeah. Chris talked last year about silicon dye analysis. And he's like one of 11 00:01:02,160 --> 00:01:10,040 the best smart card hackers in the world for sure. So we'll make up stuff on his slides. 12 00:01:11,600 --> 00:01:16,720 We'll hand wave. Yeah. So why parking meters? I mentioned why I was into it. But why in 13 00:01:16,720 --> 00:01:20,720 general? Parking meters are these, you know, they're just everywhere. They're in every city. 14 00:01:20,760 --> 00:01:25,500 They're in every city in the world. These things on stage. They're in every city in the world. 15 00:01:25,520 --> 00:01:31,600 Every few feet away. And we just totally take them for granted. We go. We park our car. Put some 16 00:01:31,600 --> 00:01:37,540 money in. Walk away. We don't think about it at all. But it's one system that we thought needed a 17 00:01:37,540 --> 00:01:43,000 little kick in the ass. Because a lot of these meters now are electronic. They're essentially 18 00:01:44,040 --> 00:01:48,340 individual computer systems that can now be analyzed. Think globally. Hack locally. 19 00:01:48,960 --> 00:01:54,420 Yes. Clearly I'm the son of a hippy. 20 00:01:56,000 --> 00:01:59,880 And there's also big money. So anywhere there's money there's going to be fraud. There's 21 00:01:59,880 --> 00:02:06,000 going to be people, you know, taking advantage of the system. So the parking industry is a 22 00:02:06,000 --> 00:02:14,080 $28 billion industry annually. I think just in the U.S. alone. And there's a bunch of stuff that 23 00:02:14,080 --> 00:02:18,300 can go on. So not only like the financial fraud of getting free parking. But there's social 24 00:02:18,300 --> 00:02:24,240 issues and legal issues. And we're going to get into all of that. So generally the thing we wanted to do 25 00:02:24,240 --> 00:02:30,440 was understand the current state of the unfair collection systems. Or fair collection systems. And 26 00:02:30,440 --> 00:02:34,240 we wanted to be able to demonstrate some attacks. We wanted to be able to come here and show that 27 00:02:34,240 --> 00:02:38,040 something had been done. It's not just enough to say how some things work. We also wanted to show 28 00:02:38,040 --> 00:02:42,180 you how they don't work. Or how they work when you probably don't want them to work that way. 29 00:02:43,740 --> 00:02:48,180 Anyway. We also wanted to show the whole process from start to finish. Because, you know, for me 30 00:02:48,180 --> 00:02:52,200 this is my first real hardware hacking project where like we took some like foreign things and we 31 00:02:52,700 --> 00:02:54,060 basically like understood them. 32 00:02:54,240 --> 00:02:59,900 As best as we could. And then using that we were able to go all the way to a full break. And so this should 33 00:02:59,900 --> 00:03:04,720 hopefully take you from start to finish if you've never done it before. Which I think it's important to sort of, 34 00:03:04,720 --> 00:03:10,020 you know, bring people to the next level. And Joe really thinks that. So he brought us together to work on this. 35 00:03:10,080 --> 00:03:17,600 So it's pretty epic to be able to work with him and Chris. And of course we took on the SFMTA. But of course 36 00:03:18,440 --> 00:03:23,800 it's also important to say that this is not really specific to San Francisco. Other than our particular case study. 37 00:03:24,240 --> 00:03:33,220 The meters that we examined all had pretty much the same problems. And we just happened to live in San Francisco. So it was just kind of a no-brainer to kill that one. 38 00:03:33,460 --> 00:03:42,480 Yeah. So going through the process is the most important part that you should take out of this. You know, because you can apply this to other parking meter systems in your area. 39 00:03:42,560 --> 00:03:49,420 Or you can apply it to other products. Anything you're looking at sort of goes through this general process of analysis and gathering information and stuff like that. 40 00:03:49,480 --> 00:03:54,140 So you'll see it. And then we'll hit the case study towards the end. We're going to talk about more general 41 00:03:54,240 --> 00:04:00,140 parking meter stuff. And general process stuff. And then go into specifics of San Francisco. 42 00:04:01,220 --> 00:04:07,220 So there's some different things that are kind of interesting about the parking meters in San Francisco. And of course generally everywhere. 43 00:04:07,540 --> 00:04:15,420 You've got these single space meters that are everywhere lining the streets. In some cities like Oakland, they've cut them down and put in multi-space meters, which have really confused a lot of people. 44 00:04:15,680 --> 00:04:24,060 But the idea with the single space is you put in some change or you use a smart card or some like cell phone token. And the multi-space, you usually get like a printed paper token. 45 00:04:24,060 --> 00:04:26,900 In some cities you tape it to your window. In other ones you put it on your dash. 46 00:04:27,680 --> 00:04:34,040 And the meters generally are sold with this idea that they'll stop people from lifting money, like the meter maids from lifting money. 47 00:04:34,380 --> 00:04:40,100 And so they have audit logs. So they should know about how much the meters are used and also about how much money should be in the meters. 48 00:04:40,320 --> 00:04:46,080 And maybe they also have role separation. So the audit logs are pulled by someone other than the person that collects the money. 49 00:04:47,140 --> 00:04:53,000 And then of course they have different ways to like repair the meter. So the person that repairs the meter might not pull the audit logs. 50 00:04:53,000 --> 00:04:59,820 They also might not pull the change. And this is, I think this is generally a pretty important thing to do in a security system. 51 00:04:59,940 --> 00:05:08,240 But it's kind of ironic because the things that we found problems with would be like probably even worse if the threat model was that an insider was attacking the system. 52 00:05:08,560 --> 00:05:16,780 So a lot of these systems were sold with the idea that you basically would want to have this so you could stop your employees from like skimming money. 53 00:05:16,940 --> 00:05:21,720 I can, in, I think it was San Francisco actually, someone was arrested with 7,000 coins. 54 00:05:22,000 --> 00:05:22,420 Yeah. 55 00:05:22,420 --> 00:05:26,180 In 2000, 2007 or 1997 or something. It was a news article we found online. 56 00:05:27,020 --> 00:05:32,000 Oh, yeah. Actually, no, that was a different thing. I think they landed on the moon, right? 57 00:05:32,140 --> 00:05:33,400 Yeah, yeah. I'm not sure. 58 00:05:33,500 --> 00:05:34,160 I think so. 59 00:05:34,240 --> 00:05:41,760 Anyway, so the idea though that the insider is the threat means that they probably designed this wrong because we're not insiders either. 60 00:05:42,460 --> 00:05:45,600 But, I mean, it seems like there's some pretty bad design flaws. 61 00:05:47,080 --> 00:05:52,180 So the way parking meter technology sort of started was obviously mechanical. 62 00:05:52,420 --> 00:05:56,360 In the early 90s, these hybrid meters started coming up. 63 00:05:56,420 --> 00:06:00,760 So it was mechanical based where you put your money in and you turn the knob in some way to feed the money through. 64 00:06:00,900 --> 00:06:04,780 But then there was an electronic system, very minimal, to keep track of the timing. 65 00:06:05,280 --> 00:06:12,340 Possibly for sending out some startup messages or some administrative messages. 66 00:06:13,100 --> 00:06:17,060 But now, as I mentioned, everything is just a pure electronic system. 67 00:06:17,320 --> 00:06:22,400 You know, going from the coin detection, which is some inductive method using music. 68 00:06:22,400 --> 00:06:25,080 Coils and some electronics and processing to figure out the coin type. 69 00:06:26,040 --> 00:06:28,280 To a microprocessor with memory. 70 00:06:28,800 --> 00:06:31,780 And now we treat these systems as actual embedded systems. 71 00:06:31,940 --> 00:06:36,460 And we would go about analyzing them and breaking them the same way we would any other type of hardware product. 72 00:06:36,620 --> 00:06:39,140 So, you know, we've gone from mechanical to essentially solid state. 73 00:06:41,320 --> 00:06:43,140 So here you can see some reconnaissance. 74 00:06:43,520 --> 00:06:45,920 Just kind of like accidental reconnaissance. 75 00:06:46,060 --> 00:06:47,880 Yeah, I just happened to walk up right to her. 76 00:06:48,100 --> 00:06:48,400 Yeah. 77 00:06:48,460 --> 00:06:52,380 So basically it looks like this person has like a small electronic device. 78 00:06:52,400 --> 00:06:53,720 Stuck into the key slot. 79 00:06:54,100 --> 00:06:56,540 And if you look at the crash cart that you have there. 80 00:06:56,620 --> 00:06:57,180 That's kind of crazy. 81 00:06:57,240 --> 00:06:58,880 Your meter system has a crash cart. 82 00:07:00,120 --> 00:07:02,660 But it looks like she has a small handheld device. 83 00:07:02,860 --> 00:07:05,320 Which if you read some of the documentation for this particular meter. 84 00:07:05,500 --> 00:07:08,520 You'll find out that they have like a super secure Windows CE device. 85 00:07:08,660 --> 00:07:11,300 That you can plug into the serial bus that's in the coin slot. 86 00:07:11,640 --> 00:07:14,040 Or in the key lock. 87 00:07:14,220 --> 00:07:15,680 But it doesn't look like the lock is open. 88 00:07:15,860 --> 00:07:19,760 So it's as if they made the actual lock into a serial port. 89 00:07:20,100 --> 00:07:21,640 Which seems like kind of crazy. 90 00:07:21,800 --> 00:07:22,120 Right. 91 00:07:22,400 --> 00:07:23,620 So we think that this person. 92 00:07:23,720 --> 00:07:24,460 This was in San Francisco. 93 00:07:24,680 --> 00:07:29,200 And we think that this person was going around and grabbing audit logs. 94 00:07:29,360 --> 00:07:30,620 Or updating the meter in some way. 95 00:07:30,860 --> 00:07:32,380 So she wasn't there to pull the money out. 96 00:07:32,540 --> 00:07:33,500 So even though the coin. 97 00:07:33,640 --> 00:07:38,260 The serial interface for this PDA was through the coin lock. 98 00:07:38,680 --> 00:07:40,040 She couldn't get access to it. 99 00:07:40,100 --> 00:07:42,880 So that's the exact point of the role separation. 100 00:07:43,880 --> 00:07:46,200 Most parking meters have some sort of user interface. 101 00:07:46,320 --> 00:07:46,840 You can pay it. 102 00:07:47,400 --> 00:07:49,900 Whether it's coin, smart card, credit card. 103 00:07:51,580 --> 00:07:55,260 Some now accept text messages in some form. 104 00:07:55,760 --> 00:07:57,200 And then there's administrator interfaces. 105 00:07:57,380 --> 00:07:58,100 Some of them are the same. 106 00:07:58,220 --> 00:07:58,800 So the coin slot. 107 00:07:58,860 --> 00:08:00,080 The smart card interface. 108 00:08:00,360 --> 00:08:03,180 Could be used for depending on the system. 109 00:08:03,760 --> 00:08:06,720 For administrator access through some piece of hardware. 110 00:08:07,040 --> 00:08:08,340 Usually it's some serial interface. 111 00:08:08,540 --> 00:08:09,040 The coin slot. 112 00:08:09,180 --> 00:08:10,120 Because it has inductive. 113 00:08:10,240 --> 00:08:10,980 It has coils. 114 00:08:11,100 --> 00:08:13,220 So you could do some really short range wireless. 115 00:08:13,700 --> 00:08:16,120 Then you have infrared capabilities. 116 00:08:16,440 --> 00:08:17,800 And other wireless capabilities. 117 00:08:17,800 --> 00:08:21,200 And then other stuff that might be completely meter specific. 118 00:08:21,400 --> 00:08:24,080 Like the serial via the coin lock. 119 00:08:24,280 --> 00:08:26,520 So a lot of interfaces out there. 120 00:08:26,600 --> 00:08:28,260 And the more interfaces that are out there per meter. 121 00:08:28,520 --> 00:08:30,120 We can target each of those. 122 00:08:30,380 --> 00:08:33,000 It's like every single interface is an attack vector. 123 00:08:33,200 --> 00:08:35,720 The attack service for some of these meters is just ridiculous. 124 00:08:36,060 --> 00:08:38,820 I don't know how the designers of these systems. 125 00:08:38,880 --> 00:08:41,100 Thought they could get away with putting something like this. 126 00:08:41,180 --> 00:08:42,900 In front of every single person all the time. 127 00:08:43,060 --> 00:08:44,460 Especially something that often makes people mad. 128 00:08:45,120 --> 00:08:45,560 So. 129 00:08:45,800 --> 00:08:46,080 Yeah. 130 00:08:46,080 --> 00:08:49,800 It seems like a lot of the design work that had gone on for security. 131 00:08:49,860 --> 00:08:51,120 Is just for vandalism. 132 00:08:51,440 --> 00:08:52,120 And they never. 133 00:08:52,260 --> 00:08:56,640 The designers didn't think about this next generation of attacks. 134 00:08:57,200 --> 00:08:59,640 Basically if you read some of the documentation. 135 00:08:59,740 --> 00:09:02,780 They say stuff like the smart card slot is modular. 136 00:09:03,000 --> 00:09:04,700 So that it can serve as the sacrificial part. 137 00:09:04,980 --> 00:09:07,800 So they're like AUG is going to attack our meter. 138 00:09:07,920 --> 00:09:08,940 AUG has tin foil. 139 00:09:09,480 --> 00:09:11,340 AUG has shorted out smart card reader. 140 00:09:12,100 --> 00:09:14,460 Well we can totally protect against AUG. 141 00:09:14,580 --> 00:09:15,220 No problem. 142 00:09:16,520 --> 00:09:16,880 Fuck. 143 00:09:18,440 --> 00:09:19,120 All right. 144 00:09:19,140 --> 00:09:21,300 So we took a few pictures of some parking meters. 145 00:09:21,820 --> 00:09:23,060 Just from various cities. 146 00:09:23,120 --> 00:09:25,040 This one has a smart card interface from Austin. 147 00:09:25,600 --> 00:09:27,300 This is a Chicago multi-space meter. 148 00:09:27,380 --> 00:09:28,500 Which we'll mention in a few slides. 149 00:09:28,560 --> 00:09:31,140 When we talk about some previous work and problems. 150 00:09:32,840 --> 00:09:33,980 For those of you that know me. 151 00:09:34,080 --> 00:09:35,020 You know that I love Canada. 152 00:09:36,560 --> 00:09:37,920 And this meter is great. 153 00:09:38,040 --> 00:09:40,600 It's also by the same company that designed the San Francisco meters. 154 00:09:40,680 --> 00:09:41,280 JJ McKay. 155 00:09:41,800 --> 00:09:42,980 And this one's interesting. 156 00:09:43,380 --> 00:09:44,440 I didn't actually use it. 157 00:09:44,500 --> 00:09:45,780 I didn't have a car when I was in Vancouver. 158 00:09:47,200 --> 00:09:49,480 And apparently you call this number. 159 00:09:49,540 --> 00:09:50,700 Or you text message this number. 160 00:09:51,120 --> 00:09:54,580 And you basically don't actually change the value on the meter. 161 00:09:54,680 --> 00:09:57,820 But the meter may have like a log that shows which ones have paid by that way. 162 00:09:57,940 --> 00:09:59,080 And then even though it's expired. 163 00:09:59,620 --> 00:10:00,740 They won't give you a ticket. 164 00:10:01,360 --> 00:10:03,420 Because they know the time in which it's supposed to be up. 165 00:10:03,720 --> 00:10:06,540 Which is kind of an interesting system here. 166 00:10:06,640 --> 00:10:09,640 So you have a completely separate system that overrides the mechanical meter. 167 00:10:09,760 --> 00:10:13,560 So you could in theory give everyone free parking or something like that. 168 00:10:13,640 --> 00:10:14,240 By doing that. 169 00:10:14,300 --> 00:10:15,500 Like attacking this other system. 170 00:10:15,500 --> 00:10:17,640 So it's like who designed those systems? 171 00:10:17,720 --> 00:10:18,800 Did they know they would work together? 172 00:10:19,180 --> 00:10:20,940 That's a really interesting idea. 173 00:10:21,140 --> 00:10:22,960 And if they haven't done some due diligence with that. 174 00:10:23,040 --> 00:10:24,100 It could be very, very bad. 175 00:10:24,600 --> 00:10:27,460 That one also seems sort of labor intensive. 176 00:10:27,760 --> 00:10:30,820 Because if normally a meter maid will drive by the meters. 177 00:10:30,880 --> 00:10:32,820 And they'll look at the back size to see if time's expired. 178 00:10:33,300 --> 00:10:34,140 But in this case. 179 00:10:34,240 --> 00:10:35,460 If somebody is paying online. 180 00:10:35,700 --> 00:10:37,220 And then the meter actually does stay at zero. 181 00:10:37,380 --> 00:10:38,460 They're going to have to stop at each one. 182 00:10:38,560 --> 00:10:41,900 And check to see if the person paid via phone instead. 183 00:10:42,240 --> 00:10:42,520 Yeah. 184 00:10:42,560 --> 00:10:43,040 It's pretty rough. 185 00:10:46,500 --> 00:10:49,260 Here's a parking meter from Jerusalem. 186 00:10:49,400 --> 00:10:50,980 That was near the old city. 187 00:10:51,780 --> 00:10:52,620 And it's just. 188 00:10:52,840 --> 00:10:55,560 There's a few different major brands of parking meter manufacturers. 189 00:10:55,920 --> 00:10:56,980 And we'll talk about those. 190 00:10:57,180 --> 00:10:58,700 But this was. 191 00:10:58,920 --> 00:11:00,600 I believe this was POM. 192 00:11:02,700 --> 00:11:04,420 So some of the prior problems. 193 00:11:04,600 --> 00:11:05,980 We're not the first to look at parking meters. 194 00:11:06,100 --> 00:11:07,320 And hopefully we're not going to be the last. 195 00:11:07,740 --> 00:11:09,980 But there's been people messing with these things. 196 00:11:10,060 --> 00:11:11,000 As long as they've been around. 197 00:11:11,880 --> 00:11:13,160 New York City in 2001. 198 00:11:13,380 --> 00:11:15,480 When some of the early electronics. 199 00:11:15,500 --> 00:11:16,480 And electronic parking meters came out. 200 00:11:16,620 --> 00:11:19,020 They had infrared capability for their administrator. 201 00:11:19,820 --> 00:11:20,300 Interface. 202 00:11:20,480 --> 00:11:22,800 And somebody figured out that they could take a universal remote control. 203 00:11:23,000 --> 00:11:23,980 And hit some. 204 00:11:24,200 --> 00:11:25,300 One of the buttons. 205 00:11:25,780 --> 00:11:28,400 To reset the value of money on the meter. 206 00:11:29,980 --> 00:11:32,940 Which is one of the exact social attacks that we had. 207 00:11:33,020 --> 00:11:34,920 That we had kind of come up with. 208 00:11:35,660 --> 00:11:37,360 Is Hikari here in the audience? 209 00:11:37,660 --> 00:11:38,220 Are you here? 210 00:11:38,400 --> 00:11:38,880 David? 211 00:11:39,540 --> 00:11:40,020 No. 212 00:11:40,080 --> 00:11:40,560 Okay. 213 00:11:40,700 --> 00:11:42,500 But he wrote a pretty awesome paper. 214 00:11:42,600 --> 00:11:43,540 In the Uninformed Journal. 215 00:11:43,540 --> 00:11:44,480 Which if you don't read. 216 00:11:44,660 --> 00:11:46,140 Does anybody here read Uninformed? 217 00:11:46,280 --> 00:11:46,720 Raise your hand. 218 00:11:48,080 --> 00:11:48,340 Wow. 219 00:11:48,660 --> 00:11:49,060 Okay. 220 00:11:49,140 --> 00:11:50,280 You should all read Uninformed. 221 00:11:50,460 --> 00:11:52,240 It's the most hardcore technical journal. 222 00:11:52,360 --> 00:11:53,440 Basically since Frack. 223 00:11:53,700 --> 00:11:55,260 So if you're not reading it. 224 00:11:55,360 --> 00:11:56,400 You're probably uninformed. 225 00:11:56,620 --> 00:11:57,680 So you should read Uninformed. 226 00:11:57,740 --> 00:11:58,180 And be informed. 227 00:11:58,940 --> 00:12:00,940 But this is a great text file by Hikari. 228 00:12:01,060 --> 00:12:04,220 And it talks about attacking the San Diego stored value card. 229 00:12:04,380 --> 00:12:04,820 Which is pretty. 230 00:12:04,980 --> 00:12:05,600 It's a good one. 231 00:12:06,040 --> 00:12:06,380 Yeah. 232 00:12:06,400 --> 00:12:06,700 It's an interesting. 233 00:12:06,900 --> 00:12:07,260 It's a different. 234 00:12:07,380 --> 00:12:08,760 Completely different smart card implementation. 235 00:12:10,040 --> 00:12:13,140 But it's almost a different type of smart card. 236 00:12:13,140 --> 00:12:13,900 So it's worth seeing. 237 00:12:13,960 --> 00:12:18,140 So you can kind of get a view of how various smart cards are used. 238 00:12:18,480 --> 00:12:24,600 And then Chicago recently deployed a bunch of multi-space parking meters all over the city in June. 239 00:12:24,780 --> 00:12:26,200 How many people here are from Chicago? 240 00:12:27,320 --> 00:12:28,720 Have you seen these parking meters? 241 00:12:29,500 --> 00:12:29,920 Yes. 242 00:12:30,040 --> 00:12:30,920 Do you love them? 243 00:12:31,580 --> 00:12:32,000 Yeah. 244 00:12:32,260 --> 00:12:33,620 Nobody in Chicago seems to like parking. 245 00:12:33,620 --> 00:12:34,540 Think globally, not locally. 246 00:12:35,180 --> 00:12:35,600 Right. 247 00:12:35,680 --> 00:12:39,760 So I mean Chicago has been notorious for disliking the parking situation there. 248 00:12:40,580 --> 00:12:42,120 Meters are always being vandalized. 249 00:12:42,120 --> 00:12:42,900 They're always being damaged. 250 00:12:43,140 --> 00:12:45,160 And I don't know. 251 00:12:45,180 --> 00:12:49,560 For some reason when some of these parking meters came out, these multi-space meters, some of them failed. 252 00:12:49,800 --> 00:12:50,800 And they weren't working. 253 00:12:50,940 --> 00:12:52,320 And the media said, oh, no. 254 00:12:52,920 --> 00:12:54,700 Hackers have taken over our parking meters. 255 00:12:56,380 --> 00:12:57,920 And they got in touch with me. 256 00:12:59,100 --> 00:13:01,660 And Jake politely declined to talk to them. 257 00:13:01,840 --> 00:13:03,020 I just deleted their email. 258 00:13:04,060 --> 00:13:11,840 But I called them back and had to give them my view which was, sorry, it's not hackers. 259 00:13:12,260 --> 00:13:13,640 It's probably a firmware problem. 260 00:13:14,120 --> 00:13:17,340 Because the multi-space meters that failed, and I don't exactly know how they failed. 261 00:13:17,380 --> 00:13:18,180 I think they just didn't work. 262 00:13:19,080 --> 00:13:24,800 Were all situated in one neighborhood of Chicago that had a different rate than the rest of the city. 263 00:13:24,980 --> 00:13:26,800 And it was like a really expensive rate. 264 00:13:26,900 --> 00:13:28,420 And I don't think they tested that rate. 265 00:13:28,500 --> 00:13:30,880 So there might have been some firmware problem or some overflow or something. 266 00:13:31,060 --> 00:13:32,600 So it was in the news. 267 00:13:32,740 --> 00:13:33,600 It was all over the place. 268 00:13:33,660 --> 00:13:34,760 And then it quietly disappeared. 269 00:13:35,080 --> 00:13:39,660 So I don't know if anybody from Chicago knows the real result of that. 270 00:13:40,460 --> 00:13:40,820 No. 271 00:13:40,820 --> 00:13:43,440 Are you suggesting that greed might have caused a firmware bug? 272 00:13:44,440 --> 00:13:44,840 Possibly. 273 00:13:45,120 --> 00:13:45,440 Whoops. 274 00:13:45,500 --> 00:13:45,720 Yeah. 275 00:13:46,260 --> 00:13:48,480 They're like, let's jack up the rate as much as we can. 276 00:13:49,280 --> 00:13:52,620 That's pretty bad if you hit like an overflow condition from raising your prices. 277 00:13:52,880 --> 00:13:52,920 Right. 278 00:13:54,700 --> 00:13:59,500 And Chicago, too, also has some sort of wireless communication back up to the cell phone network. 279 00:14:00,060 --> 00:14:01,540 And then back to some mothership. 280 00:14:01,580 --> 00:14:02,260 So they were connected. 281 00:14:02,420 --> 00:14:04,900 And that opens up a whole new range of attacks. 282 00:14:05,240 --> 00:14:08,840 Who here thinks that just because you're using a cell phone, the file layer is secure? 283 00:14:09,320 --> 00:14:10,800 I mean, how many people have you seen that? 284 00:14:10,820 --> 00:14:12,280 I've seen around here just using cell modems. 285 00:14:12,680 --> 00:14:20,020 It seems like if there's some sort of cell modem back into these things, you should all start hacking on CDMA and GSM stuff. 286 00:14:20,480 --> 00:14:21,760 I mean, it's not hard, right? 287 00:14:22,320 --> 00:14:23,360 I'm sure someone is. 288 00:14:23,580 --> 00:14:23,740 Right. 289 00:14:23,760 --> 00:14:24,180 Well, definitely. 290 00:14:24,340 --> 00:14:24,880 Use a new radio. 291 00:14:27,320 --> 00:14:35,000 So this is just the general process of how we approach the problem and how we approach sort of any hardware problem. 292 00:14:35,940 --> 00:14:37,220 Kind of think about some attacks. 293 00:14:37,460 --> 00:14:40,040 We postulate some various attacks about what we could do. 294 00:14:40,040 --> 00:14:46,140 You know, from the most lofty goals to kind of the most maybe obvious or low-hanging fruit. 295 00:14:47,100 --> 00:14:48,100 Then we gather information. 296 00:14:48,760 --> 00:14:50,280 We will analyze hardware. 297 00:14:50,400 --> 00:14:52,100 We analyze firmware if necessary. 298 00:14:52,380 --> 00:14:54,680 And then we look at any external interfaces. 299 00:14:54,760 --> 00:14:56,620 In our case, there's a smart card interface. 300 00:14:56,720 --> 00:14:57,420 So we looked at that. 301 00:14:59,320 --> 00:15:02,500 So no pun intended while saying this with a member of the loft on stage. 302 00:15:02,720 --> 00:15:05,000 But the loftiest one we thought was the covert channels. 303 00:15:05,160 --> 00:15:08,340 Like imagine you know someone's serial number for their smart card. 304 00:15:08,340 --> 00:15:10,540 Or you know how they pay via cell phone. 305 00:15:10,760 --> 00:15:15,820 You could potentially set up the LCD so that it sends, you know, a message like, oh, hello, Joe. 306 00:15:15,920 --> 00:15:16,880 The crow flies at midnight. 307 00:15:18,240 --> 00:15:19,000 Modifying the firmware. 308 00:15:19,280 --> 00:15:19,440 Right. 309 00:15:20,380 --> 00:15:21,840 And I think it was Jeff Moss. 310 00:15:22,040 --> 00:15:26,140 He suggested, well, you know, if you have these RF interfaces and, you know, the meters were exploitable, 311 00:15:26,280 --> 00:15:29,120 well, why don't you just, you know, make some malware that spreads between meters? 312 00:15:29,600 --> 00:15:32,000 I mean, if they're a mesh, then, you know, mesh it. 313 00:15:32,220 --> 00:15:32,580 Yeah. 314 00:15:33,900 --> 00:15:36,640 And then denial of service are sort of these destructive attacks. 315 00:15:37,680 --> 00:15:41,420 But depending on the attacker's goals might still be valid. 316 00:15:41,700 --> 00:15:44,380 So setting a meter to out of order, just preventing people from parking there. 317 00:15:44,460 --> 00:15:47,420 Because a lot of cities, if the meter is out of order, you're not allowed to park there. 318 00:15:47,560 --> 00:15:49,360 Or you're only allowed to park there for an hour. 319 00:15:50,400 --> 00:15:51,440 And then you'll get a ticket. 320 00:15:51,660 --> 00:15:54,300 And that could also be useful if you're like, well, you know, I got to leave. 321 00:15:54,480 --> 00:15:56,680 I'll set the meter to out of order and then I'll come back. 322 00:15:56,800 --> 00:15:56,900 Right. 323 00:15:57,460 --> 00:15:57,780 Yeah. 324 00:15:59,240 --> 00:16:06,280 And then, of course, destroying any sort of user interface, smart card interface or coin processing circuitry with a little ESD pulse. 325 00:16:07,120 --> 00:16:08,500 Using a little discharge tool. 326 00:16:08,940 --> 00:16:11,560 Some of the meters are designed to be electrically isolated. 327 00:16:11,900 --> 00:16:17,340 But, you know, I think that if you have a taser or a stun gun, you could find out how well they did that. 328 00:16:19,240 --> 00:16:20,960 I'm not suggesting that I tested this. 329 00:16:21,040 --> 00:16:23,640 But if you just look at some of the boards that you can buy or the meters on eBay, 330 00:16:23,800 --> 00:16:29,140 you see that they very clearly take the route of, oh, well, the smart card interface is the one that's going to get attacked. 331 00:16:29,740 --> 00:16:32,500 But they forget about maybe like the external serial bus or something. 332 00:16:32,780 --> 00:16:33,040 Yeah. 333 00:16:34,560 --> 00:16:36,620 And then, you know, possibly even, you know, 334 00:16:36,640 --> 00:16:40,820 if you know how the system operates causing a legitimate user to be added to some fraud list, 335 00:16:41,060 --> 00:16:46,780 if there is a fraud list implemented in the city, say, based on serial number. 336 00:16:47,160 --> 00:16:53,160 So if I know Jake's serial number of his prepaid card that he's using, you know, 337 00:16:53,160 --> 00:16:56,960 maybe I would clone his card and use it all over the city all the time 338 00:16:56,960 --> 00:17:01,220 and generate some flag somewhere to prevent him from legitimately using his card. 339 00:17:03,360 --> 00:17:06,620 So it's also possible that you could do some sort of immediate detection. 340 00:17:06,640 --> 00:17:07,140 You could do a reduction of credit. 341 00:17:07,240 --> 00:17:10,880 So if someone walks up and they put in three hours and then they leave. 342 00:17:11,540 --> 00:17:13,940 We mentioned this at Black Hat when we were talking about this. 343 00:17:14,040 --> 00:17:16,940 And some guy from Montreal is like, oh, yes, we love to do that in Montreal. 344 00:17:17,300 --> 00:17:18,800 We hate those fucking parking meters. 345 00:17:19,240 --> 00:17:24,920 And so apparently the deal is that you park the car, you put in the change, 346 00:17:25,040 --> 00:17:26,360 and you are not allowed to refill it. 347 00:17:26,440 --> 00:17:30,400 So if you put in more change, the incentive system, yes, it was that fine gentleman there, 348 00:17:31,880 --> 00:17:32,960 it resets to zero. 349 00:17:33,120 --> 00:17:36,620 So apparently there's like a social fad about going and doing that. 350 00:17:36,640 --> 00:17:40,300 And you're dropping in coins across the whole block in order to raise doubts about the meter system. 351 00:17:40,520 --> 00:17:44,620 And basically anyone can contest a ticket because it's so easy to break that system. 352 00:17:45,220 --> 00:17:47,140 So in a way, I mean, that's great. 353 00:17:47,280 --> 00:17:51,440 They showed that the machine was not, you know, perfect, which is important. 354 00:17:51,780 --> 00:17:55,720 And this is exactly what people in New York were doing with the infrared remote controls as well. 355 00:17:55,820 --> 00:17:59,620 So it's, you know, one of the favorite things would be, hey, you know, 356 00:17:59,620 --> 00:18:05,680 there's some guy that you don't like, he just parked his car, go remove all his credit. 357 00:18:06,640 --> 00:18:09,860 Call a tow truck, call the parking officials, give them a ticket. 358 00:18:10,520 --> 00:18:15,320 There's also, of course, the possibility that you could change the audit log, right? 359 00:18:15,380 --> 00:18:21,180 So it doesn't look like any of the meters are actually using any sort of computational infeasibility, right? 360 00:18:21,280 --> 00:18:23,620 So it's not like there's a cryptographic problem you have to solve. 361 00:18:23,740 --> 00:18:27,040 It's generally just do you know something, like do you know how it works? 362 00:18:27,240 --> 00:18:30,500 So that sounds a lot like security through obscurity to me, which means that it's what? 363 00:18:30,780 --> 00:18:33,080 Is that secure? Probably not. 364 00:18:34,040 --> 00:18:38,520 And, of course, if you wanted to, well, you're better at this part of the slide than I am. 365 00:18:38,520 --> 00:18:39,180 I don't know about that. 366 00:18:40,820 --> 00:18:43,300 So changing the time and date could always be fun, right? 367 00:18:43,400 --> 00:18:46,400 If you, you know, everybody gets free parking on Sunday, so what could you do? 368 00:18:46,600 --> 00:18:50,200 You know, change the date, and it's like every day is Sunday, Sunday, Sunday. 369 00:18:50,960 --> 00:18:52,240 Free parking in the city. 370 00:18:53,500 --> 00:18:54,880 They're already here. We don't have to get their money. 371 00:18:54,940 --> 00:18:56,120 I don't understand why you're saying that. 372 00:18:56,900 --> 00:19:01,360 For those of you that ever watched The Simpsons while growing up, thanks for the two that got the reference. 373 00:19:01,360 --> 00:19:04,320 Is that the monorail episode? I don't even know. 374 00:19:04,400 --> 00:19:08,940 I think it's the one where What's-His-Face goes and works at the racetrack and they're bilking everybody. 375 00:19:09,580 --> 00:19:13,440 Anyway, so the least lofty goal just so happens to be the one that probably everybody wants, 376 00:19:13,580 --> 00:19:15,220 which is unlimited payment via smart card. 377 00:19:16,220 --> 00:19:21,080 And that one is kind of incredible because you think, you know, you look at a smart card, 378 00:19:21,160 --> 00:19:22,520 you're like, oh, that's got to be secure. 379 00:19:22,700 --> 00:19:25,320 You know, it's smart. It's a smart car, right? 380 00:19:25,940 --> 00:19:27,160 So that's got to be secure. 381 00:19:27,220 --> 00:19:28,840 I mean, even as smart in the name. 382 00:19:28,960 --> 00:19:29,620 And it's really tiny. 383 00:19:29,920 --> 00:19:30,140 Yeah. 384 00:19:31,360 --> 00:19:31,980 But, you know, smart. 385 00:19:32,100 --> 00:19:32,560 It has to be high tech. 386 00:19:32,820 --> 00:19:37,360 So that's actually what we're looking at for the case study in San Francisco is the unlimited payment via smart card. 387 00:19:37,560 --> 00:19:38,380 Not so smart card. 388 00:19:38,560 --> 00:19:38,740 Yeah. 389 00:19:40,300 --> 00:19:42,820 So here's the process just on information gathering. 390 00:19:42,900 --> 00:19:46,500 Of course, you do stuff like Google and browse the Internet. 391 00:19:47,580 --> 00:19:47,940 But... 392 00:19:47,940 --> 00:19:48,620 Yeah. 393 00:19:48,960 --> 00:19:50,080 You know, there's... 394 00:19:50,080 --> 00:19:53,760 I'll talk about it a little bit in the San Francisco case study. 395 00:19:54,040 --> 00:19:56,560 But, I mean, social engineering can get you really far. 396 00:19:57,060 --> 00:19:59,980 I mean, just, you know, if you ask, technically incorrect, 397 00:19:59,980 --> 00:20:07,080 but really specific questions that are maybe really eager to someone who cares about their job, 398 00:20:07,200 --> 00:20:10,380 they'll tell you the most amazing information about their system. 399 00:20:10,560 --> 00:20:14,500 And generally speaking, if they only tell you a little piece and someone else tells you another piece, 400 00:20:14,660 --> 00:20:17,740 you now have enough to put, you know, something together that is really useful. 401 00:20:18,480 --> 00:20:22,340 And combining that with, say, press releases where everyone's always tooting their own horn 402 00:20:22,340 --> 00:20:24,660 about all of the details of their system and how good it is, 403 00:20:24,760 --> 00:20:28,940 you can start to realize where they're lying before you even look at their systems, too, which is great. 404 00:20:28,940 --> 00:20:30,220 Like, for example, it's secure? 405 00:20:30,460 --> 00:20:30,960 Probably not. 406 00:20:31,180 --> 00:20:31,260 Yeah. 407 00:20:31,740 --> 00:20:36,640 And, yeah, part of the hard-racking process or any sort of analysis process is just gathering clues. 408 00:20:37,000 --> 00:20:39,880 So you do your social engineering and you might get one bit of information. 409 00:20:40,080 --> 00:20:41,280 You find something on Google. 410 00:20:41,360 --> 00:20:42,760 You find something in the trash. 411 00:20:43,480 --> 00:20:46,780 All these things, you might not know how they all fit together until you start your work 412 00:20:46,780 --> 00:20:48,240 and then you're like, oh, I can use that piece. 413 00:20:49,000 --> 00:20:51,940 So another thing is we said, you know, globalism. 414 00:20:52,060 --> 00:20:54,800 What does globalism have to do with, you know, parking meters in a city? 415 00:20:55,180 --> 00:20:58,760 Well, I mean, if you roll your own stuff, you can control your own stuff. 416 00:20:58,760 --> 00:21:00,820 You can make sure no one ever sells it on eBay. 417 00:21:01,420 --> 00:21:04,760 But if there's a meter company and they build a piece of hardware 418 00:21:04,760 --> 00:21:07,020 and they sell it to another city and they test it in that city 419 00:21:07,020 --> 00:21:10,180 and then that city buys a new implementation because they didn't like it, 420 00:21:10,300 --> 00:21:12,820 they're going to possibly sell that meter infrastructure online. 421 00:21:13,180 --> 00:21:18,520 And now you can buy that and legitimately own something that's very similar to the meter that's in your city. 422 00:21:18,680 --> 00:21:19,900 And then you can attack that. 423 00:21:20,040 --> 00:21:22,300 And you don't need to take a meter or do something illegal. 424 00:21:22,560 --> 00:21:25,540 You can do it totally legally, which is exactly what we did for our case study. 425 00:21:25,800 --> 00:21:26,500 Thank you, eBay. 426 00:21:27,260 --> 00:21:27,660 Yeah. 427 00:21:28,760 --> 00:21:29,620 It is a magical place. 428 00:21:31,100 --> 00:21:34,600 And when we started looking at hardware, you know, in general, 429 00:21:34,620 --> 00:21:36,820 we just wanted to get an idea about parking meters 430 00:21:37,180 --> 00:21:41,960 because it's not often that you can, you know, walk up to one on the street and take it away. 431 00:21:42,140 --> 00:21:44,220 So we wanted to buy some. 432 00:21:44,340 --> 00:21:48,080 And, you know, we did some searches on parking meters on eBay over a span of like two months. 433 00:21:48,180 --> 00:21:50,300 And we bought every type that we could. 434 00:21:50,440 --> 00:21:51,880 And there were three that was available. 435 00:21:52,580 --> 00:21:55,340 The Dunkin' EMM 7700 is the oldest one. 436 00:21:55,620 --> 00:21:56,880 The Palm APM. 437 00:21:56,880 --> 00:22:03,020 And then the McKay Guardian, which is the early revision of the McKay Guardian XLE, which is used in San Francisco. 438 00:22:03,320 --> 00:22:06,100 So we were hoping that we could get some clues about the system. 439 00:22:06,260 --> 00:22:13,800 And being a designer, I know this for a fact that revisions of products typically are based on previous revisions of the design. 440 00:22:14,280 --> 00:22:24,100 So we can learn a lot about current systems by looking at older systems and getting an idea about how, you know, even from a system level, how the design is. 441 00:22:24,100 --> 00:22:29,220 And maybe even from an electrical level about, you know, what microprocessor is being used. 442 00:22:29,340 --> 00:22:30,700 What memory do they like using? 443 00:22:30,800 --> 00:22:31,420 What's the interfaces? 444 00:22:31,660 --> 00:22:32,600 You know, what things can we look at? 445 00:22:32,740 --> 00:22:33,940 So it gives us clues. 446 00:22:35,240 --> 00:22:39,700 And there's also actually details and similarities between competing products, which is sort of interesting. 447 00:22:39,900 --> 00:22:42,120 Like most of these are low power, for example. 448 00:22:42,240 --> 00:22:43,800 And some of the things are kind of elegant. 449 00:22:43,960 --> 00:22:53,580 And then you think like for some of the problems that they want to solve, they might do something kind of, I don't know, like it's almost like a Rube Goldberg machine in some of these meters. 450 00:22:53,680 --> 00:22:53,960 Yeah. 451 00:22:54,100 --> 00:23:02,420 This Duncan meter is kind of cool in that it actually is sort of like a hybrid mechanical electronic meter where they have like you can see on this slide here. 452 00:23:03,360 --> 00:23:04,780 There's some little screws in there. 453 00:23:04,920 --> 00:23:06,260 Those are actually buttons. 454 00:23:06,740 --> 00:23:14,760 And you put a coin in and then it weighs just a precise area out of the turning implement. 455 00:23:15,060 --> 00:23:16,480 And it turns like so. 456 00:23:16,680 --> 00:23:21,260 And when it turns, it scrapes across the heads of the screws and pushes an electronic button underneath. 457 00:23:21,600 --> 00:23:23,340 So there's sort of this sequence of. 458 00:23:23,340 --> 00:23:25,240 If you put a quarter in, it might hit. 459 00:23:25,780 --> 00:23:27,300 Say here's a picture of the circuitry. 460 00:23:27,420 --> 00:23:33,140 It might hit one of the buttons, like button number one, button number three, and then button number four. 461 00:23:33,340 --> 00:23:36,780 But if it's a dime, it might hit button number two, button number three, and button number four. 462 00:23:36,860 --> 00:23:44,300 So there's a sequence to program the time corresponding to that value onto the screen. 463 00:23:45,900 --> 00:23:46,680 There's also some. 464 00:23:46,820 --> 00:23:47,480 So this is the circuitry. 465 00:23:47,560 --> 00:23:49,380 This is the oldest one, as I mentioned, from 1991. 466 00:23:50,460 --> 00:23:54,360 There's a bunch of the buttons that are used for the coin stuff. 467 00:23:54,500 --> 00:23:57,500 But there's also some administrator reset buttons, which are cool. 468 00:23:57,620 --> 00:23:58,200 There's infrared. 469 00:23:58,520 --> 00:24:01,500 So people have been using infrared for a really long time. 470 00:24:01,840 --> 00:24:04,660 And it's still in use. 471 00:24:04,800 --> 00:24:10,120 And from what I know, all of that stuff is just being sent, if not in clear, with some just very poor encoding. 472 00:24:10,480 --> 00:24:12,860 Anybody see the microprocessor on this board? 473 00:24:13,180 --> 00:24:14,120 Anyone know where it is? 474 00:24:14,820 --> 00:24:15,940 It has to be there somewhere. 475 00:24:16,100 --> 00:24:16,260 Right. 476 00:24:16,280 --> 00:24:16,660 There's something. 477 00:24:16,660 --> 00:24:16,900 Anyone? 478 00:24:17,240 --> 00:24:17,940 Take a shot at it? 479 00:24:18,360 --> 00:24:19,140 Win my shirt. 480 00:24:19,440 --> 00:24:20,200 Win my shirt. 481 00:24:20,660 --> 00:24:21,020 Wow. 482 00:24:22,040 --> 00:24:22,840 That's pretty generous. 483 00:24:23,000 --> 00:24:24,360 Do you have another one to wear afterwards? 484 00:24:24,560 --> 00:24:24,960 No, I don't. 485 00:24:25,700 --> 00:24:34,620 So the microprocessor is actually hidden under the LCD, which might not be an intentional thing. 486 00:24:34,940 --> 00:24:39,540 From a security point of view, it might just be because a lot of the pinouts go to drive the LCD, which is right there. 487 00:24:39,980 --> 00:24:46,220 But it is under the LCD, which means if you want to get access to it and this has internal ROM, then you need to tear the meter apart. 488 00:24:47,660 --> 00:24:50,320 The Palm APM, this is a meter from Israel. 489 00:24:50,620 --> 00:24:51,900 It takes shekels. 490 00:24:52,280 --> 00:24:54,380 But it's made by Palm in the U.S. 491 00:24:54,460 --> 00:25:04,560 So there is this cross-pollination of various countries sharing their devices, which could be ripe for international espionage, I guess. 492 00:25:04,840 --> 00:25:05,560 Yeah, I don't know. 493 00:25:05,680 --> 00:25:16,200 I mean, it seems like if you have someone designing the whole system in another country, there's a different set of economic and legal implications for the person that breaks the system. 494 00:25:16,200 --> 00:25:23,140 They maybe never need to set foot in that country, and they could sell cards or something and mail them abroad and make money from it. 495 00:25:23,220 --> 00:25:24,100 Like, oh, broke the system. 496 00:25:24,280 --> 00:25:33,460 So an insider, understanding how this works, if it isn't something that's actually secured by some infeasibility problem, it's just like a disaster waiting to happen, I think. 497 00:25:33,640 --> 00:25:38,920 Yeah, and some of you guys might be thinking, oh, well, there's no way someone's ever going to get access to a parking meter. 498 00:25:39,060 --> 00:25:40,700 There's big locks on the meters. 499 00:25:41,460 --> 00:25:42,680 That's just physical protection. 500 00:25:43,000 --> 00:25:45,240 And if you're at DEF CON, you might realize that. 501 00:25:46,200 --> 00:25:49,840 Physical protection and locks don't really stop everybody. 502 00:25:50,320 --> 00:25:53,820 Maybe Barry's here, and he could tell us how good locks are, mechanical locks, right? 503 00:25:54,020 --> 00:25:57,920 I mean, there's no real mechanical lock that is unbreakable, right? 504 00:25:58,180 --> 00:26:01,560 So, I mean, you might need to be buried to break some of them. 505 00:26:01,600 --> 00:26:09,260 But essentially, if you are relying on physical security to ensure you don't have what amounts to a class break for your entire city, you're probably doing it wrong. 506 00:26:09,480 --> 00:26:09,720 Right. 507 00:26:09,800 --> 00:26:12,480 Key diversity is something that could be really useful to you here. 508 00:26:13,320 --> 00:26:16,000 Probably both in the actual physical keying of the meter. 509 00:26:16,020 --> 00:26:16,180 Yeah. 510 00:26:16,200 --> 00:26:17,660 And also in the engineering infrastructure, but also in software. 511 00:26:18,020 --> 00:26:18,420 Yeah. 512 00:26:18,540 --> 00:26:20,000 So there's a few more. 513 00:26:20,120 --> 00:26:21,020 I'm just going to breeze through these. 514 00:26:21,160 --> 00:26:24,580 There's some debug ports that I thought were interesting on the POM. 515 00:26:24,740 --> 00:26:28,260 The POM is also modular, so you can replace the various parts if they break. 516 00:26:29,060 --> 00:26:30,340 Easy access to the ROM. 517 00:26:30,940 --> 00:26:31,700 Here's another view. 518 00:26:31,900 --> 00:26:33,520 Easy access to the microprocessor as well. 519 00:26:33,700 --> 00:26:34,560 There's a reset button. 520 00:26:37,160 --> 00:26:37,760 McKay Guardian. 521 00:26:38,400 --> 00:26:42,700 So this is one that was decommissioned from Tallahassee, Florida, that we bought on eBay. 522 00:26:42,840 --> 00:26:43,960 Oh, I should mention, too, the prices. 523 00:26:43,960 --> 00:26:48,340 Price range was from 99 cents for a meter on eBay to $500. 524 00:26:50,160 --> 00:26:53,940 So, you know, well within a budget of most curious people. 525 00:26:55,020 --> 00:26:55,860 Here's the McKay. 526 00:26:56,300 --> 00:26:59,400 Again, easy access to the microprocessor, easy access to the ROM. 527 00:27:00,220 --> 00:27:09,240 The microprocessor in this case is a CLT840231G, which is a custom ASIC with a Z80 core. 528 00:27:10,100 --> 00:27:20,880 So if you were to pull off the ROM, which is an Atmel WEPROM, you could decompile that or disassemble it and it's Z80. 529 00:27:21,120 --> 00:27:23,080 Toss it into IDA Pro and start looking around. 530 00:27:23,700 --> 00:27:23,980 Yeah. 531 00:27:24,520 --> 00:27:30,160 Another interesting thing about the Guardian is there's this cool RJ45 connector on the lower right. 532 00:27:30,500 --> 00:27:37,960 And reading through some of the data sheets available on their website, it had made mention of some test connector, some interface. 533 00:27:38,140 --> 00:27:38,980 So we're like, oh, okay. 534 00:27:38,980 --> 00:27:44,200 Maybe, you know, it says something about having a serial port and having some I2C, which is an interchip communication port. 535 00:27:44,540 --> 00:27:46,620 So we said, oh, maybe we should look at that. 536 00:27:46,820 --> 00:27:47,560 You know, we have the meter. 537 00:27:47,680 --> 00:27:47,980 It's open. 538 00:27:48,060 --> 00:27:48,420 It works. 539 00:27:48,460 --> 00:27:49,240 We might as well look at it. 540 00:27:49,340 --> 00:27:56,580 So we hooked it up to my little lab setup with my digital oscilloscope and some level shifter circuitry. 541 00:27:56,640 --> 00:27:59,280 And we're probing all the different pins trying to figure out what's what. 542 00:27:59,420 --> 00:28:03,500 Because if there's an interchip communication, maybe that's something useful to drive the display. 543 00:28:04,660 --> 00:28:06,640 But more importantly, I wanted to see the serial interface. 544 00:28:06,820 --> 00:28:08,960 If that was the debug port for sucking audit lines. 545 00:28:08,980 --> 00:28:09,280 If that was the log information. 546 00:28:10,020 --> 00:28:12,240 And they had infrared on this particular version. 547 00:28:12,400 --> 00:28:25,520 And what we figured out is that on reset, on power up, the infrared port would spew out a bunch of stuff that also correlated to some data we were seeing over the wire. 548 00:28:25,660 --> 00:28:29,040 So sort of infrared and serial information being set out. 549 00:28:29,180 --> 00:28:30,640 And we tried to probe that for a while. 550 00:28:30,740 --> 00:28:31,580 And we're just kind of playing around. 551 00:28:31,680 --> 00:28:33,660 We didn't exactly figure out how it worked. 552 00:28:33,700 --> 00:28:36,560 But given time, we definitely would have. 553 00:28:36,780 --> 00:28:37,160 Yeah. 554 00:28:37,160 --> 00:28:38,840 It was only mildly interesting. 555 00:28:39,620 --> 00:28:50,700 But just looking at the way that it was designed, we realized that if this was sort of like the parent of the San Francisco meters, then that does not bode well for San Francisco's purchasing decision. 556 00:28:51,460 --> 00:28:51,820 Right. 557 00:28:53,480 --> 00:28:56,200 And then firmware analysis, which we did not do in our case. 558 00:28:56,340 --> 00:29:04,440 But just in general, if you do end up getting access to memory devices or to microprocessors, the first thing you would do is suck all of the data out of them. 559 00:29:04,500 --> 00:29:05,700 Suck all the program code out of them. 560 00:29:05,740 --> 00:29:06,800 And then reverse engineer them. 561 00:29:06,800 --> 00:29:07,420 Decompile them. 562 00:29:07,460 --> 00:29:08,200 Do whatever you need to do. 563 00:29:08,400 --> 00:29:08,600 Right. 564 00:29:08,720 --> 00:29:19,660 So, I mean, if you know the company that's building the system and you understand what compiler they're using, for example, and you toss that into IDA Pro, you can help, like, guide IDA Pro, for example. 565 00:29:19,800 --> 00:29:22,780 That would be pretty useful if you want to use and grep, I guess. 566 00:29:22,880 --> 00:29:24,160 You could also do it that way. 567 00:29:25,000 --> 00:29:26,400 So it would be really useful. 568 00:29:26,520 --> 00:29:34,280 Because maybe there's, like, some particular portion of a problem you want to solve, but you can't figure out the generalized algorithm or you can't figure out, like, exactly what they're doing. 569 00:29:34,280 --> 00:29:37,900 Maybe they have some sort of, like, shift feedback register thing going on. 570 00:29:38,000 --> 00:29:45,520 It would be useful to see the structure of the firmware so that you could better understand what's actually happening without just, you know, doing an intercept. 571 00:29:45,900 --> 00:29:46,260 Yeah. 572 00:29:46,340 --> 00:29:53,440 And you can also target specific areas if you don't want to reverse engineer the whole thing because you just want to get clues or maybe figure out an access point to get to, like, an administrator menu. 573 00:29:53,680 --> 00:30:04,260 But what I like to do, since I'm not the greatest reverse engineer for binaries and for firmware and stuff for source code, I usually run stuff through strings first to see if there's anything wrong. 574 00:30:04,260 --> 00:30:07,080 If there's any, you know, information, any cool constants and texts that are there. 575 00:30:07,220 --> 00:30:08,100 And usually there are. 576 00:30:08,200 --> 00:30:12,500 Because engineers like to leave stuff in that's going to help them, debug messages, stuff like that. 577 00:30:12,780 --> 00:30:14,920 And usually those are left in production products. 578 00:30:16,440 --> 00:30:17,920 And then smart card analysis. 579 00:30:18,300 --> 00:30:22,220 Again, I mentioned in this case if you have an external interface that is a smart card, you would do this. 580 00:30:22,260 --> 00:30:25,160 If you have an external interface for other things, you would analyze those. 581 00:30:25,380 --> 00:30:26,700 This is the process that we went through. 582 00:30:27,700 --> 00:30:28,420 Monitoring communications. 583 00:30:28,820 --> 00:30:31,160 You might want to try to decode the protocols, emulate the protocols. 584 00:30:31,520 --> 00:30:34,240 So one thing that's really good about this is that it's really easy. 585 00:30:34,260 --> 00:30:37,440 One of the things about this is that looking at press releases can be really helpful for this. 586 00:30:37,740 --> 00:30:39,120 Especially when they're from the company. 587 00:30:39,240 --> 00:30:41,620 They'll say something like, it's secure and we use this standard. 588 00:30:42,140 --> 00:30:45,780 So then you go and read that standard and you think to yourself, this isn't secure at all. 589 00:30:46,580 --> 00:30:47,660 And that's really useful. 590 00:30:47,820 --> 00:30:51,560 Especially when you start to do the decoding and you want to do the emulation. 591 00:30:51,720 --> 00:30:53,240 Because you can implement part of the standard. 592 00:30:53,420 --> 00:30:56,460 And then when you've done that, you, of course, know that that is not true, that it is secure. 593 00:30:59,320 --> 00:31:00,740 My coffee is almost working. 594 00:31:01,660 --> 00:31:02,020 Almost. 595 00:31:02,020 --> 00:31:02,720 A few more minutes. 596 00:31:02,920 --> 00:31:04,640 All right. 597 00:31:04,680 --> 00:31:08,960 So now we're going to jump into the case study of the San Francisco MTA. 598 00:31:09,840 --> 00:31:17,480 And the city of San Francisco for a long time has sort of been grasping at straws of what parking infrastructure should we use. 599 00:31:18,080 --> 00:31:21,800 You know, should we use electronic meters, single space meters, should we use multi-space meters. 600 00:31:21,880 --> 00:31:23,340 That's made by a company called Rhino. 601 00:31:24,160 --> 00:31:28,580 The smart card that you see in the single space meter also works in the Rhino. 602 00:31:28,620 --> 00:31:31,580 So there is some modularity there. 603 00:31:32,140 --> 00:31:36,020 This system was essentially a pilot program in 2003. 604 00:31:36,180 --> 00:31:38,920 And it cost $35 million, which we'll get to. 605 00:31:39,160 --> 00:31:43,120 But we should make a disclaimer first about this. 606 00:31:43,500 --> 00:31:43,620 Yeah. 607 00:31:43,620 --> 00:31:45,200 Well, yeah, go ahead. 608 00:31:45,380 --> 00:31:56,960 So first of all, contrary to Wired totally fucking us with the title of their story saying free parking for all, which we expressly told them not to say because we didn't want to end up like the MBTA kids. 609 00:31:58,020 --> 00:32:01,340 We are not trying to get people to defraud the San Francisco parking meters. 610 00:32:01,340 --> 00:32:03,700 The point here is more to undermine its authority. 611 00:32:04,460 --> 00:32:05,940 I think that's much more important. 612 00:32:06,140 --> 00:32:13,680 And we should all do our job to undermine authority wherever we can, especially when it isn't, you know, necessarily duly received. 613 00:32:13,860 --> 00:32:16,220 I mean, San Francisco essentially wants to create revenue here. 614 00:32:16,620 --> 00:32:19,180 I think it's good to put doubt in the perfection of the machine. 615 00:32:19,560 --> 00:32:22,700 I think that when people get parking tickets, you should be able to contest them. 616 00:32:22,820 --> 00:32:27,920 I think that there isn't a God, I can't do it, but I'm going to quote Jean-Luc Picard. 617 00:32:29,020 --> 00:32:30,200 Oh, this is going to be good. 618 00:32:30,200 --> 00:32:32,580 There can be no justice when rules are absolute. 619 00:32:33,980 --> 00:32:34,420 Okay. 620 00:32:34,480 --> 00:32:35,100 It's true. 621 00:32:38,220 --> 00:32:39,260 Machines are not perfect. 622 00:32:39,520 --> 00:32:47,040 And there was a 19th century anarchist who said something along the lines of it is not that I fear that machines will begin to think like men. 623 00:32:47,240 --> 00:32:47,820 No, no. 624 00:32:47,900 --> 00:32:50,920 It is that I fear that men will begin to think like machines. 625 00:32:51,820 --> 00:32:53,840 And we have to fight against that, I think. 626 00:32:53,940 --> 00:32:56,500 So hopefully this is like, you know, chipping away at that. 627 00:32:56,600 --> 00:32:58,680 The one anarchist in the audience represent. 628 00:32:58,680 --> 00:33:05,040 And we are both San Francisco residents and we pay a lot of tax to the city. 629 00:33:05,220 --> 00:33:05,640 Yeah, seriously. 630 00:33:05,920 --> 00:33:12,100 And it's just that it's okay for a city to try to figure out what parking system they want. 631 00:33:12,180 --> 00:33:12,800 And that's fine. 632 00:33:12,860 --> 00:33:15,240 Here's two other parking meters that are available in the city. 633 00:33:15,300 --> 00:33:19,180 This one is a credit card based machine that says the smart cards don't work on them. 634 00:33:20,060 --> 00:33:25,980 It's just our tax dollars are at work and a lot of money is being spent on systems that aren't being analyzed. 635 00:33:26,120 --> 00:33:28,660 Or if they're being analyzed, the problems are just being ignored. 636 00:33:28,680 --> 00:33:33,700 Some tech somewhere in San Francisco, or actually, is there anyone from the city of San Francisco here? 637 00:33:35,160 --> 00:33:37,320 Not where you work for the city of San Francisco. 638 00:33:37,540 --> 00:33:38,600 I'm sure that there are people here. 639 00:33:38,760 --> 00:33:39,420 Do you work for the city? 640 00:33:39,540 --> 00:33:40,680 Do you work for the DPT? 641 00:33:40,940 --> 00:33:41,340 No. 642 00:33:41,480 --> 00:33:42,860 Anybody from the DPT here? 643 00:33:43,300 --> 00:33:43,840 You are. 644 00:33:44,300 --> 00:33:48,840 I used to be out of Berkeley's IT department and saw their DPT stuff. 645 00:33:49,740 --> 00:33:51,860 Yeah, so somebody here from the Bay Area. 646 00:33:52,180 --> 00:33:52,320 Cool. 647 00:33:52,580 --> 00:33:56,780 Yeah, so as Jake mentioned, this, the meter that we're looking at, the McKay Guardian XLE, 648 00:33:56,780 --> 00:34:02,760 there's 23,000 of them in the city that replaced mechanical meters in 2002 as a pilot program. 649 00:34:03,000 --> 00:34:05,140 A 35 million dollar pilot program. 650 00:34:05,780 --> 00:34:08,660 And to me, a pilot is like a test, right? 651 00:34:08,680 --> 00:34:09,200 It's like an evaluation. 652 00:34:11,060 --> 00:34:14,620 It's 2009 and they're still evaluating a system. 653 00:34:16,100 --> 00:34:22,720 And 35 million dollars to do an attack like we did, which is very, very easy as you'll see, 654 00:34:23,420 --> 00:34:25,080 it shouldn't be possible. 655 00:34:25,080 --> 00:34:28,820 And it blows my mind how much money they spent on this. 656 00:34:28,880 --> 00:34:32,980 So I'm a little conflicted about, I mean, so in general, I think that this kind of disclosure 657 00:34:32,980 --> 00:34:34,900 is good so we can influence social policy. 658 00:34:35,040 --> 00:34:37,100 We hope that we can get some of these things to change. 659 00:34:37,940 --> 00:34:43,140 San Francisco wants to install 320,000 of these meters in all of the residential areas 660 00:34:43,140 --> 00:34:44,000 of all of the city. 661 00:34:44,120 --> 00:34:47,500 They think that it will improve, for example, the environment because people won't have 662 00:34:47,500 --> 00:34:48,120 to double park. 663 00:34:49,180 --> 00:34:51,420 Which sounds like newspeak to me. 664 00:34:51,860 --> 00:34:54,960 But I think before they go and spend 320,000. 665 00:34:56,120 --> 00:35:00,540 Worth of parking meters, worth of money, I think that maybe we should like question 666 00:35:00,540 --> 00:35:02,160 that that's a good idea in the first place. 667 00:35:02,260 --> 00:35:04,340 If they want revenue, they should be up front about it. 668 00:35:04,400 --> 00:35:08,400 They should say this is the true cost of having a car in the city instead of actually 669 00:35:08,400 --> 00:35:09,360 inconveniencing everyone. 670 00:35:09,560 --> 00:35:12,040 Because what will happen is they'll become reliant on the smart card infrastructure, 671 00:35:12,240 --> 00:35:13,380 which is thoroughly broken. 672 00:35:14,020 --> 00:35:16,400 And, I mean, what are you going to do when you're at home? 673 00:35:16,480 --> 00:35:17,960 You're going to go get a roll of quarters? 674 00:35:18,140 --> 00:35:20,260 I mean, that doesn't scale for an entire city, right? 675 00:35:20,380 --> 00:35:20,620 So. 676 00:35:22,360 --> 00:35:24,020 There are definitely some social problems. 677 00:35:24,020 --> 00:35:27,560 San Francisco uses the McKay Guardian XLE meter. 678 00:35:27,680 --> 00:35:31,500 So if you've got a web browser in front of you and you're on the Internet here, you can look 679 00:35:31,500 --> 00:35:32,260 that up right now. 680 00:35:32,420 --> 00:35:36,200 Yeah, there's plenty of information out there about meters because manufacturers want 681 00:35:36,940 --> 00:35:38,580 designers and implementers to use their stuff. 682 00:35:38,720 --> 00:35:39,880 So they make a lot of information available. 683 00:35:40,240 --> 00:35:45,660 So the way the system works is the smart card interface, the city uses a stored value smart 684 00:35:45,660 --> 00:35:45,980 card. 685 00:35:46,280 --> 00:35:48,040 They come in $20 and $50 quantities. 686 00:35:48,260 --> 00:35:51,580 You buy them in cash at certain places around the city. 687 00:35:51,660 --> 00:35:53,280 Or you use a credit card online. 688 00:35:53,560 --> 00:35:54,000 Right. 689 00:35:54,020 --> 00:35:57,760 Once you deduct credit, you put the card into the meter. 690 00:35:57,940 --> 00:36:00,780 The meter displays the value remaining on the card. 691 00:36:00,940 --> 00:36:04,300 And then after a few seconds, it starts deducting units. 692 00:36:04,560 --> 00:36:06,240 Like you're putting quarters into the meter. 693 00:36:06,920 --> 00:36:10,500 Once the value is depleted on the card, it's not reloadable. 694 00:36:10,660 --> 00:36:11,440 It's a one-time thing. 695 00:36:11,500 --> 00:36:12,000 You throw it away. 696 00:36:12,980 --> 00:36:18,580 And the research, as you'll see starting right now, is it's easy to replay the smart card 697 00:36:18,580 --> 00:36:18,960 transaction. 698 00:36:19,200 --> 00:36:24,000 So even without knowing anything about how it works, you can replay the entire smart card 699 00:36:24,000 --> 00:36:26,360 transaction to the parking meter and emulate a card. 700 00:36:27,000 --> 00:36:30,380 But then you can also modify certain data to do cooler things. 701 00:36:30,920 --> 00:36:35,940 And we did this solely by looking at captures of an oscilloscope screen, a digital oscilloscope 702 00:36:35,940 --> 00:36:41,460 screen, and then analyzing data on a piece of paper over the course of three days. 703 00:36:41,840 --> 00:36:46,400 Basically, a scope, pencil, and paper are all you needed to break the San Francisco 704 00:36:46,400 --> 00:36:47,100 smart card implementation. 705 00:36:47,580 --> 00:36:47,780 Yeah. 706 00:36:47,800 --> 00:36:50,120 And it was interesting because I'd never worked with smart cards before. 707 00:36:50,200 --> 00:36:53,000 I kind of dabbled with them but not really looked at them in detail. 708 00:36:53,000 --> 00:36:54,440 So it was a fun exercise to do that. 709 00:36:54,760 --> 00:36:57,440 And sort of we came out of it saying, wow, that was kind of easy. 710 00:36:57,560 --> 00:36:58,600 And it shouldn't be that easy. 711 00:36:58,780 --> 00:37:00,180 I worked a little bit with Moxie. 712 00:37:00,200 --> 00:37:02,840 You probably saw his SSL talk on some smart card stuff. 713 00:37:03,140 --> 00:37:03,880 And so I had some. 714 00:37:04,780 --> 00:37:06,680 I was a little familiar with smart cards. 715 00:37:06,740 --> 00:37:08,600 But just in general, like I hadn't gone in this deep. 716 00:37:09,120 --> 00:37:15,500 And what actually prompted me to be interested in this is I saw this guy from the DPT who had 717 00:37:15,500 --> 00:37:17,640 opened up one of the Rhino multispace meters. 718 00:37:17,780 --> 00:37:19,180 And inside of it was like a circuit board. 719 00:37:19,260 --> 00:37:20,320 I didn't describe this as a black hat. 720 00:37:20,400 --> 00:37:21,780 But basically, it's a small embedded computer. 721 00:37:23,000 --> 00:37:27,580 It has like an SD card in it, which looks like it has several hundred megabytes of space. 722 00:37:28,060 --> 00:37:31,320 And I just asked him questions like, wow, you know, I've always wanted to work with computers. 723 00:37:31,440 --> 00:37:31,860 What's that like? 724 00:37:34,840 --> 00:37:37,120 And the guy was like, well, you know, it's a great job. 725 00:37:37,580 --> 00:37:39,500 You know, the city is really great. 726 00:37:39,760 --> 00:37:41,160 And, you know, they treat you well. 727 00:37:41,220 --> 00:37:42,100 We talked for a while. 728 00:37:42,220 --> 00:37:44,800 I asked him questions like, so can I like pay with my cell phone? 729 00:37:44,880 --> 00:37:48,600 I just got one of those wireless telephones so that I can talk to my girlfriend. 730 00:37:50,200 --> 00:37:51,620 And he's like, no, no, can't pay. 731 00:37:51,900 --> 00:37:52,880 Can't pay that way. 732 00:37:53,000 --> 00:37:53,800 You know, these are all disconnected. 733 00:37:54,020 --> 00:37:58,420 So like just in the course of like a five-minute conversation where I'm holding my backpack over my 2600 shirt, 734 00:38:01,140 --> 00:38:03,900 you know, the guy like explained to me everything I needed to know. 735 00:38:03,960 --> 00:38:05,620 It's an offline stored payment system. 736 00:38:05,740 --> 00:38:07,220 And it's not hooked up to the Internet. 737 00:38:07,340 --> 00:38:08,060 They don't do any verification. 738 00:38:08,380 --> 00:38:09,700 They probably don't do any fraud detection. 739 00:38:09,840 --> 00:38:12,180 If they do, they probably do it badly in a way where you can frame someone. 740 00:38:12,300 --> 00:38:15,780 They don't have any actual cryptographic solutions that you'd need to solve. 741 00:38:15,840 --> 00:38:16,880 They'd probably replay it, et cetera. 742 00:38:17,080 --> 00:38:18,680 And the guy didn't realize he was telling me that. 743 00:38:18,760 --> 00:38:22,760 But he was also giving me a job offer at the same time, which was hilarious because they're trying to protect against insider attacks. 744 00:38:25,320 --> 00:38:27,580 So I'm just going to jump back for one second. 745 00:38:27,660 --> 00:38:28,420 We mentioned this already. 746 00:38:28,640 --> 00:38:33,080 You know, the goals of this work weren't to slam San Francisco and get free parking. 747 00:38:33,540 --> 00:38:35,540 We really want to share the process with everybody. 748 00:38:36,720 --> 00:38:38,720 We have released code. 749 00:38:39,300 --> 00:38:43,660 But the code is essentially a template for how our smart card emulator worked. 750 00:38:43,840 --> 00:38:48,380 I removed all of the bytes of data that you could use to get free parking in San Francisco. 751 00:38:48,520 --> 00:38:51,780 So anybody who's in the media who's writing about this. 752 00:38:53,040 --> 00:38:54,860 The code is essentially useless. 753 00:38:55,360 --> 00:38:57,980 Unless you're curious about how smart card emulators work. 754 00:38:58,160 --> 00:38:59,240 I changed all the bytes to FF. 755 00:38:59,600 --> 00:39:02,380 It's purely for educational purposes and that's why we're here. 756 00:39:03,040 --> 00:39:03,360 Right. 757 00:39:04,000 --> 00:39:06,080 So some other things with information gathering. 758 00:39:06,540 --> 00:39:07,880 The Internet was sort of useful. 759 00:39:08,280 --> 00:39:09,480 Sometimes a useful tool. 760 00:39:09,740 --> 00:39:09,960 Yeah. 761 00:39:10,240 --> 00:39:14,140 I really recommend the airplane method of reconnaissance. 762 00:39:14,660 --> 00:39:18,900 Which is that you set WGET to run and then you get on an airplane. 763 00:39:19,620 --> 00:39:21,100 And then you just come back and read it later. 764 00:39:21,100 --> 00:39:22,060 That's all that matters. 765 00:39:22,160 --> 00:39:23,080 If you do that, you'll be good. 766 00:39:23,260 --> 00:39:24,240 You'll be totally good. 767 00:39:24,340 --> 00:39:24,760 Surprisingly. 768 00:39:27,780 --> 00:39:28,620 So yeah. 769 00:39:28,740 --> 00:39:33,800 The one kind of fun thing here is, you know, you would obviously search for product specs and press releases. 770 00:39:34,220 --> 00:39:36,720 But you might also want to think about discussion forums. 771 00:39:37,020 --> 00:39:41,820 Maybe the company is having technical troubles with a certain portion of their design. 772 00:39:42,100 --> 00:39:43,460 Do you think they have technical troubles, Joe? 773 00:39:43,580 --> 00:39:44,500 I'm just not sure. 774 00:39:44,620 --> 00:39:45,200 I think they do. 775 00:39:45,340 --> 00:39:46,380 Or at least they did. 776 00:39:47,060 --> 00:39:51,040 And this was a post that we found on a SIGWIN mailing list. 777 00:39:51,640 --> 00:39:57,240 About some technical problems that one of the software designers were having with his implementation of CVS. 778 00:39:57,400 --> 00:39:58,260 You should definitely read that. 779 00:39:58,300 --> 00:39:59,240 It's a little small maybe. 780 00:39:59,440 --> 00:39:59,680 Okay. 781 00:39:59,740 --> 00:40:00,140 Yeah. 782 00:40:00,140 --> 00:40:00,600 It's a little small. 783 00:40:00,680 --> 00:40:02,660 So it says, it's 2001. 784 00:40:02,840 --> 00:40:04,700 It says, I'm learning how to use CVS. 785 00:40:04,720 --> 00:40:08,020 And as part of this process, I set up a test repository. 786 00:40:08,400 --> 00:40:09,900 I almost said suppository. 787 00:40:10,040 --> 00:40:10,660 To play with. 788 00:40:10,720 --> 00:40:12,820 A test repository to play with. 789 00:40:13,120 --> 00:40:13,640 It's great. 790 00:40:13,780 --> 00:40:17,140 It's 2001 and he's learning CVS. 791 00:40:17,720 --> 00:40:18,020 Ouch. 792 00:40:18,320 --> 00:40:20,080 So but there's some interesting clues here. 793 00:40:21,560 --> 00:40:25,240 If you maybe can't really see the paths, but there's some stuff in there. 794 00:40:25,320 --> 00:40:25,940 JJ McKay. 795 00:40:26,000 --> 00:40:28,180 So it's obviously a McKay designer. 796 00:40:28,720 --> 00:40:37,240 Met Talk is an interface that's used and described in some of McKay's documentation about some communications interface. 797 00:40:37,660 --> 00:40:39,720 There's the Gemplus lib path. 798 00:40:39,960 --> 00:40:42,460 So now we know they're using some Gemplus-based smart card. 799 00:40:43,000 --> 00:40:45,680 And we realize they're using GDB and GCC. 800 00:40:45,840 --> 00:40:50,060 So that gives us clues maybe if we need to reverse engineer firmware or try to disable it. 801 00:40:50,060 --> 00:40:50,540 Or try to disassemble stuff. 802 00:40:53,560 --> 00:40:57,360 So here's Chris Tarnofsky's few slides. 803 00:40:58,040 --> 00:40:59,320 Hi, my name is Chris Tarnofsky. 804 00:40:59,440 --> 00:41:01,720 I reverse engineer silicon dies. 805 00:41:01,900 --> 00:41:03,280 What we did is. 806 00:41:03,740 --> 00:41:04,320 I'm the other Chris. 807 00:41:04,460 --> 00:41:04,700 Yeah. 808 00:41:05,080 --> 00:41:05,800 So no. 809 00:41:05,900 --> 00:41:06,300 What we did. 810 00:41:06,520 --> 00:41:07,700 We have to go really fast now. 811 00:41:07,880 --> 00:41:08,020 Yeah. 812 00:41:08,040 --> 00:41:09,080 We have to go really, really fast. 813 00:41:09,840 --> 00:41:15,840 I bought 20 or 10 stored value $20 smart cards. 814 00:41:17,060 --> 00:41:20,320 And went to send them to Chris to do some dialysis on. 815 00:41:20,940 --> 00:41:21,980 And when I went into the store. 816 00:41:22,060 --> 00:41:24,760 I go to the same place all the time when I go and buy my parking cards. 817 00:41:25,320 --> 00:41:27,480 So when I had to buy 10, I was like, I don't know. 818 00:41:27,580 --> 00:41:28,240 A little bit paranoid. 819 00:41:28,640 --> 00:41:29,560 Decided to go somewhere else. 820 00:41:29,620 --> 00:41:31,760 And I walk in with my $200 in cash. 821 00:41:32,960 --> 00:41:34,180 And I go up to the guy. 822 00:41:34,200 --> 00:41:36,740 I'm like, yeah, I want to buy 10 smart cards. 823 00:41:37,620 --> 00:41:38,420 And he looks at me. 824 00:41:38,460 --> 00:41:39,440 He's like, why do you need 10? 825 00:41:40,080 --> 00:41:41,460 And I said, oh, I'm a sales guy. 826 00:41:41,560 --> 00:41:42,700 I use the car a lot. 827 00:41:42,740 --> 00:41:43,420 I drive around a lot. 828 00:41:43,500 --> 00:41:44,100 He's like, oh, yeah. 829 00:41:44,100 --> 00:41:44,640 OK. 830 00:41:44,920 --> 00:41:46,120 And then he gives me the smart card. 831 00:41:46,340 --> 00:41:50,140 And of course, one of the things to note is sequential serial numbers on the back of the car. 832 00:41:50,300 --> 00:41:50,440 Yeah. 833 00:41:50,480 --> 00:41:52,940 They were all sequential serial numbers, which is useful for analysis. 834 00:41:53,160 --> 00:41:56,840 But I felt pretty good about myself for that quick little social engineering thing. 835 00:41:56,920 --> 00:41:57,980 You're a regular Kevin Mitnick. 836 00:41:58,020 --> 00:42:00,380 Because as you probably noticed, I smile a lot. 837 00:42:00,640 --> 00:42:03,380 So I don't know if he was like, I don't know. 838 00:42:03,460 --> 00:42:04,320 He believed me, though. 839 00:42:04,360 --> 00:42:04,820 It was kind of cool. 840 00:42:05,620 --> 00:42:06,660 I'm no Kevin Mitnick. 841 00:42:06,840 --> 00:42:09,980 So Chris is totally badass at hardware hacking. 842 00:42:10,140 --> 00:42:14,080 And he just decapped all of the chips in there. 843 00:42:14,100 --> 00:42:15,500 And then imaged them for us, basically. 844 00:42:15,800 --> 00:42:16,120 Oh, yeah. 845 00:42:16,140 --> 00:42:16,560 I just realized. 846 00:42:16,620 --> 00:42:17,380 We have like 10 minutes. 847 00:42:17,580 --> 00:42:18,020 OK. 848 00:42:18,160 --> 00:42:21,280 So he decapped the cards with this process that he would discuss if he was here. 849 00:42:22,000 --> 00:42:27,420 It turns out that there's two different types of smart cards that's indistinguishable to the end user. 850 00:42:27,880 --> 00:42:32,320 But one of them is the basic Gem Club memo card. 851 00:42:32,460 --> 00:42:35,180 So it's a fixed ASIC ROM that can't be changed. 852 00:42:35,380 --> 00:42:42,400 And then future versions of the card are an 8051 microcontroller emulating the Gem Club memo stuff. 853 00:42:42,400 --> 00:42:45,760 Which is cool because now those cards can be reprogrammed. 854 00:42:46,240 --> 00:42:47,220 We didn't do that. 855 00:42:47,380 --> 00:42:49,100 But they're more general purpose. 856 00:42:49,280 --> 00:42:52,880 So they could be changed and not have to create an entirely new die. 857 00:42:53,260 --> 00:42:57,060 So general purpose one, of course, is nice because that means it has some firmware. 858 00:42:57,240 --> 00:42:58,600 And you could potentially dump the firmware. 859 00:42:58,740 --> 00:43:04,800 So in theory, even if they outlawed the rest of the smart card industry, their own system itself can probably be used against itself. 860 00:43:04,960 --> 00:43:05,600 And these are the die. 861 00:43:05,920 --> 00:43:07,540 So on the left is the ASIC. 862 00:43:07,560 --> 00:43:09,060 On the right is the general purpose one, I think. 863 00:43:09,080 --> 00:43:09,320 Yeah. 864 00:43:09,460 --> 00:43:12,680 So I'm going to skip some of this. 865 00:43:12,760 --> 00:43:18,420 The card is based on the ISO 7816 standard, which means a lot of the electrical interfaces are known. 866 00:43:19,500 --> 00:43:22,080 There's two different types of transmission protocols for 7816. 867 00:43:22,320 --> 00:43:22,980 One is asynchronous. 868 00:43:23,180 --> 00:43:23,620 One is synchronous. 869 00:43:24,080 --> 00:43:25,680 The card we're looking at is asynchronous. 870 00:43:25,800 --> 00:43:27,160 There's no external clock needed. 871 00:43:28,180 --> 00:43:30,740 So the data transfer is on one line. 872 00:43:31,400 --> 00:43:32,900 And we can capture that. 873 00:43:33,560 --> 00:43:34,260 And we did. 874 00:43:34,380 --> 00:43:36,620 And the way we did it is we used a smart card shim. 875 00:43:36,740 --> 00:43:39,440 So we had a circuit board that we purchased from one of the companies. 876 00:43:39,460 --> 00:43:49,400 One of the many kind of satellite TV smart card hacking sites that are out there that we'd plug the smart card in on one side, have a bunch of test points that we could connect to our oscilloscope. 877 00:43:49,580 --> 00:43:55,540 And then there is a smart card pad on the other side of the shim that plugs into the meter. 878 00:43:55,640 --> 00:43:58,920 So now we can monitor the communications while the communications are actually happening. 879 00:43:59,100 --> 00:44:00,260 And there's a kind of funny story here. 880 00:44:00,400 --> 00:44:01,840 So you'll note that that's a shim. 881 00:44:01,880 --> 00:44:03,000 That's an SFMTA card. 882 00:44:03,720 --> 00:44:08,640 If you're ever going to break a law or do anything kind of weird or even something kind of sketchy in San Francisco, 883 00:44:08,640 --> 00:44:13,340 there's one excuse that you can always use that will get you away with everything, which is that it's for your art project. 884 00:44:14,180 --> 00:44:14,540 Yeah. 885 00:44:14,640 --> 00:44:16,260 So this is our art project. 886 00:44:16,740 --> 00:44:18,480 We just wanted to show you our art project. 887 00:44:18,720 --> 00:44:20,220 You can walk up to a parking meter. 888 00:44:20,440 --> 00:44:22,520 I mean you can do anything in San Francisco pretty much anyway. 889 00:44:22,640 --> 00:44:26,020 But you can walk up to a parking meter with whatever tools you need and no one is going to care at all. 890 00:44:26,160 --> 00:44:33,840 So it's a parking meter also so you can park in front of your target and run a wire like with your, say, AC inverter from your car to your oscilloscope. 891 00:44:33,920 --> 00:44:36,700 And then just go on up with your art project and you're just making art. 892 00:44:36,940 --> 00:44:36,980 All right. 893 00:44:37,040 --> 00:44:37,400 So. 894 00:44:38,640 --> 00:44:40,500 I'm going to document the whole process with my camera because it's art. 895 00:44:40,640 --> 00:44:40,960 Right. 896 00:44:41,720 --> 00:44:43,060 Which I did not do. 897 00:44:43,140 --> 00:44:45,420 I don't have pictures for anybody who's considering rating us. 898 00:44:46,760 --> 00:44:47,800 Anyway, so here's. 899 00:44:47,800 --> 00:44:48,500 Please don't rate us. 900 00:44:48,580 --> 00:44:49,700 We don't have anything interesting. 901 00:44:49,740 --> 00:44:50,700 We're telling you everything we've got. 902 00:44:50,700 --> 00:44:51,060 Everything, yeah. 903 00:44:51,780 --> 00:44:53,680 Except the actual details which we're going to tell the city. 904 00:44:53,980 --> 00:44:57,020 So this is a screenshot of the digital oscilloscope. 905 00:44:57,220 --> 00:44:59,260 The first thing we did is just see if we could monitor communications. 906 00:45:00,100 --> 00:45:05,020 And we know that smart cards always respond after reset with an ATR, a 4-byte ATR. 907 00:45:05,080 --> 00:45:06,340 So that's how we could figure out. 908 00:45:06,400 --> 00:45:08,240 We could just guess on the baud rate. 909 00:45:08,240 --> 00:45:13,600 And on the various configuration settings until we got a clean serial data that was decoded by the oscilloscope. 910 00:45:15,080 --> 00:45:15,960 We got to roll. 911 00:45:16,160 --> 00:45:16,600 Yeah. 912 00:45:16,600 --> 00:45:16,720 I know. 913 00:45:16,720 --> 00:45:17,960 We got to get to the money shot. 914 00:45:18,160 --> 00:45:25,400 So once we could monitor the communications, what we did is we captured a bunch of different transactions. 915 00:45:25,640 --> 00:45:29,900 We had a lot of different cards with different values to capture a bunch of data. 916 00:45:30,440 --> 00:45:37,000 And then we brought all that data back to my house and sat there offline and just analyzed all the different data. 917 00:45:37,000 --> 00:45:38,840 Figured out what changed based on different values. 918 00:45:39,000 --> 00:45:41,860 Figured out the initialization and how everything worked. 919 00:45:42,000 --> 00:45:42,900 And it was all done by hand. 920 00:45:43,020 --> 00:45:43,740 No computer needed. 921 00:45:43,960 --> 00:45:44,640 So here's the deal. 922 00:45:44,900 --> 00:45:45,860 Watch this setup. 923 00:45:47,180 --> 00:45:49,180 What's wrong with this right here, right? 924 00:45:49,680 --> 00:45:53,280 Do you spot the protocol bug where it might be a bad thing? 925 00:45:55,180 --> 00:45:56,880 Password okay maybe. 926 00:45:57,280 --> 00:45:58,800 And then what? 927 00:45:58,880 --> 00:45:59,340 What's that? 928 00:45:59,500 --> 00:46:00,660 You read the balance? 929 00:46:00,740 --> 00:46:00,940 Yeah. 930 00:46:00,940 --> 00:46:02,300 We'll go quick here. 931 00:46:02,460 --> 00:46:05,100 So there's some initialization stuff that always happens when you put the card in. 932 00:46:05,160 --> 00:46:05,820 It sends some stuff. 933 00:46:05,820 --> 00:46:07,140 Serial number, which could be useful. 934 00:46:07,280 --> 00:46:12,900 Some unknown value sent by the card to the meter that the meter then processes in some way and sends back and says, 935 00:46:13,680 --> 00:46:16,040 Here's the password to you, smart card. 936 00:46:16,140 --> 00:46:18,080 And the smart card says, yes, that's my password. 937 00:46:18,320 --> 00:46:19,560 You can work with me now. 938 00:46:22,260 --> 00:46:23,700 Does that sound like a good idea? 939 00:46:25,500 --> 00:46:29,400 It kind of sounds like a good idea to me if I'm not the one building these things. 940 00:46:29,400 --> 00:46:31,800 We capture one set and we have it and we're fine. 941 00:46:32,560 --> 00:46:35,120 But the way that the meter figures out the balance is it reads, 942 00:46:35,820 --> 00:46:38,540 This value that I call balance 2 from the smart card. 943 00:46:38,700 --> 00:46:41,160 And that's a fixed value based on the value of the card. 944 00:46:41,220 --> 00:46:45,120 So a $20 card is F0AF and F127 for a $50 card. 945 00:46:46,500 --> 00:46:51,860 When you deduct a single unit, what happens is there's just this transaction that happens. 946 00:46:52,080 --> 00:46:55,600 It doesn't affect the actual balance 2, which stays the same. 947 00:46:55,760 --> 00:47:00,760 It just does sort of a null transaction, which increments this thing called a transaction counter. 948 00:47:00,980 --> 00:47:05,800 And the transaction counter is the only thing that changes on the smart card during the entire process. 949 00:47:05,820 --> 00:47:09,280 And that's what's used to count how many units have been deducted. 950 00:47:09,280 --> 00:47:10,480 It's how many units have been used. 951 00:47:11,340 --> 00:47:16,500 So that value of the maximum balance 2 minus 95 decimal is the maximum card value. 952 00:47:16,620 --> 00:47:20,740 And then you would subtract the transaction counter to figure out how much money you have left. 953 00:47:21,060 --> 00:47:23,420 Survey, who thinks this is a good idea? 954 00:47:24,940 --> 00:47:28,260 Not just the okay part, but the stored value where it's... 955 00:47:28,260 --> 00:47:31,140 What would happen if you were to change those values, though? 956 00:47:31,420 --> 00:47:35,560 Yeah, let's try to change the balance 2 to say it has more money than it does. 957 00:47:37,420 --> 00:47:41,220 So once we capture all the data, the first thing we did was, okay, let's just do a standard replay attack. 958 00:47:41,600 --> 00:47:43,560 You know, we'll use a legitimate card that we bought. 959 00:47:44,280 --> 00:47:44,840 Let's use that. 960 00:47:44,980 --> 00:47:45,660 So we did that. 961 00:47:45,800 --> 00:47:47,840 I built up some circuitry with a microchip pick. 962 00:47:48,000 --> 00:47:50,180 And we'll show you some pictures of the progress in a few slides. 963 00:47:50,320 --> 00:47:52,280 But I used a microchip pick, wrote the stuff in C. 964 00:47:53,080 --> 00:47:55,820 And there's a little bit of code on there, but you go to the website and get the rest of it. 965 00:47:56,440 --> 00:47:59,860 So once we knew the replay attack worked, we said, okay, let's change the values. 966 00:48:00,000 --> 00:48:00,780 Let's change the balance. 967 00:48:01,140 --> 00:48:01,900 Let's see what happens. 968 00:48:01,980 --> 00:48:03,900 Could it really have 4,000 units? 969 00:48:05,820 --> 00:48:07,820 Not that they sell a 4,000-unit card. 970 00:48:07,920 --> 00:48:08,500 Yeah, but let's try. 971 00:48:08,780 --> 00:48:13,040 And then we also modified the code so the transaction counter would never increment. 972 00:48:13,240 --> 00:48:15,900 So your value would always stay at the maximum. 973 00:48:16,080 --> 00:48:20,500 So this is automatically refilling itself every time you take it out of the meter. 974 00:48:20,500 --> 00:48:21,240 Right, because it resets. 975 00:48:21,420 --> 00:48:22,460 Because it resets itself, right. 976 00:48:22,500 --> 00:48:33,960 And then unbeknownst to me until when I was close to being done is that satellite TV hackers who have existed for a long time, decades, or at least over 10 years, 977 00:48:34,640 --> 00:48:35,800 like using microchips. 978 00:48:35,820 --> 00:48:41,040 So it just happened that the microchip pick device I used existed in a smart card form already. 979 00:48:41,240 --> 00:48:45,880 So I could get blank smart cards, program them with my code, and it would work. 980 00:48:46,100 --> 00:48:47,720 So the first one you see the shim. 981 00:48:47,840 --> 00:48:48,700 You see the evolution. 982 00:48:49,020 --> 00:48:50,340 Okay, first one on the sketch. 983 00:48:50,620 --> 00:48:53,440 If you think about like a threshold, a sketch hold, right? 984 00:48:54,140 --> 00:48:54,540 Okay. 985 00:48:54,700 --> 00:49:00,400 You've got a sketch hold of really sketch where you have Joe's actual last name logo for the board. 986 00:49:00,400 --> 00:49:00,860 There's a G on there. 987 00:49:01,000 --> 00:49:03,600 And then you go all the way to the right where you just have a normal smart card. 988 00:49:03,660 --> 00:49:04,480 It looks like everything else. 989 00:49:04,700 --> 00:49:04,800 Yeah. 990 00:49:05,820 --> 00:49:06,160 So here's what happens. 991 00:49:06,320 --> 00:49:06,840 Here's the results. 992 00:49:09,380 --> 00:49:22,040 And for those that can't see, for those that can't see, the meter has just read the value of the smart card and thinks it has $999.99. 993 00:49:22,620 --> 00:49:27,820 We removed the card before it started deducting value, the city of San Francisco. 994 00:49:28,600 --> 00:49:29,000 Yes. 995 00:49:29,540 --> 00:49:35,460 If you're interested in projects like this and you live in San Francisco, you should come down to the Hack Lab, Noisebridge, noisebridge.net. 996 00:49:35,460 --> 00:49:36,900 And we work on some stuff like this. 997 00:49:37,080 --> 00:49:40,980 And we do need to mention that we intentionally did not contact the city before this research. 998 00:49:41,200 --> 00:49:45,680 First of all, because we didn't want to encounter the same problem that the MBTA guys did last year. 999 00:49:45,780 --> 00:49:49,500 But also because we intentionally didn't release the information that could cause them harm. 1000 00:49:49,680 --> 00:49:52,920 But we're reaching out to them now and we're trying to give them all the information. 1001 00:49:53,260 --> 00:49:55,460 So here's some fixes that you could have. 1002 00:49:56,380 --> 00:49:58,800 Really good luck with that. 1003 00:49:59,180 --> 00:50:01,700 It's very hard on standalone systems. 1004 00:50:01,840 --> 00:50:04,260 It's very hard to do any proper cryptographic communications. 1005 00:50:04,260 --> 00:50:05,820 But you can look through these. 1006 00:50:06,880 --> 00:50:10,260 The slides are on the DEF CON CD so you can browse through them. 1007 00:50:10,360 --> 00:50:11,980 But it's a very hard problem to solve. 1008 00:50:12,160 --> 00:50:15,360 Just to be real quick because we have basically one minute. 1009 00:50:16,360 --> 00:50:19,400 These meter companies have basically created an e-cache system. 1010 00:50:19,860 --> 00:50:21,320 But they didn't do it right. 1011 00:50:21,580 --> 00:50:23,740 They didn't take into account the privacy implications. 1012 00:50:24,100 --> 00:50:26,060 And they didn't take into account the fraud issues. 1013 00:50:26,440 --> 00:50:32,120 Dr. David Chom actually solved basically all of these problems over a decade ago working on anonymous e-cache. 1014 00:50:32,120 --> 00:50:36,880 So really they should be thinking about Chom's work and they should be reimplementing that. 1015 00:50:38,500 --> 00:50:39,440 So that's it. 1016 00:50:39,480 --> 00:50:40,320 These are our final thoughts. 1017 00:50:40,380 --> 00:50:40,880 You can read. 1018 00:50:41,020 --> 00:50:43,440 You can really ride a bicycle I guess to avoid this. 1019 00:50:44,220 --> 00:50:49,600 Also before you go, we'd really like to emphasize that people should join the EFF. 1020 00:50:49,920 --> 00:50:54,380 Jennifer Granik really helped us out and gave us advice that made us feel safe about giving this talk. 1021 00:50:55,240 --> 00:50:57,300 And if you're not a member, you should join. 1022 00:50:57,460 --> 00:50:57,860 Yes. 1023 00:50:57,860 --> 00:51:00,620 And we're going to be dragged off to some extra room if you have questions. 1024 00:51:00,860 --> 00:51:01,660 Thanks guys.