1 00:00:00,000 --> 00:00:00,580 Welcome. 2 00:00:00,580 --> 00:00:01,580 Thank you for coming. 3 00:00:01,640 --> 00:00:07,320 So it turns out these are our presentation screens or whatever. 4 00:00:07,760 --> 00:00:10,300 This is a pretty graphically heavy talk. 5 00:00:10,300 --> 00:00:13,740 So if you want to actually see what we're talking about, you might want to move up. 6 00:00:14,020 --> 00:00:16,160 If you don't want to get too close to us, that's okay. 7 00:00:16,160 --> 00:00:17,260 This is being recorded. 8 00:00:17,260 --> 00:00:18,300 It's being live streamed. 9 00:00:18,300 --> 00:00:19,480 Also, hello, internet. 10 00:00:20,580 --> 00:00:25,720 But a lot of we're showing some code and we're showing some stuff on there, and it's basically going to be impossible. 11 00:00:26,060 --> 00:00:28,680 I don't even know what we're going to see on here. 12 00:00:28,680 --> 00:00:29,980 So anyway, thank you for coming. 13 00:00:30,000 --> 00:00:31,060 Yeah, move up. 14 00:00:31,060 --> 00:00:31,380 Move up. 15 00:00:31,380 --> 00:00:31,700 Come on. 16 00:00:31,700 --> 00:00:33,480 I feel like I'm like a rock star. 17 00:00:33,480 --> 00:00:34,720 It's like, come on, move up. 18 00:00:34,720 --> 00:00:35,480 Come on. 19 00:00:35,640 --> 00:00:36,820 Close the pit. 20 00:00:38,080 --> 00:00:38,700 Yeah. 21 00:00:39,100 --> 00:00:39,600 Cool. 22 00:00:39,600 --> 00:00:40,640 Oh, is this? 23 00:00:40,660 --> 00:00:40,880 Okay. 24 00:00:40,880 --> 00:00:41,780 This is actually water. 25 00:00:41,780 --> 00:00:43,620 So DEF CON is not going to poison me. 26 00:00:44,200 --> 00:00:45,460 Are we doing this now? 27 00:00:45,460 --> 00:00:46,300 Like while? 28 00:00:47,460 --> 00:00:48,420 Is this recording? 29 00:00:48,420 --> 00:00:50,220 Yeah, this better be. 30 00:00:51,100 --> 00:00:51,800 No, it's all. 31 00:00:51,800 --> 00:00:52,760 Is this recording? 32 00:00:53,580 --> 00:00:54,020 Yeah. 33 00:00:54,020 --> 00:00:54,620 Okay. 34 00:00:54,660 --> 00:00:55,720 Can we do it anyway? 35 00:00:56,180 --> 00:00:56,820 Okay. 36 00:00:56,820 --> 00:00:59,160 Not allowed to drink on camera or something. 37 00:00:59,160 --> 00:00:59,500 Okay. 38 00:00:59,500 --> 00:01:00,920 Here, you do your thing. 39 00:01:02,380 --> 00:01:03,520 I haven't done it. 40 00:01:04,000 --> 00:01:04,580 Okay. 41 00:01:04,580 --> 00:01:07,620 So you don't want to explain the whole like. 42 00:01:07,900 --> 00:01:14,680 So DEF CON has a history of new people doing speakers and doing a shot when they do that. 43 00:01:14,960 --> 00:01:16,080 So this is a new speaker. 44 00:01:16,080 --> 00:01:17,140 So we're going to do a shot. 45 00:01:17,460 --> 00:01:18,220 Yes. 46 00:01:18,860 --> 00:01:19,660 Shots. 47 00:01:19,880 --> 00:01:21,560 We can we can turn that down too. 48 00:01:21,560 --> 00:01:22,120 Yeah. 49 00:01:22,180 --> 00:01:24,520 So this is water, by the way. 50 00:01:24,520 --> 00:01:27,740 So you don't have to be pressured into actually drinking whatever that is. 51 00:01:27,740 --> 00:01:29,260 So it's actually all water. 52 00:01:29,260 --> 00:01:30,300 Oh, I mean, it's all water. 53 00:01:30,300 --> 00:01:30,540 Right. 54 00:01:30,540 --> 00:01:33,280 So this is Bruno's first talk at DEF CON, which is awesome. 55 00:01:33,280 --> 00:01:36,780 And I think it's, I don't know, my 21st talk, but I've never gotten to do this. 56 00:01:36,780 --> 00:01:37,740 So very cool. 57 00:01:37,820 --> 00:01:38,320 Cheers. 58 00:01:44,870 --> 00:01:45,510 Refreshing. 59 00:01:45,850 --> 00:01:46,390 All right. 60 00:01:46,390 --> 00:01:47,550 Now we can start. 61 00:01:48,170 --> 00:01:48,570 Yeah. 62 00:01:48,570 --> 00:01:50,150 So thank you for coming to the talk. 63 00:01:50,150 --> 00:01:57,490 My name is Joe Grand and I am a hardware hacker and I like hacking on things. 64 00:01:57,610 --> 00:02:01,170 And yeah, I love going to DEF CON. 65 00:02:01,170 --> 00:02:03,930 So that's me. 66 00:02:04,210 --> 00:02:04,750 Yeah. 67 00:02:04,750 --> 00:02:05,510 And I'm Bruno. 68 00:02:05,510 --> 00:02:07,090 I'm from Germany. 69 00:02:07,270 --> 00:02:11,030 Was the first time to went to DEF CON two years ago. 70 00:02:11,190 --> 00:02:14,590 And now I'm first time on the stage, as you have seen. 71 00:02:14,590 --> 00:02:16,990 And yeah, really excited about it. 72 00:02:17,190 --> 00:02:17,730 Yeah. 73 00:02:17,730 --> 00:02:24,070 So this this presentation is about a project that we did together to reverse engineer the Roboform password generator. 74 00:02:24,070 --> 00:02:25,850 And we'll get into all of the details. 75 00:02:25,850 --> 00:02:28,690 But the the presentation is is about hacking time. 76 00:02:28,830 --> 00:02:31,350 And this is not a sensational talk. 77 00:02:31,350 --> 00:02:33,510 We don't have a name for our discovery. 78 00:02:33,730 --> 00:02:38,710 But it really kind of shows the problems that we face. 79 00:02:38,710 --> 00:02:41,470 I guess the the advantages that we face if we're hackers. 80 00:02:41,690 --> 00:02:48,630 But kind of the problems of systems and security flaws and how they are going to kind of persist even if things have been fixed. 81 00:02:48,690 --> 00:02:53,950 So we're not the first to hack time, even though we would like to think that we are. 82 00:02:54,210 --> 00:02:55,510 So we have some examples. 83 00:02:55,510 --> 00:02:56,390 I don't even remember. 84 00:02:56,390 --> 00:02:57,190 Which one is this? 85 00:02:57,190 --> 00:02:58,050 Oh, yeah, the time machine. 86 00:02:58,050 --> 00:02:58,830 Has anyone read this? 87 00:02:58,830 --> 00:03:01,110 I know DeathVeggie has probably read the time machine. 88 00:03:01,290 --> 00:03:02,550 Yes, okay. 89 00:03:02,550 --> 00:03:03,890 Has anybody else read this? 90 00:03:04,170 --> 00:03:09,510 Yeah, it was sort of like the first mention, right, of like traveling back in time to change something else. 91 00:03:10,070 --> 00:03:13,290 Of course, there are so many things of people hacking time. 92 00:03:13,290 --> 00:03:14,390 I chose a couple. 93 00:03:14,430 --> 00:03:15,630 I probably missed some. 94 00:03:15,890 --> 00:03:17,430 Anybody guess what? 95 00:03:17,890 --> 00:03:19,250 Is that even playing? 96 00:03:19,390 --> 00:03:20,950 I can't I can't see from here. 97 00:03:21,230 --> 00:03:22,370 Oh, it's playing now. 98 00:03:22,370 --> 00:03:24,470 Anybody guess what it is before the words come up? 99 00:03:25,330 --> 00:03:26,110 Did did you cheat? 100 00:03:26,110 --> 00:03:26,870 Is it already? 101 00:03:27,990 --> 00:03:29,010 Oh, no, it's already up there. 102 00:03:29,010 --> 00:03:29,950 Okay, Doctor Who, yeah. 103 00:03:29,950 --> 00:03:32,490 So, um, Time Lords, of course. 104 00:03:33,250 --> 00:03:36,610 Put this one in for for LeapBunny of the hardware hacking village. 105 00:03:36,690 --> 00:03:38,430 So back to the future, of course, right? 106 00:03:38,430 --> 00:03:39,150 Hacking time. 107 00:03:39,270 --> 00:03:43,130 And my personal favorite, which is why I'm wearing the T-shirt, is Hacker Man. 108 00:03:43,130 --> 00:03:44,810 Has anybody seen Kung Fury? 109 00:03:45,050 --> 00:03:47,570 Woo, yeah, like ten people. 110 00:03:47,570 --> 00:03:48,130 Yeah, awesome. 111 00:03:48,130 --> 00:03:49,610 Oh, there's Jesse back there. 112 00:03:49,610 --> 00:03:53,570 Um, yes, Kung Fury, Hacker Man is the star of the show. 113 00:03:53,570 --> 00:03:58,870 So, hacking time to go back and do all sorts of stuff that needed to be properly completed. 114 00:03:59,630 --> 00:04:01,190 Um, what have I missed? 115 00:04:01,690 --> 00:04:04,810 Am I like are we grossly misrepresenting hacking time? 116 00:04:04,810 --> 00:04:05,770 Is there any other? 117 00:04:07,230 --> 00:04:08,430 What was it? 118 00:04:08,890 --> 00:04:09,830 The what? 119 00:04:10,610 --> 00:04:11,750 The tenant? 120 00:04:11,970 --> 00:04:13,050 The tenant. 121 00:04:13,830 --> 00:04:14,130 Okay. 122 00:04:14,150 --> 00:04:15,390 Star Trek? 123 00:04:15,390 --> 00:04:15,910 Star Wars? 124 00:04:15,910 --> 00:04:16,470 I don't know. 125 00:04:16,470 --> 00:04:17,290 Nobody's? 126 00:04:17,410 --> 00:04:18,330 No Star Wars? 127 00:04:18,330 --> 00:04:19,430 Star Trek is, yeah. 128 00:04:19,430 --> 00:04:21,190 So, okay, so there's a lot of hacking time, right? 129 00:04:21,190 --> 00:04:22,150 We're not the first. 130 00:04:22,250 --> 00:04:27,530 Um, this thing that we found is kind of related to random number generators. 131 00:04:27,530 --> 00:04:32,710 Pseudo random number generators were also not the first people to discover a poorly seeded pseudo random number generator. 132 00:04:32,790 --> 00:04:36,670 Um, we've known about this as a security problem for a long time. 133 00:04:37,110 --> 00:04:39,770 But it still persists over and over again. 134 00:04:39,770 --> 00:04:49,690 And we'll explain if you're not familiar with different types of random number generators, we'll explain that and then sort of go into the details of why this is a problem in this particular situation. 135 00:04:50,270 --> 00:04:57,410 Yeah, so the generating random numbers is a complex problem for programmers. 136 00:04:57,410 --> 00:05:05,250 And to really generate true random numbers, you will need some type of entropy source. 137 00:05:05,390 --> 00:05:17,010 So, for example, from the environment, people using lever lamps, for example, or some diodes, which are creating noise to then really create this random stream of data. 138 00:05:17,730 --> 00:05:23,010 And on the opposite of that, there's these pseudo random number generators. 139 00:05:23,010 --> 00:05:27,530 And even they work with a seed. 140 00:05:27,530 --> 00:05:37,590 So with the seed in place, you will always generate the same sequence of random bytes with the same seed. 141 00:05:37,910 --> 00:05:52,390 And this is exactly where we can attack if we know the same seed at some point, as it was used in the past, and we can also generate the same randomness today. 142 00:05:53,710 --> 00:06:02,490 Yeah, and I guess this is a known kind of issue with security and cryptography and generating random numbers being hard. 143 00:06:03,270 --> 00:06:08,350 It hasn't really been solved, besides using some of those entropy sources that are better. 144 00:06:08,350 --> 00:06:09,750 But that's not really a practical thing. 145 00:06:09,750 --> 00:06:13,710 So this is even like a CWE, you know, a commonly known vulnerability. 146 00:06:13,710 --> 00:06:19,830 If you're designing systems that have some sort of secure element, you would probably want to study some of this stuff, right? 147 00:06:19,830 --> 00:06:25,170 So it's sort of, I feel like everybody in the security community probably knows these things, but maybe not. 148 00:06:26,210 --> 00:06:33,010 But if you're selling a piece of software that is sold as a secure thing, you would probably want to know these things. 149 00:06:33,470 --> 00:06:40,350 So here is like with CWE, this is one of many about pseudorandom number generators being these deterministic generators, right? 150 00:06:40,350 --> 00:06:46,570 Like what Bruno said, if you know what's coming in, you know all the numbers coming out, which maybe isn't always a problem depending on how it's implemented. 151 00:06:47,210 --> 00:06:49,410 So here, I can't even see it on here. 152 00:06:49,410 --> 00:06:53,610 So yeah, it's just sort of highlighting the main things about pseudorandom number generators being deterministic. 153 00:06:54,110 --> 00:07:00,810 We recommend maybe like, don't use time as a seed, because time is a known value. 154 00:07:00,810 --> 00:07:10,650 And if you're able to know what time is, even if you don't know exactly the time of how the random number generator is being seeded, you know a range of the numbers that are going to come out of the random number generator. 155 00:07:10,650 --> 00:07:13,390 And that's what we can take advantage of as we're hacking on things. 156 00:07:16,610 --> 00:07:22,030 So even though many programmers know it's a really bad thing to do, it still happens. 157 00:07:22,030 --> 00:07:26,410 And here are some examples like where it happens. 158 00:07:26,470 --> 00:07:39,190 One is the Netscape Navigator, which I think I used the time and then the process ID plus the process ID of the parent process. 159 00:07:39,190 --> 00:07:45,450 So really reducing the entropy so you can easily guess the seed. 160 00:07:45,550 --> 00:07:49,030 Same with the router from D-Link. 161 00:07:49,030 --> 00:08:10,010 This one actually used just the time and then generated the VWPS pin via time, which basically would allow you if you listen to the network and wait for some VWPS to exactly know what pin it will be. 162 00:08:10,390 --> 00:08:12,130 Then there's QTPath. 163 00:08:12,130 --> 00:08:16,470 I think it's the default Unix password manager. 164 00:08:16,590 --> 00:08:23,530 And this one was actually really bad because it not even used the time but the milliseconds. 165 00:08:23,650 --> 00:08:31,010 So in the end, it came down to 1000 possible seeds, which were then used to generate these passwords. 166 00:08:32,350 --> 00:08:37,270 Another example, the Kaspersky password manager also using the time. 167 00:08:37,270 --> 00:08:56,830 Telnod Compass X is actually a German company which is doing alert systems and they had the management software to write to this FID chips, which you can then unlock doors and everything and to generate the AES key, they also just use time. 168 00:08:56,830 --> 00:09:03,190 So you could go to the door and then brute force the key just in a couple of seconds. 169 00:09:04,130 --> 00:09:09,150 And Milksat, I think this one was also... 170 00:09:10,490 --> 00:09:15,450 there was a fallback for some operating systems which also use time. 171 00:09:15,450 --> 00:09:22,030 And then this one was used to generate private keys for Bitcoin, Bitcoin privacy keys. 172 00:09:22,170 --> 00:09:30,350 And then, yeah, they got generated and I think swiped the wallets like two years ago or one year ago. 173 00:09:30,350 --> 00:09:33,130 So yeah, really, really bad. 174 00:09:33,130 --> 00:09:38,330 And yeah, then there's RoboForm, where we talk about today. 175 00:09:38,330 --> 00:09:42,310 Yeah, and this is just a sampling, but you can see the years go back to 1995. 176 00:09:42,370 --> 00:09:46,170 And it's not just software, it's not hardware, it's web stuff. 177 00:09:46,170 --> 00:09:48,290 And that's what's really interesting about this. 178 00:09:48,290 --> 00:09:58,490 So this particular project where we're picking on RoboForm, and I mentioned I'm traditionally a hardware hacker, I normally hack on, you know, embedded systems and electronics. 179 00:09:58,490 --> 00:09:59,630 And that's sort of what I love to do. 180 00:09:59,630 --> 00:10:05,770 But I also in that same time, have dabbled in reverse engineering software, usually firmware related to hardware. 181 00:10:05,770 --> 00:10:11,750 But it was fun to do a project like this, where we're looking purely at hardware and seeing these implementation problems. 182 00:10:11,870 --> 00:10:15,810 RoboForm is a password generator and password manager. 183 00:10:15,990 --> 00:10:26,890 It's claimed, they claim to be the first, so maybe around 2002, not only to generate random passwords, random passwords, but also to store them, you know, so you can go back to them. 184 00:10:26,890 --> 00:10:29,490 And there's a lot of different password generators that are out there now. 185 00:10:29,570 --> 00:10:32,050 I'm just quoting directly from their website. 186 00:10:32,150 --> 00:10:35,250 Because I didn't want to say anything that was incorrect and get in trouble. 187 00:10:35,330 --> 00:10:48,370 So used by millions of people worldwide, individual users and small businesses to government agencies and leading fortune 500 companies made by a company called cyber systems, I think in Virginia, Washington, DC. 188 00:10:48,370 --> 00:10:50,550 So yeah, one type of password generator. 189 00:10:50,950 --> 00:10:59,970 And the reason that we started looking at this is Bruno and I had been working on some projects of recovering cryptocurrency for people in various ways, hardware and software stuff. 190 00:11:00,030 --> 00:11:05,750 And somebody had contacted us and said, Hey, I have a lot of Bitcoin locked. 191 00:11:05,750 --> 00:11:10,890 And I had used the RoboForm password generator to generate my passwords that I then encrypted. 192 00:11:11,570 --> 00:11:14,990 Or did they encrypt the private key with? 193 00:11:14,990 --> 00:11:15,610 Yes. 194 00:11:15,610 --> 00:11:20,490 They had a truecrypt container and there they saved the password for the wallet. 195 00:11:20,490 --> 00:11:21,870 That they had used with RoboForm, right. 196 00:11:21,870 --> 00:11:26,030 So they generated the RoboForm password, saved it in a text file, encrypted it with truecrypt. 197 00:11:26,030 --> 00:11:27,770 That partition got corrupted. 198 00:11:27,770 --> 00:11:30,890 So he lost his password to the wallet. 199 00:11:30,890 --> 00:11:32,810 So that's sort of how we got into this. 200 00:11:32,990 --> 00:11:39,730 And at first, when he emailed, it was like, what are we going to brute force a 20 character? 201 00:11:39,730 --> 00:11:46,210 He thought it was 20 character special characters, numbers, letters, like computationally infeasible to brute force, right? 202 00:11:46,210 --> 00:11:47,530 We're just not going to do that. 203 00:11:47,870 --> 00:11:49,450 So I remember turning them down. 204 00:11:49,650 --> 00:11:51,670 And then Bruno was like, well, wait a second. 205 00:11:51,670 --> 00:11:53,830 Like it was a year later, I think he contacted us again. 206 00:11:53,830 --> 00:11:56,890 And Bruno was like, well, I had worked on this other project. 207 00:11:56,890 --> 00:11:58,710 Maybe we should take a look at it. 208 00:11:58,710 --> 00:11:59,770 Do you want to tell that? 209 00:11:59,970 --> 00:12:00,290 Yeah. 210 00:12:00,290 --> 00:12:03,350 So it was a password generator, not very popular. 211 00:12:03,350 --> 00:12:05,350 It was called Wireless Key Generator. 212 00:12:05,350 --> 00:12:09,350 And like the name suggested, it was to create a password for your Wi-Fi. 213 00:12:09,910 --> 00:12:15,370 And we had a customer before who used exactly that one and also encrypted his wallet with it. 214 00:12:15,370 --> 00:12:21,570 So we had a look back then and it just looked so crappy that I thought, OK, this can't be secure. 215 00:12:22,170 --> 00:12:24,470 And it turned out it wasn't. 216 00:12:24,470 --> 00:12:27,570 So it was, I think, using Visual Basic 6. 217 00:12:27,570 --> 00:12:38,930 And this was like the worst randomness I ever saw in a coding language because it was not even like that you need to guess the seed, but it was the way they implemented it. 218 00:12:38,930 --> 00:12:43,890 You have just an array of two million values that are pre-computed random. 219 00:12:43,890 --> 00:12:50,950 And then the seed only defines like the start position of that list. 220 00:12:50,990 --> 00:12:59,810 So it will just, after two million generations, no matter what seed, you will always have the generated all possible values. 221 00:12:59,810 --> 00:13:02,250 So this one was really, really bad. 222 00:13:02,410 --> 00:13:02,970 Yeah. 223 00:13:02,970 --> 00:13:10,350 And this, and this, even though like we got into this because of cryptocurrency, like this is by no means a cryptocurrency singular problem. 224 00:13:10,350 --> 00:13:16,450 Anybody that has used this version of RoboForm and prior versions of RoboForm are susceptible to this type of attack. 225 00:13:16,450 --> 00:13:19,810 Actually, how many of you have even heard of RoboForm? 226 00:13:20,670 --> 00:13:21,290 Okay. 227 00:13:21,290 --> 00:13:23,390 Like maybe a quarter. 228 00:13:23,390 --> 00:13:25,730 How many of you actually use RoboForm? 229 00:13:27,010 --> 00:13:30,730 One, two, three, four, five. 230 00:13:30,730 --> 00:13:31,530 That's pretty good. 231 00:13:31,530 --> 00:13:32,210 Okay. 232 00:13:32,210 --> 00:13:35,250 Um, did you use it in 2015 or earlier? 233 00:13:35,670 --> 00:13:37,110 Now we're like really good. 234 00:13:37,110 --> 00:13:37,890 One. 235 00:13:38,090 --> 00:13:38,590 Okay. 236 00:13:38,590 --> 00:13:40,190 Have you changed your passwords? 237 00:13:40,410 --> 00:13:40,910 Okay. 238 00:13:40,910 --> 00:13:41,090 Yeah. 239 00:13:41,090 --> 00:13:41,690 Cool. 240 00:13:41,690 --> 00:13:43,930 I guess maybe you will after the talk, but yeah, cool. 241 00:13:43,930 --> 00:13:44,450 Okay. 242 00:13:44,450 --> 00:13:45,150 Um, right. 243 00:13:45,150 --> 00:13:52,410 So it really is, it's something where you could pre-compute, you know, every possible password that had been generated and that's what we're going to show you. 244 00:13:53,150 --> 00:14:02,090 So we started getting into this project and, um, Bruno started digging through the changelog where, where this is a closed source piece of software. 245 00:14:02,950 --> 00:14:08,950 So all we have really is the changelog, anything that the vendor decides to make public changelog and, and the binaries. 246 00:14:08,950 --> 00:14:11,930 Um, but Bruno had noticed this change here. 247 00:14:13,390 --> 00:14:13,930 Yeah. 248 00:14:13,930 --> 00:14:20,270 So we looked at the time and then said, okay, it needs to be version, I think 7.9 or something. 249 00:14:20,490 --> 00:14:31,150 And then, um, we saw after that version, um, there was an entry which says increase randomness of generated passwords, which is pretty weird. 250 00:14:31,150 --> 00:14:36,570 That's pretty weird for a password generator to say, wouldn't you imagine all of them would be, but that was the clue. 251 00:14:36,570 --> 00:14:47,250 So we basically knew from the person we were dealing with, Michael, uh, when his last access to the wallet was, which was like 2013, I think. 252 00:14:47,250 --> 00:14:49,910 So we kind of looked and seen like, okay, what did anything change? 253 00:14:49,910 --> 00:14:52,550 And that's when we saw this increased randomness of generated password. 254 00:14:52,550 --> 00:14:58,730 We go, wait, are all of the prior versions doing something that is not random or less random or weaker? 255 00:14:58,750 --> 00:15:02,210 And it just happened that the version that we were looking at fell into that. 256 00:15:02,210 --> 00:15:05,150 So this applies to everything up to this version. 257 00:15:05,450 --> 00:15:13,030 Uh, and then we'll talk about sort of what has happened since this version, which we don't actually know is the TLDR of that. 258 00:15:13,870 --> 00:15:14,550 Um, okay. 259 00:15:14,550 --> 00:15:16,710 So let's get into the process of what we did. 260 00:15:16,730 --> 00:15:18,910 Um, Bruno lives in Germany. 261 00:15:18,910 --> 00:15:20,690 I live in Portland, Oregon. 262 00:15:20,910 --> 00:15:24,590 Uh, and we did a lot of remote work, which was super fun. 263 00:15:24,950 --> 00:15:29,510 And for those who know me, like I don't normally work with a lot of people at one time. 264 00:15:29,510 --> 00:15:31,990 I like to sort of hole up and just hack on stuff alone. 265 00:15:31,990 --> 00:15:34,770 So it's like finding people to work with is really cool. 266 00:15:34,830 --> 00:15:40,230 Um, and it was a lot of fun, like these late night zoom sessions, sharing screens, like hacking on stuff. 267 00:15:40,230 --> 00:15:43,650 We did end up doing some stuff together in person at a conference. 268 00:15:43,710 --> 00:15:47,610 Um, it was like, I don't know, 24 or 30 hours straight or something. 269 00:15:47,610 --> 00:15:50,350 And then I got on the airplane and fell asleep the entire time. 270 00:15:50,350 --> 00:15:55,550 So it was really like a fun example of like true hacking together. 271 00:15:55,550 --> 00:15:56,250 It was really cool. 272 00:15:56,250 --> 00:16:00,710 So the we basically started with some memory analysis and we'll explain each of these steps. 273 00:16:00,810 --> 00:16:07,930 Uh, memory analysis first, static analysis, uh, dynamic analysis, and then we built some custom wrapper to handle all of that. 274 00:16:07,930 --> 00:16:11,790 So if you're from the software world, you're probably like, oh, this is like a totally normal thing to do. 275 00:16:11,790 --> 00:16:17,930 But from a hardware world, it's like it, it, it was interesting to be able to do it in like a full process. 276 00:16:17,930 --> 00:16:21,730 Kind of go through everything instead of just dabbling with like, you know, one, one tool or the other. 277 00:16:21,770 --> 00:16:26,690 So that's, you know, we kind of go through this process and then, um, hopefully we profit. 278 00:16:27,810 --> 00:16:28,230 Okay. 279 00:16:28,230 --> 00:16:30,310 So let's go into the demo of things. 280 00:16:30,310 --> 00:16:34,990 Um, we were going to do live demos, but Defcon really was like, you should just record your demos. 281 00:16:34,990 --> 00:16:36,890 And we know the demo gods, blah, blah, blah. 282 00:16:36,890 --> 00:16:38,490 But I like to live on the edge. 283 00:16:38,550 --> 00:16:42,010 Um, but I finally gave in and said, okay, we're just recording these. 284 00:16:42,010 --> 00:16:48,630 So these are videos, um, and you can play along at home, you know, afterwards and, and see that we're not lying or anything. 285 00:16:48,650 --> 00:16:52,190 So Bruno is going to talk about Cheat Engine and we'll go into all the other steps. 286 00:16:52,390 --> 00:16:52,710 Yeah. 287 00:16:52,710 --> 00:16:58,110 So first we used Cheat Engine and it's originally made for games. 288 00:16:58,370 --> 00:17:02,910 I personally use it as a kit for, um, cheating my favorite single player game. 289 00:17:02,910 --> 00:17:09,890 So I didn't have to grind hundreds of hours to get my gear and you can actually also use it for hacking. 290 00:17:10,090 --> 00:17:13,910 So, um, I hope the video is playing now. 291 00:17:15,650 --> 00:17:16,590 Is it playing? 292 00:17:16,590 --> 00:17:17,930 We can't see that it's playing. 293 00:17:17,930 --> 00:17:18,310 So yes. 294 00:17:18,310 --> 00:17:18,530 Okay. 295 00:17:18,530 --> 00:17:22,590 Dean is going to be our video, our video thumbs upper for every video. 296 00:17:22,590 --> 00:17:23,450 Is that okay? 297 00:17:23,450 --> 00:17:23,970 Perfect. 298 00:17:23,970 --> 00:17:24,230 Okay. 299 00:17:24,230 --> 00:17:25,050 Dean says, okay. 300 00:17:25,050 --> 00:17:27,210 So what we did here is a very simple. 301 00:17:27,210 --> 00:17:35,170 So with Cheat Engine, you can scan, edit, um, even you can freeze some parts of the memory so it can't be modified by the program anymore. 302 00:17:35,730 --> 00:17:41,050 And here we just searched for the generated password and we found it. 303 00:17:41,610 --> 00:17:55,710 And which means that, um, other password generators, for example, try to decrypt it in some way that you can't extract it from the memory or, um, try to hide it or remove it after a certain amount of time. 304 00:17:55,710 --> 00:18:02,230 Um, because there's a risk involved if you have plain text passwords in the memory, but, um, RoboForm doesn't. 305 00:18:02,490 --> 00:18:04,450 And that's already good. 306 00:18:04,450 --> 00:18:07,630 And you can actually see that it's, um, found twice. 307 00:18:07,710 --> 00:18:10,770 That's one time for the GUI. 308 00:18:10,770 --> 00:18:18,170 So what is displayed and one time is, um, the, in the memory of the internal logic, um, we found it. 309 00:18:18,330 --> 00:18:18,750 Yeah. 310 00:18:18,750 --> 00:18:21,470 And right when we saw that, we're like, oh wait, it's in the clear. 311 00:18:21,570 --> 00:18:22,110 Perfect. 312 00:18:22,110 --> 00:18:29,670 And then I think we were even, there was a couple of different, there was like a DLL and an executable and we're trying to figure out which piece of the code was plopping that into memory. 313 00:18:29,710 --> 00:18:32,670 But knowing that was there, we're like, all right, now it's in memory. 314 00:18:33,530 --> 00:18:38,050 Let's try to find out what routine is actually putting it in the memory and then kind of working backwards. 315 00:18:38,050 --> 00:18:45,570 So we could then figure out where the actual password generator routine was happening within this entire blob of stuff. 316 00:18:45,570 --> 00:18:48,490 Because RoboForm, again, does not just generate passwords. 317 00:18:48,490 --> 00:18:51,910 There's all this other stuff that we had to kind of dig through to find the right thing. 318 00:18:52,130 --> 00:18:53,390 So we use Ghidra. 319 00:18:53,390 --> 00:18:54,370 Thank you NSA. 320 00:18:54,370 --> 00:18:56,490 I'll continue to thank the NSA for that. 321 00:18:56,550 --> 00:18:58,710 One of the few things I'll thank them for. 322 00:18:58,710 --> 00:19:00,350 Or maybe the only thing, actually. 323 00:19:00,770 --> 00:19:08,570 Um, so this is, uh, kind of, it's going to show, let's see, I can't see it again, but this is like, this should be a time lapse. 324 00:19:08,570 --> 00:19:08,770 Okay. 325 00:19:08,770 --> 00:19:09,250 Dean says, yeah. 326 00:19:09,250 --> 00:19:20,050 So there's, you know, we're not going to show the whole process, but we basically started with this giant binary and we dug down little by little, starting to, to label things of what we thought it was, of, oh, that looks like this. 327 00:19:20,050 --> 00:19:22,630 And we would change parameters and look again. 328 00:19:22,630 --> 00:19:27,030 And like, uh, oh, sorry, with Ghidra, we didn't, we were just looking at the, at the static, static side. 329 00:19:27,030 --> 00:19:28,110 So things weren't changing. 330 00:19:28,170 --> 00:19:34,830 Um, but we basically narrowed it down to a point and Bruno found this first of like, that called a system time, right? 331 00:19:34,830 --> 00:19:35,590 It was like, get time. 332 00:19:35,590 --> 00:19:36,870 I think it's time 64. 333 00:19:37,110 --> 00:19:43,930 And, um, that was like, wait, this piece of code is calling time and then it's doing some stuff and then it's calling SRand. 334 00:19:43,930 --> 00:19:45,930 So seeding the, the pseudorandom number generator. 335 00:19:45,950 --> 00:19:47,630 That was a pretty big giveaway. 336 00:19:47,630 --> 00:19:54,610 And there was a couple other places where there was the pseudorandom number generator being seeded, but there was no other call to time. 337 00:19:54,610 --> 00:20:00,690 And we basically figured out that this section was the section that we were actually interested in. 338 00:20:00,690 --> 00:20:12,790 Of this whole piece of code, like these couple lines where it's calling the system time, manipulating it, which basically what it was doing, because you can press the, every time you press the generate password button, it hits this code. 339 00:20:12,790 --> 00:20:26,570 If you press the button more than one time a second, if there was no manipulation of that time, the time wouldn't increase because this call system time is just returning time and Unix time since 1970, January 1st, 1970 in seconds. 340 00:20:26,570 --> 00:20:31,070 So if you hit the button multiple times, they basically added some additional manipulation in there. 341 00:20:31,070 --> 00:20:34,450 So you can press the button multiple times within a second and not get the same password. 342 00:20:35,330 --> 00:20:39,870 And they basically are just adding a fixed constant or are they subtracting? 343 00:20:39,870 --> 00:20:42,510 Are they subtracting a subtraction? 344 00:20:42,510 --> 00:20:43,890 Yeah, something like that. 345 00:20:43,930 --> 00:20:44,890 Yeah, they were subtracting. 346 00:20:44,890 --> 00:20:53,130 No, they were, it was something that messed us up and we'll actually talk about that, but they're doing a manipulation and it basically is just jumping either ahead or backwards in time. 347 00:20:53,350 --> 00:20:57,190 So you can still generate the password if you know all of the time. 348 00:20:57,190 --> 00:21:01,090 It was just so they couldn't, you know, duplicate the same time in that same button press. 349 00:21:01,090 --> 00:21:03,350 So a pretty weak type of manipulation. 350 00:21:03,350 --> 00:21:08,150 Then it calls SRAND and then it goes into the actual password generation routine. 351 00:21:08,310 --> 00:21:17,670 I guess what we could have done and what we were originally thinking is like, oh, we can just pull out that password generating block, put it into our own code and then just sort of build the wrapper around it. 352 00:21:17,670 --> 00:21:23,970 Um, but it was so complicated when we started digging into the function that gets called after that was just ridiculous. 353 00:21:23,970 --> 00:21:25,730 And we didn't really want to go through that process. 354 00:21:26,150 --> 00:21:35,830 So we eventually thought like, okay, if we could confirm this, we'll just build some, a wrapper that will go and touch those values and then just let the rest of the code that's in the DLL do its thing. 355 00:21:37,790 --> 00:21:49,570 So once we could identify the, the static portion of code where we knew that that pseudorandom generator was being seeded with time, then we went to X64 debug and we were actually using X32 debug. 356 00:21:49,770 --> 00:21:59,610 Uh, and this is our dynamic analysis to be able to debug the system as it's running in real time and see what was happening with the registers and with other low level CPU stuff. 357 00:21:59,610 --> 00:22:01,970 So then we could see if we could manipulate it. 358 00:22:02,610 --> 00:22:05,830 And this is going to be interesting because again, I can't see stuff here. 359 00:22:05,830 --> 00:22:07,810 So, we're going to start it. 360 00:22:09,290 --> 00:22:15,690 And I'm pretty sure what I'm showing first is, uh, there's a bunch of break points that we set. 361 00:22:15,690 --> 00:22:21,630 So we can actually, you know, run the code and then it's going to hit the break point at certain times when certain pieces of code are run. 362 00:22:21,630 --> 00:22:26,650 We basically set the break point that we care about at that same spot that I just showed. 363 00:22:26,650 --> 00:22:28,450 So when the system time is being called. 364 00:22:31,160 --> 00:22:35,820 And then I'm probably running the, running the, the, the debugger. 365 00:22:35,820 --> 00:22:38,420 Eventually the password generator is going to start. 366 00:22:38,420 --> 00:22:39,460 The GUI is going to start. 367 00:22:39,740 --> 00:22:43,340 And even when you first start the GUI, there's already one password that's in there. 368 00:22:43,340 --> 00:22:46,180 So it actually already runs the password generator once. 369 00:22:46,300 --> 00:22:49,000 Uh, so that, that manipulation has already happened once. 370 00:22:49,000 --> 00:22:51,380 Which for us, threw us off again a little bit. 371 00:22:52,640 --> 00:22:54,900 And I think it's eventually going to stop. 372 00:22:54,900 --> 00:23:02,440 But I'm generating passwords and if you look, which you probably can't see, the EAX register is directly correlated to the system time. 373 00:23:03,060 --> 00:23:08,140 Plus, like, whatever manipulation maybe there was from the, from the call before. 374 00:23:08,980 --> 00:23:10,980 And has it stopped yet? 375 00:23:10,980 --> 00:23:12,300 Is it just sitting still? 376 00:23:13,140 --> 00:23:14,320 Still going. 377 00:23:14,420 --> 00:23:14,940 Okay. 378 00:23:14,940 --> 00:23:30,860 So, um, I'm going to generate a couple passwords and then at one point I'm going to write down, there was one value that I don't have on this slide, it's on the next slide, I think it's like 66 CF 6550 in hex for EAX corresponds to one particular password. 379 00:23:30,880 --> 00:23:36,500 And that's the one that we're going to end up redoing once we let the system generate some more. 380 00:23:36,940 --> 00:23:38,040 Has it stopped? 381 00:23:38,680 --> 00:23:39,400 Okay. 382 00:23:39,780 --> 00:23:41,920 So this is what we care about out of all of that. 383 00:23:41,920 --> 00:23:42,680 The two arrows. 384 00:23:42,680 --> 00:23:47,760 There's one arrow pointing to EAX and then there's one arrow pointing to the password that's been generated. 385 00:23:47,760 --> 00:23:50,780 So those two things are completely intertwined. 386 00:23:50,780 --> 00:23:57,620 Anytime we enter the EAX value of that particular time, manipulated time value, it's going to generate that particular password. 387 00:24:00,400 --> 00:24:09,180 So let's continue on with that part of the demo and now I'm going to generate another password just to show again that EAX continues to increment because time is incrementing. 388 00:24:09,700 --> 00:24:21,300 And then once we get it sort of cleared the EAX value with the new one, then we'll go back and replace it with one we know to show that we can, you know, regenerate passwords that have already been generated from the past. 389 00:24:21,780 --> 00:24:25,260 I'm just going to watch your reactions so I'll know when it actually happens. 390 00:24:26,460 --> 00:24:29,560 When it does go ooh or something. 391 00:24:39,520 --> 00:24:40,940 The tension. 392 00:24:42,180 --> 00:24:43,280 Ooh, right? 393 00:24:43,280 --> 00:24:47,460 So now we have regenerated a password. 394 00:24:47,460 --> 00:24:54,320 In theory with a properly, you know, computationally cryptographically secure system, that shouldn't happen. 395 00:24:54,320 --> 00:25:04,540 But this proved to us with the debugger of like, nice, now we can basically feed in whatever EAX value we want for time and the manipulation doesn't really matter because that just changes kind of the date range a little bit. 396 00:25:04,560 --> 00:25:13,440 But we could precompute everything if we were able to tap right into that part, hook into that part of the DLL, add our wrapper code around it to get to that part. 397 00:25:14,540 --> 00:25:16,040 And this was, this was pretty cool. 398 00:25:16,040 --> 00:25:17,800 Oh and this is the hacking time, right? 399 00:25:17,800 --> 00:25:18,700 So now do you get it? 400 00:25:18,700 --> 00:25:18,880 Right? 401 00:25:18,880 --> 00:25:20,320 We're hacking time to change that. 402 00:25:20,320 --> 00:25:21,600 So that was, yeah. 403 00:25:22,500 --> 00:25:30,540 Um, okay so then the wrapper code, this was something just to put it all together, give us a way that we could precompute all the passwords that we wanted to for the date range that mattered for us. 404 00:25:30,780 --> 00:25:33,680 And we did it in I think just, what was it? 405 00:25:33,680 --> 00:25:34,980 Visual, I don't even remember. 406 00:25:34,980 --> 00:25:37,840 It was in Visual Studio, yeah Visual Studio. 407 00:25:37,840 --> 00:25:42,380 And we did it in C, which I know is like taboo now, can't use C, but I use C. 408 00:25:42,380 --> 00:25:43,680 And I use assembly language. 409 00:25:43,680 --> 00:25:52,700 And it actually was, it was cool because we had to tap into some of the, we had to do some assembly language to, to move some things around to get it properly executing in the DLL. 410 00:25:52,820 --> 00:25:57,940 Um, and seeing assembly language really for sort of hardware hackers, that's like, that's what you want to see. 411 00:25:57,940 --> 00:26:00,720 Um, because that's the type of level that we work with. 412 00:26:01,060 --> 00:26:02,600 So here's the wrapper code. 413 00:26:02,720 --> 00:26:06,060 Um, I have a couple slides sort of scrolling through the code. 414 00:26:06,060 --> 00:26:15,400 This is all open source by the way, it's on my website, there's a link in the slides and these slides will be up on the Defcon server after the session, whenever Defcon puts them up. 415 00:26:15,440 --> 00:26:20,080 Uh, they're also on my website which is grandideastudio.com. 416 00:26:20,080 --> 00:26:22,960 I put them on my, that's like my formal website. 417 00:26:22,960 --> 00:26:28,280 But everything is there so you could um, already work with it and somebody already has, which we'll talk about. 418 00:26:28,280 --> 00:26:31,940 So yeah, this code basically is um, let's see. 419 00:26:32,280 --> 00:26:37,720 The video's kind of showing different sections but this first section we're just setting the time values that we want, the time range that matters. 420 00:26:39,320 --> 00:26:43,680 And then it should be scrolling down a little bit but kind of showing some functions as we're, as we're getting ready. 421 00:26:43,680 --> 00:26:49,180 We're basically, we need to have code that's gonna hook into the DLL so it has to search through the DLL. 422 00:26:49,260 --> 00:26:51,980 This is not an exported function. 423 00:26:52,800 --> 00:26:54,140 Is that the right terminology? 424 00:26:54,140 --> 00:26:57,620 It's not a function that you're normally supposed to access from the outside world, right? 425 00:26:57,620 --> 00:26:58,280 I see nodding. 426 00:26:58,280 --> 00:27:04,760 Okay, so it's something where we know the code is there but it's not given to the, you know, to the other executable to normally be able to, to work with. 427 00:27:04,760 --> 00:27:09,140 So we had to search for a known signature string that we found just by looking in the debugger. 428 00:27:09,440 --> 00:27:15,220 Uh, to say okay, let's just look for these kind of op codes and uh, and hope that's the right section in the DLL. 429 00:27:15,220 --> 00:27:17,420 So we're kind of searching through for that. 430 00:27:20,280 --> 00:27:21,380 And let's see, what else? 431 00:27:21,380 --> 00:27:24,840 We're gonna look for the, yeah, so these are all the functions and set system time. 432 00:27:24,840 --> 00:27:26,200 I think here's the real code. 433 00:27:26,660 --> 00:27:33,560 So yeah, this code here where, you know, we're calling system time and we're basically setting our computer at whatever system time we want. 434 00:27:38,910 --> 00:27:42,550 And then, oh, there's also, there's some other constants I'll get into. 435 00:27:42,550 --> 00:27:44,970 There's like a bunch of weird stuff that we had to end up doing to make it work. 436 00:27:44,970 --> 00:27:49,850 It seems, it seemed easy in theory of like, oh, let's just hook into this DLL and like call the code. 437 00:27:49,870 --> 00:27:53,450 But things have to be prepared before that to actually make it work. 438 00:27:55,810 --> 00:28:00,510 So where we are in here, is it still scrolling or can you, still scrolling and now it stopped? 439 00:28:01,570 --> 00:28:02,190 Okay. 440 00:28:02,190 --> 00:28:11,370 So yeah, this is the part that should be searching through the DLL, finding that portion, finding the address of the DLL with the, that, those op codes that we want. 441 00:28:11,370 --> 00:28:16,350 And that's the exact same stuff that we saw um, in x64 debug and in Ghidra. 442 00:28:16,350 --> 00:28:18,830 Uh, the upper memory is gonna change though, right? 443 00:28:18,830 --> 00:28:22,030 Because we don't know where the DLL is gonna be loaded in memory, so we kinda know. 444 00:28:22,030 --> 00:28:25,310 But being able to search through it, uh, automatically seemed to make sense. 445 00:28:25,530 --> 00:28:27,370 Then there's a whole bunch of different parameters. 446 00:28:27,370 --> 00:28:31,650 I don't know if you noticed on that RoboForm screen, but there's one for, do you want to use uppercase, lowercase? 447 00:28:31,650 --> 00:28:33,230 Do you want to use letters? 448 00:28:33,310 --> 00:28:34,490 Do you want to use numbers? 449 00:28:34,490 --> 00:28:35,530 Do you want special characters? 450 00:28:35,530 --> 00:28:42,050 Those are all individual settings that get fed into that password generator routine after the pseudorandom number is generated. 451 00:28:42,050 --> 00:28:48,490 So we had to figure out how those parameters were configured before we could actually call the, the function that was generating the password. 452 00:28:48,550 --> 00:28:53,170 And that took a lot of trial and error and a lot of debugging and um, as it should be, right? 453 00:28:53,170 --> 00:28:55,310 If it was too easy, it wouldn't be that much fun. 454 00:28:55,350 --> 00:29:10,050 Um, but it was really interesting to kind of see that a lot of those values were, had to be placed in certain memory locations and specific things and that's what that array at the beginning was of like, we just happened to see that oh, this setting was in this one and then we have a couple bytes that we don't care about and then we add another one. 455 00:29:11,270 --> 00:29:13,170 And then we get to the cool stuff. 456 00:29:13,530 --> 00:29:25,910 Which we're basically looping and we're calling system time, setting all the values the right way and then we get into the assembly language which is my favorite part and I don't really know, I think it's maybe this part that shows the rest of it. 457 00:29:25,910 --> 00:29:33,510 But we're moving the parameters into the right spot, we're moving everything into the right spot and normally what was happening is we were getting crashes for days, right? 458 00:29:33,510 --> 00:29:37,770 Or over and over again and then finally it's like we're going to try another thing, try another thing. 459 00:29:37,770 --> 00:29:40,510 And then it finally worked and we generated a password, we're like holy crap. 460 00:29:40,670 --> 00:29:47,770 Um, then we built the loop around it so we're just doing this over and over again, setting the time, calling the DLL, you know, getting the password out. 461 00:29:47,770 --> 00:29:55,810 Because the password gets set into some register that, you know, that's where it was that we saw in cheat engine, then we push that into a variable in C and then we print that out. 462 00:29:55,970 --> 00:30:01,850 And uh, turns out it wasn't the most efficient way to do it but it definitely like was enough to generate the passwords. 463 00:30:02,810 --> 00:30:07,130 So we had all of our passwords, is this, is this actually showing the password generator? 464 00:30:07,130 --> 00:30:07,510 Oh it is. 465 00:30:07,510 --> 00:30:07,990 Okay, right. 466 00:30:07,990 --> 00:30:09,410 So we actually got it working. 467 00:30:09,510 --> 00:30:14,710 Um, this is generating all of the passwords starting from whatever 2013 date range we wanted. 468 00:30:14,930 --> 00:30:17,790 Uh, at about a hundred passwords per second. 469 00:30:17,870 --> 00:30:28,030 Which for us was fine because we only had, it was like a couple months worth so it wasn't a huge amount and it took, on my machine I think it took like 20 hours or something but yours was like super long. 470 00:30:28,030 --> 00:30:34,210 Yeah, I think you had the M2 SSD so Windows really limits the, the amount of time. 471 00:30:34,210 --> 00:30:35,690 Yeah, there was like disk access, right? 472 00:30:35,690 --> 00:30:36,390 Yeah. 473 00:30:36,390 --> 00:30:39,290 So I, I needed like three or four days. 474 00:30:39,290 --> 00:30:40,350 Yeah, to do the list, right? 475 00:30:40,350 --> 00:30:52,230 And that got really frustrating when it's like we tried different password lists that we were generating, plopped them into the password cracker, you know, tried, tried to unlock this, this Bitcoin wallet and um, we kept failing. 476 00:30:52,490 --> 00:30:55,610 And we're like, oh my God, is this like, is this our coding problem? 477 00:30:55,610 --> 00:30:56,850 Are the parameters wrong? 478 00:30:56,850 --> 00:30:58,010 Are the dates wrong? 479 00:30:58,010 --> 00:31:01,270 Uh, we kept calling this guy, Michael and um... 480 00:31:01,270 --> 00:31:01,690 Yeah. 481 00:31:01,690 --> 00:31:03,590 And he was getting like pretty annoyed. 482 00:31:03,730 --> 00:31:09,570 I was talking to him and he was like, in the end he was like, oh no, not again, this guy. 483 00:31:09,570 --> 00:31:11,550 Yeah, he's like, oh, they're bugging us again. 484 00:31:11,550 --> 00:31:15,790 And like he, and then at one point he was like, I'm going to see if I can remember it through hypnosis. 485 00:31:16,330 --> 00:31:18,550 Uh, and we're like, oh boy, now we're in trouble. 486 00:31:18,810 --> 00:31:30,530 Um, but it turned out, so he had sent us a list of passwords that he had used for other things and all of them except one were 20 characters with specials or without, I think. 487 00:31:30,970 --> 00:31:32,130 I think some... 488 00:31:32,130 --> 00:31:36,990 He told us he used specials as his original password, but there were some which didn't use specials. 489 00:31:36,990 --> 00:31:37,410 Which didn't, right. 490 00:31:37,410 --> 00:31:40,490 So he was so sure it had special characters, but it turns out there was a couple that didn't. 491 00:31:40,490 --> 00:31:47,350 So we're like, let's just regenerate without special characters because that changes the entire password that comes out. 492 00:31:47,390 --> 00:31:49,090 So we finally did that. 493 00:31:49,090 --> 00:31:54,950 And Bruno sends me a message like maybe like 20 minutes after we started running that list. 494 00:31:54,950 --> 00:31:55,390 Yeah. 495 00:31:55,410 --> 00:31:57,470 It's very exciting. 496 00:31:57,470 --> 00:31:57,850 Yeah. 497 00:31:57,850 --> 00:32:01,410 I also didn't thought it would happen because he was so sure. 498 00:32:01,410 --> 00:32:05,370 He said like, nah, it was special characters, like 99%. 499 00:32:05,370 --> 00:32:07,670 And then we got it. 500 00:32:07,670 --> 00:32:08,270 And then we got it. 501 00:32:08,270 --> 00:32:08,450 Yeah. 502 00:32:08,450 --> 00:32:10,750 So here we had to block out all this. 503 00:32:10,790 --> 00:32:11,510 Thank you. 504 00:32:17,340 --> 00:32:30,580 We had to block out all of the transaction history because I know that some of you, if not all of you would go and try to track it down and now like, you know, see what this guy's doing and spy on the blockchain and whatever else hackers do these days. 505 00:32:30,740 --> 00:32:35,680 But we can see the password is actually generated May 15th, 2013. 506 00:32:35,680 --> 00:32:40,600 And that was actually a little earlier than we thought also based on the transaction history. 507 00:32:40,600 --> 00:32:44,740 But it could also be that he pressed the button twice, right? 508 00:32:44,740 --> 00:32:45,180 Yeah, right. 509 00:32:45,180 --> 00:32:49,700 He could have pressed the button enough to like change where that manipulation was happening. 510 00:32:49,700 --> 00:32:57,680 Because like how they did it, they, I think increased then the time by a fixed amount, which was like around eight or nine days. 511 00:32:57,800 --> 00:32:58,120 Yes. 512 00:32:58,120 --> 00:32:58,580 And it right. 513 00:32:58,580 --> 00:33:01,660 So it was subtracting a negative number and that's what threw us off. 514 00:33:01,660 --> 00:33:09,420 We thought it was adding or we thought it was just subtracting the number, but it was subtracting a negative number, which is adding. 515 00:33:09,700 --> 00:33:13,980 So we were going the wrong way in time to try to create our list, but ultimately it ended up working. 516 00:33:13,980 --> 00:33:15,320 But it was pretty dark for a while. 517 00:33:15,320 --> 00:33:18,520 There was a couple of days when it was like, we just went through all this reverse engineering work. 518 00:33:18,520 --> 00:33:19,640 We can generate all these passwords. 519 00:33:19,940 --> 00:33:22,700 And it was like, is all of this work going to go wasted? 520 00:33:23,280 --> 00:33:25,920 Uh, I mean, I guess it wouldn't be wasted anyway because other people could use it. 521 00:33:25,920 --> 00:33:28,560 But like from our perspective, it would have been a bummer. 522 00:33:29,160 --> 00:33:44,620 Um, as part of this process, uh, sometimes I make YouTube videos and this was a project where we were like, this would be super fun to film this process and make a fun video out of it to kind of show, you know, the story and the drama. 523 00:33:44,900 --> 00:33:48,000 Um, so how many of you have seen our, our video on this? 524 00:33:48,360 --> 00:33:49,180 Oh wow. 525 00:33:49,180 --> 00:33:50,980 That's like, that's impressive. 526 00:33:50,980 --> 00:33:52,200 That gets like a quarter maybe. 527 00:33:52,200 --> 00:33:52,920 That's good. 528 00:33:52,920 --> 00:33:55,100 Um, everyone else, hopefully you watch it. 529 00:33:55,140 --> 00:34:03,800 And uh, these are just some behind the scenes of what it takes to film videos like without just using your, you know, iPhone. 530 00:34:03,860 --> 00:34:13,920 Um, but this particular project, the, the customer who had this wallet is from Germany, but he was in Barcelona on vacation and Bruno's in Germany. 531 00:34:13,920 --> 00:34:17,400 So we started kind of our, our process in the video in Germany. 532 00:34:17,400 --> 00:34:21,780 We did interviews, um, and then flew. 533 00:34:21,780 --> 00:34:23,220 Oh, here's our film crew by the way. 534 00:34:23,220 --> 00:34:33,160 And then we flew over to Barcelona and Michael, the, this guy thought that we were just going to ask him more questions and interview him again. 535 00:34:33,160 --> 00:34:36,380 Like he didn't know that by that point we had done it. 536 00:34:36,380 --> 00:34:39,620 Um, so he was like, Oh God, now they're just going to ask more things. 537 00:34:39,840 --> 00:34:41,480 Um, so it was actually pretty funny. 538 00:34:41,480 --> 00:34:44,740 We're not going to reveal like the full thing cause that's why you should watch the video. 539 00:34:44,740 --> 00:34:48,620 It's way more exciting when you watch it there instead of on a tiny screen here. 540 00:34:48,780 --> 00:34:59,520 Um, but we basically set up this whole environment like, um, you know, publishers clearing house style kind of reveal, uh, which was totally ridiculous and yeah, very, very fun. 541 00:34:59,660 --> 00:35:12,360 Um, and that's part of it is like being able to share this information and, and, you know, share some technological stuff is super fun and being able to make videos and like get creative with things that we're doing otherwise equally as fun. 542 00:35:12,360 --> 00:35:13,360 So this stuff is really cool. 543 00:35:13,360 --> 00:35:23,640 And also you can see how, you know, safety third, um, for those who actually can see the picture, there's two guys holding a gigantic ladder as one guy's like fiddling with some lamps and electrical stuff. 544 00:35:23,660 --> 00:35:28,460 Uh, I probably shouldn't have documented that, but definitely not safe. 545 00:35:32,080 --> 00:35:39,800 So yeah, um, once we found this issue and we solved our problem, we're like, awesome. 546 00:35:39,800 --> 00:35:39,980 Okay. 547 00:35:39,980 --> 00:35:41,040 Michael's taken care of. 548 00:35:41,040 --> 00:35:42,020 We recovered his Bitcoin. 549 00:35:42,020 --> 00:35:42,680 Yay. 550 00:35:42,700 --> 00:35:50,580 But part of the process of hacking, in my opinion, is sharing that information with other people so they can learn from it and use it. 551 00:35:50,580 --> 00:35:56,160 And that's equally as important as that's equally as important as the success of the project, right? 552 00:35:56,160 --> 00:36:01,300 If you just hoard all your information and not share it with anybody else, what's the point of hacking? 553 00:36:01,300 --> 00:36:10,640 I think that's, that's something I feel very strongly about and something that, that has been sort of ingrained in me since my younger days of being a hacker. 554 00:36:10,780 --> 00:36:14,340 So we solved this problem and we're like, all right, how are we going to disclose this? 555 00:36:14,500 --> 00:36:21,840 You know, there's responsible disclosure, um, which I don't really like that term because it implies that not doing that is irresponsible. 556 00:36:22,300 --> 00:36:23,980 Um, and there's all sorts of things. 557 00:36:23,980 --> 00:36:35,840 Like when I was at the loft back in a long time ago, uh, we would kind of tell the vendor like, Hey, we're going to release this in a week or whatever and really force them to fix things. 558 00:36:35,840 --> 00:36:39,980 And now there's a little more kind of ethical dilemma about like how much time do you give a vendor? 559 00:36:40,520 --> 00:36:42,000 Do you tell the vendor? 560 00:36:42,120 --> 00:36:53,940 We looked up and, and went to the RoboForm website, looked around online, looked at different bug bounty platforms and couldn't find any indication that this company had worked with hackers before or worked with good faith researchers. 561 00:36:53,940 --> 00:37:02,840 So we got really worried because in this day and age you sort of expect software companies will have a security at whatever contact or something, right? 562 00:37:02,840 --> 00:37:06,000 Like it was scary to not see that. 563 00:37:06,280 --> 00:37:08,020 So we couldn't find it. 564 00:37:08,020 --> 00:37:11,580 We start discussing like what's the, what's the reality of the situation? 565 00:37:11,580 --> 00:37:12,580 Are we going to get sued? 566 00:37:12,580 --> 00:37:19,880 We know from DEF CON history there was even a talk actually, I think was it supposed to be today, that received a cease and desist letter. 567 00:37:20,120 --> 00:37:24,040 And now they're working with lawyers and maybe they're going to be able to give the talk on Sunday. 568 00:37:24,040 --> 00:37:26,400 Like it's a real risk for, for researchers. 569 00:37:26,400 --> 00:37:32,920 And nobody wants to get sued, especially when it's a company that has lots of lawyers and we're like individual people that don't want to deal with that. 570 00:37:33,260 --> 00:37:35,220 Um, but if it came down to it, we would. 571 00:37:35,600 --> 00:37:39,900 Uh, and I remember also talking to my wife about this of like, should we release this information? 572 00:37:39,900 --> 00:37:43,220 Like I really want to talk about it at DEF CON and do something with Bruno like on stage. 573 00:37:43,220 --> 00:37:45,580 And she's like, like hell of course. 574 00:37:45,580 --> 00:37:46,380 Like you're a hacker. 575 00:37:46,380 --> 00:37:48,900 Like you need to go against these companies and do it. 576 00:37:48,900 --> 00:37:51,800 And if you get sued, at least you'll have given the talk first. 577 00:37:53,060 --> 00:37:55,000 Which I agree with. 578 00:37:59,360 --> 00:38:01,000 So that, that's my little rant. 579 00:38:01,060 --> 00:38:06,740 So um, we reached out to, to Kim Zetter who is a fantastic journalist with cyber security. 580 00:38:06,800 --> 00:38:10,200 Um, and has really been pushing, you know, the good of what hackers can do. 581 00:38:10,200 --> 00:38:15,440 And also has written some books about some like wild state sponsored adversary type of stuff. 582 00:38:15,600 --> 00:38:17,580 Um, and she wants to write about the story. 583 00:38:17,580 --> 00:38:18,460 So we're like, great. 584 00:38:18,460 --> 00:38:23,760 She can reach out to the company and kind of get a sense of how litigious they are, like what's going on. 585 00:38:23,800 --> 00:38:27,500 So she wrote the story, reached out to them to get some comment about our work. 586 00:38:27,500 --> 00:38:30,400 And they basically were like, oh we fixed the problem, not a big deal. 587 00:38:30,600 --> 00:38:33,780 And then she wrote back and was like, well how did you fix the problem? 588 00:38:35,500 --> 00:38:36,220 Nothing. 589 00:38:36,420 --> 00:38:37,140 Crickets. 590 00:38:37,460 --> 00:38:42,360 Um, and I thought that was a really, also another kind of indicative thing. 591 00:38:42,360 --> 00:38:42,500 Right? 592 00:38:42,500 --> 00:38:51,100 Of like, okay, if they're not responding, like, it should be very clear if you may, if you fix a security problem, first of all you should notify all your customers if you make a, a significant change like that. 593 00:38:51,300 --> 00:38:52,740 Um, which didn't happen. 594 00:38:52,740 --> 00:38:59,640 But you would also want to be very proud of your changes and say, this is what we did to fix it so you can trust our software that you're running. 595 00:38:59,900 --> 00:39:01,000 None of that. 596 00:39:01,020 --> 00:39:04,880 This is, it almost feels like I'm in the 90s again, talking about this stuff. 597 00:39:05,100 --> 00:39:08,240 Um, so she didn't get any, any meaningful comment. 598 00:39:08,240 --> 00:39:10,880 Article came out, no, no comment. 599 00:39:10,880 --> 00:39:12,960 You know, a lot of journalists reached out, nothing. 600 00:39:13,080 --> 00:39:15,800 Um, maybe this is, maybe this is more typical than I think. 601 00:39:15,800 --> 00:39:19,460 But I was really surprised of not getting any sort of feedback. 602 00:39:19,720 --> 00:39:25,260 Uh, and then we decided, okay, article came out, same time, let's release the video and then let's do our Defcon talk. 603 00:39:25,260 --> 00:39:29,240 And I think it's, you know, it's, it's, it's a concern. 604 00:39:29,240 --> 00:39:37,280 I guess I also want to ask, how many of you have been in the same situation of like finding some vulnerability and being worried about talking to the vendor and, and getting sued? 605 00:39:38,160 --> 00:39:39,300 That's a lot of people. 606 00:39:39,300 --> 00:39:43,500 That's probably 25, 30 people just in this room. 607 00:39:43,520 --> 00:39:50,380 Um, multiply that by the number of people at Defcon, multiply that by the number of people outside who are also hacking. 608 00:39:50,380 --> 00:39:52,680 Like, is this a significant enough problem? 609 00:39:52,680 --> 00:39:53,760 And vendors know that. 610 00:39:53,960 --> 00:39:56,420 Um, but it is, it is a real thing. 611 00:39:57,520 --> 00:40:08,620 So anyway, yeah, we released all of the information and uh, and I think that's the important way to go and, and hopefully, hopefully I, I don't, uh, make my next video from jail or something like that. 612 00:40:10,020 --> 00:40:11,760 Um, so some future work, right? 613 00:40:11,760 --> 00:40:13,180 So we don't know how they fixed the problem. 614 00:40:13,180 --> 00:40:18,060 Maybe future versions, you know, they say they increased the randomness of generated passwords. 615 00:40:18,180 --> 00:40:19,280 Maybe they did. 616 00:40:19,280 --> 00:40:24,160 We searched through the code, we couldn't find any direct calls to system time. 617 00:40:24,160 --> 00:40:26,140 It could have been obfuscated, we don't know. 618 00:40:26,140 --> 00:40:27,160 Maybe that's future work. 619 00:40:27,160 --> 00:40:31,260 Maybe, maybe not for us, maybe for one of you who go, ooh, let's go dig into this, right? 620 00:40:31,260 --> 00:40:32,920 And see what they fixed. 621 00:40:33,120 --> 00:40:46,480 Um, already since we released our code, uh, my friend, our friend Dean Pierce from Portland, whoo, 503, um, has already taken our code and optimized it to be over 600 times faster. 622 00:40:46,480 --> 00:40:52,560 Almost probably a thousand times faster depending on the machine where we were generating a hundred passwords a second. 623 00:40:52,960 --> 00:40:55,900 Dean was generating 68,000 passwords a second. 624 00:40:56,260 --> 00:40:57,960 Uh, per core. 625 00:40:57,960 --> 00:41:10,960 So he made it multi-core and he removed the need to directly set system time, which requires administrator access, by getting rid of that whole call to system time and just putting a value into that register. 626 00:41:10,960 --> 00:41:14,800 So you don't have to call system time, you just plop whatever Unix time you want into there. 627 00:41:14,960 --> 00:41:16,020 And then what else did you do? 628 00:41:16,020 --> 00:41:26,380 You did one other thing, um, oh, you don't need to, uh, to call the DLL each time, which in our code we're calling the DLL because it's like resetting some things that we're not exactly sure about, which takes a lot of time. 629 00:41:26,720 --> 00:41:30,640 You're just reseeding the random number generator directly. 630 00:41:36,900 --> 00:41:47,160 Oh, okay, so it's knopping out part of, so you're patching a different part of the DLL, knopping out some parts that's reseeding something so you don't have to keep calling the, the DLL, which is a huge time savings. 631 00:41:47,160 --> 00:41:48,760 Um, and then he made a command line. 632 00:41:48,980 --> 00:41:52,140 Our code you had to like change the parameters, recompile it, run it. 633 00:41:52,140 --> 00:42:07,840 His is now command line, you put in your start time, your end time, your parameters, and you let it run and now you can create your rainbow, you know, rainbow tables of all of your passwords with the RoboForm password generator, uh, that have been computed prior to apparently their fix in, 634 00:42:07,840 --> 00:42:10,660 uh, in 2015 for 7.9.14. 635 00:42:10,820 --> 00:42:12,300 And maybe, maybe other stuff. 636 00:42:12,300 --> 00:42:13,920 Who knows what's going to come out of this? 637 00:42:17,050 --> 00:42:18,670 Uh, and a couple of resources. 638 00:42:18,670 --> 00:42:20,090 Again, this, these slides will be available. 639 00:42:20,090 --> 00:42:22,930 These are clickable links, um, but all the code is available. 640 00:42:22,930 --> 00:42:33,070 All of Dean's code is also available, um, on GitHub and also linked to from the website and then the original Wired article and then the video, uh, that is, um, is on YouTube. 641 00:42:33,070 --> 00:42:36,790 So that's our story about hacking RoboForm. 642 00:42:36,790 --> 00:42:38,210 Any last words? 643 00:42:39,430 --> 00:42:55,710 I mean, this should also really put in the perspective that, uh, I showed you the examples of the, um, poor seeded random number generators and there was like you standard Unix password manager and Kaspersky. 644 00:42:55,710 --> 00:43:02,390 So it is probably in many things we haven't checked yet just because we thought, okay, this must be secure. 645 00:43:02,390 --> 00:43:04,650 So yes, widespread, right? 646 00:43:04,650 --> 00:43:06,510 This is not the only thing it's still happening. 647 00:43:06,570 --> 00:43:12,350 Go out there and, and find random number generators and you too can also hack time. 648 00:43:12,350 --> 00:43:13,810 So thank you for coming.