1 00:00:00,000 --> 00:00:08,520 Hi, how's it going? I'm Ahn, and this is Ha here, and we're here to give you guys a talk 2 00:00:08,520 --> 00:00:18,120 about malware migrating to gaming consoles. Okay, so, just a sec. So the title pretty 3 00:00:18,120 --> 00:00:23,280 much says it all, but this talk is going to be about how malware can be infected into 4 00:00:23,280 --> 00:00:28,500 gaming consoles and the consequences that can follow and some possible defenses that 5 00:00:28,500 --> 00:00:35,140 can be taken. And also as a side quest, we're also going to see how gaming devices can be 6 00:00:35,140 --> 00:00:44,600 used as attacking tools. So, to give you guys a picture of what's going on, this talk is 7 00:00:44,600 --> 00:00:49,720 going to be about embedded systems and how attackers can use the hardware of these devices 8 00:00:49,720 --> 00:00:56,880 to their advantage. And embedded devices have been around for years, so the security of 9 00:00:56,880 --> 00:00:58,480 these devices will be used in the future. So, this talk is going to be about how these 10 00:01:01,980 --> 00:01:05,760 devices can be used in the future. Okay, so, the technology is kind of old, but new 11 00:01:05,760 --> 00:01:12,000 on the security side. So there's lots of new things still waiting to be discovered on the 12 00:01:12,000 --> 00:01:18,400 security side. The thing is, not so many people are fully aware of these issues. So 13 00:01:18,750 --> 00:01:24,260 these devices can make a good target for attackers and cause a lot, cause a lot of these devices, 14 00:01:24,990 --> 00:01:28,460 particularly smartphones, carry a lot of important personal information. So, there are a lot 15 00:01:28,480 --> 00:01:33,980 information. And we're going to discuss about these issues with a couple of real world examples. 16 00:01:34,840 --> 00:01:40,320 Actually a lot of real world examples so we can make this talk a little bit more interesting. 17 00:01:44,620 --> 00:01:51,340 This is how the presentation is going to be laid out. The second part is actually going 18 00:01:51,340 --> 00:01:57,720 to be divided into two other sections. The first part being how to abuse embedded devices 19 00:01:57,720 --> 00:02:04,200 as an attacker. And the second part is malware on gaming console systems. And we're going 20 00:02:04,200 --> 00:02:08,860 to start out with a little background knowledge and then move on to the more interesting part 21 00:02:08,860 --> 00:02:15,340 of how attackers would use these systems to accomplish their goals. And finally some possible 22 00:02:15,340 --> 00:02:25,640 defensive measures we can take to ruin the attacker's plans. And here comes the obvious 23 00:02:25,640 --> 00:02:27,700 part. Background knowledge. 24 00:02:29,600 --> 00:02:39,360 The piracy of gaming console and smart phones. Now everyone here should know what piracy 25 00:02:39,360 --> 00:02:45,980 is. It's like common knowledge. Illegally downloading and installing paid software 26 00:02:45,980 --> 00:02:51,600 either by hardware or software modifications. And a couple of examples are shown on the 27 00:02:51,600 --> 00:02:57,660 screen. Like a hardware modification on the gaming console on the left side and the 28 00:02:57,660 --> 00:03:04,400 on the bottom the Nintendo R4 to play free games on the Nintendo DS. And everybody's 29 00:03:04,400 --> 00:03:13,780 favorite iPhone jailbreak. Okay. As soon as someone finds a way to bypass the security 30 00:03:13,780 --> 00:03:20,120 on a device and make piracy possible, a massive amount of users dump and crack their games 31 00:03:20,120 --> 00:03:26,860 and software and distribute it using either torrents, P2P or web storage like rapid share. 32 00:03:27,660 --> 00:03:33,520 And then they, the download link or torrent is freely distributed to the public. So all 33 00:03:33,520 --> 00:03:39,700 the general users can download them and this also, this is also how malware is going to 34 00:03:39,700 --> 00:03:49,860 be distributed which I'll discuss about in a moment. And okay. We know that there already 35 00:03:49,860 --> 00:03:54,720 is embedded device malware running in the wild for quite a while. But just to give an 36 00:03:54,720 --> 00:03:55,920 example of a couple of these. 37 00:03:57,700 --> 00:04:04,840 We had on gaming consoles a malware that looks like a homebrew and it actually does have 38 00:04:04,840 --> 00:04:10,980 useful features to make people install these homebrew, I mean these homebrew. But the 39 00:04:10,980 --> 00:04:15,640 attacker made it so that it had a separate thread running in the background doing lots 40 00:04:15,640 --> 00:04:20,220 of other sneaky stuff. And all this is possible because the author of the homebrew application 41 00:04:20,700 --> 00:04:27,240 is the author of the malware itself. So, and he can choose to add whatever functionality 42 00:04:27,660 --> 00:04:34,080 he wants in his own source code. Of course, he would have to release a clean version of 43 00:04:34,080 --> 00:04:39,040 the homebrew to the public. But the executable file will have the malware contained inside. 44 00:04:39,360 --> 00:04:45,680 And nobody will really recognize unless someone is monitoring the network or attempts to reverse 45 00:04:46,100 --> 00:04:54,040 engineer the binary which not so many people do. So the second case is a cracking tool 46 00:04:54,040 --> 00:04:57,640 that advertises itself as a way of advertising the network as a source code. And so this is 47 00:04:57,640 --> 00:05:03,620 breaking the security of a device, somewhat like jailbreaking, and makes the users run 48 00:05:03,620 --> 00:05:09,440 it on their system, but then eventually it just wrecks the machine and breaks the system 49 00:05:09,440 --> 00:05:10,580 or something like that. 50 00:05:12,060 --> 00:05:18,020 These are the two kinds of malware on gaming systems that were publicly discovered so far. 51 00:05:18,480 --> 00:05:23,480 And on the other hand, there were quite a few malware on smartphones. A couple of them 52 00:05:23,480 --> 00:05:28,680 are presented here, but I'm sure that there's a lot more that antivirus companies obtained 53 00:05:28,680 --> 00:05:32,000 secretly but didn't release to the public. 54 00:05:32,480 --> 00:05:39,640 And these are the more popular ones that were made public on the Web. The iPhone malware 55 00:05:39,640 --> 00:05:46,460 targeting default passwords, and Windows Mobile Symbian and Blackberry malware, and there 56 00:05:46,460 --> 00:05:53,400 was even a toaster rootkit that Matt Tassano showcased a few years ago. Some people might 57 00:05:53,480 --> 00:05:59,860 know. And there's of course the Android rootkit that was discussed here at DEF CON a couple 58 00:05:59,860 --> 00:06:00,460 of hours ago. 59 00:06:04,920 --> 00:06:14,180 Now let's see what the general public thinks about this situation. And the thing is, generally 60 00:06:14,180 --> 00:06:21,540 users don't even think or want to think that malware runs on these devices because that 61 00:06:22,520 --> 00:06:23,120 sort of stuff. 62 00:06:23,120 --> 00:06:28,200 It gives them a headache. And they just think about that, they just think that the application 63 00:06:28,200 --> 00:06:33,880 they're installing right now is completely safe or somewhat safe. And they usually only 64 00:06:33,880 --> 00:06:38,140 see that the application is running properly with no error or crashes. 65 00:06:38,420 --> 00:06:44,120 And personally, I think, I don't think any normal person not related to security in any 66 00:06:44,120 --> 00:06:50,060 way will think that malware is running on their device until, like, a big black screen 67 00:06:50,060 --> 00:06:53,100 pops up saying that your device has been hacked. 68 00:06:53,100 --> 00:07:00,420 Roll on floor or something like that. But anyone who has common sense will try to make 69 00:07:00,420 --> 00:07:05,400 a malware as stealthy as possible. So that's one thing that brings a false sense of security 70 00:07:05,400 --> 00:07:07,440 to the general users. 71 00:07:08,280 --> 00:07:19,460 And however, however, these devices have all the necessary hardware to run malware. So 72 00:07:19,460 --> 00:07:23,080 even recent gaming consoles are becoming so much easier to run malware on their devices. 73 00:07:23,080 --> 00:07:29,080 Much like a computer, that it's becoming questionable whether it's impossible to run malware on 74 00:07:29,080 --> 00:07:29,560 these systems. 75 00:07:31,580 --> 00:07:37,440 Now the question is, how would an attacker use these systems to their advantage? 76 00:07:38,940 --> 00:07:45,680 We'll start off by showing gaming consoles as an attacking tool because the method of 77 00:07:45,680 --> 00:07:50,980 generating attacking tools is the base concept of generating malware on gaming consoles. 78 00:07:51,160 --> 00:07:52,780 So we're going to start with that. 79 00:07:52,900 --> 00:07:53,060 Okay. 80 00:07:54,240 --> 00:07:59,920 And we already know that gaming consoles have high quality hardware. And a lot of people 81 00:07:59,920 --> 00:08:05,420 contribute to the gaming console scene, hacking scene, eventually bringing it to the level 82 00:08:05,420 --> 00:08:11,720 where homebrew applications for that particular system is possible, generating homebrew applications. 83 00:08:12,320 --> 00:08:18,760 So having a complete development environment for homebrew applications, an attacker can 84 00:08:19,620 --> 00:08:23,060 effectively create tools that run on the target gaming console. So we're going to start off 85 00:08:23,060 --> 00:08:27,780 with the game console system. And the advantage of running these tools on a gaming console 86 00:08:27,780 --> 00:08:33,800 is that bringing a gaming console in a corporate or company will make people less cautious 87 00:08:33,800 --> 00:08:40,140 than bringing a laptop or a computer. Because generally people don't think that gaming consoles 88 00:08:40,140 --> 00:08:50,360 can be used as an attacking tool. So this is how the scenario, attack scenario goes. 89 00:08:50,560 --> 00:08:53,040 The attacker connects to an internal network. And the attacker connects to an internal 90 00:08:53,040 --> 00:08:57,900 network in a company and performs any kind of attack possible within the internal network. 91 00:08:58,480 --> 00:09:03,720 And essentially the concept is pretty much the same as attacking an internal network 92 00:09:03,720 --> 00:09:14,860 with a smartphone. But a Nintendo DS is used in its place. And now we're going to show 93 00:09:14,860 --> 00:09:19,980 a couple examples of what kind of attacks can be performed using these concepts. And 94 00:09:19,980 --> 00:09:23,020 the first demo is using Nintendo DS. 95 00:09:23,040 --> 00:09:28,120 This is a Nintendo DS to attack a remote host using a known exploit and compromising the 96 00:09:28,120 --> 00:09:31,660 host. So we'll put the camera on screen right now. 97 00:09:37,180 --> 00:09:47,340 And this is a Nintendo DS that has all the tools needed for attacking. And it's going 98 00:09:47,340 --> 00:09:49,880 to attach to the network with wireless. 99 00:09:53,800 --> 00:09:59,560 And as you can see, the DS is running games with R4. And we're going to run our homebrew 100 00:09:59,560 --> 00:10:07,240 Meta Desploit, which is already running already. It was inspired from Metasploit. 101 00:10:07,280 --> 00:10:13,960 So the name might be a little queer. But anyway, we're going to search for a usable 102 00:10:13,960 --> 00:10:22,000 access point right now. And there's one called IP time. If you see an access point with the 103 00:10:22,000 --> 00:10:28,060 name IP time, it means nothing's been touched since the router was purchased. So it most 104 00:10:28,460 --> 00:10:31,700 likely uses a default password. So we're going to use that one. 105 00:10:33,100 --> 00:10:45,160 And successfully connected. And now actually there's seems to be a problem. 106 00:10:55,380 --> 00:10:57,540 Okay. Trying again. 107 00:11:16,940 --> 00:11:21,980 Okay. There seems to be some work going on. 108 00:11:21,980 --> 00:11:35,040 wireless issues here. But this is embarrassing. We kind of predicted this would happen and 109 00:11:36,140 --> 00:11:45,800 we ‑‑ hold on a sec. Okay. We're just going to skip this demo then and go on to 110 00:11:45,800 --> 00:12:02,280 the next one. Okay. This one is a video to show you a live demo. I mean, we can't show 111 00:12:02,280 --> 00:12:09,340 you a live demo because live demos take a little long. So a lot of these demos we prepare 112 00:12:09,340 --> 00:12:14,040 for videos. And one of these ‑‑ this is one of the videos. 113 00:12:14,660 --> 00:12:15,500 Just a sec. 114 00:12:19,960 --> 00:12:30,980 Okay. This is an attack using ARP spoofing. And we assume that this is either a home network 115 00:12:30,980 --> 00:12:42,420 or an internal network in a company. And the bottom screen is ‑‑ whoops. Bottom 116 00:12:42,420 --> 00:12:45,420 screen is there to remote. 117 00:12:45,420 --> 00:12:57,720 Remotely access to two computers on top screen. And on the bottom screen ‑‑ okay. I'm 118 00:12:57,720 --> 00:13:11,240 sorry. Okay. Let's try this again. 119 00:13:12,280 --> 00:13:14,540 Okay. Let's try this again. 120 00:13:14,540 --> 00:13:14,960 Okay. Let's try this again. 121 00:13:14,960 --> 00:13:15,020 Okay. Let's try this again. 122 00:13:15,420 --> 00:13:18,960 Okay. Let's try this again. 123 00:13:18,960 --> 00:13:25,080 And on the bottom screen, it's used to remotely access to two computers on top. And it's checking 124 00:13:25,080 --> 00:13:31,000 that the Internet works by pinging Google. And we're going to constantly ping Google 125 00:13:31,740 --> 00:13:38,560 to see that network is up and running. And same goes with the second laptop. 126 00:13:39,480 --> 00:13:40,080 Okay. 127 00:13:41,320 --> 00:13:41,880 Okay. 128 00:13:44,800 --> 00:13:45,400 Okay. 129 00:13:45,760 --> 00:13:46,280 Okay. 130 00:13:49,040 --> 00:13:49,560 Okay. 131 00:13:52,980 --> 00:13:53,500 Okay. 132 00:13:56,820 --> 00:13:57,340 Okay. 133 00:13:58,160 --> 00:13:58,500 Okay. 134 00:13:59,060 --> 00:13:59,580 Okay. 135 00:14:00,660 --> 00:14:00,800 Okay. 136 00:14:01,800 --> 00:14:01,820 Okay. 137 00:14:01,840 --> 00:14:02,000 Okay. 138 00:14:02,160 --> 00:14:02,180 Okay. 139 00:14:02,200 --> 00:14:02,220 Okay. 140 00:14:02,240 --> 00:14:02,260 Okay. 141 00:14:02,300 --> 00:14:02,360 Okay. 142 00:14:02,420 --> 00:14:02,940 Okay. 143 00:14:03,400 --> 00:14:03,920 Okay. 144 00:14:04,400 --> 00:14:04,560 Okay. 145 00:14:09,460 --> 00:14:09,980 Okay. 146 00:14:28,400 --> 00:14:31,320 So, connecting to an access point right now. 147 00:14:46,080 --> 00:14:49,380 And starting the attack. 148 00:14:55,780 --> 00:15:01,140 And as you can see on both computers, the ping is timing out, meaning the network has 149 00:15:01,140 --> 00:15:01,300 gone. 150 00:15:01,300 --> 00:15:09,500 And Wireshark is showing that somebody is tearing down the network with ARP spoofing. 151 00:15:11,960 --> 00:15:26,300 And then finally, yeah, Google cannot be accessed anymore. 152 00:15:26,700 --> 00:15:28,920 And that's it for the second demo. 153 00:15:43,520 --> 00:15:49,820 And we're going to go back to the first demo, because our guy seems to have fixed the wireless 154 00:15:49,820 --> 00:15:50,820 issues, so... 155 00:15:57,240 --> 00:15:59,320 So this is the Nintendo DS. 156 00:15:59,580 --> 00:16:01,100 And we're going to run the... 157 00:16:01,100 --> 00:16:05,040 Meta Dsploit, D standing for the DS. 158 00:16:08,840 --> 00:16:11,960 And searching for the IP time router. 159 00:16:16,020 --> 00:16:17,160 And connecting. 160 00:16:17,640 --> 00:16:18,940 Hope it works this time. 161 00:16:22,880 --> 00:16:23,520 No? 162 00:16:24,460 --> 00:16:25,340 Come on. 163 00:16:27,680 --> 00:16:28,320 Okay. 164 00:16:30,440 --> 00:16:31,080 Okay. 165 00:16:51,160 --> 00:16:57,860 We'll just move on to the third demo, because the wireless seems to be used by so many people 166 00:16:57,860 --> 00:17:00,840 in this room that it's not quite working. 167 00:17:00,840 --> 00:17:02,280 As it's supposed to. 168 00:17:02,380 --> 00:17:02,920 So... 169 00:17:05,340 --> 00:17:06,800 You're holding it wrong. 170 00:17:07,480 --> 00:17:08,320 . 171 00:17:11,220 --> 00:17:12,060 . 172 00:17:12,060 --> 00:17:12,500 . 173 00:17:12,500 --> 00:17:12,540 . 174 00:17:12,540 --> 00:17:12,780 . 175 00:17:12,780 --> 00:17:13,200 . 176 00:17:14,280 --> 00:17:14,380 . 177 00:17:14,380 --> 00:17:14,840 . 178 00:17:15,480 --> 00:17:16,680 . 179 00:17:16,680 --> 00:17:16,860 . 180 00:17:16,860 --> 00:17:17,460 . 181 00:17:17,460 --> 00:17:18,980 . 182 00:17:24,880 --> 00:17:25,720 . 183 00:17:33,800 --> 00:17:36,520 . . 184 00:17:42,740 --> 00:17:44,140 . 185 00:17:56,000 --> 00:18:14,120 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 00:18:27,140 --> 00:18:28,760 Okay, I'm really sorry about this. 187 00:19:00,960 --> 00:19:02,060 Oh, what is it? 188 00:19:07,040 --> 00:19:10,340 There was a video, video processing, up and down, right? 189 00:19:12,180 --> 00:19:12,740 Can't you do that? 190 00:19:13,540 --> 00:19:14,100 No, I can't. 191 00:19:36,280 --> 00:19:41,820 Okay, and you see a typical computer connected to a home network, and we're connecting to 192 00:19:41,820 --> 00:19:44,100 Google to see that there is nothing wrong with it. 193 00:19:44,100 --> 00:19:44,520 Nothing wrong with the network. 194 00:19:59,400 --> 00:20:00,520 And yeah. 195 00:20:07,800 --> 00:20:10,960 The Google page doesn't look like that, however. 196 00:20:11,380 --> 00:20:13,960 It's a custom page we created for testing purposes. 197 00:20:14,480 --> 00:20:15,080 Yeah. 198 00:20:19,420 --> 00:20:20,020 GEORGE VER guild. 199 00:20:21,780 --> 00:20:22,380 . 200 00:20:22,380 --> 00:20:22,620 . 201 00:20:22,620 --> 00:20:23,400 . 202 00:20:23,400 --> 00:20:23,580 . 203 00:20:23,580 --> 00:20:23,640 . 204 00:20:23,640 --> 00:20:23,940 . 205 00:20:23,940 --> 00:20:24,160 . 206 00:20:35,000 --> 00:20:35,600 . 207 00:20:35,600 --> 00:20:35,780 . 208 00:20:39,560 --> 00:20:40,160 . 209 00:20:43,480 --> 00:20:44,080 . 210 00:20:57,200 --> 00:20:58,600 Okay. 211 00:20:58,600 --> 00:20:59,280 Okay. 212 00:21:14,780 --> 00:21:15,440 Finally. 213 00:21:17,160 --> 00:21:21,040 And this is a custom Google page that we created. 214 00:21:24,700 --> 00:21:28,680 And opening up Fireshark now to monitor the packets. 215 00:21:32,640 --> 00:21:36,300 Now we're going to run the inject frame homebrew. 216 00:21:36,700 --> 00:21:40,860 What it does is insert an iframe in a page by modifying the packets. 217 00:21:40,860 --> 00:21:54,860 So connecting to an access point now. 218 00:21:57,060 --> 00:22:04,220 And we're going to set the IP of the DS manually because there is a glitch in the homebrew 219 00:22:04,220 --> 00:22:05,480 that we didn't manage to fix. 220 00:22:05,580 --> 00:22:07,380 But it's just a little extra work. 221 00:22:07,480 --> 00:22:07,660 So. 222 00:22:10,360 --> 00:22:10,840 Okay. 223 00:22:14,280 --> 00:22:18,160 Writing down the subnet mask and gateway and connect it. 224 00:22:18,580 --> 00:22:25,860 And seems like the attack just started. 225 00:22:26,480 --> 00:22:27,860 And look at the packets. 226 00:22:28,160 --> 00:22:31,740 We can see that tons of ARP packets are being sent by the homebrew. 227 00:22:31,860 --> 00:22:37,100 And these packets make the host think that the DS is a gateway and make all the traffic 228 00:22:37,100 --> 00:22:38,000 go through the DS. 229 00:22:38,180 --> 00:22:40,060 And the DS modifies these packets. 230 00:22:40,860 --> 00:22:42,100 And resends it to the host. 231 00:22:42,380 --> 00:22:50,960 So when you look at the Google source code again, nothing has changed because of the 232 00:22:50,960 --> 00:22:51,600 DNS cache. 233 00:22:52,060 --> 00:22:56,080 So we're going to refresh it now to reflect the changes. 234 00:22:56,360 --> 00:23:01,160 And then we see that a new iframe code is injected in the page. 235 00:23:01,640 --> 00:23:07,080 The iframe page will consequently load a malicious page created by the malware author. 236 00:23:07,520 --> 00:23:10,340 And that's about it for the Nintendo DS. 237 00:23:19,840 --> 00:23:21,320 I'll see you next time. 238 00:23:22,460 --> 00:23:23,100 Thank you, everyone. 239 00:23:23,100 --> 00:23:30,500 And then now that's it for the Nintendo DS. 240 00:23:30,620 --> 00:23:33,220 And now we'll talk about malware on gaming consoles. 241 00:23:33,460 --> 00:23:38,540 And we particularly targeted the system, Nintendo Wii. 242 00:23:38,720 --> 00:23:40,320 And the reason is that. 243 00:23:40,320 --> 00:23:46,360 that. As you can see on the picture on the left side, Wii is marked as the second most 244 00:23:46,360 --> 00:23:52,700 pirated system among all gaming consoles. And also, according to a survey, a lot of 245 00:23:52,700 --> 00:23:58,800 companies put Nintendo Wii in their break room to increase morale. And I don't exactly 246 00:23:58,800 --> 00:24:07,260 know why Nintendo Wii would increase morale more than Xbox or PS3, but I've seen a lot 247 00:24:07,260 --> 00:24:12,600 of Nintendo Wiis myself at a couple of companies I visited, so we decided to give it a shot. 248 00:24:15,600 --> 00:24:22,160 And now that we have the target system, we should know how games work on the Wii. And 249 00:24:22,160 --> 00:24:28,660 all games contain a single file with a .doll extension, which you can think of as a main 250 00:24:28,660 --> 00:24:35,020 executable file. And this .doll file contains all the code needed to run the game. And according 251 00:24:35,020 --> 00:24:37,240 to the file format, it's essentially the same as the .doll file, but it's a little 252 00:24:37,240 --> 00:24:41,920 bit more complex. It's actually a stripped-down version of an ELF file, with the non-important 253 00:24:41,920 --> 00:24:54,440 data, such as debugging data and compiler-specific data, all stripped out. So when you actually 254 00:24:54,440 --> 00:24:59,660 play the game, the execution goes from the system menu, and the system menu being the 255 00:24:59,660 --> 00:25:05,980 first screen where you see a lot of selection boxes, and to the app loader, which does all 256 00:25:05,980 --> 00:25:06,860 the initializing. 257 00:25:08,020 --> 00:25:14,260 And finally, to the actual game. And like I said, the .doll file contains all the code 258 00:25:14,260 --> 00:25:20,140 needed for the game to run. So that file must be the most interesting one for our purposes. 259 00:25:23,480 --> 00:25:30,800 So how exactly would malware be injected? Since we know that a .doll file is basically 260 00:25:30,800 --> 00:25:36,800 an ELF file, it seems that the techniques used in ELF malware can be used. 261 00:25:37,240 --> 00:25:44,320 But the thing is, calling the internal WE functions is not as simple as using a couple 262 00:25:44,320 --> 00:25:50,040 system calls. And there really isn't such thing as imported functions in WE executables. 263 00:25:50,300 --> 00:25:56,280 They're pretty much just statically linked into the binary. So we decided to use a different 264 00:25:56,280 --> 00:26:01,080 kind of approach. What we did was statically compile all the 265 00:26:01,080 --> 00:26:06,860 library code in our homebrew application, which is done by default anyway, and fix the 266 00:26:06,860 --> 00:26:12,460 image space to some place in the game memory that's not occupied. And after that, attach 267 00:26:12,460 --> 00:26:19,420 our homebrew application to the game executable, and fix the header in the game .doll file 268 00:26:19,760 --> 00:26:24,680 to reflect the changes. And the entry point will be changed to the entry point of the 269 00:26:24,680 --> 00:26:29,060 homebrew. And after the homebrew finishes running, the execution will be transferred 270 00:26:29,060 --> 00:26:35,640 to the game, which requires a small jump patch in the executable code. And there's also a 271 00:26:35,640 --> 00:26:36,840 place in the homebrew application that we can apply the code. We're going to use the 272 00:26:36,860 --> 00:26:43,740 homebrew that causes problems. So after making those last fixes, all you have to do is pack 273 00:26:43,740 --> 00:26:51,020 it back neatly into a game ISO file and distribute it to the public using torrents or POP or 274 00:26:51,020 --> 00:26:59,440 whatever you like. And there's a small tool I made that semi-automates the injection process. 275 00:26:59,440 --> 00:27:07,180 And I'm not trying to give you a full walkthrough of how to create Wii malware. But just to give 276 00:27:07,180 --> 00:27:11,740 you guys an idea of how it works. I'll show you a little demo. 277 00:27:22,060 --> 00:27:28,920 First you have to extract all the files out of the game ISO file. Which I won't show you 278 00:27:28,920 --> 00:27:29,420 because it's impossible to do. So I'm just going to show you guys an example of how to 279 00:27:29,440 --> 00:27:36,640 takes more than five or ten minutes. And my favorite tool for that purpose is WIT, W-I-T, 280 00:27:36,800 --> 00:27:46,900 WIT. And this is the extracted game image, which is Okami extracted. We use Okami here 281 00:27:46,900 --> 00:27:53,940 for the example. And normally the main DOLE file is at the sys folder. So finding that 282 00:27:53,940 --> 00:28:12,880 main DOLE and copying to the injector tool directory right now. And you can see that main 283 00:28:12,880 --> 00:28:17,780 DOLE file right there. And that has all the game code in it. So we're going to copy it. 284 00:28:17,880 --> 00:28:23,920 Well, it's already copied to the injector directory. So moving on to the injector 285 00:28:24,920 --> 00:28:31,480 The injector needs three files and three addresses to work correctly. So and these addresses 286 00:28:31,480 --> 00:28:36,340 can be found in IDA. So we fire up IDA and load up the homebrew. 287 00:29:02,780 --> 00:29:16,140 And this is the assembly code of the executable code of the homebrew file. And 288 00:29:25,780 --> 00:29:31,660 I'm going to skip all the analyzing part. And this address right at this part, 289 00:29:31,740 --> 00:29:38,240 this is a branch instruction. And that branch is the last branch taken before the system 290 00:29:38,240 --> 00:29:44,500 completely shuts down. So we're going to use that branch as a trampoline to the gaming, 291 00:29:44,600 --> 00:29:48,240 to the actual game DOLE file. So that's going to be the first address. 292 00:29:57,300 --> 00:30:08,180 And then this part of the code writes to someplace outside the game address space, so it's writing 293 00:30:08,180 --> 00:30:13,640 to an invalid memory. I don't know why it's doing that, but I tried noping, I mean, like, 294 00:30:13,740 --> 00:30:19,460 removing that whole part out, and then there was no problem running the homebrew, so I 295 00:30:19,460 --> 00:30:26,880 just, like, removed, noped that whole part out. And that's the start, starting address 296 00:30:27,280 --> 00:30:32,840 of that code section is going to be the second address. And the third address is going to 297 00:30:32,840 --> 00:30:37,820 be the image space of the game dole file. So we're going to open the game dole file 298 00:30:37,820 --> 00:30:38,600 in the hex editor. 299 00:30:55,740 --> 00:31:03,380 And the entry point is at a fixed location in the dole file, and the dole file format 300 00:31:03,380 --> 00:31:13,460 is pretty much publicly released, so that fixed location is E0, which contains the D 301 00:31:13,460 --> 00:31:19,340 word, 800403C. And that's going to be our 302 00:31:19,340 --> 00:31:21,360 third address. And... 303 00:31:42,060 --> 00:31:49,320 So yeah, you first write the file that's going to be injected. And then you're going to 304 00:31:53,560 --> 00:31:54,280 write the address for it. And look, if 305 00:31:54,280 --> 00:31:57,260 join them together. And you go all the way down there. To the resultant file. I mean, 306 00:31:57,260 --> 00:31:58,000 the 307 00:31:58,840 --> 00:32:12,080 file...The homebrew application. And then you write down the resultant file that has 308 00:32:12,080 --> 00:32:19,320 the injected data in it, and then you write down the three addresses that areCome on, 309 00:32:19,340 --> 00:32:28,420 we just found before. And I don't quite remember the addresses, so I can't quite write it down 310 00:32:28,420 --> 00:32:32,680 there. But that's how this injector works. And after you execute it, you have a main 311 00:32:32,680 --> 00:32:41,980 Dole file that has the injected code in it. And all you have to do is put that resulting 312 00:32:41,980 --> 00:32:49,880 main Dole file in its original place in the game image. And then you repack it into an 313 00:32:49,880 --> 00:32:57,620 ISO. And then all you have to do is distribute it to forums or torrents and places like that. 314 00:32:57,720 --> 00:33:06,940 And people will download it. And hopefully, not hopefully, but they will accidentally 315 00:33:06,940 --> 00:33:11,000 have malware running on their gaming systems. 316 00:33:11,200 --> 00:33:11,960 So that's how it works. 317 00:33:11,980 --> 00:33:12,660 And that's it for the demo. 318 00:33:32,940 --> 00:33:34,440 And this is 319 00:33:41,000 --> 00:33:46,820 how the attack scenario is going to look. The scenario is pretty much the same as the 320 00:33:46,820 --> 00:33:54,400 Nintendo DS. A NAV user brings a hacked Wii device inside a company connecting to the 321 00:33:54,400 --> 00:33:59,560 internal network and plays one of the games he downloaded off the web. Actually, it doesn't 322 00:33:59,560 --> 00:34:04,320 always have to be a USB hard drive connected to the Wii. 323 00:34:04,440 --> 00:34:11,180 The user could just download the game, and then he could burn it on the disk, and that 324 00:34:11,180 --> 00:34:19,600 would create the same effect. And that game, in fact, contains the malware. So all the 325 00:34:19,600 --> 00:34:25,220 attacks presented in the Nintendo DS section can be performed on the Wii, including some 326 00:34:25,220 --> 00:34:27,220 new ones, which will be shown next. 327 00:34:51,100 --> 00:35:03,060 So that's it for the demo. 328 00:35:03,460 --> 00:35:03,960 I hope you enjoyed it. 329 00:35:03,960 --> 00:35:04,020 And I'll see you guys in the next one. 330 00:35:04,040 --> 00:35:04,060 Bye. 331 00:35:04,080 --> 00:35:04,100 Bye. 332 00:35:04,100 --> 00:35:04,200 Bye. 333 00:35:04,440 --> 00:35:05,220 , 334 00:35:05,220 --> 00:35:11,060 The first demo is about malware attacking remote hosts on the same network. And the 335 00:35:11,060 --> 00:35:16,780 Wii is assumed to be already connected to the network, and it's also connected to an 336 00:35:16,780 --> 00:35:22,640 external hard drive, which contains a game that the user downloaded off the web. So the 337 00:35:22,640 --> 00:35:29,080 attacker has a remote access tool running in the background to use after the attack 338 00:35:29,080 --> 00:35:33,920 has succeeded. And now we're going to launch the game to 339 00:35:33,920 --> 00:35:35,460 see if the malware runs. 340 00:36:07,940 --> 00:36:14,560 Okay. Unfortunately, the wireless, too many people are accessing the wireless right now, 341 00:36:14,640 --> 00:36:23,100 and we can't do a live demo in this kind of environment. So we'll just have to go with 342 00:36:23,100 --> 00:36:23,460 the video. 343 00:36:37,760 --> 00:36:45,460 So, yeah, that's the game list screen. And the user is running the game now, which is Mario. 344 00:36:48,420 --> 00:36:57,800 And what the malware does is it attacks hosts on the network using no vulnerabilities or zero 345 00:36:57,800 --> 00:37:03,600 days, and installs a backdoor on the compromised hosts. So, like, after the game starts, a new 346 00:37:03,600 --> 00:37:03,900 user can access the game. 347 00:37:03,920 --> 00:37:09,800 And the user is shown on the Pro Act console. And you can do lots of things on the target computer, 348 00:37:10,000 --> 00:37:15,020 like taking screen shots and accessing file system and all that stuff the backdoors can do. 349 00:37:15,220 --> 00:37:17,180 So that's it for the first demo. 350 00:37:26,980 --> 00:37:33,900 And the second demo is the malware bringing down the network by accessing the router with the 351 00:37:33,900 --> 00:37:42,340 weak or default password. And the we should be connected to an internal network, which we see. 352 00:37:43,000 --> 00:37:46,100 And we see that the Internet is accessible. 353 00:37:54,680 --> 00:37:59,820 And we have ping running in the background to check the network's condition. 354 00:38:00,560 --> 00:38:00,980 . 355 00:38:02,940 --> 00:38:11,560 The router IP shows 9.49.9.2. Right there on the right. 356 00:38:15,460 --> 00:38:17,660 And we're about to run the game now. 357 00:38:17,660 --> 00:38:17,880 . 358 00:38:27,200 --> 00:38:33,520 The malware in this one uses a default password to access the router and kind of plays around 359 00:38:33,520 --> 00:38:35,240 with the settings in the router. 360 00:38:36,620 --> 00:38:37,260 . 361 00:38:42,100 --> 00:38:43,880 And the game is loading up. 362 00:38:45,820 --> 00:38:46,340 . 363 00:38:52,080 --> 00:38:53,040 Taking a while. 364 00:38:54,360 --> 00:38:54,880 . 365 00:39:03,800 --> 00:39:05,180 Okay, the game is playing. 366 00:39:05,340 --> 00:39:05,860 . 367 00:39:05,860 --> 00:39:12,280 And ping is starting to fail. 368 00:39:12,420 --> 00:39:16,200 And Google is not accessible anymore. 369 00:39:17,480 --> 00:39:18,120 . 370 00:39:20,460 --> 00:39:21,600 Skip this part. 371 00:39:22,760 --> 00:39:23,400 . 372 00:39:25,920 --> 00:39:31,720 And the router IP is changed to a bogus IP, including the DNS and the gateway address. 373 00:39:31,980 --> 00:39:32,500 . 374 00:39:32,500 --> 00:39:34,280 And that's it for the second demo. 375 00:39:34,700 --> 00:39:35,340 . 376 00:39:45,480 --> 00:39:53,280 And the third demo is kind of long, but we're going to kind of skip a lot through 377 00:39:53,280 --> 00:39:55,040 it because we don't have enough time. 378 00:39:55,340 --> 00:39:55,840 . 379 00:39:57,080 --> 00:40:03,280 And the third demo is to show a malware redirecting the user's request to the attacker's server 380 00:40:03,280 --> 00:40:04,880 using DNS farming. 381 00:40:04,880 --> 00:40:05,020 . 382 00:40:05,020 --> 00:40:10,340 So the attacker created a fake DEFCON page to collect the ID and password. 383 00:40:10,820 --> 00:40:11,540 . 384 00:40:12,920 --> 00:40:20,460 And to make the users access the fake page, we run a custom DNS server and monitor the 385 00:40:20,460 --> 00:40:22,780 ID and pass info with tail. 386 00:40:22,940 --> 00:40:23,320 . 387 00:40:23,320 --> 00:40:26,880 And we're running a botnet IRC server in the background. 388 00:40:27,660 --> 00:40:28,020 . 389 00:40:30,160 --> 00:40:32,180 So we're pinging DEFCON now. 390 00:40:32,460 --> 00:40:33,180 . 391 00:40:36,840 --> 00:40:42,180 Which shows the IP address of 173.14.whatever. 392 00:40:43,280 --> 00:40:43,460 . 393 00:40:43,460 --> 00:40:47,100 And now we're going to run the infected game. 394 00:40:49,140 --> 00:40:49,820 . 395 00:40:57,340 --> 00:40:59,520 And the game is running. 396 00:41:00,280 --> 00:41:00,960 . 397 00:41:20,260 --> 00:41:21,100 It's running. 398 00:41:21,100 --> 00:41:21,780 And here we go. 399 00:41:21,780 --> 00:41:22,200 And the one that's missing is the IP address. 400 00:41:22,200 --> 00:41:28,800 And the Google and DEFCON sites show the IP, the same IP as the DNS server, so you 401 00:41:28,800 --> 00:41:43,380 you can see that the user's request to both pages are being redirected. And the fake page 402 00:41:43,760 --> 00:41:49,440 logs the ID and password to the attacker's server, which is shown on the screen right 403 00:41:49,440 --> 00:42:00,540 now. And when the user accesses Google, then Google loads a malicious page. This page is 404 00:42:00,540 --> 00:42:10,200 also created by the attacker. And the malicious page in turn downloads a backdoor. Actually 405 00:42:10,200 --> 00:42:18,760 a botnet client and in just a second, the system should ‑‑ I mean, the client should 406 00:42:18,760 --> 00:42:19,420 join the user. 407 00:42:19,420 --> 00:42:23,700 the zombies should join the botnet server, which you can see on the screen right now. 408 00:42:25,800 --> 00:42:34,960 So these are the kinds of things you can do with malware injected in console games. 409 00:42:37,440 --> 00:42:40,340 And this concludes the section on gaming consoles. 410 00:42:40,680 --> 00:42:47,580 And next I wanted to talk a little bit more about malware on smartphones, but due to the 411 00:42:47,580 --> 00:42:53,120 time constraints, I guess I'll have to kind of fly through the slides. 412 00:42:55,000 --> 00:43:00,680 What I want to demonstrate is that the same malware injection techniques presented in 413 00:43:00,680 --> 00:43:04,040 the previous slides can also be implemented in smartphone applications. 414 00:43:04,380 --> 00:43:06,520 So we'll first start with iPhone. 415 00:43:08,800 --> 00:43:13,180 And basically an iPhone application package is a zip file. 416 00:43:13,300 --> 00:43:17,560 And after unpacking it, you can find the main executable inside, which is a 417 00:43:17,580 --> 00:43:18,260 Mac O binary. 418 00:43:18,560 --> 00:43:24,980 And since malware injection techniques for Mac OS X existed for several years, and all 419 00:43:24,980 --> 00:43:33,420 iPhone and Mac executables are in Mac O format, all the malware techniques for Mac can be 420 00:43:33,420 --> 00:43:34,700 used for iPhone binaries. 421 00:43:34,920 --> 00:43:40,400 The only difference is that after the injection is done, the binary has to be signed and repackaged 422 00:43:40,400 --> 00:43:46,460 into an IPA file and finally added to the Hekulis database so the general users can 423 00:43:46,460 --> 00:43:46,980 download it. 424 00:43:47,580 --> 00:43:55,860 And I was supposed to show a little demo for a proof of concept, but since time is 425 00:43:55,860 --> 00:43:57,260 short, we'll have to skip that. 426 00:44:09,140 --> 00:44:12,280 And the same thing can be done with Android applications. 427 00:44:12,960 --> 00:44:17,320 There's already various tools out there that can modify the APK files. 428 00:44:17,320 --> 00:44:22,820 And we covered the Java source code and other tools that can modify the binary and intermediate 429 00:44:22,820 --> 00:44:23,480 code level. 430 00:44:23,660 --> 00:44:28,720 And with these tools, the attacker can add custom code into the existing application 431 00:44:28,720 --> 00:44:32,380 either in source code or intermediate code level. 432 00:44:32,900 --> 00:44:40,380 So the same things can be, same malware techniques, injection techniques can be performed on smartphones. 433 00:44:42,380 --> 00:44:44,660 And that's all for the attacking part. 434 00:44:46,560 --> 00:44:46,880 And. 435 00:44:49,160 --> 00:44:50,360 The defenses. 436 00:44:51,740 --> 00:44:59,440 This part is supposed to be like three minutes, but time, we kind of ran out of time. 437 00:44:59,560 --> 00:45:07,420 So if anyone has questions about how to defend from these malware attacks, then you can come 438 00:45:07,420 --> 00:45:09,720 to me personally and I'll answer your questions. 439 00:45:10,420 --> 00:45:15,160 And so, yeah, that's pretty much it. 440 00:45:15,260 --> 00:45:15,780 And. 441 00:45:15,780 --> 00:45:21,780 This whole presentation was to show you that malware can run on these devices and all the 442 00:45:21,780 --> 00:45:26,900 stuff we showed earlier can happen in the near future or could already be happening 443 00:45:26,900 --> 00:45:27,320 right now. 444 00:45:27,540 --> 00:45:35,080 So to sum it up all in one sentence, yeah, download games at your own risk or more like 445 00:45:35,080 --> 00:45:38,020 download games but play them at your own risk. 446 00:45:38,580 --> 00:45:42,880 And this concludes our presentation and thank you for listening. 447 00:45:45,780 --> 00:45:47,700 That's it folks. 448 00:45:47,700 --> 00:45:49,160 Bye.쿠 449 00:45:49,160 --> 00:45:49,280 do Ieg3