1 00:00:00,000 --> 00:00:02,560 Hello everyone, how are we enjoying DEF CON? 2 00:00:05,150 --> 00:00:08,430 Yeah, so last day, glad that you're all here. 3 00:00:08,690 --> 00:00:17,170 I have with me Sam and Tom, I'm Marius, and we are here to talk about getting banned without actually cheating. 4 00:00:17,290 --> 00:00:26,670 So, this game aims at kind of showcasing a little bit what's going on in the cheat and anti-cheat world by a fun exploration of the topic. 5 00:00:27,530 --> 00:00:33,870 So, first of all, let's look into why are we actually interested in getting banned without cheating, right? 6 00:00:33,870 --> 00:00:35,090 Getting banned should be easy. 7 00:00:35,090 --> 00:00:41,790 We just buy some cheats and then, like all the other cool kids on the block, we will be banned as well. 8 00:00:42,070 --> 00:00:51,090 Now, we have seen on Twitch, we really want to get banned, but we are all working in a university, we are academics, we don't have money, we cannot afford to buy cheats. 9 00:00:51,370 --> 00:01:02,690 So, as a result, we look into ways to just go for getting banned without cheating, and also, a little bit later in the talk, how we can get other people banned on our behalf. 10 00:01:03,370 --> 00:01:05,770 So, who are we that we are here and talking? 11 00:01:05,990 --> 00:01:11,290 We have Sam over here, who is currently a PhD student with us at the University of Birmingham. 12 00:01:11,730 --> 00:01:17,430 He works a lot on his research on man-at-the-end attacks and reverse engineering. 13 00:01:17,450 --> 00:01:20,850 So, looking into anti-cheats and cheats is right down his alley. 14 00:01:21,330 --> 00:01:28,570 He also developed some games for our undergrad courses, and these games can only be solved by actively being hacked. 15 00:01:28,570 --> 00:01:30,230 So, not cheating, but hacking. 16 00:01:30,230 --> 00:01:32,370 So, a little bit of game dev experience. 17 00:01:32,450 --> 00:01:36,550 Tom is a full professor at our university. 18 00:01:36,710 --> 00:01:42,410 He is teaching game hacking since years and years and years to our different students, including Sam. 19 00:01:42,410 --> 00:01:53,930 And besides looking at that, he also hacked small little payment providers like Apple Pay, Visa, Square, Bank of America, the things you just look at. 20 00:01:54,070 --> 00:01:57,650 I'm Marius, I'm working as an assistant prof at the same uni. 21 00:01:57,650 --> 00:02:03,510 I do a lot of securing smartphones, basement hacking, low-level reverse engineering, these kind of stuff. 22 00:02:03,510 --> 00:02:07,250 Recently, I also looked into the RP-2350, the Pico 2. 23 00:02:07,250 --> 00:02:12,930 So, that's us, a team of people really interested in reverse engineering and low-level security. 24 00:02:13,990 --> 00:02:22,630 Now, for getting banned in games without actually cheating, it's not as easy as one may think. 25 00:02:22,890 --> 00:02:25,310 First of all, getting banned can be hard. 26 00:02:25,310 --> 00:02:30,090 Modern anti-cheats may detect and prevent ban-worthy behavior. 27 00:02:30,090 --> 00:02:38,950 So, instead of just letting us run our things, which would get us banned, they prevent us from doing so in the first place, just stops the game and we cannot get banned. 28 00:02:39,970 --> 00:02:44,550 Also, another problem is, sometimes we just don't know when we got banned. 29 00:02:44,550 --> 00:02:50,270 Like, games operate with ban waves so that cheaters usually don't know when they were caught or for what. 30 00:02:50,270 --> 00:02:52,490 This, of course, makes also our research harder. 31 00:02:52,490 --> 00:02:57,870 We cannot easily do a test and know, oh, we got banned because we did that. 32 00:02:58,830 --> 00:03:05,450 So, as a result, we ended up having a lot of different hardware systems, which by now are banned in a lot of different games. 33 00:03:05,550 --> 00:03:11,950 But, yeah, it was not one computer, it was an effort of multiple computing devices trying different things at the same time. 34 00:03:12,550 --> 00:03:15,510 The last part is knowing why we are banned. 35 00:03:15,510 --> 00:03:25,670 We were really trying out a lot of different things and we were not always sure what exactly was the ban-worthy behavior, so we needed to redo the same tests in isolation. 36 00:03:25,950 --> 00:03:29,970 But, with all of this in place, let's have a look at the rest of the talk. 37 00:03:29,970 --> 00:03:35,670 We just now had the intro and talked about getting banned or not getting banned. 38 00:03:35,670 --> 00:03:36,370 Sorry. 39 00:03:36,370 --> 00:03:38,790 We will now talk about not getting banned. 40 00:03:40,330 --> 00:03:41,830 Oh, thanks a lot. 41 00:03:41,830 --> 00:03:48,510 So, first, some easy things we tried to try and trigger a game ban, which didn't work. 42 00:03:48,650 --> 00:03:52,970 So, first thing, we download a cheat and try and run it. 43 00:03:52,970 --> 00:03:54,750 We used Cheat Engine. 44 00:03:55,070 --> 00:03:56,770 We ran our game. 45 00:03:57,190 --> 00:04:04,290 We ran this Cheat Engine software, which lets you edit memory directly, find player positions, that kind of thing. 46 00:04:04,450 --> 00:04:07,590 Against a basic game, this works really well. 47 00:04:07,590 --> 00:04:13,250 The games we looked at with Anti-Cheat just crashed the game, got kicked out of Valiant. 48 00:04:13,370 --> 00:04:19,490 When I log back in, I actually got a penalty for leaving the game early, even though they kicked me. 49 00:04:19,670 --> 00:04:20,970 It doesn't work. 50 00:04:21,090 --> 00:04:24,510 So, how is it detecting these cheat processes? 51 00:04:25,130 --> 00:04:28,410 Turns out, a lot of the time, they just look for the name. 52 00:04:28,790 --> 00:04:36,690 So, you can also get kicked out of a ban by opening Notepad and saving it with the name of a cheat tool. 53 00:04:36,690 --> 00:04:38,430 Here, a Windows debugger. 54 00:04:38,550 --> 00:04:41,850 That also gets you kicked out of Fortnite. 55 00:04:42,410 --> 00:04:44,170 But, no ban. 56 00:04:44,250 --> 00:04:47,930 To get banned in a game, you've got to go a lot further than this. 57 00:04:48,510 --> 00:04:51,570 A little bit of background about Windows security. 58 00:04:52,070 --> 00:04:56,270 The games, things like Cheat Engine, run at the user level. 59 00:04:56,430 --> 00:05:01,310 Any program can run at this level, but it doesn't have that many abilities. 60 00:05:01,310 --> 00:05:05,330 The low-level operating system runs at the kernel level. 61 00:05:05,530 --> 00:05:08,130 This code can connect to any process. 62 00:05:08,130 --> 00:05:09,730 It can read and write processes. 63 00:05:10,010 --> 00:05:13,530 A crash at the kernel level blue screens your machine. 64 00:05:13,890 --> 00:05:19,090 And importantly, code running at the kernel level should be signed by Microsoft. 65 00:05:20,070 --> 00:05:29,470 So, if you want to run kernel-level code, you should go to Microsoft, pay them some money, they'll look at your code, sign it, and that gets you into the kernel. 66 00:05:30,210 --> 00:05:37,950 So, to write our own Cheat processes, we tried running user-level code, which called kernel functions. 67 00:05:39,890 --> 00:05:46,610 And these kernel functions could then interact with the game process and read memory directly. 68 00:05:46,770 --> 00:05:50,970 Again, this works really well against any game without anti-cheat. 69 00:05:51,070 --> 00:05:52,930 It looks something like this. 70 00:05:53,270 --> 00:05:56,210 The first line there opens a process. 71 00:05:56,210 --> 00:06:00,110 It asks the kernel, please give me a handle to this process. 72 00:06:00,530 --> 00:06:04,090 The read process command will let you read memory directly. 73 00:06:04,570 --> 00:06:06,570 Unfortunately, no luck. 74 00:06:06,570 --> 00:06:08,830 The game just crashes again. 75 00:06:09,570 --> 00:06:16,830 So, what's going on is the game companies have gone to Microsoft and got their anti-cheat code signed. 76 00:06:17,130 --> 00:06:26,490 So, their anti-cheat code is running in the kernel with more privileges than our cheat code, which makes cheating much harder. 77 00:06:27,050 --> 00:06:34,750 When any cheat process tries to interact using kernel API calls, the anti-cheat can block it. 78 00:06:35,330 --> 00:06:38,490 So, there's a lot of past related work in this area. 79 00:06:38,490 --> 00:06:46,530 Cheat forums, past talks have looked at how to write cheats, and they found a neat way around this kernel-level protection. 80 00:06:46,610 --> 00:06:50,990 And that's to use old, out-of-date drivers. 81 00:06:50,990 --> 00:06:58,910 So, your drivers for any equipment will be signed by Microsoft for low-level hardware operations. 82 00:06:59,150 --> 00:07:05,570 However, over the years, Microsoft have accidentally signed quite a few vulnerable drivers. 83 00:07:05,690 --> 00:07:08,310 Intel networking drivers, for instance. 84 00:07:08,310 --> 00:07:12,870 And there's no easy way to stop these drivers once they're signed. 85 00:07:12,910 --> 00:07:30,950 So, we get an old driver, we load the old vulnerable driver, and we exploit the vulnerability to map our own code into the kernel, and now we have unsigned code running into the kernel, and we can move our cheat into the kernel. 86 00:07:31,010 --> 00:07:34,510 And this is what a lot of actual working cheats do. 87 00:07:35,130 --> 00:07:37,510 This is also used by malware now. 88 00:07:37,510 --> 00:07:41,530 It's a great malware technique to bypass Windows defenses. 89 00:07:41,790 --> 00:07:44,090 So, let's see if this gets us banned. 90 00:07:44,570 --> 00:07:46,510 We start up the game. 91 00:07:46,510 --> 00:07:50,130 We find an old vulnerable Intel driver. 92 00:07:50,150 --> 00:07:51,390 We load it. 93 00:07:51,390 --> 00:07:52,730 Windows says okay. 94 00:07:52,730 --> 00:07:54,550 It's happy to load it. 95 00:07:54,930 --> 00:07:59,390 But when we actually try to use it, it's not loaded. 96 00:07:59,950 --> 00:08:09,050 The game anti-cheat running at the kernel level is hooking the DLL load functions to stop us loading vulnerable drivers. 97 00:08:09,570 --> 00:08:15,230 The running game may also unload any drivers it sees as vulnerable. 98 00:08:15,350 --> 00:08:18,930 So, this technique doesn't work on its own. 99 00:08:20,750 --> 00:08:23,190 Next, we looked at the hypervisor. 100 00:08:23,190 --> 00:08:25,970 We tried virtualizing the entire stack. 101 00:08:26,250 --> 00:08:32,430 If the game is running virtualized, we can get above the anti-cheat code. 102 00:08:32,830 --> 00:08:35,990 Normally, a debugger would run at the kernel level. 103 00:08:36,490 --> 00:08:43,490 We're going to try running it in a hypervisor , which would make it almost invisible to the anti-cheat software. 104 00:08:43,610 --> 00:08:46,790 If we got that working, we could do anything we wanted. 105 00:08:47,910 --> 00:08:54,310 One problem is we've got driver integrity checks, signature checks to bypass. 106 00:08:54,310 --> 00:08:58,830 So, we try that same technique of using vulnerable drivers. 107 00:08:58,950 --> 00:09:13,230 And we patch the integrity check for the kernel to always return true, which lets us load our hypervisor debugger. 108 00:09:13,230 --> 00:09:21,050 Now that's loaded, we can run the game, and our cheat code should be completely invisible to the anti-cheat code. 109 00:09:22,030 --> 00:09:23,670 Should work? 110 00:09:23,690 --> 00:09:25,010 It doesn't. 111 00:09:25,010 --> 00:09:28,110 Easy anti-cheat blue screens our computer. 112 00:09:28,350 --> 00:09:32,450 Battle.ai blue screens our computer, and so does Vanguard. 113 00:09:33,090 --> 00:09:41,350 What these anti-cheats are doing is they're deliberately enforcing some errors and then calling a VM exit. 114 00:09:42,050 --> 00:09:46,170 If the code is not running in a VM, nothing happens. 115 00:09:46,330 --> 00:09:50,010 If it is running in a VM , that forces a blue screen. 116 00:09:50,310 --> 00:09:55,630 So, these anti -cheat companies are deliberately blue screening our machines if we try and mess with them. 117 00:09:55,910 --> 00:09:58,430 But, no ban in sight. 118 00:09:58,930 --> 00:10:05,550 The anti-cheat companies think all of these methods are so basic that they don't merit a ban. 119 00:10:05,630 --> 00:10:08,870 To get banned, you've got to go a lot further. 120 00:10:08,970 --> 00:10:11,530 And for that, I'll hand over to Marius. 121 00:10:12,110 --> 00:10:13,150 Yes. 122 00:10:13,150 --> 00:10:18,450 So, let's look into a couple of things we tried which actually got us banned. 123 00:10:18,490 --> 00:10:28,470 And for this, the important bit is that we custom tailor our methods to the different game and anti-cheats we are targeting because all of them operate slightly differently. 124 00:10:28,470 --> 00:10:35,510 So, we will have a small rundown of some, in our opinion, really cool things to get banned without cheating for particular games. 125 00:10:36,110 --> 00:10:40,230 So, first let's look into user mode code injection. 126 00:10:40,230 --> 00:10:53,090 So, similar to cheat tools we saw which run in the same user mode or which run in user mode and inject their code into the running game, we found a way to get user mode injection working and also getting us banned from Overwatch 2 . 127 00:10:53,090 --> 00:10:58,530 So, Overwatch 2 was not able to prevent us from injecting code with a little twist. 128 00:10:58,530 --> 00:11:02,390 So, we want to run some custom code in the target's game process. 129 00:11:02,810 --> 00:11:13,250 Normally , what we will do is we would use a load library function like a Windows API to load our cheating code like in this code 1337hex.dll. 130 00:11:14,290 --> 00:11:19,210 All anti-cheats really, really check for this and see, oh no, load library is happening . 131 00:11:19,210 --> 00:11:27,670 When the game is already running , a user should not really load additional libraries and modify the memory process of the game. 132 00:11:27,670 --> 00:11:32,750 There are also different methods like load library A or create remote thread, these kind of things . 133 00:11:32,750 --> 00:11:36,250 All of these, the anti-cheats catch and ruin our day. 134 00:11:37,270 --> 00:11:39,570 So, what did we do instead? 135 00:11:39,790 --> 00:11:45,550 Instead, we avoided the API calls and resorted to a technique which is called manual mapping. 136 00:11:46,570 --> 00:11:52,050 This basically boils down to replicating the load library functionality completely ourselves. 137 00:11:52,230 --> 00:12:09,890 So, we allocate some executable space, we copy the PE sections into the memory, we do a little bit of resolving imports so that it all works and is at the right location, and then we call the entry of the DLL and optionally then the DLL could hijack the game thread. 138 00:12:11,370 --> 00:12:19,050 And all in all, when we developed this, we were like, okay, we basically just built load library again. 139 00:12:19,110 --> 00:12:24,610 It's just not called load library anymore, it's now called our evil loader 1337. 140 00:12:25,670 --> 00:12:30,110 And with that, we got banned, our first ban from a game. 141 00:12:30,210 --> 00:12:40,290 So, Overwatch 2 sent us this nice email saying that we made an offense of using unauthorized cheat programs or hacks. 142 00:12:41,610 --> 00:12:42,950 We did not cheat. 143 00:12:42,950 --> 00:12:44,110 We did not use any cheat. 144 00:12:44,110 --> 00:12:46,650 We just load our own memory. 145 00:12:46,750 --> 00:12:47,950 What is wrong about this? 146 00:12:47,950 --> 00:12:49,150 But, okay. 147 00:12:50,650 --> 00:13:03,410 One important bit here to also consider is that cheats which move to kernel level, sorry, anti-cheats which move to kernel level would block this attempt because they run at a higher privilege level. 148 00:13:03,410 --> 00:13:15,150 So, this is all based on the fact that Overwatch 2 runs the anti-cheat engine in user mode and we have to try a little harder for games running and anti-cheats running in the kernel . 149 00:13:16,090 --> 00:13:23,770 So, let's cycle back to the bring your own vulnerable driver kind of attack Tom mentioned a couple of minutes ago . 150 00:13:24,430 --> 00:13:31,850 In the case of Rainbow Six Siege and other games, the methodology which is used by malware and which Tom explained would not work, right? 151 00:13:31,850 --> 00:13:35,790 We cannot start the game, load the vulnerable driver. 152 00:13:35,970 --> 00:13:38,990 The anti-cheat would prevent us from doing so. 153 00:13:39,430 --> 00:13:43,610 So, let's permutate this operation a little bit. 154 00:13:44,410 --> 00:13:47,290 We first load the vulnerable driver. 155 00:13:47,430 --> 00:13:49,510 Windows as before just says okay. 156 00:13:49,510 --> 00:13:52,450 So, now we have arbitrary read-write primitives in the kernel. 157 00:13:52,450 --> 00:13:58,650 We can write memory and we can afterwards, like we can insert our malicious behavior, our cheat codes. 158 00:13:58,730 --> 00:14:07,530 We can unload the driver, then start the game, reload and yes, the game gets us banned. 159 00:14:07,530 --> 00:14:19,470 Like instead of preventing this technique, which it's not can because Rainbow Six Siege is not running at the time we are injecting our vulnerable driver, it will see that something funky happened and it bans us for cheating. 160 00:14:19,470 --> 00:14:22,590 So, that's our second ban we successfully got. 161 00:14:22,730 --> 00:14:27,750 Both of these bans relied on injecting memory to the game process. 162 00:14:27,870 --> 00:14:33,530 So, let's look at a different type of potential cheating, which we do not, right? 163 00:14:33,530 --> 00:14:36,690 We don't cheat, but there are different techniques we can look into. 164 00:14:37,330 --> 00:14:38,210 Cool. 165 00:14:38,490 --> 00:14:45,070 So, we've looked a bit at sort of injecting memory into user mode and kernel mode and we're now going to have a look at more cheat specific behavior. 166 00:14:45,490 --> 00:14:50,670 We're going to start with Apex Legends and we're going to have a look at some sort of mousy cheats. 167 00:14:51,010 --> 00:14:56,890 AimBots, so people might be familiar with these, they aim for you, they can shoot for you as well. 168 00:14:57,930 --> 00:15:10,410 PixelBots just shoot for you, normally on a color change, so games like Valorant are very polite and they put this nice red box around enemies, so you see the color red change in your middle central pixel and you just shoot. 169 00:15:10,790 --> 00:15:18,310 And macros, which again shoot for us or can move your mouse for you, normally for things like recall reduction or shooting quite quickly. 170 00:15:19,010 --> 00:15:25,310 So, cheats can simulate inputs and mouse movements, so can unusual inputs get us banned. 171 00:15:26,510 --> 00:15:33,190 There's a problem with modern keyboards, they're a bit crap, they lack soul, mine's too small, I don't like it very much. 172 00:15:33,450 --> 00:15:39,750 And we really like to compose our movement a bit more tastefully and therefore we would like to present Keyboard++. 173 00:15:42,510 --> 00:15:51,170 For those of you wondering how this works, like this, this is my live stream from my office. 174 00:16:02,890 --> 00:16:06,410 I should point out Sam works in a shared office. 175 00:16:09,090 --> 00:16:17,550 Okay , so we log in the next day, we've really pissed off my office mates and unfortunately we can still play Apex Legends . 176 00:16:17,550 --> 00:16:19,030 Terrible news, I hate that game. 177 00:16:19,630 --> 00:16:21,390 So we've got to go a bit further. 178 00:16:21,530 --> 00:16:29,210 The other problem is it's quite noisy in there and I'm having to click quite a lot and the clicking on my big keyboard is kind of slow. 179 00:16:29,810 --> 00:16:36,850 So what I do is I take my software I've written to simulate inputs from the signal from the keyboard and update it. 180 00:16:36,850 --> 00:16:44,990 So before I'd have something like this, I click and that's painfully slow. 181 00:16:46,530 --> 00:16:53,770 What I do is I've upgraded it so if I just hold down one key, it now shoots for me. 182 00:16:53,950 --> 00:16:54,830 Fantastic. 183 00:16:55,330 --> 00:16:59,550 My office mates ears are saved and I can get more frags. 184 00:17:00,210 --> 00:17:06,670 So again, log in a few days later and finally I can no longer play Apex Legends. 185 00:17:07,050 --> 00:17:08,390 So what's happened? 186 00:17:09,190 --> 00:17:18,330 It could be the EA hates class, I wouldn't put this past them, or more likely we've run into a couple of anti-cheat measures and there are two likely possibilities here. 187 00:17:18,330 --> 00:17:21,890 Macro detection or aim bot slash pixel bot detection. 188 00:17:22,350 --> 00:17:31,550 We look at these cheats, here are some sort of things they might look for, some checks they might run, and as you can see we kind of took a couple of these. 189 00:17:31,550 --> 00:17:41,650 We've got third-party software sort of generating synthetic inputs and at the same time we've got this sort of inhuman click timing caused by my shoot macro. 190 00:17:42,590 --> 00:17:47,950 So terrific, we don't have to play Apex Legends anymore, we can move on to a single -player game. 191 00:17:53,260 --> 00:18:00,720 Okay, so the next thing we wanted to look at was overlays because a lot of cheats work by printing stuff onto the screen. 192 00:18:01,300 --> 00:18:05,760 Classic cheat is a wall hack which will display the enemy position through a wall. 193 00:18:06,280 --> 00:18:10,700 Radars are often common which will tell you where all the enemy players are in a game. 194 00:18:10,940 --> 00:18:15,760 These are kind of the absolute standard cheat, so something we had to look at. 195 00:18:16,260 --> 00:18:20,760 So we wanted to see would using an overlay trigger a cheat . 196 00:18:24,120 --> 00:18:32,600 So additionally as well there is a problem of most crosshairs, a lot are quite subtle, they're not informative, they're a bit boring. 197 00:18:32,840 --> 00:18:41,260 Also I'm getting a bit older , my attention span wanders, I find it hard to concentrate, so I need a crosshair which will help me play a game. 198 00:18:41,260 --> 00:18:43,660 So I present crosshair++. 199 00:18:44,660 --> 00:18:49,340 This keeps my attention, this would absolutely help me play Fortnite. 200 00:18:49,640 --> 00:18:52,700 So here we go. 201 00:18:53,560 --> 00:18:57,600 That absolutely makes me a better Fortnite player. 202 00:18:57,600 --> 00:19:10,880 Great, I can now continue my Fortnite career and note the move in hand, but no, Fortnite is not having it the next day my account is banned. 203 00:19:11,560 --> 00:19:13,760 So what happened? 204 00:19:13,980 --> 00:19:17,440 Maybe Epic just don't like my taste in crosshair. 205 00:19:17,440 --> 00:19:19,580 Unfortunately it's probably not that. 206 00:19:19,580 --> 00:19:23,240 We've triggered some overlay detection. 207 00:19:23,660 --> 00:19:42,800 Any anti-cheat is suspicious of any overlay on the machine and particularly we found that a no click overlay, so an overlay which didn't accept mouse clicks and was moving, that's important, was dynamic, that triggered a ban. 208 00:19:46,560 --> 00:19:57,420 So the moving is important and it's also worth noting that overlays for applications like Steam or Discord are white listed. 209 00:19:57,820 --> 00:20:02,200 So the anti-cheat will actually look at where the overlay is coming from. 210 00:20:02,200 --> 00:20:11,240 It's got a list of allowable overlay sources and if you have something which isn't one of those, that may in fact trigger a ban. 211 00:20:11,320 --> 00:20:19,320 Of course what cheaters started doing was injecting their overlay into Steam or Discord and making that display it. 212 00:20:19,320 --> 00:20:27,320 So the anti-cheats now integrity check Discord and Steam to make sure those processes haven't been attacked as well. 213 00:20:27,320 --> 00:20:34,120 So the anti-cheat as well as protecting the game will also protect Discord and make sure that hasn't been hacked. 214 00:20:34,120 --> 00:20:37,240 So that provides a lot of protection from overlays. 215 00:20:39,800 --> 00:20:40,260 Okay. 216 00:20:40,960 --> 00:20:43,120 There's two silly things over and done with. 217 00:20:43,120 --> 00:20:46,240 We're going to move back to memory injection. 218 00:20:47,180 --> 00:20:50,440 Everyone's favorite and least favorite anti-cheat Valorant and Vanguard. 219 00:20:52,000 --> 00:20:54,400 If you haven't noticed so far, API suck. 220 00:20:55,640 --> 00:20:57,920 Loading a driver normally doesn't work. 221 00:20:57,920 --> 00:20:58,680 It's easy to prevent. 222 00:20:58,680 --> 00:20:59,920 It's easy to spot. 223 00:21:00,420 --> 00:21:08,900 And in the case of Vanguard that anti-cheat runs from system boot so we can't just, you know, load a vulnerable driver, inject some code, unload it before the game starts. 224 00:21:09,440 --> 00:21:13,500 So we're gonna have to go a bit deeper here to get our code into the kernel. 225 00:21:14,040 --> 00:21:15,320 There's two ways to do this. 226 00:21:15,320 --> 00:21:18,060 First is in the UEFI environment. 227 00:21:18,100 --> 00:21:19,720 So we disable secure boot. 228 00:21:20,520 --> 00:21:25,260 We run our injector in the UEFI boot environment . 229 00:21:26,220 --> 00:21:33,560 Write our own code into the boot cycle and map our mischievous driver here in pink before Vanguard anti-cheat loads. 230 00:21:34,540 --> 00:21:42,680 The second way to get code into the kernel without, you know, the normal methods is via something called a direct memory access card. 231 00:21:42,680 --> 00:21:47,620 This is a separate PCI device and it circumvents the CPU more or less entirely. 232 00:21:47,620 --> 00:21:49,820 It can directly read and write to system memory. 233 00:21:49,820 --> 00:21:53,620 It can be disabled by the kernel and therefore we disguise it as a network card. 234 00:21:54,400 --> 00:21:57,620 And then we can stealthily map our code into the kernel once again. 235 00:21:58,460 --> 00:22:00,560 Does this work against Vanguard? 236 00:22:02,060 --> 00:22:03,020 No. 237 00:22:04,500 --> 00:22:05,440 Unfortunately not. 238 00:22:05,440 --> 00:22:06,360 What happened? 239 00:22:06,780 --> 00:22:10,680 Vanguard hooks into the Windows page fault handler at a very low level. 240 00:22:10,780 --> 00:22:14,540 It also kills Microsoft patch guard to do this. 241 00:22:15,180 --> 00:22:19,700 Using this trick, they can catch unsigned kernel code as it executes very neatly. 242 00:22:20,980 --> 00:22:22,860 Doesn't matter how the code got there. 243 00:22:22,860 --> 00:22:24,320 They can still find you. 244 00:22:25,060 --> 00:22:29,620 I'm going to pass over to Marius and we're going to explore how we can stay banned from video games. 245 00:22:30,660 --> 00:22:31,380 Exactly. 246 00:22:31,380 --> 00:22:44,120 Because by now at this point in stage, okay, we got banned once but game companies have the tendency to at some point a couple of weeks later if we only catch once to release our ban and let us play again. 247 00:22:44,120 --> 00:22:46,300 And of course we cannot have this happen. 248 00:22:46,300 --> 00:22:47,700 We want to stay banned. 249 00:22:48,920 --> 00:22:53,720 To look into this, let's do a little trip down the memory lane. 250 00:22:53,720 --> 00:22:57,400 So let's imagine it's 2015 all over again. 251 00:22:57,820 --> 00:23:00,420 Rainbow Six Siege was just released. 252 00:23:00,420 --> 00:23:05,880 We found a couple of cheats, got cheated and we got successfully banned from Rainbow Six. 253 00:23:05,880 --> 00:23:06,940 Amazing . 254 00:23:07,240 --> 00:23:14,600 Now, if we wanted to continue playing besides being banned, we can just create a new account and get back to cheating . 255 00:23:14,600 --> 00:23:18,540 So it's equivalent to setting up a different hack. 256 00:23:18,540 --> 00:23:19,860 We are now looking different . 257 00:23:19,860 --> 00:23:22,940 Our account name is different but it's still us playing. 258 00:23:23,120 --> 00:23:27,680 We may get banned again so we just do it again and again. 259 00:23:28,260 --> 00:23:29,340 It doesn't matter. 260 00:23:29,340 --> 00:23:31,940 We are wearing different hats all the time. 261 00:23:31,960 --> 00:23:35,180 The game back then will just let us play again and again. 262 00:23:35,660 --> 00:23:42,540 Now, by now we do have or anti-cheat systems do have a solution to this which are hardware ID bans. 263 00:23:42,760 --> 00:23:50,100 So anti-cheats collect a lot of different IDs of your hardware on the computer you're gaming on. 264 00:23:50,360 --> 00:23:52,520 And here are just a couple of examples of these, right? 265 00:23:52,520 --> 00:24:10,140 There are the serial numbers of the memory, there are the main board serials and the IDs, what kind of network interface cards are used, GPUs and their serials, and also what operation system you're running on, like which version, and so on and so forth. 266 00:24:10,640 --> 00:24:12,080 These are just some examples. 267 00:24:12,080 --> 00:24:17,000 There are a lot of more of different factors anti-cheats may sample to create a hardware ID. 268 00:24:17,400 --> 00:24:33,600 And then, once they keep or they... once they got you caught cheating, they ban the hardware ID so you can stay banned even if you create a new account, right? 269 00:24:33,600 --> 00:24:36,260 The hardware now of the computer is banned from the game. 270 00:24:37,120 --> 00:24:42,080 So we started writing little scripts to dump on our own hardware IDs. 271 00:24:42,080 --> 00:24:46,440 Here in this example, the main board, some new ID of the system and so on. 272 00:24:46,440 --> 00:24:49,120 And yes, these are our real hardware IDs. 273 00:24:49,120 --> 00:24:51,280 They are already banned in some games. 274 00:24:51,280 --> 00:24:55,500 If you take them, go out and get us banned in more games, that would be fantastic. 275 00:24:57,260 --> 00:25:11,060 So, anyhow, we can just use a simple script, for instance, running from a live CD and just get those hardware IDs against any computer, which would be okay to, yeah, to let us boot our own system. 276 00:25:11,220 --> 00:25:17,400 We could also steal the motherboard packaging after a user has got it. 277 00:25:17,400 --> 00:25:20,820 We could trick a victim to execute a script on our behalf. 278 00:25:20,820 --> 00:25:24,320 There are multiple ways to get hardware IDs of different people. 279 00:25:24,320 --> 00:25:26,360 We will get to that back a little bit later. 280 00:25:26,360 --> 00:25:29,800 Just keep in mind, these are really easy to get. 281 00:25:30,640 --> 00:25:37,340 Now, the cheat market, of course, also reacted to the fact that there are hardware ID bans. 282 00:25:37,340 --> 00:25:52,620 So you can buy hardware ID spoofers on different cheat forums and cheat selling websites, and we see here that a one -day access to such a hardware ID spoofer is already like $5 a day, seven days, $20. 283 00:25:52,880 --> 00:25:55,780 And as said before, we don't want to buy cheats. 284 00:25:55,780 --> 00:25:58,600 We even less want to buy hardware spoofing ID. 285 00:25:58,600 --> 00:26:00,320 Also, it's a bit boring. 286 00:26:00,320 --> 00:26:02,760 It just changes all of it in software . 287 00:26:02,760 --> 00:26:09,840 So maybe we can do something different and directly change the IDs of the hardware. 288 00:26:11,380 --> 00:26:17,920 Now, there's too much hardware to cover in one talk, so we will focus just on two interesting examples. 289 00:26:18,400 --> 00:26:26,300 One are the mainboards or motherboards, because this is a very classic and common way which was used a lot to bypass hardware IDs. 290 00:26:26,300 --> 00:26:36,240 And the other one are RAM or memory, because there are interesting new ways to get down to change the serial and IDs of the RAM interface . 291 00:26:36,600 --> 00:26:42,280 So I'll head over to Sam, who will talk about motherboard shenanigans. 292 00:26:42,520 --> 00:26:48,420 Okay , so you want to change the hardware ID on your motherboard for one reason or another. 293 00:26:50,700 --> 00:26:55,920 There's a few ways to do this, and I'll kind of walk you through my story of trying to do this on various motherboards. 294 00:26:56,460 --> 00:27:08,900 First attempt, quite easy, we just take some American Megatrends firmware, we put this on a USB and we boot into an EFI shell, and we can, using this software, quite easily just change your IDs for one power cycle. 295 00:27:08,960 --> 00:27:09,880 There's a few problems with this. 296 00:27:09,880 --> 00:27:11,100 One, it's volatile . 297 00:27:11,100 --> 00:27:12,780 You have to do this every single boot. 298 00:27:13,620 --> 00:27:15,020 There's only limited functionality. 299 00:27:15,020 --> 00:27:16,600 You've kind of got to do what AMI tells you. 300 00:27:16,600 --> 00:27:19,140 You can't change things like your inbuilt MAC address. 301 00:27:19,920 --> 00:27:21,600 And finally, it violates secure boot. 302 00:27:21,680 --> 00:27:25,740 So games like Valorant, which say you must have secure boot on, this won't work. 303 00:27:25,860 --> 00:27:28,120 So moving on to attempt two. 304 00:27:28,620 --> 00:27:30,660 We're going to boot our machine into MS-DOS. 305 00:27:31,240 --> 00:27:33,780 If you do know what that is, well done. 306 00:27:35,220 --> 00:27:40,120 Using AFU DOS, which is the American Megatrends DOS utility, we're going to dump the BIOS. 307 00:27:40,440 --> 00:27:46,540 We're going to scan through for the serial numbers we want to change, and on some boards, this can include built-in MAC addresses. 308 00:27:46,540 --> 00:27:48,120 On most, it doesn't. 309 00:27:48,400 --> 00:27:51,900 And then using the same utility, we're going to flash back the edited BIOS. 310 00:27:52,740 --> 00:27:53,840 It's a problem solved. 311 00:27:53,840 --> 00:27:54,460 Terrific. 312 00:27:54,460 --> 00:27:55,620 It's non -volatile. 313 00:27:55,620 --> 00:27:57,280 It bypasses secure boot. 314 00:27:57,360 --> 00:27:58,780 Yippee , we can all go home. 315 00:27:59,320 --> 00:28:00,360 Unfortunately not. 316 00:28:00,360 --> 00:28:02,920 A lot of motherboards now have BIOS write protections. 317 00:28:03,240 --> 00:28:09,680 On some, you can roll back your BIOS again and again and again until, you know, they didn't have security updates. 318 00:28:09,680 --> 00:28:11,680 But for most of them, you're going to get stuck. 319 00:28:11,680 --> 00:28:13,920 We're going to have to go a bit lower level. 320 00:28:14,860 --> 00:28:16,400 This is where the lab comes in. 321 00:28:16,460 --> 00:28:17,580 Attempt number three. 322 00:28:18,000 --> 00:28:20,240 We're going to connect to the onboard SPI chip. 323 00:28:20,240 --> 00:28:23,060 So this is the programmable read-only memory. 324 00:28:24,240 --> 00:28:28,220 You're going to start by doing this with individual wires before you realize you have a clip. 325 00:28:29,240 --> 00:28:31,460 You're then going to put your clip on. 326 00:28:32,420 --> 00:28:35,420 Interface from a separate machine, something like a laptop. 327 00:28:36,180 --> 00:28:38,320 We're going to use a utility like Flash ROM. 328 00:28:38,520 --> 00:28:39,360 Terrific. 329 00:28:39,720 --> 00:28:44,040 Dump our BIOS, edit the IDs, reflash the BIOS. 330 00:28:44,040 --> 00:28:45,040 Terrific. 331 00:28:46,240 --> 00:28:47,420 Profit? 332 00:28:47,580 --> 00:28:48,900 Unfortunately not. 333 00:28:49,420 --> 00:28:54,520 For those of you who are into hardware hacking, you might have run into this very irksome problem before. 334 00:28:55,540 --> 00:29:00,600 The SPI chip shares power with the CPU and this can completely screw with your readings. 335 00:29:01,100 --> 00:29:04,200 On small devices like NICs, you're often fine. 336 00:29:04,200 --> 00:29:07,720 On a big motherboard, you're not going to get a nice readout. 337 00:29:08,360 --> 00:29:09,600 So attempt number four. 338 00:29:12,100 --> 00:29:13,440 Desolder the SPI chip. 339 00:29:14,560 --> 00:29:16,900 Take it off entirely and connect it to an adapter. 340 00:29:17,460 --> 00:29:21,180 Order an adapter from some weird Chinese website and wait two weeks for that to arrive. 341 00:29:23,340 --> 00:29:28,840 Flash the edited BIOS and finally we can resolder the SPI chip onto the motherboard. 342 00:29:29,780 --> 00:29:40,600 I don't know how well I've done there, so I think some of you can probably do a much better job than me, but I think that's perfect and it works and terrific. 343 00:29:40,860 --> 00:29:49,500 Before, we have our boring ASUS motherboard with a very sort of, you know, conspicuous serial number and now we've changed it. 344 00:29:49,500 --> 00:29:53,420 We are inconspicuous and we have changed our serial number to whatever we like. 345 00:29:53,800 --> 00:29:58,400 One thing I'd love to highlight here is that every single one of those four methods can work. 346 00:29:59,160 --> 00:30:00,860 It depends on your motherboard. 347 00:30:00,860 --> 00:30:03,300 The first method, as I said, works for some games. 348 00:30:03,360 --> 00:30:05,580 You know, if you have Securebit on, we're going to move forward. 349 00:30:05,580 --> 00:30:08,280 If you've got BIOS protections, we're going to move forward. 350 00:30:08,280 --> 00:30:10,720 You can get it done, you just have to take the chips off. 351 00:30:12,120 --> 00:30:13,200 So that's motherboards. 352 00:30:13,200 --> 00:30:13,900 Terrific. 353 00:30:13,900 --> 00:30:22,080 The next one I'm going to move on to is RAM and this is kind of where being an academic and having a lab comes really handy because you can steal other people's cool toys. 354 00:30:23,360 --> 00:30:27,220 So RAM is traditionally very hard to spoof from hardware and there's a few reasons. 355 00:30:27,520 --> 00:30:29,440 One, there's no nice software tools. 356 00:30:29,440 --> 00:30:34,420 There's no BIOS utility change your RAM serials, at least not that I know of. 357 00:30:34,420 --> 00:30:35,740 If there is one, please tell me. 358 00:30:35,740 --> 00:30:37,320 There's no SPI interface. 359 00:30:37,320 --> 00:30:38,740 They use a different standard. 360 00:30:38,740 --> 00:30:43,480 It's called SPD and these chips are often write protected. 361 00:30:44,000 --> 00:30:48,380 So therefore the adapter setup to sort of overcome this is a bit messy. 362 00:30:48,380 --> 00:30:51,160 We've got some soldered wires and a Raspberry Pi Pico . 363 00:30:51,200 --> 00:30:56,140 Big thank you to the Bad RAM project at the university for letting me steal their toys. 364 00:30:57,440 --> 00:31:02,780 So we connect our DIMM into our DIMM adapter into a Raspberry Pi Pico. 365 00:31:03,420 --> 00:31:05,640 We dump our SPD chip. 366 00:31:06,540 --> 00:31:08,820 We can then hex edit our serial values. 367 00:31:09,180 --> 00:31:11,260 You can put something funny if you want. 368 00:31:11,260 --> 00:31:13,300 You know, I've changed mine to Reto Please. 369 00:31:14,840 --> 00:31:17,100 We can then kill write protection on the chip. 370 00:31:17,100 --> 00:31:23,000 This is a little bit tricky and you can learn the hard way the correct voltage. 371 00:31:23,360 --> 00:31:33,640 I'll tell you now it's seven volts down a specific pin and you issue the clear write protection command to the correct address and we've killed write protection. 372 00:31:33,640 --> 00:31:40,000 We can now write our edited SPD dump back to the chip and successfully change our serials. 373 00:31:42,420 --> 00:31:44,100 That's motherboards and RAM. 374 00:31:44,360 --> 00:31:49,000 We're now going to move on to a really fun bit of the talk which is how we can get other people banned from games. 375 00:31:49,180 --> 00:31:52,420 I would like to describe this as an advanced form of disrespect. 376 00:31:53,700 --> 00:31:58,560 It can be used to make any malware much worse and more importantly it can make your friends go play outside. 377 00:32:03,250 --> 00:32:10,730 We're going to take a little trip back in time to April 1st before the Black Hat USA deadline. 378 00:32:11,210 --> 00:32:13,490 Me and Maris here are both hard at work. 379 00:32:15,270 --> 00:32:16,670 Tom's really busy. 380 00:32:17,310 --> 00:32:19,310 We're pretty confused. 381 00:32:19,310 --> 00:32:20,590 He's got nothing on. 382 00:32:21,230 --> 00:32:23,150 We think he's bullshitting us. 383 00:32:23,810 --> 00:32:25,750 Tom is in fact playing Valorant. 384 00:32:26,610 --> 00:32:32,390 I peep my head around his office because I have a key and lo and behold Tom is in fact playing Valorant. 385 00:32:32,390 --> 00:32:32,990 I'm shocked. 386 00:32:32,990 --> 00:32:34,130 I'm upset. 387 00:32:34,130 --> 00:32:40,910 My supervisor has failed me and therefore I devise a devious prank to save future PhD students from bad supervision. 388 00:32:46,600 --> 00:32:49,420 One week later I come into work. 389 00:32:49,820 --> 00:32:51,520 I click on my emails. 390 00:32:51,520 --> 00:32:53,200 I click select all and I click delete . 391 00:32:53,200 --> 00:32:59,980 I get a coffee and I settle down for a morning playing Valorant and no I'm banned. 392 00:33:00,280 --> 00:33:02,520 This is on a completely clean machine. 393 00:33:02,520 --> 00:33:04,380 I've never cheated on this machine. 394 00:33:04,380 --> 00:33:06,140 I've never cheated on that account. 395 00:33:06,760 --> 00:33:09,580 I keep my password safe. 396 00:33:09,720 --> 00:33:18,300 I haven't shared my user account with anyone but importantly my bootloader isn't locked because no one locks their bootloader. 397 00:33:18,300 --> 00:33:21,800 So that's the scenario and I'll hand over to Maris. 398 00:33:22,560 --> 00:33:24,160 So what happened? 399 00:33:24,160 --> 00:33:31,040 How did we get Tom banned and having him need to work on the slides with us? 400 00:33:31,340 --> 00:33:40,900 Sam went into the office and run a live CD to then dump out the hardware IDs from Tom's machine. 401 00:33:40,900 --> 00:34:02,760 Then using all of the fancy attacks we saw he faked Tom's hardware IDs on his machine, used all the techniques we saw to get banned from Valorant and the next time Tom logs into the game the anti-cheat sees the same banned hardware IDs and says oh it's the same machine it's a new account let's ban this account as well. 402 00:34:03,500 --> 00:34:07,920 And now Tom has to help us preparing the slides. 403 00:34:09,900 --> 00:34:17,220 And it is important to note that this is not all like I mean it's a fun attack but it also could make malware way worse. 404 00:34:18,800 --> 00:34:24,800 So for example we have here some of the biggest malware that can steal money from banks. 405 00:34:26,040 --> 00:34:33,500 So the advanced version of a malware will also get you banned at Rainbow Six making it much more dangerous malware. 406 00:34:33,500 --> 00:34:37,760 We then have PowerGhost mining crypto using the machine. 407 00:34:38,600 --> 00:34:42,260 PowerGhost++ would also get you banned at Valorant. 408 00:34:42,260 --> 00:34:46,800 Now this would clearly free up all the CPU cycles to mine more crypto. 409 00:34:47,140 --> 00:34:54,080 Finally and worst of all Stuxnet huge attack disabled nuclear centrifuges. 410 00:34:54,880 --> 00:35:02,500 Stuxnet++ would also get all the nuclear engineers banned at Fortnite which would have brought the nuclear program to its knees. 411 00:35:05,560 --> 00:35:08,720 So let's just recap what we saw here. 412 00:35:08,720 --> 00:35:10,540 Game bans as an attack. 413 00:35:10,820 --> 00:35:19,740 First of all we want to note here that this is not a problem for weaker anti-cheats like while the anti-cheat for instance which do not rely on hardware banning right. 414 00:35:19,740 --> 00:35:25,880 As long as anti-cheats are just doing account based banning this attack is not a problem. 415 00:35:25,960 --> 00:35:32,260 However we do believe that getting innocent people banned in games is a real attack that works in practice right. 416 00:35:32,260 --> 00:35:44,180 We saw the example in our office where someone has access to a physical machine but imagine for also the scenario of streamers on Twitch which is a there's a lot of revenue in that right . 417 00:35:44,180 --> 00:35:49,340 Someone could ship an already pre -banned graphics card to someone and get them banned in their games. 418 00:35:49,760 --> 00:35:57,060 And any attempt to mitigate this kind of attack in our opinion would make hardware banning much weaker. 419 00:35:57,060 --> 00:36:00,380 Like there's not an easy way to get out of that. 420 00:36:01,900 --> 00:36:06,460 So with all of that we are arriving towards the end of our talk. 421 00:36:06,460 --> 00:36:09,620 Let's just quickly recap what we saw earlier. 422 00:36:14,340 --> 00:36:20,120 We've had a look at basic techniques things like cheat engine that you might play around with on Civ 5. 423 00:36:20,860 --> 00:36:23,280 These will get you someone that's played Civ 5. 424 00:36:23,500 --> 00:36:26,880 Things that will get you blocked, crash games but not banned. 425 00:36:27,460 --> 00:36:32,380 Look at mapping code into game processes from user mode and how this will get you banned on Overwatch. 426 00:36:32,420 --> 00:36:37,960 We've looked at mapping code into the kernel and how this will get you banned on Rainbow Six Siege and other BattlEye games. 427 00:36:38,280 --> 00:36:44,420 We've looked at simulating inputs getting us banned on easy anti-cheat on Apex Legends. 428 00:36:44,820 --> 00:36:48,520 Adding video overlays onto our game. 429 00:36:48,620 --> 00:36:50,660 Again easy anti-cheat for Fortnite. 430 00:36:51,120 --> 00:36:52,700 Fortnite also runs BattlEye. 431 00:36:53,240 --> 00:37:00,120 And we've looked at loading our own drivers sneakily and how anti-cheat such as Vanguard can block this. 432 00:37:01,280 --> 00:37:04,540 So what are the takeaways and the conclusions of this talk? 433 00:37:05,440 --> 00:37:09,620 First modern anti-cheats shrug off a lot of traditional cheat attempts. 434 00:37:09,980 --> 00:37:14,540 Probably getting banned without cheating can be very easy or very hard. 435 00:37:14,540 --> 00:37:17,320 Small things can trigger them if they think you're cheating. 436 00:37:17,320 --> 00:37:21,360 Big things can also not all the way up to loading our own hypervisor. 437 00:37:21,360 --> 00:37:23,440 Yeah we'll just crash it do what you want. 438 00:37:24,680 --> 00:37:27,780 Modifying hardware is the sort of king of spoofing. 439 00:37:28,340 --> 00:37:32,040 It cannot be detected if done right. 440 00:37:33,300 --> 00:37:35,680 And you can also get your friends to go outside. 441 00:37:36,420 --> 00:37:37,940 You can ban streamers. 442 00:37:38,720 --> 00:37:43,560 I think we should mention the our attack we presented it as I'll take your hardware IDs. 443 00:37:43,920 --> 00:37:49,880 You can flip this around to use some software methods to write hardware IDs to other people's machines that are already banned. 444 00:37:49,880 --> 00:37:58,020 So you could have a mother band device and deploy those hardware IDs or you can collect someone else's hardware IDs, spoof those and get them banned. 445 00:37:58,020 --> 00:37:59,140 It works either way. 446 00:37:59,980 --> 00:38:04,940 If you're interested in our work, that's a link to our GitHub. 447 00:38:04,940 --> 00:38:07,280 We've got our slides from this talk will be up there. 448 00:38:07,320 --> 00:38:11,280 The slides from our black hat talk which is a sort of deep dive into some technical stuff. 449 00:38:11,620 --> 00:38:20,740 So if you want to know for example how Vanguard page fault hook works, the one that can detect unsigned code in the kernel, that's in that talk and that'll be up there. 450 00:38:21,480 --> 00:38:23,340 So please check that out. 451 00:38:23,800 --> 00:38:28,140 Take any questions any advice, et cetera. 452 00:38:28,500 --> 00:38:29,900 Thank you for coming.