1 00:00:00,000 --> 00:00:06,340 Hi everyone, I'm Eli, and this is Jocelyn, and today we're going to present you Cartograph. 2 00:00:10,000 --> 00:00:23,660 We do a lot of reverse engineering with Jocelyn, and we thought it might be fun to actually apply reverse engineering techniques to games, and that's Cartograph. 3 00:00:23,660 --> 00:00:35,500 So, you see on the slide, you have a hashtag, it's Cartograph. We put for you a video of the demo of the tool, and also already put the slides, so if you want to gather them, you have them gathering directly on Twitter. 4 00:00:36,800 --> 00:00:47,740 So, what is Cartograph? Cartograph is basically a memory analyzer, which we're going to do patching on fly games, and we're going to show you how we can do that, and how efficient it is to hack modern games. 5 00:00:48,160 --> 00:00:53,120 So, why are we trying to do that? For multiple things, so you can do a lot of stuff with Cartograph. 6 00:00:53,300 --> 00:00:53,640 Okay. 7 00:00:53,660 --> 00:01:01,660 You can first try to have units which level faster. We can also have a way to have infinite monies or any resources you want. 8 00:01:01,960 --> 00:01:11,060 And we also have a way to have x-ray vision, meaning we can have, we know what your opponent is doing, and finally, we also have an invisible unit. 9 00:01:11,620 --> 00:01:19,260 Before we start, let me show you what the end result is. So, this is a video of Supreme Commando 2, and if you notice our tank on the bottom, it never dies. 10 00:01:19,420 --> 00:01:22,600 It's a health bar, it keeps replenishing, that's Cartograph in action. 11 00:01:22,920 --> 00:01:23,640 It's basically a tank. 12 00:01:23,660 --> 00:01:24,660 It's basically replenishing the health bar. 13 00:01:25,700 --> 00:01:27,040 So, do you want to know how we do that? 14 00:01:27,540 --> 00:01:27,940 Yes. 15 00:01:29,500 --> 00:01:29,900 Okay. 16 00:01:30,200 --> 00:01:36,560 So, the way we do that is we are doing in-flight memory patching. 17 00:01:36,680 --> 00:01:46,900 So, view your game as a huge chunk of memory, and what we try to do is to modify it, and if you modify it in the right way, then you end up having a nice effect. 18 00:01:47,120 --> 00:01:51,080 So, having a building, having an infinite amount of money, and that kind of stuff. 19 00:01:53,660 --> 00:02:00,160 So, the nice thing about doing in-flight patching of the memory is that it's a generic way to attack game. 20 00:02:00,320 --> 00:02:02,020 You can do this on any kind of game you want. 21 00:02:02,760 --> 00:02:03,560 It's pretty fast. 22 00:02:03,700 --> 00:02:11,840 It turns out that actually looking at the memory and try to reverse the game from the memory is, for me, actually faster than doing a binary analysis. 23 00:02:12,300 --> 00:02:16,580 And finally, it's almost invisible because you're only rewriting a part of the memory. 24 00:02:16,860 --> 00:02:20,920 So, people, it's very hard for a game to know that you, to detect that you did shit. 25 00:02:22,120 --> 00:02:26,020 So, actually, we have some drawback for this kind of game, for this kind of attack. 26 00:02:26,480 --> 00:02:28,780 First, it's really finding a needle in a haystack. 27 00:02:29,120 --> 00:02:35,000 For instance, Supreme Calendar, we just showed it to you, have about 800 megabytes of data. 28 00:02:35,620 --> 00:02:38,640 And what we are looking for, let's say, the map is only one megabyte. 29 00:02:38,780 --> 00:02:41,380 So, you're really trying to find a needle in a haystack. 30 00:02:41,660 --> 00:02:49,560 The other problem we have, and we're going to show you that, is that when you try to rewrite the memory, we don't have no direct control over the algorithm of the game. 31 00:02:49,760 --> 00:02:50,900 So, sometimes, we have a problem. 32 00:02:50,920 --> 00:02:54,840 We have to find a way to trigger the algorithm to do something for us. 33 00:02:55,080 --> 00:02:56,800 And sometimes it works, sometimes it does not. 34 00:02:56,920 --> 00:03:00,620 So, in some cases, it's not as reliable as patching the binary. 35 00:03:03,080 --> 00:03:05,120 So, here is what we're going to present to you. 36 00:03:05,220 --> 00:03:07,560 First, we're going to give you a quick background of the game. 37 00:03:07,880 --> 00:03:09,240 Who is playing game here? 38 00:03:10,360 --> 00:03:10,960 Raise your hand. 39 00:03:11,080 --> 00:03:11,620 Almost everyone. 40 00:03:11,820 --> 00:03:13,080 Okay, so this will be pretty quick. 41 00:03:13,480 --> 00:03:19,700 And then we're going to show you how we can actually really build a map hack, reverse a game, and build a map hack out of it. 42 00:03:20,460 --> 00:03:21,700 With character graph. 43 00:03:22,240 --> 00:03:27,540 Then we're going to show you how we are able to make invisible unit on another game. 44 00:03:27,780 --> 00:03:34,060 And finally, we'll discuss how we can actually rethink the network to prevent being caught when we're cheating online. 45 00:03:34,560 --> 00:03:38,040 And finally, if you've got anymore with us, just fine. 46 00:03:38,060 --> 00:03:39,760 It's going to show you how character graph code is. 47 00:03:39,920 --> 00:03:42,580 And it's going to do, in real time, a map hack for you. 48 00:03:43,040 --> 00:03:43,760 If it works. 49 00:03:45,460 --> 00:03:46,840 So, bit of background. 50 00:03:47,460 --> 00:03:48,560 We all know that. 51 00:03:48,560 --> 00:03:49,380 Money. 52 00:03:49,800 --> 00:03:52,500 That games actually earn a lot of money. 53 00:03:52,840 --> 00:03:55,640 About 273 million this last year. 54 00:03:55,880 --> 00:03:57,900 And there is a ton of different kind of game. 55 00:03:58,340 --> 00:03:59,040 Action game. 56 00:03:59,140 --> 00:03:59,460 Mario. 57 00:04:00,120 --> 00:04:01,160 First person shooter. 58 00:04:01,980 --> 00:04:02,800 Sports game. 59 00:04:04,340 --> 00:04:05,240 World playing game. 60 00:04:05,360 --> 00:04:05,840 World of Warcraft. 61 00:04:06,080 --> 00:04:07,680 Any World of Warcraft player here? 62 00:04:08,620 --> 00:04:09,980 No one is playing World of Warcraft? 63 00:04:10,220 --> 00:04:10,740 Few of you? 64 00:04:11,280 --> 00:04:11,940 I do. 65 00:04:12,180 --> 00:04:12,660 Okay. 66 00:04:13,000 --> 00:04:14,540 And some adventure game. 67 00:04:14,700 --> 00:04:16,400 Not that interesting to cheat on actually. 68 00:04:16,620 --> 00:04:18,160 And finally, strategy game. 69 00:04:18,560 --> 00:04:23,180 And the one we actually did focus on for this talk is these rare strategy games. 70 00:04:23,580 --> 00:04:25,680 Because they are the ones who are the most sold on PC. 71 00:04:27,040 --> 00:04:30,200 We could have done anyone else, any other type of game. 72 00:04:30,360 --> 00:04:31,800 It's just that this one is the most used. 73 00:04:31,900 --> 00:04:33,560 So that's the one we go for. 74 00:04:35,160 --> 00:04:36,780 For those who never see Arateus. 75 00:04:37,040 --> 00:04:40,240 And I think there is almost anyone here who never saw it. 76 00:04:40,760 --> 00:04:41,980 There is a bunch of... 77 00:04:42,420 --> 00:04:44,620 The idea is you want to beat up your opponent. 78 00:04:44,680 --> 00:04:46,860 And to do that, you gather resources. 79 00:04:46,860 --> 00:04:53,380 And then you accumulate them until you can buy stuff like building, units. 80 00:04:54,340 --> 00:04:58,680 And you have what we call a mini map on the corner usually. 81 00:04:58,860 --> 00:05:00,000 Which displays the entire map. 82 00:05:00,280 --> 00:05:02,000 And you see there is a part which is visible. 83 00:05:02,220 --> 00:05:04,260 Which is the part you actually show your opponent. 84 00:05:04,420 --> 00:05:07,600 If your opponent is in this visible section, you see it. 85 00:05:07,780 --> 00:05:13,800 And if you don't, if it's not in this section, it's what we call the fog of war. 86 00:05:14,000 --> 00:05:15,680 It's where you don't have any line of sight. 87 00:05:15,680 --> 00:05:17,600 And if your opponent is here, you don't see it. 88 00:05:18,280 --> 00:05:21,720 All the other idea of the map pack is actually to remove it. 89 00:05:23,080 --> 00:05:28,500 We're going to show you the demo on the most recent game we were able to find. 90 00:05:28,680 --> 00:05:29,880 This is Supreme Commando 2. 91 00:05:30,320 --> 00:05:34,340 It's a fairly straightforward real-time strategy game. 92 00:05:34,480 --> 00:05:35,460 It has been released in March. 93 00:05:35,880 --> 00:05:38,000 So it's the most recent one we came up with. 94 00:05:38,380 --> 00:05:40,680 The newest one is of course Starcraft 2. 95 00:05:40,860 --> 00:05:42,340 We're going to discuss this in a bit. 96 00:05:42,400 --> 00:05:45,520 But we hadn't had the game when we were doing... 97 00:05:45,520 --> 00:05:46,460 This kind of demo. 98 00:05:46,980 --> 00:05:48,540 So fairly recent game. 99 00:05:48,740 --> 00:05:49,980 And you see all our units. 100 00:05:51,460 --> 00:05:57,200 And if we move a unit onto the top, you will see that we are able to see the fog of war in effect. 101 00:05:57,320 --> 00:05:59,860 And our opponent is going to show up. 102 00:06:00,120 --> 00:06:04,240 And all the tutorial for this first part will be to actually lift off this restriction. 103 00:06:05,440 --> 00:06:08,800 So as we said, there is multiple ways to cheat on RTS. 104 00:06:09,660 --> 00:06:11,840 The first one is to try to have more resources. 105 00:06:12,240 --> 00:06:14,380 The second one is having more units. 106 00:06:14,380 --> 00:06:18,540 Some units which are cheaper or have more health points. 107 00:06:18,920 --> 00:06:20,080 Invincible units, if you want. 108 00:06:20,360 --> 00:06:22,740 And finally, you can also do this kind of map hack. 109 00:06:23,120 --> 00:06:25,660 So a map hack visually is just this, right? 110 00:06:25,720 --> 00:06:30,160 We try to rewrite the memory and fool the game into thinking that we can see everything. 111 00:06:30,360 --> 00:06:33,560 So if we are successful, you basically see the entire map. 112 00:06:35,000 --> 00:06:36,400 So there is no spoon. 113 00:06:37,100 --> 00:06:39,360 It might seem that there are three kinds of hacks. 114 00:06:39,580 --> 00:06:44,000 One for resources, one for units, and one for map hacks. 115 00:06:44,000 --> 00:06:44,780 Actually, it's not true. 116 00:06:45,040 --> 00:06:48,220 For our perspective, it's only a bunch of bits. 117 00:06:48,400 --> 00:06:52,100 And all we have to do is find the algorithm to figure out which bits is what. 118 00:06:52,640 --> 00:06:54,200 And try to flip them in the right order. 119 00:06:54,500 --> 00:06:55,680 So we can trigger an effect. 120 00:06:56,140 --> 00:06:59,820 So it's basically going through the matrix and see it and try to modify it. 121 00:07:00,800 --> 00:07:02,380 So how will we build a map hack? 122 00:07:03,620 --> 00:07:04,740 We have to find a way. 123 00:07:04,740 --> 00:07:10,140 The hard part was to find a way to instrument the game in a way that gives us enough information so we know what to look for. 124 00:07:10,660 --> 00:07:12,140 So we do that in three steps. 125 00:07:12,140 --> 00:07:20,540 The first step would be to reduce the part of memory we want to consider as a potential place where the structure is. 126 00:07:20,680 --> 00:07:22,480 Then we want to find it visually. 127 00:07:22,920 --> 00:07:25,940 And then we try to understand it by doing some testing. 128 00:07:26,220 --> 00:07:28,420 And finally, we just rewrite it on the fly. 129 00:07:29,740 --> 00:07:34,280 Either one time or multiple times, depending on which kind of writing we need. 130 00:07:34,740 --> 00:07:38,060 So how we do that is first we acquire the memory. 131 00:07:39,080 --> 00:07:40,960 Cartograph basically reads the entire memory. 132 00:07:40,960 --> 00:07:43,640 That's why we had to move to 64-bit. 133 00:07:43,740 --> 00:07:45,800 That's where actually 64-bit is great for us. 134 00:07:46,060 --> 00:07:56,960 When a game for Super Mario 2 takes like 800 megabytes of memory, we have to have at least 6 or 7 gigabytes of RAM to actually hold it in multiple places and do a lot of computation on it. 135 00:07:57,100 --> 00:07:59,560 So we work on Windows 7 64-bits. 136 00:07:59,920 --> 00:08:02,940 You can't do that in a 32-bit architecture actually. 137 00:08:03,120 --> 00:08:04,400 But memory is cheap, right? 138 00:08:04,620 --> 00:08:08,740 So the first step to instrument the game is we first play the game. 139 00:08:09,280 --> 00:08:10,440 And we try everything. 140 00:08:10,960 --> 00:08:11,660 We start discovering the map. 141 00:08:11,780 --> 00:08:17,860 And we're going only to keep what is the part which did not move because we didn't discover the map. 142 00:08:17,960 --> 00:08:19,620 So it must be a memory which didn't change. 143 00:08:21,080 --> 00:08:24,680 And it should help us to reduce what we are considering. 144 00:08:25,000 --> 00:08:28,660 Then the second step, we're going to discover the map. 145 00:08:29,400 --> 00:08:30,660 And only discover the map. 146 00:08:30,760 --> 00:08:32,160 And this time we ask only the memory. 147 00:08:32,340 --> 00:08:34,100 We only keep the memory which did change. 148 00:08:34,360 --> 00:08:37,840 So it helps us to reduce further how many memory we need to consider. 149 00:08:38,100 --> 00:08:39,580 And finally, we do a third step. 150 00:08:39,580 --> 00:08:40,720 Just to clean up a little bit more. 151 00:08:40,920 --> 00:08:42,060 And we play the game again. 152 00:08:42,840 --> 00:08:47,180 And after that, we should have a fairly small chunk of memory. 153 00:08:47,340 --> 00:08:50,300 Usually 2 or 3 megabytes where we know the map is in it. 154 00:08:50,400 --> 00:08:52,360 And then we have to look at it visually. 155 00:08:52,760 --> 00:08:54,060 That's what we're going to show you. 156 00:08:54,440 --> 00:08:56,900 So how do we acquire the game memory for real? 157 00:08:57,400 --> 00:09:00,360 This is a video of cartography in action. 158 00:09:00,640 --> 00:09:05,380 So we're going to select the process of Supreme Commander. 159 00:09:05,840 --> 00:09:07,640 And then we're going to read the memory from it. 160 00:09:08,260 --> 00:09:11,380 It takes a bit of time because the memory, as I said, is 800 megabytes. 161 00:09:11,660 --> 00:09:15,780 And for each of them, we have to store the address and the value. 162 00:09:15,920 --> 00:09:22,200 So basically, we have to store 1.6 gigabytes of data for this step. 163 00:09:22,280 --> 00:09:23,400 So it takes a little bit of time. 164 00:09:23,580 --> 00:09:25,220 You click on I'm going to do map hack. 165 00:09:25,300 --> 00:09:27,560 There is a ton of buttons in the interface. 166 00:09:28,460 --> 00:09:32,780 For those who wonder, Cartograph has been developed in Csharp.net. 167 00:09:33,580 --> 00:09:34,500 So we do that. 168 00:09:34,660 --> 00:09:37,380 And hopefully, when this step is done, 169 00:09:37,640 --> 00:09:40,240 we can move on and try to do something else, 170 00:09:40,280 --> 00:09:42,160 which is we try to remove unrelated memory. 171 00:09:42,740 --> 00:09:43,360 Same idea. 172 00:09:44,040 --> 00:09:45,280 We go back to the game. 173 00:09:45,400 --> 00:09:47,880 And then we try to trigger as many stuff as we can, 174 00:09:48,540 --> 00:09:50,140 either by creating new units, 175 00:09:50,680 --> 00:09:53,180 looking at our building, rotating the camera, 176 00:09:53,400 --> 00:09:56,780 doing zooming because this game uses a lot of zoom. 177 00:09:57,040 --> 00:09:59,360 So basically, we try to change as many memory 178 00:09:59,360 --> 00:10:03,480 which is unrelated to the game to narrow down what we have. 179 00:10:03,600 --> 00:10:06,280 And then we ask Cartograph to remove everything which did change. 180 00:10:06,280 --> 00:10:07,720 And this is actually faster. 181 00:10:07,900 --> 00:10:11,860 And we're going to basically knock off about 100 megabytes of data 182 00:10:11,860 --> 00:10:13,320 which is not related to the map. 183 00:10:13,760 --> 00:10:14,880 And it's pretty quick. 184 00:10:17,720 --> 00:10:21,060 So you see the progress bar in green in the middle of the video. 185 00:10:25,020 --> 00:10:25,500 Okay. 186 00:10:25,920 --> 00:10:28,840 So once it's done, we have to do the most important step. 187 00:10:29,220 --> 00:10:32,740 We have to use a couple of units to discover the map. 188 00:10:33,380 --> 00:10:35,840 And then keep only what's... 189 00:10:36,280 --> 00:10:37,980 which part of the memory has been changed. 190 00:10:38,520 --> 00:10:40,360 Actually, we never have a clean screenshot 191 00:10:40,360 --> 00:10:42,800 because a lot of things are happening all the time. 192 00:10:43,200 --> 00:10:45,960 But it's really, really reduced the map 193 00:10:45,960 --> 00:10:49,680 from about 600 megabytes to 2.5 megabytes. 194 00:10:50,120 --> 00:10:50,820 So let's see that. 195 00:10:51,200 --> 00:10:52,820 So you're going to see on the video, 196 00:10:52,980 --> 00:10:56,140 I'm going to move two units to the bottom left of the map. 197 00:10:56,640 --> 00:10:58,060 You will see them right now. 198 00:10:59,460 --> 00:11:00,280 Here they go. 199 00:11:00,380 --> 00:11:01,340 So one and two. 200 00:11:01,600 --> 00:11:03,840 So basically, I'm discovering the bottom left of the map 201 00:11:03,840 --> 00:11:05,160 and try to remember the shape. 202 00:11:05,160 --> 00:11:08,080 Because that's the one we're going to look in the memory. 203 00:11:08,680 --> 00:11:09,700 So when we have that, 204 00:11:10,380 --> 00:11:11,680 we do a third step, 205 00:11:12,460 --> 00:11:13,680 which is, as I said, 206 00:11:13,820 --> 00:11:14,940 similar to step one, 207 00:11:15,000 --> 00:11:18,940 we're going to redo a change by... 208 00:11:19,560 --> 00:11:23,180 we're going to re-remove everything which will change 209 00:11:23,180 --> 00:11:24,860 by just playing the game a little bit more. 210 00:11:26,660 --> 00:11:27,060 Okay. 211 00:11:27,160 --> 00:11:28,120 I think I skipped the video. 212 00:11:28,320 --> 00:11:28,640 Okay. 213 00:11:29,160 --> 00:11:30,100 So same thing. 214 00:11:30,280 --> 00:11:31,400 We try to move a little bit. 215 00:11:31,480 --> 00:11:33,260 It doesn't have to be long. 216 00:11:33,380 --> 00:11:34,380 It's just really efficient. 217 00:11:34,660 --> 00:11:35,140 At the moment, 218 00:11:35,160 --> 00:11:35,440 at that time, 219 00:11:35,480 --> 00:11:37,460 we probably will remove half of the size, 220 00:11:37,580 --> 00:11:41,100 going from 2.5 to 1.2 megabytes of data. 221 00:11:41,840 --> 00:11:43,260 And when we're done with that, 222 00:11:43,480 --> 00:11:46,480 we need to find the mapping memory. 223 00:11:46,700 --> 00:11:48,260 So now we have reduced as much as we can. 224 00:11:48,480 --> 00:11:50,680 We now really have to look at the memory 225 00:11:50,680 --> 00:11:52,320 and try to figure out where the map is. 226 00:11:52,720 --> 00:11:53,980 So we have one working assumption. 227 00:11:54,420 --> 00:11:57,540 It turns out to be true in almost every game we look at, 228 00:11:57,700 --> 00:12:00,380 is that the map is stored into a 2D array. 229 00:12:00,960 --> 00:12:04,140 Actually, you can have multiple maps into the memory. 230 00:12:04,140 --> 00:12:07,240 Jocelyn is going to show you this live in the demo. 231 00:12:07,700 --> 00:12:08,720 But for now, 232 00:12:08,780 --> 00:12:12,040 we just assume that the map is one array in 2D. 233 00:12:12,180 --> 00:12:15,240 And if you look at this using visualization techniques, 234 00:12:15,560 --> 00:12:17,880 what you're going to observe in memory is something like this. 235 00:12:18,260 --> 00:12:20,560 So you should be able to see with different colors 236 00:12:21,120 --> 00:12:24,400 a 2D array which pop up in the memory we have acquired. 237 00:12:25,760 --> 00:12:27,000 So let's do it for real. 238 00:12:27,960 --> 00:12:30,500 So first we're going to select the snapshot we want. 239 00:12:30,600 --> 00:12:31,800 We have only one snapshot now, 240 00:12:31,900 --> 00:12:33,820 which is the one which is the memory 241 00:12:33,820 --> 00:12:35,540 we did remove all the part. 242 00:12:35,720 --> 00:12:38,640 And we're going to use what we call a heatmap visualization. 243 00:12:39,360 --> 00:12:43,260 The heatmap visualization is simply having one pixel 244 00:12:43,260 --> 00:12:45,520 for each bit of the memory 245 00:12:45,520 --> 00:12:48,440 and assign different colors depending on the value. 246 00:12:48,740 --> 00:12:50,280 And if we scroll down to it, 247 00:12:50,440 --> 00:12:52,520 I'm not sure it's very visible on the screen, 248 00:12:52,720 --> 00:12:57,620 on the bottom of the map you have a very, very strange shape. 249 00:12:58,340 --> 00:12:59,480 Can everyone see it? 250 00:12:59,700 --> 00:13:02,160 You see the shape on the bottom? 251 00:13:03,820 --> 00:13:04,620 It's a very tilted line, right? 252 00:13:04,760 --> 00:13:07,660 It exactly looks almost like what we have as the two units. 253 00:13:10,160 --> 00:13:10,500 Yeah? 254 00:13:10,640 --> 00:13:12,480 Okay, so I'm going to show you a zoom of it, 255 00:13:12,520 --> 00:13:12,980 but that's the idea. 256 00:13:13,140 --> 00:13:14,600 So let's get to what we see from cartograph. 257 00:13:15,140 --> 00:13:17,980 And we're going to try to isolate this potential map. 258 00:13:18,660 --> 00:13:21,740 If you look in memory, here's what it looks like. 259 00:13:22,360 --> 00:13:23,520 On the left, this is a game. 260 00:13:23,620 --> 00:13:25,020 On the right, this is what we can have 261 00:13:25,460 --> 00:13:28,720 by doing a heatmap visualization of this part of the memory. 262 00:13:29,460 --> 00:13:32,440 So you see it really looks like the map we have 263 00:13:36,080 --> 00:13:38,800 And Supreme Commander 2 is a specific kind of map. 264 00:13:39,000 --> 00:13:41,020 It's what we call an additive visibility map, 265 00:13:42,140 --> 00:13:43,700 meaning that every time you have a unit, 266 00:13:43,800 --> 00:13:48,200 it actually increases the value with one by one. 267 00:13:48,340 --> 00:13:49,900 So if you have two units, the value would be two. 268 00:13:49,940 --> 00:13:51,720 If you have three units, the value would be three. 269 00:13:51,920 --> 00:13:53,500 So basically, every time you move a unit, 270 00:13:53,660 --> 00:13:56,380 it actually subtracts or adds a visibility point to all the map. 271 00:13:56,780 --> 00:13:58,340 So the way we're going to hack it 272 00:13:58,340 --> 00:14:01,520 is we're going to rewrite the entire memory with FFF, 273 00:14:01,680 --> 00:14:03,440 meaning that we have 255 units, 274 00:14:03,540 --> 00:14:03,800 which are all visible. 275 00:14:03,820 --> 00:14:06,280 So we are actually able to view each square of the map. 276 00:14:06,740 --> 00:14:09,600 And we're going to do this continuously into memory 277 00:14:10,060 --> 00:14:11,320 because every time you move a unit, 278 00:14:11,440 --> 00:14:12,300 you actually decrease it. 279 00:14:12,380 --> 00:14:13,740 So at some point, if we don't do it, 280 00:14:14,380 --> 00:14:16,700 the map app tends to fade. 281 00:14:19,380 --> 00:14:21,360 So how we came up with the idea 282 00:14:21,360 --> 00:14:23,340 that this is an additive structure 283 00:14:23,340 --> 00:14:26,380 is because we are able to use another trick, 284 00:14:26,720 --> 00:14:27,720 which is called a diff map. 285 00:14:27,980 --> 00:14:31,180 So remember, this was a situation of the game. 286 00:14:31,480 --> 00:14:32,400 And what we did, 287 00:14:32,400 --> 00:14:34,940 what we're going to do is we're going to move one unit, right? 288 00:14:35,020 --> 00:14:35,980 We know where the map is. 289 00:14:36,060 --> 00:14:38,440 So what we're going to do is we're just going to move the unit 290 00:14:38,440 --> 00:14:41,380 from bottom to up and have two different positions. 291 00:14:41,580 --> 00:14:43,080 And we're going to use what we call a diff map. 292 00:14:43,280 --> 00:14:45,420 So a diff map is basically a heat map with two colors. 293 00:14:46,000 --> 00:14:47,520 Blue means nothing changed. 294 00:14:48,120 --> 00:14:49,020 Red means change. 295 00:14:49,180 --> 00:14:49,980 And if you look here, 296 00:14:50,360 --> 00:14:52,600 we're going to put you side by side with the previous map. 297 00:14:52,800 --> 00:14:55,020 You see that the only spot which did move 298 00:14:55,020 --> 00:14:57,460 was the one where the unit was, right? 299 00:14:58,100 --> 00:14:58,820 Everyone see that? 300 00:15:00,000 --> 00:15:01,200 Okay, so far so good. 301 00:15:01,200 --> 00:15:02,800 So now we can look at the value. 302 00:15:03,160 --> 00:15:04,700 You see the tooltip of Cartograph 303 00:15:04,700 --> 00:15:06,080 actually display you what the value is. 304 00:15:06,300 --> 00:15:08,140 So we know what the value was before 305 00:15:08,140 --> 00:15:09,460 and what the value is now. 306 00:15:09,700 --> 00:15:12,820 So we can have a guess of how the algorithm works. 307 00:15:13,700 --> 00:15:17,240 Once again, we're only comparing with a storage structure, 308 00:15:17,560 --> 00:15:18,120 not the algorithm. 309 00:15:18,500 --> 00:15:20,220 So we have to count on the game 310 00:15:20,220 --> 00:15:22,700 to actually reprocess the storage structure. 311 00:15:22,820 --> 00:15:24,040 And sometimes it works, sometimes it does not. 312 00:15:25,500 --> 00:15:27,640 So at that point, it's almost done, right? 313 00:15:27,740 --> 00:15:28,740 We know what to rewrite. 314 00:15:28,860 --> 00:15:29,760 We know what to rewrite it. 315 00:15:29,840 --> 00:15:31,180 So it's basically just having spawning points. 316 00:15:31,200 --> 00:15:33,480 Having a thread and writing the memory of the game. 317 00:15:34,140 --> 00:15:35,880 And you want to see how it look like? 318 00:15:37,060 --> 00:15:37,420 Yeah. 319 00:15:38,160 --> 00:15:38,820 Okay, good. 320 00:15:38,980 --> 00:15:41,760 So here is the video when you try to rewrite it. 321 00:15:41,860 --> 00:15:43,540 So it's an in-game visualization of it. 322 00:15:44,540 --> 00:15:48,280 So as you see, on the top, there is my opponent. 323 00:15:48,460 --> 00:15:49,040 I can't see it. 324 00:15:49,060 --> 00:15:49,800 It's a fog of war. 325 00:15:49,960 --> 00:15:53,300 And we just rewrite it right now as we speak. 326 00:15:53,440 --> 00:15:55,380 So what will happen is it will pop. 327 00:15:55,700 --> 00:15:57,980 And you will see that the game will really believe that, 328 00:15:58,480 --> 00:15:59,320 see, here you go. 329 00:15:59,320 --> 00:16:01,680 And as you see, the game is completely full, 330 00:16:01,740 --> 00:16:03,000 believing that we can see everything. 331 00:16:03,180 --> 00:16:06,420 And our defense tower are starting to shoot at the unit. 332 00:16:06,560 --> 00:16:07,820 We can even click on the building. 333 00:16:08,600 --> 00:16:09,920 It's completely invisible. 334 00:16:10,260 --> 00:16:11,540 At that point, you have a full map hack. 335 00:16:12,160 --> 00:16:12,860 Pretty cool, right? 336 00:16:13,440 --> 00:16:13,500 Yeah. 337 00:16:15,360 --> 00:16:15,920 Thank you. 338 00:16:18,400 --> 00:16:22,260 So how many of you did order StarCraft II? 339 00:16:24,080 --> 00:16:24,660 StarCraft II? 340 00:16:25,780 --> 00:16:27,200 Yeah, just released, right? 341 00:16:27,300 --> 00:16:28,120 And some of you, yes. 342 00:16:29,020 --> 00:16:31,900 So we wanted to show you how to do that for StarCraft II. 343 00:16:32,000 --> 00:16:33,320 We didn't have time, sorry. 344 00:16:33,920 --> 00:16:35,420 But we have something for you. 345 00:16:35,820 --> 00:16:36,940 So this is StarCraft II. 346 00:16:38,000 --> 00:16:42,260 And we tried to do it, but it was really quick. 347 00:16:42,360 --> 00:16:43,860 The game had been released two days ago. 348 00:16:44,460 --> 00:16:48,200 So what we have is we were able to find the mini-map. 349 00:16:48,460 --> 00:16:51,320 It doesn't mean that we can rewrite it to actually make something useful out of it. 350 00:16:51,500 --> 00:16:53,060 But we were able to find it in memory. 351 00:16:53,160 --> 00:16:57,020 If you see, it's just a mirror side, but you can see the mini-map. 352 00:16:57,020 --> 00:17:01,180 So we are able to actually already find the mini-map from StarCraft II. 353 00:17:01,280 --> 00:17:01,960 So it's really easy. 354 00:17:01,960 --> 00:17:04,820 This approach can work on any modern game we know. 355 00:17:05,720 --> 00:17:10,400 If you have any other idea of game you think we should try, you can just send us a tweet or email. 356 00:17:10,640 --> 00:17:11,560 We'll be happy to try. 357 00:17:12,120 --> 00:17:13,840 By the way, we're not going to release the tool. 358 00:17:14,100 --> 00:17:14,460 Sorry. 359 00:17:16,800 --> 00:17:21,020 And sometime, you know, we were at the lab really late at night and we tried a bunch of games. 360 00:17:21,120 --> 00:17:22,900 And we have some unexpected effect. 361 00:17:23,180 --> 00:17:26,800 So we want just to show you one to see what odd thing we can come up with. 362 00:17:27,020 --> 00:17:29,920 So I think it was like two months ago. 363 00:17:30,620 --> 00:17:33,840 Yeah, two months ago, we tried to do Anno, which is a strategy game. 364 00:17:34,220 --> 00:17:36,520 And we were messing up with the visibility map. 365 00:17:36,680 --> 00:17:38,220 So we were trying one effect here. 366 00:17:38,720 --> 00:17:39,860 And we had a trap running. 367 00:17:40,020 --> 00:17:41,980 And we just tried to put our boat into the fog. 368 00:17:42,880 --> 00:17:45,120 Well, in a way, we did succeed to find the map. 369 00:17:46,560 --> 00:17:48,900 We just make the fog permanent. 370 00:17:50,680 --> 00:17:51,080 Yeah. 371 00:17:52,040 --> 00:17:55,900 The underlying reason why it's not working is because actually when you remove the fog, 372 00:17:57,020 --> 00:17:58,100 you do not reprocess the map. 373 00:17:58,500 --> 00:18:01,540 So you can't actually remove it because it's already removed. 374 00:18:02,040 --> 00:18:03,180 Just you don't know it. 375 00:18:03,300 --> 00:18:04,840 That's the kind of effect. 376 00:18:05,500 --> 00:18:06,940 We have a bunch of video like this. 377 00:18:07,980 --> 00:18:11,320 In Civilization IV, for instance, we were able to have the map completely disappear. 378 00:18:11,660 --> 00:18:12,680 Don't see anything else. 379 00:18:13,840 --> 00:18:15,240 That's kind of a side effect, right? 380 00:18:15,380 --> 00:18:18,240 So when you tamper with memory, you never know what happened. 381 00:18:19,340 --> 00:18:20,960 A little bit about unit hacking. 382 00:18:22,080 --> 00:18:24,240 Unit hack is way, way more harder. 383 00:18:24,920 --> 00:18:26,060 Because this time, 384 00:18:27,020 --> 00:18:29,520 what we're looking for is probably a few kilobytes of data. 385 00:18:30,180 --> 00:18:32,060 And so visualization won't work. 386 00:18:32,260 --> 00:18:33,840 You can't actually look at the map and say, 387 00:18:33,920 --> 00:18:35,500 here, here it is, and click on it. 388 00:18:35,820 --> 00:18:38,380 So we solely rely on shape analysis, 389 00:18:39,060 --> 00:18:40,980 which our algorithm will try to put. 390 00:18:41,680 --> 00:18:43,800 Justin made a lot of effort on that. 391 00:18:43,920 --> 00:18:47,440 I think he spent nine, ten days for about a month and a half on this. 392 00:18:47,760 --> 00:18:49,440 It's really hard to come up with an algorithm 393 00:18:49,440 --> 00:18:51,860 which helps you to find the structure with change 394 00:18:51,860 --> 00:18:53,260 and understand which structure. 395 00:18:53,440 --> 00:18:55,660 So we have one algorithm for each type of structure. 396 00:18:59,040 --> 00:19:02,320 Stacks, chain head list, pointer list, and so forth. 397 00:19:02,600 --> 00:19:04,080 To give you an idea how we do that, 398 00:19:04,240 --> 00:19:05,320 we have a bunch of heuristics. 399 00:19:05,620 --> 00:19:07,840 So if you want to find a stack of pointer, 400 00:19:08,040 --> 00:19:11,520 what we do is we make sure that the memory we look considering 401 00:19:11,520 --> 00:19:14,560 is only having one integer added every time we create a unit. 402 00:19:14,960 --> 00:19:18,340 And we also make sure that this integer is a real pointer. 403 00:19:18,840 --> 00:19:23,500 So what we have under the hood is a dereferencing algorithm 404 00:19:23,500 --> 00:19:24,820 which looks at the pointer 405 00:19:24,820 --> 00:19:27,360 and try to see where it points into the memory. 406 00:19:27,620 --> 00:19:29,880 Once again, it's easier said than done, 407 00:19:29,960 --> 00:19:31,360 and that's how we do that. 408 00:19:31,940 --> 00:19:35,320 The basic idea to narrow down the memory we are considering 409 00:19:35,320 --> 00:19:36,260 is simply the same idea. 410 00:19:36,580 --> 00:19:37,560 We build unit. 411 00:19:38,400 --> 00:19:39,980 And every time we build a unit, 412 00:19:40,100 --> 00:19:44,840 the possible place where the map, the unit list is 413 00:19:46,360 --> 00:19:48,920 keeps decreasing until we have a very small one. 414 00:19:51,420 --> 00:19:52,900 So when we have this memory, 415 00:19:53,100 --> 00:19:54,680 we go back to our idea 416 00:19:54,820 --> 00:19:55,500 of using visualization. 417 00:19:56,180 --> 00:19:57,120 And here you go. 418 00:19:57,600 --> 00:20:01,040 This is a visualization of the unit list of 419 00:20:02,660 --> 00:20:04,380 Age of Empires 3, I guess, on this one. 420 00:20:04,960 --> 00:20:07,160 As you see, we have only like a strip. 421 00:20:07,420 --> 00:20:08,580 Each strip represents one unit. 422 00:20:08,720 --> 00:20:10,280 So if you have five units, it's five strips. 423 00:20:10,500 --> 00:20:13,000 And the black void behind, between each unit, 424 00:20:13,060 --> 00:20:14,300 is basically a bunch of memory 425 00:20:14,300 --> 00:20:16,120 which is not related to the unit list. 426 00:20:18,260 --> 00:20:19,600 So it's really hard then, 427 00:20:19,720 --> 00:20:21,980 when we have that, we have to figure out how the units work. 428 00:20:22,140 --> 00:20:23,000 Any idea how we do that? 429 00:20:27,080 --> 00:20:27,440 Yeah. 430 00:20:27,680 --> 00:20:28,740 You get the right idea. 431 00:20:28,920 --> 00:20:29,280 Exactly. 432 00:20:30,180 --> 00:20:32,580 So the way we do that is exactly like this. 433 00:20:32,620 --> 00:20:34,220 We go back to the idea of using a diff map. 434 00:20:34,480 --> 00:20:36,940 So we start with the unit which is completely blue. 435 00:20:37,040 --> 00:20:39,360 The memory of the unit would be blue 436 00:20:39,360 --> 00:20:41,580 because we don't move it, we don't do anything with it. 437 00:20:41,720 --> 00:20:44,420 And then to know where the coordinates of the unit are stored, 438 00:20:44,540 --> 00:20:45,400 we just make it move. 439 00:20:45,800 --> 00:20:46,760 And by making it move, 440 00:20:46,860 --> 00:20:48,960 we are able to know which part of the memory changed, 441 00:20:49,140 --> 00:20:50,400 so we know where the coordinates are. 442 00:20:50,620 --> 00:20:52,860 And then we have to figure out how the coordinate system works. 443 00:20:53,200 --> 00:20:54,080 And when we know that, 444 00:20:54,080 --> 00:20:56,400 we are able to have units which teleport across the map. 445 00:20:57,460 --> 00:20:58,320 Pretty cool hack. 446 00:20:58,540 --> 00:21:00,040 And the one we really like is 447 00:21:00,040 --> 00:21:03,000 we try to have an invisible unit. 448 00:21:03,220 --> 00:21:03,840 And to do that, 449 00:21:03,880 --> 00:21:06,520 the way we do it is we basically attack our own unit 450 00:21:07,080 --> 00:21:07,900 and we make it bleed. 451 00:21:08,120 --> 00:21:10,800 So we shoot at them and hopefully we know 452 00:21:10,800 --> 00:21:13,260 by looking where the HP decrease, 453 00:21:13,400 --> 00:21:15,000 to know where the HP points are. 454 00:21:16,080 --> 00:21:18,320 And as a result, you get something like this. 455 00:21:18,440 --> 00:21:19,520 You get four units 456 00:21:20,080 --> 00:21:22,160 which are able to completely whip off a base 457 00:21:22,160 --> 00:21:23,560 because they're just not dying. 458 00:21:24,700 --> 00:21:27,960 You can notice that our health bar are black 459 00:21:27,960 --> 00:21:29,900 is because when we rewrite the memory, 460 00:21:30,020 --> 00:21:33,820 what happens is we probably also rewrite the color of the bar. 461 00:21:33,960 --> 00:21:35,980 We have no way to tell where the color is 462 00:21:35,980 --> 00:21:39,500 because it's also changed with the health point. 463 00:21:39,720 --> 00:21:40,700 But as you can see, 464 00:21:40,780 --> 00:21:42,640 we are able to have invincible units, right? 465 00:21:42,720 --> 00:21:43,020 Pretty cool. 466 00:21:47,860 --> 00:21:48,480 Thank you. 467 00:21:52,740 --> 00:21:55,640 So now I'm going to tell you the sad part of the story. 468 00:21:55,940 --> 00:21:57,660 There is a sad part in the story. 469 00:21:59,960 --> 00:22:00,840 Network, right? 470 00:22:01,460 --> 00:22:03,840 If you try to cheat on the game on the network side, 471 00:22:04,060 --> 00:22:04,840 here is what you get. 472 00:22:05,780 --> 00:22:06,580 Out of sync. 473 00:22:06,740 --> 00:22:08,100 We basically get out of sync 474 00:22:08,100 --> 00:22:12,820 because a lot of games actually do some type of checking 475 00:22:13,300 --> 00:22:15,280 on the value of the number of units you have, 476 00:22:15,480 --> 00:22:17,100 how much health points they have. 477 00:22:17,100 --> 00:22:19,380 For instance, if your unit is not dying on your side 478 00:22:19,380 --> 00:22:20,760 and is dying on the other side, 479 00:22:20,860 --> 00:22:21,940 then something is off. 480 00:22:23,360 --> 00:22:25,540 So we have to deal with desynchronization. 481 00:22:26,100 --> 00:22:27,900 The way we have to do that is basically 482 00:22:27,900 --> 00:22:30,620 you are either able to re-sync 483 00:22:31,040 --> 00:22:32,660 or you basically get caught. 484 00:22:33,120 --> 00:22:35,620 What happens is for some hack, 485 00:22:35,820 --> 00:22:36,860 like the map hack, 486 00:22:37,040 --> 00:22:40,440 it's not detectable by this kind of integrated checking 487 00:22:40,440 --> 00:22:42,620 because all you are saying is, 488 00:22:42,700 --> 00:22:43,860 I am able to see this map, 489 00:22:44,360 --> 00:22:45,820 which basically is not triggering that. 490 00:22:45,820 --> 00:22:47,280 But if you try to have invisible units 491 00:22:47,280 --> 00:22:49,380 or comparing with the resources, 492 00:22:49,720 --> 00:22:50,340 then you get this. 493 00:22:50,620 --> 00:22:54,680 So we had actually to build on one idea 494 00:22:54,680 --> 00:22:56,560 which has been presented at DEF CON 15. 495 00:22:57,060 --> 00:22:58,100 And it was pretty cool. 496 00:22:58,220 --> 00:22:59,520 It was using the LSP. 497 00:22:59,700 --> 00:23:02,700 So the LSP is a layer service provider. 498 00:23:03,140 --> 00:23:05,360 It's a functionality provided by Winsock. 499 00:23:05,820 --> 00:23:08,740 And it actually allows you to divert some of the traffic 500 00:23:08,740 --> 00:23:10,440 to an application if you want. 501 00:23:10,760 --> 00:23:15,060 So what we did is we worked with Pascal Gendayer, 502 00:23:15,200 --> 00:23:15,800 which is a friend of mine 503 00:23:15,820 --> 00:23:16,100 and a French guy, 504 00:23:16,240 --> 00:23:19,660 which helped us get it run on Windows 7. 505 00:23:19,860 --> 00:23:21,340 He started his own project 506 00:23:21,340 --> 00:23:22,800 and we were able to actually intercept packets. 507 00:23:23,580 --> 00:23:24,640 And with that, 508 00:23:24,660 --> 00:23:26,400 we are able actually to tamper with the traffic 509 00:23:27,260 --> 00:23:29,360 basically by first collecting it 510 00:23:29,360 --> 00:23:31,840 and then trying to rewrite it to re-sync the game. 511 00:23:33,500 --> 00:23:35,280 So the way we do that, 512 00:23:35,320 --> 00:23:36,260 we do four steps. 513 00:23:36,800 --> 00:23:38,980 The first one is we're going to bucket the traffic. 514 00:23:39,620 --> 00:23:40,620 When you have a game, 515 00:23:40,680 --> 00:23:43,360 you usually have four to seven types of packets. 516 00:23:43,760 --> 00:23:45,740 And the way we know there is five to seven types 517 00:23:45,820 --> 00:23:48,160 of packets is because these packets have a specific size. 518 00:23:48,900 --> 00:23:51,840 And so we're going to only focus on one size at a time 519 00:23:51,840 --> 00:23:54,260 because we can compare then what changed 520 00:23:54,260 --> 00:23:56,000 and what is not changing. 521 00:23:56,360 --> 00:24:01,060 And then we're going to visualize how the changes are. 522 00:24:01,320 --> 00:24:02,940 And then we try to understand it. 523 00:24:03,000 --> 00:24:04,200 Sometimes we are able to do it. 524 00:24:04,220 --> 00:24:05,440 Sometimes we are not able to do it. 525 00:24:05,540 --> 00:24:08,160 And finally, we are able to re-write the packets. 526 00:24:08,800 --> 00:24:11,020 And by re-writing the packets, re-sync the game. 527 00:24:11,200 --> 00:24:14,960 So usually you end up with having not re-sync. 528 00:24:15,480 --> 00:24:18,180 We're not going to tell you how to cheat on a game on the network. 529 00:24:19,100 --> 00:24:19,480 Sorry. 530 00:24:20,080 --> 00:24:21,940 We're going to show you what the interface looks like. 531 00:24:22,000 --> 00:24:24,820 But it's up to you if you want to really apply it on a real game. 532 00:24:24,940 --> 00:24:25,520 We know it works. 533 00:24:26,360 --> 00:24:29,100 It's just that we don't want to be the one which will be blamed 534 00:24:29,100 --> 00:24:32,300 because everyone is starting to cheat at Supreme Court or two 535 00:24:32,300 --> 00:24:33,400 or that kind of famous game. 536 00:24:33,580 --> 00:24:33,920 Sorry. 537 00:24:34,060 --> 00:24:35,380 But here's the interface. 538 00:24:37,900 --> 00:24:40,560 On the left, you have what we call the LSP listener. 539 00:24:40,900 --> 00:24:43,520 So the LSP lives at the Windsor floor. 540 00:24:43,520 --> 00:24:49,660 So we have to have an IPC which is going to speak with Cartograph. 541 00:24:49,920 --> 00:24:53,220 And Cartograph will tell him whether to let the packet go or to modify it 542 00:24:53,220 --> 00:24:56,200 and then tell him to rewrite it with a specific value we want. 543 00:24:56,540 --> 00:24:59,460 Then we have all the buckets I was speaking of before. 544 00:24:59,800 --> 00:25:05,040 So for instance, for Civilization 4, there is five types of packets 545 00:25:05,980 --> 00:25:07,540 which are sorted by size. 546 00:25:07,720 --> 00:25:11,540 And finally, you have the visualization for each bucket. 547 00:25:11,780 --> 00:25:13,500 So we can visualize one bucket. 548 00:25:13,520 --> 00:25:14,120 At the time. 549 00:25:14,420 --> 00:25:17,640 A little bit more on the visualization bucket view. 550 00:25:18,520 --> 00:25:20,540 So the visualization bucket works like this. 551 00:25:21,040 --> 00:25:24,560 On the x-axis, you have the length of the packet. 552 00:25:24,740 --> 00:25:29,620 So the top, the rightmost part is the last bit of the packet, 553 00:25:29,740 --> 00:25:30,540 byte of the packet. 554 00:25:30,740 --> 00:25:32,420 And the leftmost part is the first bit. 555 00:25:32,620 --> 00:25:35,140 So basically, each block is one different bit of the packet. 556 00:25:35,580 --> 00:25:40,740 And on the y-axis, it's basically each packet are stacked up to the other. 557 00:25:40,860 --> 00:25:42,660 So we see the evolution of the trace. 558 00:25:43,520 --> 00:25:47,340 And as you can see, and on the top of it, we have something different, 559 00:25:47,500 --> 00:25:50,720 which is blue and red, and you should be used to it by now. 560 00:25:50,940 --> 00:25:53,020 This is our diff map analysis for the trace. 561 00:25:53,260 --> 00:25:57,700 So it tells us which part of the packets are moving and which part is not. 562 00:25:58,280 --> 00:26:01,160 Blue meaning not moving and red meaning it did change at some point. 563 00:26:01,720 --> 00:26:04,940 And by just looking and visualizing the trace, 564 00:26:05,080 --> 00:26:08,600 you can infer a lot of information on how the protocol works. 565 00:26:09,100 --> 00:26:12,940 If it's a fixed value, then you see it's the same color all over the place, right? 566 00:26:12,940 --> 00:26:14,380 Like the pink one on the screen. 567 00:26:14,980 --> 00:26:19,220 If it's a counter, then that's where the heat map is really useful, 568 00:26:19,400 --> 00:26:22,100 is you're going to see a gradient. 569 00:26:22,380 --> 00:26:23,260 Do you see it on the screen? 570 00:26:23,640 --> 00:26:25,720 So basically, you see this is an increment. 571 00:26:25,920 --> 00:26:27,520 Every time it increments, it changes color by one. 572 00:26:27,660 --> 00:26:31,540 So you see a continuous gradient, which means that it's probably a counter. 573 00:26:31,880 --> 00:26:36,440 So we don't really have to take care of this until we want to inject something more in it. 574 00:26:36,720 --> 00:26:40,440 And finally, you have this part on the right, which completely looks like a scramble. 575 00:26:40,680 --> 00:26:42,180 It's usually either an IV, 576 00:26:42,940 --> 00:26:44,880 or an encrypted value with a given key, 577 00:26:44,980 --> 00:26:48,060 although the game we look at didn't have key exchange. 578 00:26:48,420 --> 00:26:49,780 So it's a little bit more subtle. 579 00:26:49,920 --> 00:26:53,260 It's just more like a specific value for each packet, 580 00:26:53,420 --> 00:26:54,380 specific as an IV. 581 00:26:58,300 --> 00:27:01,020 Before Joe is going to try to do a demo real time for you, 582 00:27:01,640 --> 00:27:03,400 just a little bit of what we're doing now. 583 00:27:03,760 --> 00:27:06,000 We didn't do that for only a hacking game. 584 00:27:06,100 --> 00:27:10,100 What we really hope to do is building more crypto stuff to actually make the game more secure. 585 00:27:10,760 --> 00:27:12,700 We should have a lib ready. 586 00:27:12,940 --> 00:27:15,000 It should be about in three months or four months, 587 00:27:15,040 --> 00:27:18,200 which actually will help developers to build more secure games, 588 00:27:18,300 --> 00:27:20,000 so this kind of attack won't work anymore. 589 00:27:20,700 --> 00:27:23,020 And we're also working on trying to detect both, 590 00:27:23,160 --> 00:27:27,160 because I kind of hate when I have a bot in front of me on World of Warcraft, 591 00:27:27,320 --> 00:27:29,600 which gathers everything, and I end up with nothing. 592 00:27:31,040 --> 00:27:33,940 So let's play all together the God of Demo. 593 00:27:34,000 --> 00:27:35,900 And who wants to see a cartograph real time? 594 00:27:38,560 --> 00:27:39,240 So Joe? 595 00:27:41,280 --> 00:27:42,480 Everyone is counting on you. 596 00:27:42,480 --> 00:27:42,940 Pleasure. 597 00:27:43,740 --> 00:27:44,400 Okay. 598 00:27:45,140 --> 00:27:46,300 Let's see if this works. 599 00:27:47,190 --> 00:27:47,900 Let me try. 600 00:27:49,240 --> 00:27:50,200 Does it work? 601 00:27:50,940 --> 00:27:51,680 Do you hear me? 602 00:27:52,000 --> 00:27:52,360 No. 603 00:27:58,170 --> 00:27:58,500 Sorry. 604 00:28:02,100 --> 00:28:02,760 Sorry. 605 00:28:12,500 --> 00:28:13,020 Okay. 606 00:28:13,120 --> 00:28:13,960 I don't know. 607 00:28:16,880 --> 00:28:17,620 No screen. 608 00:28:24,180 --> 00:28:26,020 Okay, but there's no screen on my side. 609 00:28:31,420 --> 00:28:32,700 You see something? 610 00:28:37,920 --> 00:28:38,440 Okay. 611 00:28:40,520 --> 00:28:41,040 Sorry. 612 00:28:41,040 --> 00:28:42,260 Sorry. Technical problem. 613 00:28:47,580 --> 00:28:48,480 This one? 614 00:28:48,960 --> 00:28:49,700 No. 615 00:28:50,880 --> 00:28:51,760 This one? 616 00:28:53,920 --> 00:28:54,700 Yeah? 617 00:28:57,720 --> 00:28:58,500 Yeah. 618 00:29:00,080 --> 00:29:00,860 Ah. 619 00:29:01,800 --> 00:29:03,060 Oh, it got there. 620 00:29:03,750 --> 00:29:04,560 I see nothing. 621 00:29:11,520 --> 00:29:12,080 You see nothing. 622 00:29:15,220 --> 00:29:15,780 Oh. 623 00:29:15,780 --> 00:29:16,220 Easy. 624 00:29:16,260 --> 00:29:16,440 Easy. 625 00:29:17,060 --> 00:29:17,620 Easy. 626 00:29:18,200 --> 00:29:18,760 Oh. 627 00:29:24,100 --> 00:29:25,420 I saw nothing. 628 00:29:25,640 --> 00:29:25,920 Ah. 629 00:29:30,860 --> 00:29:30,880 Ah. 630 00:29:31,100 --> 00:29:31,120 Ah. 631 00:29:31,140 --> 00:29:31,160 Oh. 632 00:29:36,600 --> 00:29:37,160 Oh. 633 00:29:39,100 --> 00:29:39,660 Whoa. 634 00:29:40,340 --> 00:29:40,500 Whoa. 635 00:29:40,640 --> 00:29:41,020 Oh. 636 00:29:41,020 --> 00:29:41,440 I don't know. 637 00:29:41,900 --> 00:29:43,240 I don't know. 638 00:29:43,300 --> 00:29:44,200 I don't know. 639 00:29:44,740 --> 00:29:46,280 I don't know. 640 00:29:46,560 --> 00:29:49,140 I don't know. 641 00:29:53,820 --> 00:29:54,440 Okay. 642 00:29:56,000 --> 00:29:56,780 Yeah, it works. 643 00:29:57,560 --> 00:29:58,180 Okay. 644 00:30:05,120 --> 00:30:06,020 It's okay, I guess. 645 00:30:13,480 --> 00:30:13,960 Okay. 646 00:30:14,820 --> 00:30:16,780 So, sorry, some technical difficulties. 647 00:30:19,040 --> 00:30:28,660 So, I'm going to show you how to make a map hack on Age of Empires III because I'm only using my little MacBook, so I don't have a lot of memory. 648 00:30:28,980 --> 00:30:31,260 But it still works and it's still cool. 649 00:30:33,140 --> 00:30:36,120 So, we're starting a game. 650 00:30:37,560 --> 00:30:38,560 Here is Cartograph. 651 00:30:38,940 --> 00:30:40,680 So, first step, I will just... 652 00:30:41,380 --> 00:30:42,500 choose a good process. 653 00:30:44,180 --> 00:30:45,160 If I find it. 654 00:30:45,320 --> 00:30:45,720 Okay. 655 00:30:47,180 --> 00:30:52,320 So, as you can see in this game, there is 235 megabytes of data. 656 00:30:54,860 --> 00:30:56,320 So, okay, the game is starting. 657 00:30:58,600 --> 00:31:04,800 So, first step, I will use the map hack button and I will just scan all of the memory. 658 00:31:08,700 --> 00:31:10,100 So, I'm acquiring it. 659 00:31:12,500 --> 00:31:12,900 Okay. 660 00:31:13,460 --> 00:31:14,160 Now it's done. 661 00:31:14,380 --> 00:31:17,460 I will just, like Kelly said, save you. 662 00:31:17,860 --> 00:31:20,500 I'm just letting the game play a little. 663 00:31:20,760 --> 00:31:29,260 And so, I'm letting my units gather some of your resources to make the memory change. 664 00:31:31,440 --> 00:31:32,520 So, now it's done. 665 00:31:33,060 --> 00:31:34,260 I'm going to just step two. 666 00:31:45,360 --> 00:31:46,260 If it won't work. 667 00:31:49,640 --> 00:31:50,000 Okay. 668 00:31:58,760 --> 00:31:59,120 Okay. 669 00:32:04,480 --> 00:32:08,840 So, as you can see at the beginning, I was 235 megabytes. 670 00:32:08,840 --> 00:32:12,260 Now, I only have 196 megabytes. 671 00:32:12,720 --> 00:32:15,580 And the first step is the one that will use the most the memory. 672 00:32:16,340 --> 00:32:22,080 So, to do that, I will just take one of my units and make it discover the map. 673 00:32:24,120 --> 00:32:28,120 So, like this, I will be able to change the map, the structure of the map. 674 00:32:28,260 --> 00:32:32,360 And hopefully, I will be able to identify it. 675 00:32:36,300 --> 00:32:37,760 So, let's move a little. 676 00:32:46,000 --> 00:32:46,720 Okay. 677 00:32:49,120 --> 00:32:49,840 Okay. 678 00:32:53,760 --> 00:32:56,980 So, now, like always, clicking. 679 00:32:57,220 --> 00:32:57,740 Okay. 680 00:33:00,280 --> 00:33:01,000 Okay. 681 00:33:01,620 --> 00:33:02,340 Okay. 682 00:33:20,700 --> 00:33:21,020 Wait one second. 683 00:33:21,100 --> 00:33:23,780 And now, as you can see, I only have 3 megabytes left. 684 00:33:24,320 --> 00:33:26,940 So, it really reduced all of the memory. 685 00:33:27,260 --> 00:33:28,400 All of the data I need. 686 00:33:28,860 --> 00:33:30,160 So, now all I just have to do. 687 00:33:30,160 --> 00:33:36,800 let the game play a little more to reduce a little more of the memory left. 688 00:33:38,280 --> 00:33:47,000 Okay, should be enough. Now it's pretty quick. And here is now the interface for the 689 00:33:47,000 --> 00:33:52,200 screenshot manager and as you can see the screenshot is only 1.8 megabytes. 690 00:33:52,800 --> 00:33:58,940 I will use the heat map to visualize it and, hopefully, finding the map. 691 00:34:02,120 --> 00:34:07,540 So, here is the heat map. So, you can see there is a lot of data left, but not so much, 692 00:34:07,580 --> 00:34:14,620 all of the black spots are compressed memory space that is not relevant. So, there's a 693 00:34:14,620 --> 00:34:18,860 lot of stuff. And here as we can see, we can see like two 694 00:34:18,860 --> 00:34:22,060 maps, the blue one and the brown one! 695 00:34:22,140 --> 00:34:22,180 Amazing, right?! 696 00:34:22,200 --> 00:34:24,240 But in fact, because I know this game already, 697 00:34:24,460 --> 00:34:27,060 I know that the 2 and the 2-1 are only the mini-map. 698 00:34:27,240 --> 00:34:29,180 And they're not the one I'm interested in. 699 00:34:29,620 --> 00:34:39,040 The one I'm interested in should be, pop, pop, pop. 700 00:34:40,460 --> 00:34:41,520 I think this one. 701 00:34:41,760 --> 00:34:44,540 Like all this color, here it's not really look like a map. 702 00:34:45,240 --> 00:34:47,960 But when I will zoom on it, it will really look like a map. 703 00:34:48,300 --> 00:34:48,860 I hope. 704 00:34:52,400 --> 00:34:56,400 So yeah, I'm just trying to grab the good memory, 705 00:34:56,660 --> 00:34:58,140 the good addresses memory. 706 00:35:00,180 --> 00:35:00,980 And it's done. 707 00:35:01,420 --> 00:35:05,380 As you can see here, I have the memory, the true address 708 00:35:05,380 --> 00:35:05,620 memory. 709 00:35:05,980 --> 00:35:06,940 I just grab. 710 00:35:08,100 --> 00:35:11,360 And oh, it doesn't work in the middle. 711 00:35:16,560 --> 00:35:18,260 OK, it's a technical problem. 712 00:35:18,460 --> 00:35:19,660 I can see all my screen. 713 00:35:22,300 --> 00:35:23,400 How can I do that? 714 00:35:26,680 --> 00:35:27,040 Sorry. 715 00:35:37,220 --> 00:35:37,580 Oh. 716 00:35:39,260 --> 00:35:40,600 I'm going to use some, ah. 717 00:35:42,700 --> 00:35:43,540 Why can't I? 718 00:35:45,140 --> 00:35:46,140 I should put it back there. 719 00:35:46,180 --> 00:35:46,840 I should put it back there. 720 00:35:49,720 --> 00:35:50,880 How can I do that? 721 00:35:53,780 --> 00:35:54,960 I can do my Snapchat. 722 00:35:55,940 --> 00:35:58,740 I can access my, ah, my screen. 723 00:36:02,260 --> 00:36:03,520 I'll try to change the resolution. 724 00:36:04,400 --> 00:36:05,280 Just for a minute. 725 00:36:08,980 --> 00:36:09,840 Hope to work. 726 00:36:14,920 --> 00:36:15,900 OK, just a second. 727 00:36:16,000 --> 00:36:16,180 Sorry. 728 00:36:20,280 --> 00:36:20,720 OK. 729 00:36:22,800 --> 00:36:23,100 OK. 730 00:36:23,400 --> 00:36:24,060 I've got better on my screen. 731 00:36:26,100 --> 00:36:29,200 I just have to do the manipulation again. 732 00:36:43,860 --> 00:36:44,160 OK. 733 00:36:44,220 --> 00:36:44,500 I said, ah. 734 00:36:44,720 --> 00:36:45,120 I'll show you. 735 00:36:50,020 --> 00:36:50,700 Some technical problems. 736 00:36:50,700 --> 00:36:54,360 difficulties, sorry. We'll be back in a few seconds. 737 00:37:02,280 --> 00:37:07,760 Oh, you can see, in fact. Oh, perfect. 738 00:37:10,060 --> 00:37:11,460 So, I'm just doing it again. 739 00:37:16,940 --> 00:37:17,340 Okay. 740 00:37:18,380 --> 00:37:19,720 And somewhere around here. 741 00:37:20,960 --> 00:37:23,720 So, as you can see, this is the part that I wasn't able to see. 742 00:37:23,900 --> 00:37:26,920 And this is the most important part because it's where I write the memory. 743 00:37:27,680 --> 00:37:31,580 So, here are the two addresses I just select. I do a new snapshot. 744 00:37:33,340 --> 00:37:36,040 Here it is. And I will use a button that 745 00:37:36,040 --> 00:37:40,020 tries to increase the size of the snapshot just to hold the memory, 746 00:37:40,160 --> 00:37:44,140 or hold the map. And I will zoom a little on it. 747 00:37:45,740 --> 00:37:46,640 Something like that. 748 00:37:48,920 --> 00:37:50,360 There. It looks like 749 00:37:50,360 --> 00:37:50,680 it's 750 00:37:50,700 --> 00:37:54,100 gibberish. But, if I find a way to align it, 751 00:37:55,580 --> 00:37:57,440 just have to find a good alignment. 752 00:38:03,260 --> 00:38:04,160 I'm not sure. 753 00:38:06,280 --> 00:38:09,760 This part is one of the hardest because I have to make it align, 754 00:38:10,120 --> 00:38:13,480 and we didn't find a way to make it automatically. 755 00:38:16,500 --> 00:38:17,660 Yeah, it looks like 756 00:38:17,660 --> 00:38:18,140 this. 757 00:38:20,700 --> 00:38:21,500 I'll go a little faster. 758 00:38:26,100 --> 00:38:30,500 As you can see, you can see some shape that's trying to appear. 759 00:38:41,520 --> 00:38:43,500 I hope. Yep. 760 00:38:48,160 --> 00:38:48,940 And here it is. 761 00:38:57,120 --> 00:39:01,820 So, this map is kind of different of the one that Ellie showed you. 762 00:39:02,060 --> 00:39:06,880 It's not an additive visibility map. It's a bit mask map. 763 00:39:07,140 --> 00:39:12,320 So, here's my base. As you can see, the value are 0.2, 0.2. 764 00:39:12,540 --> 00:39:20,520 And this is my value. The first two bytes of high value are my actual visibility. 765 00:39:20,520 --> 00:39:27,640 And the two lower, the 0.2, are what I already saw, but I can't see anymore. 766 00:39:27,980 --> 00:39:29,320 Like, for example, here I can see. 767 00:39:30,640 --> 00:39:32,360 Where is my unit to be? 768 00:39:32,820 --> 00:39:35,540 Somewhere here. Yeah, I was here, but I'm not here anymore. 769 00:39:35,720 --> 00:39:44,340 So, I can just show the game, but not the units. 770 00:39:46,020 --> 00:39:49,920 So, all I have to do, and everything else, sorry, is 771 00:39:49,920 --> 00:39:54,000 the NPC player that I have a visibility to, and it's stored in the same map. 772 00:39:54,200 --> 00:39:55,640 So, their value is 0.1. 773 00:39:56,540 --> 00:39:59,500 And here must be my opponent, and his value is 0.4. 774 00:40:01,240 --> 00:40:07,820 So, everything I have to do is to use a bit mask, and do with this value. 775 00:40:08,080 --> 00:40:09,760 So, and put it everywhere on the map. 776 00:40:10,420 --> 00:40:11,480 So, let's try that. 777 00:40:11,820 --> 00:40:14,400 So, click on bit map. 778 00:40:15,360 --> 00:40:16,300 And show value. 779 00:40:17,160 --> 00:40:18,020 Very important. 780 00:40:19,220 --> 00:40:19,900 Very important. 781 00:40:19,920 --> 00:40:21,580 I will do this mask. 782 00:40:23,080 --> 00:40:28,900 I will try, I will use a thread to be able to rewrite it all the time, 783 00:40:28,900 --> 00:40:30,660 to be able to see the map all the time. 784 00:40:31,100 --> 00:40:32,140 And space, sorry. 785 00:40:34,060 --> 00:40:37,360 And I'll run the writing, and hopefully it will work. 786 00:40:37,480 --> 00:40:40,020 I will be able to see the game and all the map. 787 00:40:41,020 --> 00:40:43,380 So, you can see on the mini-map, nothing changed. 788 00:40:43,860 --> 00:40:47,520 On the map, it doesn't really look like it. 789 00:40:47,580 --> 00:40:49,400 Ah, sorry, I made the same mistake. 790 00:40:50,040 --> 00:40:53,940 So, here, I just write the memory I saw, I select. 791 00:40:54,980 --> 00:40:57,820 So, I just have to select the whole, the entire map. 792 00:40:58,160 --> 00:40:59,840 So, to do that, just click here. 793 00:40:59,980 --> 00:41:01,520 Give me all the addresses of the map. 794 00:41:01,900 --> 00:41:02,860 Here and here, change. 795 00:41:03,560 --> 00:41:04,420 And do the same. 796 00:41:04,660 --> 00:41:05,360 Write it. 797 00:41:08,740 --> 00:41:11,580 And here, as you can see on the mini-map, the unit began to pop. 798 00:41:11,900 --> 00:41:17,380 To appear, and everything began to appear. 799 00:41:17,460 --> 00:41:19,840 But it's not working very well, because as I already told you, 800 00:41:20,400 --> 00:41:27,120 we can't control the algorithm that makes the game appear on the map, 801 00:41:27,180 --> 00:41:31,500 but we can force it by, for example, changing the resolution of the game. 802 00:41:31,560 --> 00:41:34,280 That will force the game to rewrite all of the map. 803 00:41:34,920 --> 00:41:39,260 So, I just have to change the resolution. 804 00:41:43,700 --> 00:41:44,680 And here it is. 805 00:41:44,980 --> 00:41:46,420 I can see all the map. 806 00:41:53,100 --> 00:41:53,900 And that's it. 807 00:41:55,440 --> 00:41:57,120 Now you can cheat on your game if you want. 808 00:41:57,640 --> 00:41:58,220 It's bad. 809 00:41:59,180 --> 00:41:59,980 Don't do that. 810 00:42:01,700 --> 00:42:03,080 So, and to conclude, 811 00:42:08,500 --> 00:42:16,720 here's the addresses where you can find all of our tutorial and screenshots and keynotes. 812 00:42:18,080 --> 00:42:18,680 Let's conclude. 813 00:42:28,920 --> 00:42:32,820 So, yeah, just to let you know, if you didn't follow everything we did into the demo, 814 00:42:33,340 --> 00:42:37,420 we spent a lot of time with Joe to build a tutorial for you, which is about 10 minutes, 815 00:42:37,560 --> 00:42:38,860 which actually sum up everything we did. 816 00:42:39,260 --> 00:42:40,460 So, you can have it on video. 817 00:42:40,620 --> 00:42:42,840 And we also put the slide online, if you want them. 818 00:42:43,560 --> 00:42:45,240 Don't hesitate to share them with your friends. 819 00:42:45,480 --> 00:42:46,400 It will be happy. 820 00:42:46,780 --> 00:42:48,140 And if you have any questions, 821 00:42:48,340 --> 00:42:48,520 uh, 822 00:42:49,120 --> 00:42:49,380 uh, 823 00:42:49,920 --> 00:42:53,880 it's room 106 and we'll be happy to answer your question. 824 00:42:53,980 --> 00:42:57,020 I'll even show you even more, a little bit more of the tool if you want to play with it. 825 00:42:57,320 --> 00:42:59,580 We'll be happy to show you how we do everything, you know. 826 00:43:00,200 --> 00:43:01,780 And thanks for attending our talk. 827 00:43:01,900 --> 00:43:03,260 I hope you had fun with us. 828 00:43:03,920 --> 00:43:05,520 And, uh, that's it.