1 00:00:00,000 --> 00:00:01,240 Is everybody ready for this? 2 00:00:01,240 --> 00:00:03,620 So like I said, I said I'd be dressed as a clown. 3 00:00:03,620 --> 00:00:04,840 I'm not dressed as a clown. 4 00:00:05,100 --> 00:00:09,260 I'm dressed as Pikachu, kind of. 5 00:00:09,260 --> 00:00:10,900 Some kind of fucked up Pikachu. 6 00:00:13,780 --> 00:00:18,920 Now, I'm going to use the word fuck a lot in this, so if you're offended by the word fuck, probably best to leave the room. 7 00:00:19,400 --> 00:00:22,340 I'll try to keep it to the minimum, but that's probably quite high level. 8 00:00:22,600 --> 00:00:25,120 I'd imagine most of you here know what BitFi is. 9 00:00:25,120 --> 00:00:26,720 So this is a BitFi thing. 10 00:00:27,280 --> 00:00:29,140 I don't really know what you should call it. 11 00:00:29,140 --> 00:00:30,080 It's a device. 12 00:00:30,080 --> 00:00:31,960 It's not the wallet, but there's one there. 13 00:00:31,960 --> 00:00:33,760 We've got one that's broken, one that's working. 14 00:00:33,840 --> 00:00:36,580 But the claim that BitFi said was it was unhackable. 15 00:00:36,580 --> 00:00:39,280 They said the device was completely unhackable. 16 00:00:40,100 --> 00:00:43,440 Now, to work out why they said it's unhackable, we've got to go into cryptocurrencies a bit. 17 00:00:43,560 --> 00:00:47,080 So the way that cryptocurrencies work is you've got a private public key pair. 18 00:00:47,240 --> 00:00:51,660 You deposit funds onto the public key and you need to use the private key to spend those funds. 19 00:00:51,660 --> 00:00:52,600 It's pretty simple. 20 00:00:53,300 --> 00:00:57,840 Now, the problem is if someone gets hold of your private key, they take your private key, they can steal your funds. 21 00:00:57,840 --> 00:01:00,080 So protecting that private key is important. 22 00:01:00,560 --> 00:01:04,940 So what people started doing at first is they started moving their keys onto USB sticks. 23 00:01:05,080 --> 00:01:07,680 So the key wasn't always stored on your laptop. 24 00:01:07,860 --> 00:01:09,060 Now, that kind of works. 25 00:01:09,060 --> 00:01:10,320 It adds some protection. 26 00:01:10,320 --> 00:01:13,760 But the problem is you have to move that key back to the laptop to sign. 27 00:01:13,760 --> 00:01:17,020 When you do that, if your laptop's compromised, you'll lose your key. 28 00:01:17,020 --> 00:01:18,220 You've lost your funds. 29 00:01:19,500 --> 00:01:23,420 Now, the next problem, people, they invented things called wallets. 30 00:01:23,420 --> 00:01:26,220 And those wallets, they're a black box that holds your key. 31 00:01:26,220 --> 00:01:27,420 So they store the key inside. 32 00:01:27,420 --> 00:01:28,960 The key never has to leave. 33 00:01:28,960 --> 00:01:32,460 The idea is you send a transaction through to the wallet and it will sign it. 34 00:01:32,640 --> 00:01:37,840 Now, the problem there is if someone steals your wallet, they can still send a transaction to it and sign it. 35 00:01:38,100 --> 00:01:41,280 So to combat this, what they did was they added pin numbers to the wallets. 36 00:01:41,280 --> 00:01:43,940 So you can type a pin number in to protect that key. 37 00:01:44,280 --> 00:01:48,080 So ledger, trezor, you will type a pin number in before you can use that key. 38 00:01:48,160 --> 00:01:50,120 Again, this is added protection. 39 00:01:50,120 --> 00:01:51,620 Things are getting better and better. 40 00:01:51,980 --> 00:02:00,780 So the next stage, what people do, is they said, well, what happens instead of saying send one bitcoin to cyber Gibbons, what happens if I say send 100 bitcoins to McAfee? 41 00:02:01,080 --> 00:02:03,320 The device, you don't know what it's signing. 42 00:02:03,320 --> 00:02:04,880 You can't tell what it's signing. 43 00:02:04,880 --> 00:02:06,320 So they added displays to them. 44 00:02:06,320 --> 00:02:09,000 So it will say the transaction you're trying to carry out. 45 00:02:09,560 --> 00:02:13,860 Next problem, if I ask someone to generate a password, they'll make a bad password. 46 00:02:13,940 --> 00:02:22,220 So instead of letting users choose passwords, what they do is they use a random number generator that's inside the device, and that will generate the password for you. 47 00:02:22,220 --> 00:02:23,820 So it becomes unpredictable. 48 00:02:24,160 --> 00:02:27,060 So we've got these four things that normal hardware wallets do. 49 00:02:27,200 --> 00:02:28,180 BitFi is different, though. 50 00:02:28,180 --> 00:02:29,160 BitFi is very different. 51 00:02:29,160 --> 00:02:31,180 Do we actually have anyone from BitFi here? 52 00:02:33,820 --> 00:02:35,220 Maybe not admitting it, then. 53 00:02:35,220 --> 00:02:35,960 We'll see. 54 00:02:37,080 --> 00:02:40,180 So what BitFi does is the user has the key. 55 00:02:40,180 --> 00:02:45,440 The user has a seed and a phrase, and every time they want to do a transaction, they'll type it into the device. 56 00:02:45,920 --> 00:02:48,160 It will then sign that transaction and send it. 57 00:02:48,160 --> 00:02:50,920 Now, most people would call this a brain wallet. 58 00:02:51,460 --> 00:02:52,980 It's stored in your brain. 59 00:02:53,020 --> 00:02:58,320 So their kind of thing was, your private keys are never stored anywhere except your own brain. 60 00:02:58,860 --> 00:03:00,620 Now, to me, this sounds like bullshit. 61 00:03:01,020 --> 00:03:03,340 That has got to be typed into the device. 62 00:03:03,340 --> 00:03:07,020 There's no way that key doesn't also exist on the device. 63 00:03:07,500 --> 00:03:09,020 So they set up this bounty. 64 00:03:09,020 --> 00:03:10,520 This is what got us really interested. 65 00:03:10,520 --> 00:03:15,420 It was actually my colleague at the back there who I'm not going to, not going to name because I don't know what his name is. 66 00:03:15,420 --> 00:03:16,100 Dave? 67 00:03:16,800 --> 00:03:17,460 G? 68 00:03:17,500 --> 00:03:18,100 Whatever. 69 00:03:18,100 --> 00:03:18,820 Ali G. 70 00:03:18,820 --> 00:03:19,780 Let's go for that. 71 00:03:19,780 --> 00:03:22,920 Now, this bounty, it said that they deposit the coins onto a BitFi. 72 00:03:22,920 --> 00:03:24,500 Then they give you the BitFi. 73 00:03:24,500 --> 00:03:27,900 They'll send a BitFi to you, and you have to recover the keys from that device. 74 00:03:28,040 --> 00:03:31,520 Now, this kind of sounds like a rigged fairground, fairground game to me. 75 00:03:31,520 --> 00:03:38,080 The bounty here, it's, it's only going to cover one very, very specific attack, which is just attacking the device they've sent you. 76 00:03:38,600 --> 00:03:40,000 They made this really weird statement. 77 00:03:40,000 --> 00:03:46,840 The bounty program is not intended to help BitFi identify security vulnerabilities, since we already claim that our security is absolute. 78 00:03:46,980 --> 00:03:49,400 So they're saying that, that, that device cannot be hacked. 79 00:03:49,400 --> 00:03:52,580 So what's the point in setting up a bounty program if your device can't be hacked? 80 00:03:53,020 --> 00:03:58,000 So what they actually mean by unhackable is it's not vulnerable to one very, very specific attack. 81 00:03:58,000 --> 00:04:06,360 Them sending you a device that they've put a seed and phrase on, probably turned the power off, sent it to you for days in the post, and then you tried to recover the funds off that. 82 00:04:06,380 --> 00:04:10,800 So what we're looking at here is a rigged cold boot attack versus evil maid. 83 00:04:10,800 --> 00:04:14,020 If I can backdoor your device, that's a much more powerful attack. 84 00:04:14,200 --> 00:04:16,680 Now everything I'm going to talk about here, it wasn't me. 85 00:04:16,720 --> 00:04:18,980 I'm, I'm just a dick on the internet, to be honest. 86 00:04:19,340 --> 00:04:22,580 Most other people did the work here, so I'm presenting other people's work. 87 00:04:22,720 --> 00:04:24,060 So we have got the team. 88 00:04:24,920 --> 00:04:31,680 Oddly we got known as Thickmcascale, which is the hacker collective mistakenly known as CyberGift, and somehow sometimes called Oversoft. 89 00:04:32,800 --> 00:04:34,600 The media actually took this and ran with it. 90 00:04:34,600 --> 00:04:37,480 They started calling it Thickmcascale in, in stories. 91 00:04:37,500 --> 00:04:53,300 Um, it was mainly made up of me, a couple of colleagues who don't want to be named, um, Spadawea, who's somewhere between the age of four and 16, depending on who you speak to, um, Oversoft, uh, Ryan Castellucci, who may well be here, I'm not sure, but lots and lots of different people. 92 00:04:53,760 --> 00:04:58,300 Now the claims that BitFi made, now, you all know John McAfee, yeah? 93 00:04:58,480 --> 00:04:59,180 Yeah? 94 00:04:59,180 --> 00:05:00,520 The inventor of cybersecurity? 95 00:05:00,700 --> 00:05:07,440 Well, he was involved with the marketing of this product, and the first thing he does is he says, there is no memory to hack in this device. 96 00:05:07,440 --> 00:05:10,980 No data, all of your money is stored in a memorable phrase of your choice in your head. 97 00:05:11,620 --> 00:05:13,340 There's no memory to hack. 98 00:05:13,520 --> 00:05:14,560 So we got the BitFi. 99 00:05:15,680 --> 00:05:22,740 Um, that, that chip, the one that says 4C in big letters is, is a EMMC flash memory chip. 100 00:05:23,220 --> 00:05:23,700 Hmm. 101 00:05:23,700 --> 00:05:27,800 So we kind of challenged him on this, uh, and he says, there is no RAM. 102 00:05:27,800 --> 00:05:29,680 There is no RAM on the device. 103 00:05:32,160 --> 00:05:38,640 That, that, that, that says LPDDR3, which low power DDR RAM, that's, that's RAM. 104 00:05:38,640 --> 00:05:39,360 Hmm. 105 00:05:39,460 --> 00:05:41,160 It's not looking good here, is it really? 106 00:05:41,160 --> 00:05:43,860 The BitFi wallet is only 120 US dollars. 107 00:05:43,860 --> 00:05:48,400 As a computing device, it's much more costly to manufacture than ordinary hardware wallets. 108 00:05:48,880 --> 00:05:51,460 It's a shitty media tech phone. 109 00:05:51,460 --> 00:05:54,440 It's a, there's nothing to it. 110 00:05:54,440 --> 00:05:58,980 You can buy these devices on AliExpress for 30 bucks. 111 00:05:58,980 --> 00:06:00,200 There's nothing to it. 112 00:06:00,360 --> 00:06:01,660 Uh, we call it a phone. 113 00:06:01,660 --> 00:06:06,060 Um, it's absolutely not a cell phone or anything even resembling a cell phone. 114 00:06:06,060 --> 00:06:07,840 All cell phones are hackable. 115 00:06:08,320 --> 00:06:10,800 That fucking looks like a phone to me. 116 00:06:12,700 --> 00:06:15,540 There was some kind of corroborating evidence here though. 117 00:06:16,300 --> 00:06:16,860 Yeah. 118 00:06:16,920 --> 00:06:18,460 Sim one. 119 00:06:20,840 --> 00:06:22,720 Subscriber identity module maybe? 120 00:06:22,720 --> 00:06:23,380 I, I don't know. 121 00:06:23,380 --> 00:06:25,540 This isn't my specialist subject to be honest. 122 00:06:26,060 --> 00:06:27,480 There's their website. 123 00:06:28,240 --> 00:06:29,920 The image on their own site. 124 00:06:30,060 --> 00:06:32,480 Smartphone dash one dot PNG. 125 00:06:34,680 --> 00:06:36,240 Fucking hell. 126 00:06:37,340 --> 00:06:38,360 Key functions. 127 00:06:38,360 --> 00:06:40,320 Now this is from the FCC documentation. 128 00:06:40,320 --> 00:06:45,700 If you sell a device in the US that transmits Wi-Fi cellular, you have to get it FCC certified. 129 00:06:45,880 --> 00:06:48,460 Now we were quite surprised they actually went to this extent. 130 00:06:48,460 --> 00:06:49,700 Um, it's, it's fairly common. 131 00:06:49,700 --> 00:06:54,640 We, we've actually managed to get a, a, was it a Bluetooth cock ring? 132 00:06:54,640 --> 00:06:55,240 I think. 133 00:06:55,240 --> 00:06:58,000 Withdrawn from the market because it didn't have FCC certification. 134 00:06:58,000 --> 00:07:00,200 But anyway, that's another story for another time. 135 00:07:00,480 --> 00:07:04,560 But the FCC certification calls it a phone. 136 00:07:05,600 --> 00:07:07,640 I'm fairly sure that McAfee is wrong here. 137 00:07:08,020 --> 00:07:11,880 Now people are asking, can't someone just look over your shoulder and see what phrase they are typing? 138 00:07:11,880 --> 00:07:13,100 No, no, no. 139 00:07:13,100 --> 00:07:17,040 The bit five wallet has a screen with an extremely narrow viewing angle. 140 00:07:17,040 --> 00:07:17,700 Try it. 141 00:07:17,700 --> 00:07:18,860 No, you won't be able to see anything. 142 00:07:21,640 --> 00:07:24,860 Again, I'm not an expert in angles or anything like that. 143 00:07:25,100 --> 00:07:26,980 That, that, that looks not narrow to me. 144 00:07:26,980 --> 00:07:29,060 You can read my phrase off that. 145 00:07:29,160 --> 00:07:30,120 It got better though. 146 00:07:30,120 --> 00:07:38,580 So, uh, some guy, uh, who I think was kind of a bit of a, a shill, uh, posted this image saying that you can't read the key off the screen. 147 00:07:38,780 --> 00:07:43,020 Um, so what we did was we, we enhanced the contrast and reduced the brightness slightly. 148 00:07:43,320 --> 00:07:48,120 Um, and thanks to Ryan's help, we wrote a little script that allowed us to convert that. 149 00:07:48,560 --> 00:07:54,040 Um, and what we found out was that the passphrase was in fact, why is Dan so crazy about Monero? 150 00:07:54,160 --> 00:07:57,560 And the seed was test 70 at bit five dot com. 151 00:07:57,700 --> 00:08:04,600 Um, so we'd reconstructed that key from someone posting an image on the internet, proving the point that had a narrow viewing angle. 152 00:08:04,680 --> 00:08:06,960 Uh, we were quite kind about the way we demonstrated this. 153 00:08:06,960 --> 00:08:08,140 We stole his money. 154 00:08:08,320 --> 00:08:17,380 Um, we, we transferred it to another account, um, and paid the transaction fees like, cause we're nice people fundamentally. 155 00:08:17,760 --> 00:08:23,680 Um, the get, the best thing was another one of these kind of guys, he kept on pimping it on, um, on Twitter. 156 00:08:23,960 --> 00:08:34,080 Uh, he said, but in this case, thanks to image editing software or techniques such as techniques required to read Poison's passphrase, it would be possible to attain his phrase. 157 00:08:34,140 --> 00:08:38,700 Without changing brightness contrast, his funds would have been safe. 158 00:08:40,220 --> 00:08:42,040 These are advanced tools. 159 00:08:42,040 --> 00:08:43,720 You thought the NSA had good stuff? 160 00:08:43,720 --> 00:08:44,840 I've got paint. 161 00:08:46,960 --> 00:08:49,000 So we're going to move on to the actual hacks. 162 00:08:49,740 --> 00:08:55,300 Now, the first thing that, that seemed weird was, uh, I don't know if Elliot, whose name I've forgotten is here either. 163 00:08:55,340 --> 00:09:04,380 Um, he got his, and what he noticed was the serial number that's printed in the back of the case differed to the serial number that was on the box that he received. 164 00:09:04,380 --> 00:09:08,260 Now, this isn't great for something where supply chain tampering could be a problem. 165 00:09:08,260 --> 00:09:10,940 In fact, it's quite a big problem that it might have been tampered with. 166 00:09:10,940 --> 00:09:13,840 Um, they didn't really have a particularly good response to that, to be honest. 167 00:09:13,840 --> 00:09:16,620 They didn't really have a particularly good response to any of this. 168 00:09:16,940 --> 00:09:19,420 Um, the first attack we came up with was really simple. 169 00:09:19,440 --> 00:09:24,880 Um, the digitizer, the thing on the screen that detects where your finger goes is I2C, a serial protocol. 170 00:09:24,900 --> 00:09:27,680 Um, and it's unencrypted and exposed. 171 00:09:27,700 --> 00:09:33,060 So I could take a bit file and I can attach to the I2C bus and sniff the key presses. 172 00:09:33,280 --> 00:09:37,200 It's exposed, so you can see the ribbon there where it's got those on. 173 00:09:37,400 --> 00:09:38,800 You, it's even labeled them for me. 174 00:09:38,800 --> 00:09:40,600 So you could definitely fit that in this case. 175 00:09:40,600 --> 00:09:41,240 There's a lot of room. 176 00:09:41,240 --> 00:09:42,920 It's not a very advanced attack. 177 00:09:43,120 --> 00:09:44,820 So the next thing we wanted to do was root it. 178 00:09:44,820 --> 00:09:48,960 Now, I, I'd imagine a few people in this room have worked with MediaTek phones before. 179 00:09:49,020 --> 00:09:52,160 And they kind of got this reputation for being really, really easy to root. 180 00:09:52,360 --> 00:09:57,800 First thing we do is we use their own tool to pull the uh, flash memory out through USB. 181 00:09:58,140 --> 00:10:01,760 Um, that gives us access to all of the partitions, which is pretty easy. 182 00:10:01,840 --> 00:10:09,540 The data partition was actually encrypted, which was unexpected, so we had to root it by modifying the RAM disk, and at which point we had root on that device. 183 00:10:10,180 --> 00:10:19,980 What we then did was took a memory dump off my device, so I'd made a transaction, sent the memory dump to Ryan, and he wrote a little script, um, that pulled out potential candidates. 184 00:10:20,040 --> 00:10:22,660 And you can see there, one , one, one, one, two, two, two, two, two. 185 00:10:22,740 --> 00:10:24,240 That's my seed in phrase. 186 00:10:24,240 --> 00:10:26,000 So he could now steal my funds. 187 00:10:26,360 --> 00:10:29,780 Now, at this stage, BitFi had already been kicking off a bit, and we won a pony. 188 00:10:29,780 --> 00:10:30,700 So this was last year. 189 00:10:30,700 --> 00:10:35,200 Well, I say we won a pony, BitFi won a pony, but I think it might have been a bit more to do with us. 190 00:10:35,540 --> 00:10:38,200 So we got this little gold pony, which is great. 191 00:10:38,440 --> 00:10:40,460 Um, it got better, though. 192 00:10:41,340 --> 00:10:48,880 Um, we had root, and, uh, so what we decided to do was, uh, the typical thing, play Doom on it. 193 00:10:50,040 --> 00:10:54,640 So this is, this is, uh, this is Salim Spadawaya, who's, um, who's doing this. 194 00:10:54,660 --> 00:10:58,240 Um, we posted this to prove we rooted the device. 195 00:10:58,240 --> 00:11:00,800 Um, BitFi said that this wasn't a problem . 196 00:11:00,800 --> 00:11:05,900 You might have noticed right at the beginning of that, there was some wires taped onto the back, and the back was open. 197 00:11:05,900 --> 00:11:07,340 You don't need to do that. 198 00:11:07,340 --> 00:11:11,080 It, we were just using it to distract from the fact that it was so easy to root. 199 00:11:11,920 --> 00:11:14,560 Now, the thing was, they said you could purchase it from any source. 200 00:11:14,560 --> 00:11:23,540 Now, Tracer and Ledger, the supply chain tampering issue, if someone intercepts the Tracer or the Ledger and puts their own firmware, changes the hardware, this is a problem. 201 00:11:23,700 --> 00:11:27,940 These guys were claiming that it wasn't a problem, so someone couldn't man in the middle the hardware. 202 00:11:28,700 --> 00:11:32,160 They said it didn't work because each device has a specific digital signature. 203 00:11:32,160 --> 00:11:35,240 And they were so confident about this, they actually started another bounty. 204 00:11:35,820 --> 00:11:37,580 So, I got a BitFi. 205 00:11:38,060 --> 00:11:46,600 I rooted it, and there you can see the two different processes running, the Knox admin one that does the bulk of the firmware stuff and the Rokits one that does the actual wallet. 206 00:11:47,360 --> 00:11:49,540 I can see it establishing connection out there. 207 00:11:49,900 --> 00:11:55,460 I put my own certificate on the device, and I could intercept all the requests coming to and from the device. 208 00:11:56,320 --> 00:12:02,200 So now when it asks me to sign and pay, as an attacker, I've got the ability to send arbitrary transactions to a device. 209 00:12:02,200 --> 00:12:03,380 I can man in the middle them. 210 00:12:03,380 --> 00:12:05,500 So this digital signature thing, it's crap. 211 00:12:05,500 --> 00:12:06,840 It doesn't exist. 212 00:12:07,280 --> 00:12:13,640 The next attack was after we'd rooted it, what we realized was on Android it's really easy to find the coordinates where you touch the screen. 213 00:12:13,980 --> 00:12:18,240 So you can just read out the ITC, the coordinates, where it's coming from the digitizer. 214 00:12:18,280 --> 00:12:31,920 So I wrote a little script to deal with this, and what that does, you type in the seed and phrase, and if we skip a bit because it's a bit slow, and I can't work out how to do that, um, we do that. 215 00:12:32,560 --> 00:12:36,200 It, it harvests those events, and it sends them through to a remote computer. 216 00:12:36,200 --> 00:12:38,220 So now again, we've got the seed and passphrase. 217 00:12:38,220 --> 00:12:45,080 It wasn't a particularly advanced attack, um, but we made a transaction with the man in the middle bit fi, we'd recovered the seed and phrase, it's done . 218 00:12:47,280 --> 00:12:53,400 Selim, of course, is about 80 times more hardcore than me, and he made a much better attack. 219 00:12:53,620 --> 00:12:56,680 Um, he made it so that it automatically sent it. 220 00:12:56,680 --> 00:12:58,260 There was none of this messing about coordinates. 221 00:12:58,260 --> 00:12:59,680 He recovered it from memory. 222 00:12:59,680 --> 00:13:01,160 It was much more effective. 223 00:13:01,280 --> 00:13:05,420 We pretty much demonstrated that evil made was a real problem. 224 00:13:05,880 --> 00:13:09,260 We told them, and they canceled the bounty. 225 00:13:11,360 --> 00:13:15,080 So once we got the bounty, they said the bounty wasn't there anymore. 226 00:13:15,480 --> 00:13:18,740 Uh, up until this point, they hadn't admitted the keys were ever in RAM. 227 00:13:18,760 --> 00:13:23,440 Uh, and then in the direct message exchange, they did actually say the keys do stay in RAM for a brief period of time. 228 00:13:23,440 --> 00:13:26,160 So if someone can extract that memory, they can get them. 229 00:13:27,800 --> 00:13:29,580 This is kind of what a bit fi looks like. 230 00:13:29,580 --> 00:13:31,620 You've got USB going into the microcontroller. 231 00:13:31,620 --> 00:13:34,720 You've got the keys, which will be stored in DDR RAM at some point. 232 00:13:35,640 --> 00:13:36,920 Now they've made an assumption. 233 00:13:36,920 --> 00:13:43,520 They said, we think that if the guy was able to retrieve the private key from the device or something like that, it would have to be done on a rooted device. 234 00:13:43,640 --> 00:13:46,400 But if you root a device, you have to restart it. 235 00:13:46,400 --> 00:13:48,160 And it wipes the RAM clean. 236 00:13:49,100 --> 00:13:50,440 Now we're hackers. 237 00:13:50,620 --> 00:13:53,700 When you restart it, it wipes the RAM clean. 238 00:13:54,160 --> 00:14:01,460 Now Ryan, who I've just spotted, said much of hacking is about understanding systems better than those who built them and using that knowledge to do what's supposed to be impossible. 239 00:14:02,300 --> 00:14:07,860 So they, they'd assumed because we rebooted the device, there'd be no way to pull those keys from RAM. 240 00:14:08,200 --> 00:14:09,180 They were wrong. 241 00:14:09,860 --> 00:14:13,860 Once again, Salim, he wrote an app, and this was incredible. 242 00:14:13,860 --> 00:14:14,940 It was an Android app. 243 00:14:15,020 --> 00:14:17,020 So we've got an unmodified bit file there. 244 00:14:17,040 --> 00:14:24,200 He's typing his, don't be too salty, and my very, very salty tears, or whatever it is, is his salt and phrase. 245 00:14:26,160 --> 00:14:28,760 Once he's done that, oh, there's no sound. 246 00:14:29,200 --> 00:14:30,640 Oh, okay, it doesn't matter. 247 00:14:31,640 --> 00:14:33,120 It processes that request. 248 00:14:33,120 --> 00:14:34,440 So it sent that transaction. 249 00:14:34,780 --> 00:14:35,520 Success. 250 00:14:35,520 --> 00:14:37,280 He's now going to power off the device. 251 00:14:37,300 --> 00:14:39,440 So he's proving it's not modified like a magician. 252 00:14:39,600 --> 00:14:41,920 Plugs in USB, reboots the device. 253 00:14:42,480 --> 00:14:50,440 The attacking device then routes it after it's rebooted, scans the memory, and within a few seconds, it's recovered the key. 254 00:14:51,120 --> 00:14:53,380 Now, this is a complete break of the device. 255 00:14:53,380 --> 00:14:56,820 Not only is evil made a problem, but cold boot is also a problem. 256 00:14:57,100 --> 00:15:00,620 It's, it's not better than storing it on a USB stick, to be honest. 257 00:15:01,040 --> 00:15:02,140 Then it gets fun. 258 00:15:02,140 --> 00:15:03,140 That's the technical bit. 259 00:15:03,140 --> 00:15:04,220 Now the fun starts. 260 00:15:04,220 --> 00:15:05,520 It's their response. 261 00:15:07,400 --> 00:15:09,920 No one gets a RAM and penny from the wallet. 262 00:15:09,920 --> 00:15:11,560 All these hack claims are meaningless. 263 00:15:11,560 --> 00:15:14,260 No one came, came close to taking the coins from it. 264 00:15:15,320 --> 00:15:20,020 It took a bit of a dark turn. 265 00:15:20,020 --> 00:15:22,840 So McAfee was denying it and then BitFi tweeted this out. 266 00:15:22,920 --> 00:15:24,940 This is my last tweet as my shift is ending. 267 00:15:24,940 --> 00:15:29,240 But did you guys ever bother to look into who you picked a fight with and the resources these people have? 268 00:15:29,240 --> 00:15:30,280 Not wise. 269 00:15:30,340 --> 00:15:34,440 Remember the lies and deception you deliberately spread about BitFi can have consequences. 270 00:15:34,720 --> 00:15:37,780 That's quite a threatening tweet in the general scheme of things. 271 00:15:37,780 --> 00:15:44,260 I mean, it's, I'd rather get that than a dick pic, but when it comes down to it, well. 272 00:15:44,360 --> 00:15:46,900 Now they claimed that it was actually to do with this. 273 00:15:46,900 --> 00:15:49,000 Now we modified their logo somewhat. 274 00:15:51,320 --> 00:15:54,780 My colleague over there, he's a genius at stuff like this. 275 00:15:54,780 --> 00:15:56,220 I couldn't have done it so good. 276 00:15:56,880 --> 00:15:58,880 That was my avatar for a while. 277 00:15:59,260 --> 00:16:02,680 It, it did appear to irritate BitFi quite a bit. 278 00:16:02,680 --> 00:16:03,840 I guess that was the point. 279 00:16:04,680 --> 00:16:06,680 They also came out with some other brilliant stuff. 280 00:16:06,740 --> 00:16:12,380 We also think it's rather disappointing that a lot of media picked up on claims made by some person hiding behind a picture of a cat. 281 00:16:12,520 --> 00:16:17,500 Now we're not quite sure if they're actually talking about Daniel Gallagher, who is also part of the team, or me. 282 00:16:17,900 --> 00:16:22,380 I mean, I kind of look like a cat with the hood up a bit, I guess, but I don't really know. 283 00:16:22,580 --> 00:16:23,640 Very strange. 284 00:16:24,320 --> 00:16:30,980 And if you look at that guy who's been posting all this, CyberGimmons, the guy posts something every two seconds, 24 hours a day, like he doesn't sleep or something. 285 00:16:30,980 --> 00:16:32,000 No, I don't. 286 00:16:32,280 --> 00:16:36,460 If somebody had a real job in cyber security, they wouldn't have so much time to spend on Twitter. 287 00:16:39,340 --> 00:16:42,020 Might have a point. 288 00:16:42,800 --> 00:16:44,620 Now here's a smart dude making some sense around here. 289 00:16:44,620 --> 00:16:46,800 The yellow cat took too much acid and lost it. 290 00:16:46,800 --> 00:16:52,120 Now this was a, this was an account that was shilling, um, for BitFi on Twitter. 291 00:16:52,200 --> 00:16:58,680 Um, now an interesting thing that we noticed is that when you try and recover a password on Twitter, it leaks some information. 292 00:16:58,680 --> 00:17:07,640 So it leaks the last two digits of the phone number, and it leaks the first two letters of the first part, the email, and the last bit as well. 293 00:17:07,640 --> 00:17:20,300 Now, bitfi.com is fivecharacters.com, and Daniel Kaysen, the CEO or something of BitFi, would fit in that first bit there. 294 00:17:20,360 --> 00:17:24,360 You can also note that down the bottom there, lovecrypto as well, 58. 295 00:17:24,420 --> 00:17:27,220 Um, this was clearly linked to BitFi. 296 00:17:27,720 --> 00:17:29,920 Uh, McAfee really got involved at this point. 297 00:17:30,260 --> 00:17:31,300 Am I a wannabe? 298 00:17:31,300 --> 00:17:33,380 I fucking invented cyber security. 299 00:17:33,380 --> 00:17:35,500 Get your fucking facts right. 300 00:17:38,580 --> 00:17:41,180 I mean, he, he, he wasn't being about for a while. 301 00:17:41,800 --> 00:17:44,380 I don't, I can't remember who made this, but they sent it to me. 302 00:17:44,380 --> 00:17:45,680 I just, just love it. 303 00:17:47,520 --> 00:17:49,060 He put a challenge out to me. 304 00:17:49,060 --> 00:17:51,540 Okay, I have 20 million on my BitFi. 305 00:17:52,000 --> 00:17:54,980 I will pay your way to the states, put you up at my house for as long as you need. 306 00:17:55,140 --> 00:17:57,220 If you give my, if I give you the wallet. 307 00:17:57,220 --> 00:18:03,640 So he was putting a challenge down, 20 million, if I went to the states and attacked his wallet to get those 20 million in coins. 308 00:18:03,980 --> 00:18:14,380 Um, now, I don't know if you know McAfee, you don't, I don't know if you follow him on Twitter, um, but about the same time, serious dudes on a serious mission just received an order of one-off M4s. 309 00:18:15,020 --> 00:18:16,200 That's his house. 310 00:18:16,200 --> 00:18:19,220 He's got guns, really serious guns. 311 00:18:20,700 --> 00:18:23,720 He also hasn't been sober for 41 years. 312 00:18:25,360 --> 00:18:29,300 So he's invited me into his house with big guns and he hasn't been sober for 41 years. 313 00:18:29,300 --> 00:18:30,940 I mean, it's already sounding bad. 314 00:18:31,620 --> 00:18:37,540 Anti-virus inventor John McAfee went on a naked shooting spree because the Belize government wants to assassinate him. 315 00:18:37,680 --> 00:18:42,360 He was in the middle of having sex with his wife when the dogs started barking and he shot holes in the ceiling. 316 00:18:43,720 --> 00:18:46,440 I don't think it's really worth 20 million, to be honest. 317 00:18:48,240 --> 00:18:50,020 He then got a bit threatening on DM. 318 00:18:50,200 --> 00:18:51,760 Your career's finished. 319 00:18:51,820 --> 00:18:53,580 You'll be the laughingstock of the world. 320 00:18:53,580 --> 00:18:54,220 You lost dude. 321 00:18:54,220 --> 00:18:55,640 Go hide under a rock . 322 00:18:56,200 --> 00:18:58,900 He keeps on going with this and then he sends me this weird link. 323 00:18:58,900 --> 00:19:00,320 Now, I don't know if you've heard of Clone Zone. 324 00:19:00,320 --> 00:19:01,280 It's like this website. 325 00:19:01,280 --> 00:19:08,140 It used to be able to take, uh, the New York Times and various websites, clone it and you could modify it and then, you know, make spoof articles about other people. 326 00:19:08,140 --> 00:19:09,820 So he made the, well, I don't know if he made it. 327 00:19:09,820 --> 00:19:11,640 Someone made this one about me. 328 00:19:11,920 --> 00:19:18,680 Andrew Tierney, that's me, aka Cyber Givens Me, cyber security professional, cyber pervert enthusiast. 329 00:19:20,160 --> 00:19:27,720 This, this whole story is about how I'm some kind of like Pikachu pervert but it had this absolutely brilliant phrase in it, smash my jigglypuff. 330 00:19:29,880 --> 00:19:32,900 I still haven't actually found my jigglypuff. 331 00:19:35,340 --> 00:19:37,840 So 11 months later, we thought it all died down. 332 00:19:37,840 --> 00:19:40,100 We didn't really think that much was going to happen. 333 00:19:40,420 --> 00:19:45,120 Um, but Daniel Cason, uh, came along and set up his own Twitter account. 334 00:19:45,120 --> 00:19:50,120 Um, and he started getting a bit, um, responsive. 335 00:19:50,220 --> 00:19:51,520 Your tweets are boring and annoying. 336 00:19:51,520 --> 00:19:57,040 You keep trying to prove to the world that Bitfire's not perfect, yet everyone knows it's not perfect and we're not saying it's perfect. 337 00:19:57,120 --> 00:20:01,760 Now, the thing was, they still haven't informed the customers that they have these problems with their device. 338 00:20:01,760 --> 00:20:03,860 They haven't told them about the evil maid, the cold boot. 339 00:20:03,860 --> 00:20:07,840 They haven't allowed their customers to adjust to the change in the threat landscape. 340 00:20:10,280 --> 00:20:11,580 This tweet's brilliant. 341 00:20:12,000 --> 00:20:17,560 They're not in RAM, they are in RAM, for much less than a second, making extraction impossible. 342 00:20:17,680 --> 00:20:20,840 Now, we all work in security, we know things aren't binary like that. 343 00:20:20,960 --> 00:20:22,960 Some things are hard, some things are easy. 344 00:20:22,960 --> 00:20:25,320 Things are very, very rarely impossible. 345 00:20:25,660 --> 00:20:26,840 It's the bit at the bottom though. 346 00:20:26,840 --> 00:20:30,720 How many innocent people's lives have you put at risk if you're a clown act? 347 00:20:31,260 --> 00:20:38,420 I mean, I think it's a bit unfair calling me a clown, but I'm just thinking what I'm doing right now, stood on this stage, and yeah, maybe I am. 348 00:20:40,300 --> 00:20:54,160 Even more threatening stuff, when the marketing machine turns on and the media is covering all this, your incompetence, arrogance, ill intent towards others, manipulation, irresponsible security practices, an endless list of epic disasters will be fully revealed to the world. 349 00:20:54,700 --> 00:20:57,220 I mean, come on, it's just a vulnerability. 350 00:20:59,720 --> 00:21:01,280 This is epic. 351 00:21:02,820 --> 00:21:04,060 We aren't doing the testing. 352 00:21:04,060 --> 00:21:06,740 So they were claiming that they were getting a third party into test. 353 00:21:06,740 --> 00:21:07,600 I don't know if they are. 354 00:21:07,600 --> 00:21:09,640 I've got no way of telling if anything they say is true. 355 00:21:09,640 --> 00:21:10,680 But they aren't doing the testing. 356 00:21:10,680 --> 00:21:12,400 They're saying that Cellbrite are doing the testing. 357 00:21:12,400 --> 00:21:13,980 Now, I've got lots of respect for Cellbrite. 358 00:21:13,980 --> 00:21:15,780 They do some very impressive stuff. 359 00:21:16,360 --> 00:21:26,620 But it's a bold claim to say that on the internet, and then the VP of research at Cellbrite comes along and says, they did contact us with the request, which we declined. 360 00:21:30,800 --> 00:21:31,680 Muppets. 361 00:21:33,160 --> 00:21:38,520 Now, just to kind of actually give some kudos to them, and they said they were going to open source the code. 362 00:21:38,520 --> 00:21:39,760 Oh, this is so hot. 363 00:21:39,760 --> 00:21:41,960 They said they were going to open source the code. 364 00:21:42,000 --> 00:21:44,520 And they did actually allow access to the code. 365 00:21:44,520 --> 00:21:52,040 Now, to get access to it, you've got to download a binary and do some crazy stuff and send them a key, and eventually you get access to this tool. 366 00:21:52,060 --> 00:21:53,720 And you get access to the source code. 367 00:21:53,720 --> 00:21:56,940 Now, we were kind of expecting some things to have changed since last year. 368 00:21:56,960 --> 00:21:57,880 Not really. 369 00:21:57,880 --> 00:22:08,620 Now, it's important to note that if you ever want to wipe keys from memory in a device, simply overwriting them with zeros is really not enough. 370 00:22:08,740 --> 00:22:10,080 I mean, this is, this is really bad. 371 00:22:10,080 --> 00:22:11,400 This is not the kind of code. 372 00:22:11,400 --> 00:22:14,860 This is the sort of thing you do when you're 17 and messing about. 373 00:22:14,860 --> 00:22:16,240 It's really bad. 374 00:22:16,780 --> 00:22:18,720 It's not going to wipe keys from memory. 375 00:22:18,720 --> 00:22:22,560 An important thing to note about the way that BitFi works is it's running on an Android device. 376 00:22:22,560 --> 00:22:24,240 So you've got the bare metal on the outside. 377 00:22:25,300 --> 00:22:27,380 You've got the Android OS within that. 378 00:22:27,540 --> 00:22:30,260 Then you've got the Android ART inside of that. 379 00:22:30,260 --> 00:22:31,360 But it's also mono. 380 00:22:31,360 --> 00:22:32,280 It's C sharp. 381 00:22:32,280 --> 00:22:37,220 So it's got another layer of indirection and finally you've got the BitFi application within that. 382 00:22:37,340 --> 00:22:41,680 So we're talking a lot of different layers where things can go wrong. 383 00:22:41,720 --> 00:22:45,740 If you wipe memory within mono, it's not going to wipe it all the way up the stack. 384 00:22:45,900 --> 00:22:48,100 C sharp and mono use garbage collection. 385 00:22:48,120 --> 00:22:51,680 So if you put something on the heap, you've actually got no idea where it's going to stay on the heap. 386 00:22:51,680 --> 00:22:53,040 Things can move about. 387 00:22:53,720 --> 00:22:56,140 This is why we could originally recover the keys. 388 00:22:56,240 --> 00:23:01,400 Now they've, they've come up with this really, uh, interesting way of obfuscating the keys. 389 00:23:01,440 --> 00:23:05,320 So previously they were stored simply as, uh, ASCII bytes, I believe. 390 00:23:05,320 --> 00:23:06,420 I think that was how it was. 391 00:23:06,420 --> 00:23:17,760 So now what they do to combat us scraping the memory for ASCII bytes, those long base 64 encoded strings are PNGs of the characters. 392 00:23:17,760 --> 00:23:19,480 So it's a PNG of the letter A. 393 00:23:19,480 --> 00:23:25,880 So rather than have one byte that represents the letter A, you've now got about 60 bytes that represent the letter A. 394 00:23:25,880 --> 00:23:28,140 Now our cold boot attack sometimes failed. 395 00:23:28,180 --> 00:23:30,240 Sometimes the memory would degrade somewhat. 396 00:23:30,240 --> 00:23:33,780 You'd lose a bit of that memory and you'd have to guess the remaining characters. 397 00:23:33,800 --> 00:23:38,600 With this scheme, loads of that can degrade and you're still able to recover the data. 398 00:23:38,880 --> 00:23:40,920 Which we did quite easily. 399 00:23:41,180 --> 00:23:43,760 Um, we lost one character from that. 400 00:23:43,760 --> 00:23:47,020 You can see the, the, the second byte in the sort there is set to zero. 401 00:23:47,020 --> 00:23:49,480 That has actually been successfully wiped. 402 00:23:49,620 --> 00:23:50,740 Which is quite bad. 403 00:23:50,780 --> 00:23:52,720 So a guy called Ben Tasker did a code review. 404 00:23:52,720 --> 00:23:54,440 A really, really in-depth code review. 405 00:23:54,440 --> 00:23:56,340 It's, it's way too much for me to cover here. 406 00:23:56,340 --> 00:23:59,580 Um, he went through, um, a memory dump. 407 00:23:59,780 --> 00:24:03,580 And he, he can recover what my sort and, uh, phrase are from that. 408 00:24:03,580 --> 00:24:06,440 So you can see we've lost that letter E in one location in memory. 409 00:24:06,440 --> 00:24:06,960 That's it. 410 00:24:06,960 --> 00:24:08,620 That's how ineffective it is. 411 00:24:09,300 --> 00:24:11,820 Just looking at the rest of the code quality as well. 412 00:24:12,000 --> 00:24:14,320 Um, this is the, uh, SSL validator. 413 00:24:14,320 --> 00:24:16,820 So it makes a connection out using SSL to their servers. 414 00:24:16,820 --> 00:24:18,980 Now you've got to check that that connection's valid. 415 00:24:18,980 --> 00:24:24,420 And you can see there it says starts with www.bitfi.com. 416 00:24:24,460 --> 00:24:33,580 Now if you've ever done code review, I can register www.bitfi.com.cybergibbons.com and I can intercept SSL communications to these devices. 417 00:24:33,780 --> 00:24:35,360 This code is garbage. 418 00:24:36,220 --> 00:24:37,600 It's really bad. 419 00:24:37,600 --> 00:24:48,160 We haven't even gone into the other parts of it that to sign Bitcoin transactions, sign Apollo transactions, they've just imported arbitrary third party libraries that don't take account of this. 420 00:24:48,600 --> 00:24:52,800 So we got a pony last year, which Ryan collected, which was absolutely awesome. 421 00:24:52,800 --> 00:24:56,080 Uh, but we also got a pony this year. 422 00:24:56,280 --> 00:25:02,300 So I think this is the first time that we've managed it at, at one product's got a pony twice for the same thing. 423 00:25:02,300 --> 00:25:03,740 So lamest vendor on both of them. 424 00:25:03,740 --> 00:25:06,440 The thing I most like about getting the pony is this though. 425 00:25:06,440 --> 00:25:07,600 That's Charlie Miller. 426 00:25:07,600 --> 00:25:09,060 Look at his face. 427 00:25:14,670 --> 00:25:18,430 Now kind of getting a bit into more how we'd fix this. 428 00:25:18,430 --> 00:25:20,970 Now they always say the keys are never stored in RAM. 429 00:25:21,010 --> 00:25:25,270 That's a very different thing saying the keys are stored in RAM for a very, very short period of time . 430 00:25:25,330 --> 00:25:27,690 Now in reality, the bottom part is what's happening. 431 00:25:27,690 --> 00:25:33,490 But if you threat model for that top bit, assuming the keys are never in RAM, you're not going to be truthful to your customers . 432 00:25:33,590 --> 00:25:37,270 There will always be a way to recover those keys from RAM, whatever it is. 433 00:25:37,510 --> 00:25:40,010 So they need to communicate to this, this to their users. 434 00:25:40,010 --> 00:25:41,870 They need to say this device is broken. 435 00:25:41,910 --> 00:25:43,030 So can it be fixed? 436 00:25:43,110 --> 00:25:44,130 Well, maybe. 437 00:25:44,410 --> 00:25:46,250 Could we improve the existing hardware? 438 00:25:46,250 --> 00:25:58,810 Well, yeah, if it had secure boot, if they locked the boot loader so the USB just couldn't pull it out, if they cut the USB data lines, um, which I know was recommended to them, and if they made it take longer than two minutes to root it, it might be a little bit more secure. 439 00:25:59,110 --> 00:26:00,410 Could they improve the software? 440 00:26:00,530 --> 00:26:08,710 Well, yeah, if they stripped down Android a little bit, it was running, uh, a browser, uh, an alarm clock, you know, the standard Android stuff in the background. 441 00:26:08,710 --> 00:26:11,330 So it was always attack surface they had that was unnecessary. 442 00:26:11,710 --> 00:26:17,350 If you get closer to the metal, if you look at ledger and tracer, they're running on microcontrollers using custom code. 443 00:26:17,350 --> 00:26:19,410 It's much easier to validate that. 444 00:26:19,730 --> 00:26:22,630 Secure development practices, um, would be a good thing to do. 445 00:26:22,630 --> 00:26:24,450 And also just fucking test the thing. 446 00:26:24,450 --> 00:26:30,010 It took a, a kid, like Salim is not, he's not had the world experience. 447 00:26:30,010 --> 00:26:32,430 He's not spent hundreds of hours working on these things. 448 00:26:32,430 --> 00:26:37,910 It took him probably three or four days to go from nothing to a fully working cold boot attack. 449 00:26:37,910 --> 00:26:39,430 That's really quite extreme. 450 00:26:40,370 --> 00:26:46,310 If they're going with new hardware, well, we'd suggest they use a microcontroller, secure element, minimize the OS and things like that. 451 00:26:46,310 --> 00:26:49,510 But I think fundamentally the thing with BitFi is they need new people. 452 00:26:50,530 --> 00:26:52,590 They've abused the trust of their customers. 453 00:26:52,590 --> 00:26:54,510 You know, this device is not secure. 454 00:26:54,510 --> 00:26:56,430 It never has been secure for the last 11 months. 455 00:26:56,430 --> 00:26:58,530 As far as we're aware, nothing's changed. 456 00:26:58,930 --> 00:27:01,030 Now, they could demonstrate they've changed. 457 00:27:01,030 --> 00:27:02,850 They could get someone to pen test it. 458 00:27:02,870 --> 00:27:04,370 I'm not fucking doing it. 459 00:27:04,510 --> 00:27:06,930 Um, but they are gonna be here tomorrow, they say. 460 00:27:06,930 --> 00:27:10,010 So, I'm not sure if they're gonna be here or over in the hardware hacking village. 461 00:27:10,010 --> 00:27:14,250 So, I'd suggest maybe if someone could be bothered to take a look at themselves. 462 00:27:14,390 --> 00:27:18,510 Um, we can certainly give you some guidelines on how to root it, how to recover stuff from the memory. 463 00:27:18,650 --> 00:27:20,790 Um, the results might be interesting. 464 00:27:22,570 --> 00:27:24,890 Anyway, that's the end of the talk. 465 00:27:36,860 --> 00:27:38,300 You're all staring at me. 466 00:27:39,200 --> 00:27:43,820 If anyone's got any questions, uh, please ask. 467 00:27:43,820 --> 00:27:44,840 Oh, hi, Ryan. 468 00:27:49,410 --> 00:27:50,890 Oh, yeah, yeah, yeah. 469 00:27:50,890 --> 00:27:51,530 Okay. 470 00:27:51,630 --> 00:27:57,810 So, yeah, if you just want another amusing story, they, they did send us a, um, a bounty device eventually. 471 00:27:57,810 --> 00:27:58,970 It took a lot of convincing. 472 00:27:58,970 --> 00:28:09,970 Um, and when they sent us a bounty device, we rooted it and we found that Daniel Kaysen's, uh, SSID and PSK for his Wi-Fi, his home Wi-Fi, were stored in the device and left in the device. 473 00:28:09,970 --> 00:28:16,970 So, provisioned it at home, put the, the funds onto it, and, uh, left them in there, which allowed us to geolocate his house. 474 00:28:17,390 --> 00:28:20,330 Um, good OPSEC. 475 00:28:21,910 --> 00:28:25,570 There's a million funny things that happened that I've probably completely forgotten about. 476 00:28:26,110 --> 00:28:27,370 It was, it was good fun. 477 00:28:28,050 --> 00:28:29,510 Anything else from anybody? 478 00:28:31,790 --> 00:28:34,490 Am I going to get jumped on the way out by BitFi? 479 00:28:36,770 --> 00:28:37,830 Hope so. 480 00:28:38,790 --> 00:28:39,970 Thank you, people.