1 00:00:00,000 --> 00:00:10,280 Okay. So owning the enterprise with the Blackberry. I am Zeon. Some of you here know me as Zeon. 2 00:00:10,440 --> 00:00:18,140 I'm also known as Jesse Deguano. I'm a founder and director of professional services and 3 00:00:18,140 --> 00:00:25,020 research with Praetorian Global, a consulting company in Northern California. And also a 4 00:00:25,020 --> 00:00:31,280 core member and current team captain of Digital Revelation. We're a security research group 5 00:00:31,280 --> 00:00:38,840 who actually formed here about five, six years ago, kind of centering around the DEF CON 6 00:00:38,840 --> 00:00:43,300 capture the flag originally. And we've done some things since then, but we usually seem 7 00:00:43,300 --> 00:00:52,660 to participate in the capture the flag events. So who here uses Blackberry? Who has a Blackberry? 8 00:00:53,740 --> 00:00:54,300 Wow. 9 00:00:55,020 --> 00:01:04,880 I have a feeling more than that. Lots and lots of people use Blackberries. It's, according to 10 00:01:04,880 --> 00:01:10,980 Gartner, they're the market share lead for handhelds. And I thought it was pretty interesting 11 00:01:10,980 --> 00:01:17,140 when Research in Motion was going through the whole copyright issue, and there was a potential 12 00:01:17,140 --> 00:01:23,660 for an injunction that government and emergency workers were going to be, it seemed like, 13 00:01:23,820 --> 00:01:25,000 exempt from that. 14 00:01:25,020 --> 00:01:31,200 Because it was critical infrastructure. So I thought it was worth investigating a little bit more as far as the 15 00:01:31,200 --> 00:01:37,080 security of it. I'm going to take some time and go over kind of the background of how the Blackberry 16 00:01:37,080 --> 00:01:46,160 solution works. In case for anybody who's not familiar with how it does the thing it does, here's a 17 00:01:46,160 --> 00:01:55,000 diagram of a typical Blackberry, corporate Blackberry installation. Pretty much. You've got your, you've got your 18 00:01:55,020 --> 00:02:01,640 mobile devices here, I apologize, I apologize for I thought that we could get the slides for part of it 19 00:02:01,640 --> 00:02:09,120 on both screens. We're going to have a couple demos. So if you can't see very well, I would miss 20 00:02:09,120 --> 00:02:16,380 out on the crowd, I apologize. But anyway. So you've got your, your portable, your handheld devices, 21 00:02:16,420 --> 00:02:25,000 who, which connect to some wireless carrier, Nextel, or Singular, or whatever your carrier of Yasu 22 00:02:25,000 --> 00:02:30,120 choice is. And then you've got this little cloud as if any of you saw FX's talk, he kind 23 00:02:30,120 --> 00:02:36,600 of goes into that as well, where you've got a bunch of arrows on the diagrams, but nobody 24 00:02:36,600 --> 00:02:42,660 really knows what the RAM network really does. And then that tunnels over the internet to 25 00:02:43,660 --> 00:02:52,240 basically your corporate network. So the BEZ and also different elements that are associated 26 00:02:52,240 --> 00:02:58,880 with the BEZ lie on your corporate network. BEZ is Blackberry Enterprise Server. There's 27 00:02:58,880 --> 00:03:06,120 also the MDS, which is a component of that, the mobile data service and attachment service 28 00:03:06,120 --> 00:03:12,040 and different things like that that can either be on one machine or separated into multiple 29 00:03:12,040 --> 00:03:20,480 machines. Then I have just, typically the BEZ talks with the exchange box or Lotus or 30 00:03:20,480 --> 00:03:20,780 whatever. 31 00:03:21,320 --> 00:03:22,080 05.00 32 00:03:22,080 --> 00:03:22,180 05.00 33 00:03:22,180 --> 00:03:22,980 05.00 34 00:03:22,980 --> 00:03:28,100 depending on your installation. And then basically just whatever other 35 00:03:28,100 --> 00:03:32,800 application services and things like that that you provide access to from your Blackberry. 36 00:03:34,020 --> 00:03:41,300 This also, typically users have a workstation on the corporate network that as long as it's 37 00:03:41,300 --> 00:03:50,720 on the domain and that user has a Blackberry assigned to them, then there's this relationship 38 00:03:50,720 --> 00:03:52,040 between when they sync. 39 00:03:52,040 --> 00:03:55,580 the BlackBerrys and it does magical stuff that we'll go over later. 40 00:03:56,400 --> 00:04:04,060 So to break it down a little bit as far as how that all, how it works, how you can actually 41 00:04:04,870 --> 00:04:11,880 access internal applications and internet sites and things like that and your mail and 42 00:04:11,880 --> 00:04:14,040 your calendaring and all of that from your BlackBerry. 43 00:04:14,040 --> 00:04:22,900 First, the MDS actually creates an outbound TCP connection from inside your network out to RIM. 44 00:04:23,080 --> 00:04:30,140 You actually, you have to of course create, allow this by creating firewall rules and then 45 00:04:30,140 --> 00:04:38,980 negotiation takes place between RIM's side and your MDS or your BEZ MDS and that creates kind 46 00:04:38,980 --> 00:04:43,360 of a persistent tunnel between the BEZ and 47 00:04:44,040 --> 00:04:45,020 your, and RIM. 48 00:04:48,880 --> 00:04:55,200 That in turn, the BlackBerry, I'll go back for a second, the BlackBerry is of course 49 00:04:55,200 --> 00:05:01,440 connected to the wireless carrier and so with, somewhere in that little, that RIM cloud, 50 00:05:01,680 --> 00:05:08,260 the mystery network, it gets connected and gets end-to-end encryption between the handheld 51 00:05:08,260 --> 00:05:12,100 device and your BEZ and MDS and all of that jazz. 52 00:05:12,320 --> 00:05:13,680 So you end up with basically 53 00:05:13,680 --> 00:05:14,820 something kind of like this. 54 00:05:14,980 --> 00:05:23,820 It's a persistent tunnel through the internet from, from your BEZ out to the internet through 55 00:05:23,820 --> 00:05:28,140 RIM's network, through the, the carrier network and to your handhelds. 56 00:05:28,160 --> 00:05:35,000 And so basically your handheld then ends up virtually on your internal network, which 57 00:05:35,000 --> 00:05:40,180 looks great because you can then access all your internal apps and browse websites that 58 00:05:40,180 --> 00:05:43,080 only you could if you're in the office, things like that. 59 00:05:43,960 --> 00:05:45,920 Anybody see any problems with that though? 60 00:05:48,260 --> 00:05:55,100 Typically handhelds, the security of handhelds, the, the, is usually focused around the data 61 00:05:55,100 --> 00:06:00,320 on the handhelds, email, things like that, not what risk it can pose to your internal 62 00:06:00,320 --> 00:06:00,660 network. 63 00:06:00,900 --> 00:06:08,380 Here we have an always on, always connected, code running device that sits on your internal 64 00:06:08,380 --> 00:06:08,800 network. 65 00:06:09,780 --> 00:06:12,940 So here's a, just a, you know, simple review of. 66 00:06:13,500 --> 00:06:14,280 Of that. 67 00:06:14,520 --> 00:06:16,200 I think I skipped a slide basically. 68 00:06:18,780 --> 00:06:26,220 So the big problem and, and the reason why we figured that this research was a, a good 69 00:06:26,220 --> 00:06:30,320 thing to do and giving a talk, this talk was a good thing to do was to increase the awareness 70 00:06:31,380 --> 00:06:37,060 with, with Blackberry users and administrators as to what the dangers, the, the potential 71 00:06:37,060 --> 00:06:37,960 dangers could be. 72 00:06:39,060 --> 00:06:41,480 And what an attacker could possibly do. 73 00:06:41,480 --> 00:06:44,640 With the, the typical Blackberry installation. 74 00:06:45,860 --> 00:06:51,180 So it's obviously important to remember that they are computers that sit on your, your network. 75 00:06:51,440 --> 00:06:57,520 And in, in your typical IT infrastructure though, they're not thought of that way. 76 00:06:57,640 --> 00:07:02,380 They're not thought of and, and controlled in the way that, you know, a VPN or a dial-up 77 00:07:02,380 --> 00:07:03,900 solution or something like that would be. 78 00:07:04,100 --> 00:07:07,380 So you obviously end up with, with big problems. 79 00:07:08,980 --> 00:07:11,160 So we can exploit this problem obviously. 80 00:07:11,160 --> 00:07:12,380 That's why we're all here. 81 00:07:13,480 --> 00:07:18,640 So there's this app, this little application we threw together called BB Proxy. 82 00:07:18,900 --> 00:07:26,700 And what BB Proxy does is first it creates an outbound socket connection from your Blackberry 83 00:07:26,700 --> 00:07:31,900 device out to an arbitrary control, attacker controlled host on the intranet. 84 00:07:34,100 --> 00:07:35,660 Kind of like that. 85 00:07:38,580 --> 00:07:39,800 If you can. 86 00:07:39,800 --> 00:07:43,980 Typically, at least from your, from your Blackberry, you can at least browse websites. 87 00:07:44,240 --> 00:07:51,420 So if the, if you chose to use port 80 or something like that, then obviously, most 88 00:07:51,420 --> 00:07:54,160 likely your, your connection is going to be allowed through. 89 00:07:56,460 --> 00:08:02,860 Then from the attacker controlled host, we have a, a listening socket that, that it, 90 00:08:02,880 --> 00:08:03,720 it's connected to. 91 00:08:03,920 --> 00:08:08,360 And we create, we tell the Blackberry to, to create a subsequent connection. 92 00:08:09,260 --> 00:08:09,780 Okay. 93 00:08:09,800 --> 00:08:11,460 To a, a second host. 94 00:08:12,040 --> 00:08:16,380 And, and the benefit of this is that we can make a subsequent connection now to an internal 95 00:08:16,380 --> 00:08:16,800 host. 96 00:08:18,480 --> 00:08:19,600 Kind of like that. 97 00:08:20,300 --> 00:08:27,380 So now from our attacker controlled host, we can directly talk to a, a machine on the 98 00:08:27,380 --> 00:08:32,260 internal network and, and not have to worry about, you know, silly firewalls on, on the 99 00:08:32,260 --> 00:08:32,540 perimeter. 100 00:08:33,560 --> 00:08:34,040 Okay. 101 00:08:43,160 --> 00:08:43,600 Okay. 102 00:08:43,800 --> 00:08:49,040 So, I think, yeah, I have a, we'll do a little demo. 103 00:08:51,760 --> 00:08:58,040 To just show how that works, what I'm going to do is just start up a, a netcat listener. 104 00:08:59,260 --> 00:09:00,260 Hold on one second. 105 00:09:02,040 --> 00:09:02,480 Okay. 106 00:09:02,480 --> 00:09:02,700 Okay. 107 00:09:14,960 --> 00:09:21,520 And this will, this will be kind of like our little internal service. Use your imagination 108 00:09:21,520 --> 00:09:27,020 for what do you want it to be. It could be Telnet or SSH or an intranet site or whatever. 109 00:09:28,160 --> 00:09:41,660 And on this host, crap, hold on one second. 110 00:09:58,860 --> 00:10:01,040 We'll start another listener. This will be 111 00:10:01,040 --> 00:10:07,840 our attacker host over here. So we have our attack host here on the Internet on this side 112 00:10:07,840 --> 00:10:18,340 and our friendly little intranet site here, here. So what we'll do is, again, just Netcat 113 00:10:18,340 --> 00:10:18,660 listener. 114 00:10:21,960 --> 00:10:22,480 . 115 00:10:23,900 --> 00:10:24,420 . 116 00:10:24,420 --> 00:10:24,760 . 117 00:10:24,760 --> 00:10:24,820 . 118 00:10:24,820 --> 00:10:24,980 . 119 00:10:24,980 --> 00:10:25,000 . 120 00:10:25,000 --> 00:10:25,200 . 121 00:10:25,200 --> 00:10:25,240 . 122 00:10:25,240 --> 00:10:25,260 . 123 00:10:27,480 --> 00:10:28,320 . 124 00:10:28,320 --> 00:10:28,840 . 125 00:10:31,280 --> 00:10:32,120 . 126 00:10:32,120 --> 00:10:34,900 Now from the Blackberry, we'll fire up BBProxy. 127 00:10:40,420 --> 00:10:48,160 Oh, forgot to rename that. And usually . 128 00:11:13,800 --> 00:11:16,340 Do you mind questions during the talk or you want them afterwards? 129 00:11:16,760 --> 00:11:17,940 No, you can go ahead. 130 00:11:18,140 --> 00:11:24,920 So, maybe I missed it, but this is predicated on being able to actually get code 131 00:11:24,920 --> 00:11:31,460 to run on the handheld, which requires it to be signed and hashed by RIM, which means 132 00:11:31,460 --> 00:11:32,360 they know about it, right? 133 00:11:33,580 --> 00:11:33,980 Sure. 134 00:11:34,460 --> 00:11:35,680 Well, we'll get to that, actually. 135 00:11:35,700 --> 00:11:35,860 You will? 136 00:11:35,980 --> 00:11:36,220 Okay. 137 00:11:36,280 --> 00:11:36,540 Yes. 138 00:11:36,540 --> 00:11:36,860 Cool. 139 00:11:36,920 --> 00:11:39,020 Just wanted to make sure that I didn't miss something. 140 00:11:39,140 --> 00:11:39,360 Thank you. 141 00:11:39,760 --> 00:11:40,280 Oh, no. 142 00:11:40,540 --> 00:11:41,480 It's all right, I think. 143 00:11:42,380 --> 00:11:42,880 Let's see. 144 00:11:43,760 --> 00:11:44,160 . 145 00:11:52,460 --> 00:11:54,300 We usually do, don't we? 146 00:11:57,960 --> 00:12:05,240 Okay, so, what we get is a helpful little message here that asks to enter the destination 147 00:12:05,240 --> 00:12:09,820 host and port in kind of standard fare, so, we're... 148 00:12:12,820 --> 00:12:13,340 Okay. 149 00:12:17,240 --> 00:12:18,880 Actually, let me kill this first. 150 00:12:19,160 --> 00:12:19,600 Sorry. 151 00:12:21,700 --> 00:12:28,400 I need to prove that we can't, I can't just connect to that, you know, because we could 152 00:12:28,400 --> 00:12:29,100 be cheating. 153 00:12:34,840 --> 00:12:35,280 So. 154 00:12:36,520 --> 00:12:36,960 . 155 00:12:38,700 --> 00:12:39,140 Okay. 156 00:12:39,600 --> 00:12:39,900 All right. 157 00:12:40,320 --> 00:12:40,760 All right. 158 00:12:41,200 --> 00:12:41,640 Okay. 159 00:12:43,240 --> 00:12:43,680 All right. 160 00:12:46,060 --> 00:12:46,940 Let's see. 161 00:12:52,940 --> 00:12:54,600 It's one, two, three, four. 162 00:12:58,200 --> 00:12:58,760 So. 163 00:13:00,060 --> 00:13:02,920 It'll sit there and... 164 00:13:05,360 --> 00:13:05,920 Nothing. 165 00:13:07,700 --> 00:13:08,260 Okay. 166 00:13:10,940 --> 00:13:12,000 Can we ping it? 167 00:13:12,280 --> 00:13:12,940 All right. 168 00:13:25,420 --> 00:13:27,460 That's my special ping, actually. 169 00:13:29,000 --> 00:13:29,660 . 170 00:13:34,640 --> 00:13:35,480 All right. 171 00:13:35,780 --> 00:13:37,060 I'll type for real. 172 00:13:38,780 --> 00:13:39,460 . 173 00:13:40,320 --> 00:13:41,000 . 174 00:13:41,000 --> 00:13:41,120 . 175 00:13:41,940 --> 00:13:42,620 . 176 00:13:42,620 --> 00:13:42,920 . 177 00:13:42,920 --> 00:13:43,580 . 178 00:13:51,120 --> 00:13:51,640 . 179 00:13:51,760 --> 00:13:53,080 Hopefully everybody believes it now. 180 00:13:53,360 --> 00:13:53,520 . 181 00:13:54,900 --> 00:13:55,220 . 182 00:13:55,220 --> 00:13:55,320 . 183 00:13:55,320 --> 00:13:55,420 . 184 00:13:56,080 --> 00:13:56,400 . 185 00:13:56,400 --> 00:13:56,560 . 186 00:13:56,560 --> 00:13:56,600 . 187 00:13:56,600 --> 00:13:56,800 . 188 00:13:56,800 --> 00:13:56,900 . 189 00:14:04,980 --> 00:14:05,300 . 190 00:14:05,300 --> 00:14:05,600 . 191 00:14:05,600 --> 00:14:05,620 . 192 00:14:05,620 --> 00:14:06,320 . 193 00:14:09,000 --> 00:14:10,120 . 194 00:14:22,660 --> 00:14:23,780 . 195 00:14:23,780 --> 00:14:24,000 . 196 00:14:24,000 --> 00:14:24,820 . 197 00:14:24,820 --> 00:14:25,240 . 198 00:14:25,980 --> 00:14:26,540 . 199 00:14:26,540 --> 00:14:26,580 . 200 00:14:26,580 --> 00:14:26,700 . 201 00:14:26,700 --> 00:14:26,760 . 202 00:14:28,680 --> 00:14:28,820 . 203 00:14:31,660 --> 00:14:31,800 . 204 00:14:41,460 --> 00:14:41,600 . 205 00:14:41,600 --> 00:14:41,680 . 206 00:14:42,120 --> 00:14:42,260 . 207 00:14:42,740 --> 00:14:42,880 . 208 00:14:42,880 --> 00:14:42,900 . 209 00:14:42,900 --> 00:14:42,920 . 210 00:14:42,920 --> 00:14:42,940 . 211 00:14:42,940 --> 00:14:42,960 . 212 00:14:42,960 --> 00:14:42,980 . 213 00:14:42,980 --> 00:14:43,240 . 214 00:14:43,240 --> 00:14:43,300 . 215 00:14:43,300 --> 00:14:43,320 . 216 00:14:43,320 --> 00:14:48,340 just like it was in Interactive Service because it's being proxied through the conduit of 217 00:14:48,340 --> 00:14:49,440 the BlackBerry, so. 218 00:15:02,560 --> 00:15:03,980 Oh, it's over there. 219 00:15:10,540 --> 00:15:11,540 Okay, cool. 220 00:15:29,180 --> 00:15:30,820 Okay, back to the presentation. 221 00:15:33,240 --> 00:15:33,960 Okay. 222 00:15:39,200 --> 00:15:45,300 So now we saw, we can interact now with a Talnet service or anything on the internal 223 00:15:45,300 --> 00:15:48,580 network without the silly firewall rules getting in our way. 224 00:15:49,780 --> 00:15:51,220 But this is DEF CON, right? 225 00:15:51,380 --> 00:15:55,940 I mean, we came here to break stuff, not just to do things that are nice. 226 00:15:59,120 --> 00:16:01,640 So we've all heard of Metasploit, I think, probably. 227 00:16:02,320 --> 00:16:02,800 . 228 00:16:03,980 --> 00:16:09,220 Yeah, the point click route from Spoonum and H.G. Moore and all those folks. 229 00:16:09,620 --> 00:16:11,340 Well, now it has BlackBerry flavor. 230 00:16:15,520 --> 00:16:22,740 It just basically added a simple function to Metasploit, which will create a listener 231 00:16:23,420 --> 00:16:25,680 and wait for an incoming BlackBerry connection. 232 00:16:26,240 --> 00:16:33,860 Once it gets that connection, it hands it off to, it stores the connection and will 233 00:16:33,980 --> 00:16:36,540 hand it off to whatever exploit calls it. 234 00:16:36,860 --> 00:16:40,820 So we're gonna, I'll go over exactly the details 235 00:16:40,820 --> 00:16:41,620 of that too. 236 00:16:41,840 --> 00:16:45,180 Kind of how easy it is to port exploits over 237 00:16:45,180 --> 00:16:46,440 to use it and things like that. 238 00:16:47,460 --> 00:16:48,260 So basically. 239 00:16:51,640 --> 00:16:54,200 So I'll show a little demo of that. 240 00:16:55,100 --> 00:16:58,220 Pretty much the same thing, except now we're actually 241 00:16:58,220 --> 00:17:01,420 going to exploit a box, so. 242 00:17:13,860 --> 00:17:15,300 Can you clear your screen? 243 00:17:15,740 --> 00:17:16,300 Huh? 244 00:17:16,960 --> 00:17:18,000 Oh, okay. 245 00:17:18,440 --> 00:17:19,000 Clear. 246 00:17:19,520 --> 00:17:20,080 Clear? 247 00:17:20,360 --> 00:17:21,100 Okay, yeah. 248 00:17:26,140 --> 00:17:27,260 Thank you. Better? 249 00:17:28,220 --> 00:17:28,920 No problem, sorry. 250 00:17:39,970 --> 00:17:40,960 Start up Metasploit. 251 00:17:43,040 --> 00:17:44,200 And here. 252 00:17:46,700 --> 00:17:50,520 We have over here, our, our little host here happens 253 00:17:50,520 --> 00:17:53,460 to be a an unpatched XP box. 254 00:17:54,040 --> 00:17:57,600 I know it's not very realistic that there would be on the internal 255 00:17:57,600 --> 00:17:59,160 network, a, a vulnerable machine. 256 00:18:03,080 --> 00:18:05,180 So, just gonna have to use your imaginations. 257 00:18:17,980 --> 00:18:18,420 Okay. 258 00:18:23,520 --> 00:18:24,220 Listener function. 259 00:18:26,000 --> 00:18:27,560 So it sits and it waits for, uh. 260 00:18:27,580 --> 00:18:28,940 Uh, an incoming Blackberry connection. 261 00:18:29,220 --> 00:18:30,440 So actually, yeah, key. 262 00:18:31,040 --> 00:18:47,540 Um, it's 192.168.100, no, 102.100, and port 1455. 263 00:18:52,960 --> 00:18:57,100 Oh, that's right. 264 00:18:57,200 --> 00:18:57,560 Okay. 265 00:19:00,380 --> 00:19:01,700 So that goes out and connects. 266 00:19:02,200 --> 00:19:03,120 And it got the connect. 267 00:19:03,840 --> 00:19:07,600 So now we can go ahead and just, uh, set our, our normal options like we 268 00:19:07,600 --> 00:19:09,580 would whenever we're exploiting a box. 269 00:19:09,720 --> 00:19:10,240 So hold on. 270 00:19:12,360 --> 00:19:12,760 . 271 00:19:14,260 --> 00:19:14,660 . 272 00:19:15,100 --> 00:19:15,500 . 273 00:19:15,500 --> 00:19:16,000 . 274 00:19:16,440 --> 00:19:16,840 . 275 00:19:16,840 --> 00:19:16,940 . 276 00:19:16,940 --> 00:19:16,960 . 277 00:19:20,500 --> 00:19:20,900 . 278 00:19:24,400 --> 00:19:24,800 . 279 00:19:24,800 --> 00:19:24,860 . 280 00:19:24,860 --> 00:19:24,980 . 281 00:19:25,880 --> 00:19:26,280 . 282 00:19:34,780 --> 00:19:34,880 . 283 00:19:39,280 --> 00:19:39,380 . 284 00:19:46,320 --> 00:19:46,420 . 285 00:19:46,420 --> 00:19:46,440 . 286 00:19:46,700 --> 00:19:46,800 . 287 00:19:47,300 --> 00:19:47,400 . 288 00:19:48,960 --> 00:19:49,060 . 289 00:19:51,480 --> 00:19:51,580 . 290 00:19:51,580 --> 00:19:51,600 . 291 00:19:51,600 --> 00:19:51,620 . 292 00:19:51,620 --> 00:19:51,640 . 293 00:19:51,640 --> 00:19:51,660 . 294 00:19:51,660 --> 00:19:51,680 . 295 00:19:51,680 --> 00:19:51,700 . 296 00:19:51,700 --> 00:19:51,760 . 297 00:19:51,760 --> 00:19:51,800 . 298 00:19:51,800 --> 00:19:51,820 . 299 00:19:51,820 --> 00:19:51,860 . 300 00:19:52,120 --> 00:19:52,220 . 301 00:19:53,100 --> 00:19:53,200 . 302 00:19:59,020 --> 00:20:01,720 Okay, so now we just exploit. 303 00:20:12,000 --> 00:20:13,420 And we've got root. 304 00:20:21,820 --> 00:20:23,480 All right, so cool. 305 00:20:23,480 --> 00:20:25,940 We can now root boxes on the internal network. 306 00:21:05,720 --> 00:21:15,160 Okay, so to port an exploit, to use the file handle that we, the connection, it's actually 307 00:21:15,160 --> 00:21:15,620 pretty easy. 308 00:21:15,700 --> 00:21:20,920 I'm just gonna walk you through the amount of code that it takes to port your basic kind 309 00:21:20,920 --> 00:21:23,320 of vanilla TCP exploit over to it. 310 00:21:23,480 --> 00:21:30,880 We use, I used MSASN1, kind of old school exploit, but it's pretty reliable, even though 311 00:21:30,880 --> 00:21:31,420 it's one shot. 312 00:21:34,680 --> 00:21:51,480 So basically first, we, we set the target to the, let's see, I can't hardly see, okay. 313 00:21:51,600 --> 00:21:52,180 So 314 00:21:52,180 --> 00:21:55,260 So we listen for the proxy connection. 315 00:21:55,980 --> 00:22:01,660 There's a global variable set if the Blackberry listener, the listener function has been invoked. 316 00:22:01,740 --> 00:22:05,880 And if we've gotten a connection from that, that's been handed off. 317 00:22:06,000 --> 00:22:09,180 It's set to that global variable proxy con. 318 00:22:11,300 --> 00:22:17,720 Then from there, instead of doing the, we remove the standard kind of socket build stuff 319 00:22:17,720 --> 00:22:20,320 that happens right before an exploit is sent. 320 00:22:21,040 --> 00:22:22,160 So the standard kind of socket build stuff that happens right before an exploit is sent. 321 00:22:22,180 --> 00:22:24,800 Stuff that actually goes and, and makes a connection to a vulnerable service. 322 00:22:25,040 --> 00:22:31,960 And replace it instead with if the, the socket that we got from a Blackberry exists, it sends 323 00:22:31,960 --> 00:22:32,460 it through that. 324 00:22:32,680 --> 00:22:34,900 Otherwise, it sends it, you know, the normal way. 325 00:22:38,280 --> 00:22:44,000 So as you can see, it's pretty straightforward and pretty easy to just port most exploits 326 00:22:44,940 --> 00:22:48,120 to this, to use this conduit. 327 00:22:52,180 --> 00:22:56,720 We sleep a little bit, just so that it, it gives the, the connect, the second connection 328 00:22:56,720 --> 00:22:58,760 a little bit of time to actually make the connection. 329 00:23:00,020 --> 00:23:02,460 And then we send our exploit. 330 00:23:04,040 --> 00:23:11,420 The limitations with, currently, that we have with the Metasploit patches is that it's only, 331 00:23:11,520 --> 00:23:13,580 it's limited to TCP based exploits. 332 00:23:14,360 --> 00:23:16,120 Kind of vanilla TCP based. 333 00:23:16,800 --> 00:23:22,160 We've run into some problems with, with certain RPC protocols and, and other, you know, we've 334 00:23:22,160 --> 00:23:23,100 had those kind of exploits. 335 00:23:23,420 --> 00:23:29,180 And it, it would be really easy to port it over to UDP and also to, to make, to let it 336 00:23:29,180 --> 00:23:32,380 work with some of those as well, but just haven't gotten around to it yet. 337 00:23:32,520 --> 00:23:36,320 So look for an update to these patches. 338 00:23:36,440 --> 00:23:40,260 We're going to, I'm going to provide these patches also to Metasploit so that you can 339 00:23:40,260 --> 00:23:41,180 play around with it. 340 00:23:42,780 --> 00:23:43,880 But check back too. 341 00:23:48,280 --> 00:23:51,260 So one cool thing too. 342 00:23:51,380 --> 00:23:51,660 It. 343 00:23:51,660 --> 00:23:58,400 About this is that we actually have the ability to completely, basically evade all perimeter 344 00:23:58,400 --> 00:23:58,900 defenses. 345 00:23:59,140 --> 00:24:04,080 Not only just can we talk to machines behind the firewall, but because of the functionality 346 00:24:04,080 --> 00:24:12,380 in the BES and MDS, we can, we can really evade IDS sensors on the perimeter as well. 347 00:24:13,440 --> 00:24:18,420 We don't actually need to make, to use the MDS to make the, the first connection. 348 00:24:19,600 --> 00:24:21,260 Most newer devices. 349 00:24:21,660 --> 00:24:27,760 Have a TCP IP stack on them themselves and can make a, a connection from the device side 350 00:24:27,760 --> 00:24:29,660 via the carrier's network. 351 00:24:30,000 --> 00:24:35,720 So what, it's very easy to, to specify this in code. 352 00:24:35,880 --> 00:24:40,500 It's, it's a simple device side equals true or device side equals false in the, the URL 353 00:24:40,500 --> 00:24:41,860 for the connection string. 354 00:24:42,120 --> 00:24:48,420 So what we can do is we can make a, a, the first connection from the device, directly 355 00:24:48,420 --> 00:24:49,140 from the device. 356 00:24:49,260 --> 00:24:51,400 And then the second connection via the MDS. 357 00:24:51,400 --> 00:24:51,520 Yes. 358 00:24:52,460 --> 00:24:59,840 And you're essentially straddling the border because nothing ever actually travels across 359 00:24:59,840 --> 00:25:05,800 the, the perimeter other than through the nice and happy encrypted network that goes 360 00:25:05,800 --> 00:25:07,480 from your BES to your handheld. 361 00:25:11,160 --> 00:25:13,700 A little diagram of how that works. 362 00:25:13,940 --> 00:25:20,000 So the Black, the Blackberry itself is, is just going through the carrier network and 363 00:25:20,370 --> 00:25:20,700 making. 364 00:25:20,700 --> 00:25:28,340 Making the connection to the attacker control box without any, any interaction with the 365 00:25:28,340 --> 00:25:29,860 BES itself or, or the MDS. 366 00:25:30,140 --> 00:25:32,020 This is doing it just on the device side. 367 00:25:34,720 --> 00:25:42,360 Then the second connection is then the one that we, our exploit is going over. 368 00:25:42,500 --> 00:25:48,580 Is actually going through the whole, the, what we described earlier, the, through REMS, 369 00:25:48,580 --> 00:25:49,140 RIMS network. 370 00:25:49,140 --> 00:25:52,500 Through the MDS and into your internal network connection. 371 00:25:52,760 --> 00:25:56,860 So it's a lot, basic, it's a little bit of a complex diagram. 372 00:25:57,240 --> 00:26:01,360 But here you see the, the first connection out to the attacker control box. 373 00:26:01,600 --> 00:26:06,380 And then the second connection going all the way through the RIMS network and the internet 374 00:26:06,660 --> 00:26:08,880 and the firewall and through the MDS. 375 00:26:09,160 --> 00:26:12,500 And then ascend, and, and connecting to an internal host. 376 00:26:12,800 --> 00:26:18,520 So just let, it basically, just like having a machine, a workstation. 377 00:26:19,140 --> 00:26:19,960 Just two ethernet connections. 378 00:26:20,200 --> 00:26:24,900 One inside your, your internal network and one outside on, directly on the internet. 379 00:26:25,080 --> 00:26:26,780 And straddling your perimeter defenses. 380 00:26:27,260 --> 00:26:32,300 Kind of like the reason we usually don't allow dual home systems and, and configurations 381 00:26:32,300 --> 00:26:33,560 in VPNs. 382 00:26:33,660 --> 00:26:37,900 But again, people don't think of this as a, a remote access solution. 383 00:26:41,580 --> 00:26:42,180 Okay. 384 00:26:42,920 --> 00:26:48,100 So the problem with, with this as far as a viable attack vector. 385 00:26:48,280 --> 00:26:49,020 Is that. 386 00:26:49,140 --> 00:26:55,120 It, it really requires control, physical control of a device to put your code on the device. 387 00:26:55,480 --> 00:26:59,940 And, and run it in order to go out to an attacker control host and etcetera. 388 00:27:01,840 --> 00:27:08,000 So the solution to that is a Trojan that you can actually download over the air. 389 00:27:08,300 --> 00:27:13,120 And have the users run without seeing anything of course. 390 00:27:13,300 --> 00:27:14,920 Just like we all know what a Trojan is. 391 00:27:17,220 --> 00:27:18,940 So hot game 2018. 392 00:27:18,940 --> 00:27:22,440 2006 is, has the same functionality of BB proxy. 393 00:27:23,080 --> 00:27:25,260 The user only sees the game interface. 394 00:27:25,740 --> 00:27:27,680 The tic-tac-toe is our hot game. 395 00:27:29,020 --> 00:27:31,900 We have the ability to over the air download. 396 00:27:33,380 --> 00:27:36,200 And of course, this is just a proof of concept. 397 00:27:36,400 --> 00:27:38,540 So it's fairly limited in function. 398 00:27:38,720 --> 00:27:43,980 Just kind of plugged in the, the code from BlackBerry and BB proxy. 399 00:27:44,160 --> 00:27:48,920 But obviously you could use a lot more specialized code. 400 00:27:48,940 --> 00:27:50,120 Control channels and things like that. 401 00:27:50,220 --> 00:27:55,600 Like IRC and also functions to identify kind of the per, the, the internal network structure 402 00:27:55,600 --> 00:27:57,260 and that sort of thing. 403 00:27:57,980 --> 00:28:01,000 Right now we just have a hard coded host inside. 404 00:28:03,060 --> 00:28:04,460 So I'm gonna demo that. 405 00:28:09,540 --> 00:28:14,500 Again with our imaginary vulnerable system on the internal network. 406 00:28:15,520 --> 00:28:16,080 Okay. 407 00:28:30,140 --> 00:28:31,160 Everybody can see? 408 00:28:31,300 --> 00:28:31,740 All right. 409 00:28:36,660 --> 00:28:37,340 Okay. 410 00:28:41,680 --> 00:28:42,360 Okay. 411 00:28:42,360 --> 00:28:42,600 Okay. 412 00:28:46,400 --> 00:28:46,960 Okay. 413 00:28:46,980 --> 00:28:49,460 So hot game 2006. 414 00:28:51,440 --> 00:28:53,040 It's actually flippin' sweet. 415 00:28:53,880 --> 00:28:55,120 You should check it out. 416 00:29:00,680 --> 00:29:01,240 Okay. 417 00:29:01,280 --> 00:29:02,000 So we got the connect. 418 00:29:02,280 --> 00:29:06,140 And Temtel's gonna play tic-tac-toe for us. 419 00:29:06,360 --> 00:29:06,940 Hold on. 420 00:29:13,400 --> 00:29:13,960 Well. 421 00:29:14,180 --> 00:29:14,740 . 422 00:29:16,640 --> 00:29:17,380 Hold on. 423 00:29:23,020 --> 00:29:25,200 Maybe Temtel won't be playing this for us. 424 00:29:27,080 --> 00:29:27,700 All right. 425 00:29:27,720 --> 00:29:28,060 We're back. 426 00:29:28,900 --> 00:29:29,380 . 427 00:29:38,860 --> 00:29:40,420 Our configs are still the same. 428 00:29:40,600 --> 00:29:40,820 So. 429 00:29:41,540 --> 00:29:42,020 . 430 00:29:44,240 --> 00:29:44,720 .