1 00:00:00,000 --> 00:00:02,860 Now, see, these guys were bugging me last night at the conference. 2 00:00:03,460 --> 00:00:08,060 We were having this party over at Pure, and they said I had to tape a 40-ouncer to my hand. 3 00:00:08,480 --> 00:00:09,160 Duct-tape it. 4 00:00:09,600 --> 00:00:14,600 But see, I didn't get home until about 6 in the morning, and I went to bed, and I woke up at 10, and I was still drunk. 5 00:00:15,260 --> 00:00:19,660 So what I decided to do is I slammed a couple Bloody Marys before I got here, and I'm feeling kind of jiggy. 6 00:00:20,020 --> 00:00:23,440 So I don't think I want to tempt fate by having a 40-ouncer taped to my hand. 7 00:00:23,460 --> 00:00:26,960 So for all you guys that knew that was the deal, I'm sorry. I'm not going to do it. 8 00:00:27,640 --> 00:00:29,280 All right, so now that we got that out of the way, 9 00:00:29,280 --> 00:00:31,660 welcome to my talk, Exploding Online Games for Cash. 10 00:00:32,660 --> 00:00:35,980 I've been doing some World of Warcraft hacking, so we're going to pick on Blizzard software. 11 00:00:36,280 --> 00:00:38,900 But these techniques could be used for all kinds of different things. 12 00:00:39,040 --> 00:00:42,520 I have 125 slides. There's no way in hell I'm going to get through them all. 13 00:00:42,600 --> 00:00:44,240 So I'm going to go really fucking fast. 14 00:00:44,560 --> 00:00:45,540 So I hope you don't mind. 15 00:00:45,920 --> 00:00:49,600 I have one video of a PvP bot that I will show you towards the end. 16 00:00:50,420 --> 00:00:51,440 So let's get started. 17 00:00:51,600 --> 00:00:52,700 Why am I hacking games? 18 00:00:53,080 --> 00:00:54,360 Well, because it's really fun. 19 00:00:54,480 --> 00:00:54,880 That's why. 20 00:00:54,960 --> 00:00:57,860 People are way more interested in games than they are in firewalls. 21 00:00:57,860 --> 00:00:59,120 As I found out in my book. 22 00:00:59,280 --> 00:01:02,860 It was completely sold out in pre-orders into September, and that was the first printing. 23 00:01:03,180 --> 00:01:05,740 So I was realizing, wow, this game is really cool. 24 00:01:06,540 --> 00:01:07,520 They're really complex. 25 00:01:07,960 --> 00:01:12,300 World of Warcraft, for example, is probably one of the most complex targets I've ever had to reverse engineer in my life. 26 00:01:13,160 --> 00:01:17,300 There's a healthy community of game hackers that are not the same community as the security community, 27 00:01:17,560 --> 00:01:21,220 but they're equally as skilled in reverse engineering, probably more so in some ways. 28 00:01:21,620 --> 00:01:26,020 And the real reason we're having this talk today is because computer gaming is a big business. 29 00:01:26,300 --> 00:01:27,020 It's growing. 30 00:01:27,420 --> 00:01:29,260 There's some kind of tracking by mores. 31 00:01:29,280 --> 00:01:31,340 There's law almost going on with MMOs at this time. 32 00:01:32,200 --> 00:01:36,840 Microsoft reports that gaming is the third most common activity on the platform, right behind web and email. 33 00:01:36,940 --> 00:01:37,860 So that's a pretty big deal. 34 00:01:40,260 --> 00:01:41,380 It's measured in billions. 35 00:01:42,260 --> 00:01:43,200 Why do we cheat? 36 00:01:43,420 --> 00:01:44,040 Why do I cheat? 37 00:01:44,200 --> 00:01:45,420 I cheat because I suck at games. 38 00:01:45,480 --> 00:01:46,080 That's why I cheat. 39 00:01:48,500 --> 00:01:53,340 I like having an unfair advantage over people, and I especially like doing that with a six-pack of beer. 40 00:01:55,280 --> 00:01:57,240 Cheating makes it more fun for me to play the game. 41 00:01:57,360 --> 00:01:59,020 And with games like World of Warcraft, 42 00:01:59,280 --> 00:02:01,920 there's a lot of grinding involved, a lot of repetitious things. 43 00:02:02,240 --> 00:02:07,480 And what I discovered is I can't compete with 15-year-old kids when their moms make them dinner and bring it in to them. 44 00:02:08,160 --> 00:02:13,460 I have a real job, and I can't have my level 70 guy leveled up in 15 days like they can. 45 00:02:13,560 --> 00:02:17,020 So, hey, I want to do something to kind of give me a little bit of an edge. 46 00:02:17,680 --> 00:02:19,880 There's another reason you might be considering doing this. 47 00:02:19,900 --> 00:02:20,920 So you can actually make money. 48 00:02:21,000 --> 00:02:23,600 So this is sort of like a miniature business plan. 49 00:02:25,000 --> 00:02:28,400 What I'm going to show you is how to farm gold in World of Warcraft 50 00:02:28,400 --> 00:02:29,260 and make things. 51 00:02:29,280 --> 00:02:31,020 $350,000 a year. 52 00:02:31,180 --> 00:02:31,980 I'm going to show you the numbers. 53 00:02:36,060 --> 00:02:37,600 We already know what MMOs are. 54 00:02:37,660 --> 00:02:38,580 I don't need to talk about that. 55 00:02:39,380 --> 00:02:44,360 MMOs and money, most of you probably know this, but there's actually an exchange rate between in-game currency, 56 00:02:44,680 --> 00:02:45,940 play money, and real money. 57 00:02:46,280 --> 00:02:52,320 Right now, that's about 3 cents per 100 gold in a wholesale market if you're going through an affiliate program. 58 00:02:52,580 --> 00:02:56,860 If you're on a retail site like IGE.com, that's about 10 cents of gold they're charging you. 59 00:02:57,180 --> 00:02:58,840 You can actually go retail. 60 00:02:58,860 --> 00:02:59,260 If you want to go retail, you can go retail. 61 00:02:59,260 --> 00:03:02,800 If you want to, but then you've got to deal with all the marketing of your site and stuff. 62 00:03:02,940 --> 00:03:06,940 So it's actually just easier to wholesale your gold through a reseller or affiliate program. 63 00:03:07,600 --> 00:03:12,840 The secondary market in virtual items is probably close to a billion dollars. 64 00:03:12,960 --> 00:03:17,240 It was 600 million in 2005, so I assume it's only getting larger. 65 00:03:18,040 --> 00:03:24,180 That's an aftermarket traded in virtual items that don't exist anywhere except in a SQL database. 66 00:03:26,720 --> 00:03:28,780 Here's a screenshot, and I have a link here. 67 00:03:28,780 --> 00:03:31,900 Here's a screenshot, and I have a link here for a YouTube video that you can watch talking about Chinese farming. 68 00:03:32,220 --> 00:03:35,860 And it's just a little documentary showing the sweatshops in China and the Philippines 69 00:03:35,860 --> 00:03:39,140 and how they basically slave all day long. 70 00:03:39,400 --> 00:03:42,280 But you'd think this is a bad job, but no, these guys like doing this. 71 00:03:42,640 --> 00:03:46,080 They'd prefer to have this job than to work in the Nike factory down the road. 72 00:03:47,240 --> 00:03:50,400 They make about $6 a day doing this job. 73 00:03:51,560 --> 00:03:54,280 Now, if you make a bot, this is current standards. 74 00:03:54,540 --> 00:03:57,640 I'm familiar with several bots that are currently being used commercially. 75 00:03:57,640 --> 00:04:01,780 These are not bots that Blizzard is aware of, otherwise the warden would have already banned them. 76 00:04:01,940 --> 00:04:05,460 These bots are private, and they're sold commercially to Chinese farmers. 77 00:04:05,780 --> 00:04:09,420 They farm about 400 gold per character in every eight-hour shift. 78 00:04:09,560 --> 00:04:10,620 They run two shifts a day. 79 00:04:11,520 --> 00:04:15,920 Each admin, that's the guy making $6 an hour, can manage about 15 of these bots. 80 00:04:16,240 --> 00:04:18,180 The better the bot, the more you can manage. 81 00:04:18,280 --> 00:04:19,320 It scales your operation. 82 00:04:19,760 --> 00:04:23,500 Two shifts a day, two bots per computer, usually running Windows 2000, 83 00:04:23,600 --> 00:04:26,540 because Windows 2000 runs better than Windows XP. 84 00:04:26,780 --> 00:04:27,620 It doesn't take a lot of time. 85 00:04:27,640 --> 00:04:30,420 It doesn't take up as much memory, and they can use these cheap, old computers 86 00:04:30,420 --> 00:04:32,380 and get two WoW accounts running at a time. 87 00:04:32,440 --> 00:04:35,820 At any given time, some of the largest farmers in China 88 00:04:35,820 --> 00:04:40,940 are running 1,000 simultaneous WoW accounts logged in at that moment in time. 89 00:04:41,220 --> 00:04:43,400 To give you an idea of the scale of the operation. 90 00:04:44,180 --> 00:04:48,580 Four admins, 30 computers, 60 bots at 1,600 gold per day per computer. 91 00:04:48,780 --> 00:04:54,400 That means that your farming operation on 30 computers is generating 48,000 WoW gold per day output. 92 00:04:55,980 --> 00:04:57,620 That is a standard, and that's normal. 93 00:04:59,680 --> 00:05:01,720 Wholesale that for $3 for every 100 gold. 94 00:05:01,840 --> 00:05:05,400 That's approximately $1,400 a day in gross income. 95 00:05:05,640 --> 00:05:06,760 You pay your expenses. 96 00:05:06,880 --> 00:05:08,280 You can see I have a little break out there. 97 00:05:08,500 --> 00:05:09,620 Rent, bandwidth, et cetera. 98 00:05:09,820 --> 00:05:12,400 Assume, basically, you got $1,000 a day in profit. 99 00:05:12,700 --> 00:05:18,600 Times that by 365, and now you know how you're making $365,000 a year farming gold and WoW. 100 00:05:18,700 --> 00:05:21,340 Now, I haven't counted something in here that's really important. 101 00:05:21,560 --> 00:05:23,860 There is an attrition rate due to banning. 102 00:05:24,060 --> 00:05:26,980 If your bot is undetected, which it needs to be to even do this business, 103 00:05:27,120 --> 00:05:27,620 then, hopefully, you're going to be able to do it. 104 00:05:27,620 --> 00:05:30,700 Hopefully, that attrition rate is not too much of a problem, but it does happen, 105 00:05:30,780 --> 00:05:33,540 and I actually don't know what the figures are on the attrition rate. 106 00:05:37,020 --> 00:05:39,520 Now, let's talk about the current design of the farming bots. 107 00:05:40,140 --> 00:05:41,500 Everything is waypoint driven. 108 00:05:41,800 --> 00:05:45,880 You put it in record mode, and you run your character through what's called a patrol path. 109 00:05:46,140 --> 00:05:50,100 Then you connect that patrol path to the vendors through a vendor path, 110 00:05:50,280 --> 00:05:55,280 and you also go to the graveyard, and you record one path that goes from the graveyard out to your patrol path. 111 00:05:55,480 --> 00:05:57,600 So, if you die, your ghost lives. 112 00:05:57,620 --> 00:05:59,320 You'll run back, find the body, and resurrect. 113 00:05:59,980 --> 00:06:02,720 The bot will actually run all the way back into town, 114 00:06:02,860 --> 00:06:06,440 and it will automatically repair all the items when it needs to be repaired. 115 00:06:06,660 --> 00:06:08,500 It'll dump off all the loot. 116 00:06:08,660 --> 00:06:09,940 It has a loot filter. 117 00:06:10,160 --> 00:06:12,660 Gray items, for example, won't be picked up unless you want them to. 118 00:06:12,900 --> 00:06:15,000 Green or above goes to a mule account. 119 00:06:15,180 --> 00:06:16,220 Those get muled in the mailbox. 120 00:06:16,400 --> 00:06:18,920 This is all occurring completely and totally automatically. 121 00:06:19,320 --> 00:06:23,720 The mule account picks up the green items, and the admin goes and dumps those on the auction house. 122 00:06:24,320 --> 00:06:26,640 Total output, 400 gold per day. 123 00:06:27,620 --> 00:06:31,340 Now, most of these farming bots are private variants of systems like WowSharp. 124 00:06:31,400 --> 00:06:33,420 Has anybody ever seen or heard of WowSharp before? 125 00:06:34,160 --> 00:06:34,560 Okay. 126 00:06:35,240 --> 00:06:36,460 You know the open source. 127 00:06:36,560 --> 00:06:38,800 The guy that wrote this open sourced it and released it. 128 00:06:38,860 --> 00:06:42,900 So, a bunch of guys went out and made private versions of this thing, compiled differently, 129 00:06:43,080 --> 00:06:46,440 that the warden couldn't detect, and they're still in operation. 130 00:06:46,640 --> 00:06:48,900 That's one of the ways that the Chinese farmers work. 131 00:06:50,780 --> 00:06:51,920 Here's some different features. 132 00:06:52,000 --> 00:06:52,960 I already talked about this. 133 00:06:53,120 --> 00:06:54,420 Oh, auto detection. 134 00:06:54,540 --> 00:06:55,160 This is kind of cool. 135 00:06:55,260 --> 00:06:57,500 It can detect if somebody's following your character. 136 00:06:57,620 --> 00:06:59,300 So, this is one of the admin's jobs. 137 00:06:59,460 --> 00:07:03,100 He has to watch not only the bot's fouling, that is, getting stuck on something, 138 00:07:03,320 --> 00:07:07,760 but also make sure that it's not alerting him that there's a GM present in the chat channel, 139 00:07:07,900 --> 00:07:13,060 or there's a particular NPC or, I'm sorry, PC that's been following him for a given amount of time. 140 00:07:13,160 --> 00:07:16,700 So, there's these features built in to help you from being called out and detected. 141 00:07:17,060 --> 00:07:20,960 It takes a lot of money to make a level 70 character in World of Warcraft. 142 00:07:21,060 --> 00:07:23,460 It's over $100 in investment per level 70. 143 00:07:23,600 --> 00:07:25,580 So, it costs a lot to lose them. 144 00:07:25,660 --> 00:07:27,460 Plus, it takes about 15 days. 145 00:07:27,460 --> 00:07:31,500 15 days of leveling with the bot in order to reach level 70 in the first place. 146 00:07:31,720 --> 00:07:39,440 So, the nice thing about that is you can buy the game and use the free first month that comes with the game to level up to 70. 147 00:07:40,560 --> 00:07:45,320 The next thing you do is you drop that level 70 character on something like eBay and try to sell it for $500, 148 00:07:45,500 --> 00:07:47,840 and then you use it as a farming account until you sell it. 149 00:07:47,900 --> 00:07:48,700 That's the basic idea. 150 00:07:51,120 --> 00:07:52,400 Oops, I went up instead of down. 151 00:07:53,260 --> 00:07:55,020 Alright, here's some things not to do. 152 00:07:56,040 --> 00:07:57,440 Don't use ISX1. 153 00:07:57,460 --> 00:07:57,560 Wow. 154 00:07:57,980 --> 00:08:03,700 A whole bunch of people in the botting industry over the last three months have been banned, banned, and banned again. 155 00:08:03,760 --> 00:08:05,720 We're talking like really hardcore hits. 156 00:08:05,860 --> 00:08:07,320 Their business is probably going to go down. 157 00:08:07,620 --> 00:08:08,480 Bans are so bad. 158 00:08:08,580 --> 00:08:10,440 All of them based on ISX. 159 00:08:10,480 --> 00:08:10,660 Wow. 160 00:08:11,200 --> 00:08:15,120 Don't believe anything you read on their websites about how it's stealthy. 161 00:08:15,120 --> 00:08:15,660 It's not. 162 00:08:15,860 --> 00:08:18,680 Because I'm seeing it, they're getting banned over and over again. 163 00:08:18,720 --> 00:08:20,140 That is not a private bot. 164 00:08:20,860 --> 00:08:22,180 Don't use WowGlider. 165 00:08:22,340 --> 00:08:24,160 How many people here have had a WowGlider account? 166 00:08:24,380 --> 00:08:25,500 How many people have been banned? 167 00:08:25,500 --> 00:08:27,080 How many people have been banned? 168 00:08:27,260 --> 00:08:27,860 At least once. 169 00:08:28,220 --> 00:08:28,860 Come on. 170 00:08:29,020 --> 00:08:29,400 Two? 171 00:08:29,600 --> 00:08:29,920 That's it? 172 00:08:30,440 --> 00:08:33,980 I've lost over $400 in banned Wow accounts at this point in time. 173 00:08:36,580 --> 00:08:40,260 Don't use WowSharp, even though I just mentioned it is being used. 174 00:08:40,320 --> 00:08:41,800 It's being used with a lot of changes. 175 00:08:42,100 --> 00:08:45,500 So unless you're prepared to make those changes yourself, you'll probably get caught. 176 00:08:46,280 --> 00:08:51,020 Don't transfer a thousand gold of your own to some level one IGE mule account. 177 00:08:52,000 --> 00:08:53,160 Guaranteed banning next day. 178 00:08:53,680 --> 00:08:59,000 And don't do what I did and accidentally realize or forget that you're not supposed to be an old Ironforge. 179 00:08:59,140 --> 00:09:00,760 So when you ask in chat, how do I get out of here? 180 00:09:01,280 --> 00:09:02,840 GM comes online and bans you. 181 00:09:08,780 --> 00:09:11,300 So I'm basically making the point that public botting is dead. 182 00:09:12,460 --> 00:09:17,500 Even hardcore Ring Zero tricks like I was presenting last year in my Hacking World of Warcraft talk at Black Hat. 183 00:09:18,120 --> 00:09:18,980 That's a lot of money. 184 00:09:19,260 --> 00:09:21,080 Basically money and time that you can invest. 185 00:09:21,320 --> 00:09:22,920 If you release that as a public tool, 186 00:09:23,160 --> 00:09:25,700 even if Warden isn't going to Ring Zero, 187 00:09:25,780 --> 00:09:29,460 there's probably something we missed and they'll figure out a way to detect you. 188 00:09:29,600 --> 00:09:32,720 God knows how, but then boom, all your investment's lost. 189 00:09:33,660 --> 00:09:36,300 And the other thing is, Blizzard doesn't always use Warden to detect people. 190 00:09:36,420 --> 00:09:38,960 It uses accounting forensics to detect people too. 191 00:09:39,300 --> 00:09:42,420 Those are very simple SQL queries being taken place in their database 192 00:09:42,420 --> 00:09:44,860 and they just go through there and they can find all kinds of interesting things. 193 00:09:45,100 --> 00:09:47,540 Things that are very unnatural about a normal player. 194 00:09:48,060 --> 00:09:50,780 So every public bot so far has been detected. 195 00:09:51,600 --> 00:09:52,740 History has shown this. 196 00:09:53,160 --> 00:09:53,960 Mass bannings have occurred. 197 00:09:54,100 --> 00:09:55,540 Learn and don't do it. 198 00:09:57,840 --> 00:09:59,420 So what is forensics accounting? 199 00:10:00,200 --> 00:10:04,920 Just ask Darius Kazemi and give him a copy of GraphViz and a couple of SQL queries and he'll tell you how it works. 200 00:10:05,460 --> 00:10:07,720 He will go in there and tell you who transacts with who. 201 00:10:07,880 --> 00:10:13,140 If there's an IGE account, level of one, and he knows it's a mule and you talk to that account or move some gold to it, he knows that. 202 00:10:14,080 --> 00:10:16,480 Same quest, completed 150 times in four days. 203 00:10:16,820 --> 00:10:18,500 Okay, that's probably a problem. 204 00:10:21,160 --> 00:10:25,020 Large numbers of accounts all to the same credit card. Bad idea. 205 00:10:26,600 --> 00:10:27,900 And everything's really about gold. 206 00:10:27,960 --> 00:10:30,580 You transfer a large amount of gold between accounts, that's going to stick out. 207 00:10:30,760 --> 00:10:36,760 If you have a large amount of gold above the median average for that character, class, and level that you're at, that's going to stick out. 208 00:10:37,020 --> 00:10:41,580 You might be a guild leader and you get by because you're supposed to be the accountant and you have all the gold, that's fine. 209 00:10:41,860 --> 00:10:45,860 But if you hold on to gold for a very short time, you move it between accounts, those are the things that are going to stick out. 210 00:10:45,940 --> 00:10:48,420 And those things you can't hide from with ward insurance. 211 00:10:48,420 --> 00:10:51,840 Those are things that are just going to be in your database no matter what. 212 00:10:51,940 --> 00:10:53,520 You can pull off some interesting tricks. 213 00:10:53,620 --> 00:11:00,560 You can try to move things through the auction house, sell a really dumb item like a piece of linen for 10,000 gold, try to move it across the auction house. 214 00:11:00,620 --> 00:11:01,660 But that stuff's all tracked too. 215 00:11:02,180 --> 00:11:07,240 Gold acquisition records mark where every piece of gold comes from and where it goes. 216 00:11:07,280 --> 00:11:09,200 And those are stored. They do not throw it out. 217 00:11:11,760 --> 00:11:14,880 Now, why doesn't Blizzard actually ban people? 218 00:11:15,280 --> 00:11:17,680 They say they ban people, but that's like a public image. 219 00:11:17,680 --> 00:11:19,020 They actually like botting. 220 00:11:19,080 --> 00:11:22,740 If they ban people, they would lose 6 million of their 10 million accounts. 221 00:11:23,120 --> 00:11:25,760 Because their 10 million players is kind of a big lie. 222 00:11:26,100 --> 00:11:28,120 Something like 6 million of those are in China. 223 00:11:28,320 --> 00:11:30,260 In China, the game is played by the hour. 224 00:11:30,320 --> 00:11:32,460 You pay for every hour you're logged in. 225 00:11:32,500 --> 00:11:34,180 It's unlike the way they do it here in the West. 226 00:11:34,560 --> 00:11:37,000 So they want to keep people logged in as much as possible. 227 00:11:39,040 --> 00:11:43,360 There are only about 2 million people here in the U.S. that play WoW, according to the records that I have. 228 00:11:43,420 --> 00:11:45,920 And there's a link to the article in case you want to check it out. 229 00:11:47,680 --> 00:11:49,100 What is a ban all about? 230 00:11:49,300 --> 00:11:51,840 A ban isn't done because they want to get rid of players. 231 00:11:52,020 --> 00:11:57,720 A ban is done because they want to make more money in the next couple of weeks for their balance sheet. 232 00:11:58,640 --> 00:12:02,740 When they ban people, everyone they ban goes out and buys new accounts. 233 00:12:03,120 --> 00:12:08,200 There's a direct, measurable influx of cash immediately after every ban. 234 00:12:09,560 --> 00:12:14,400 And if you don't believe me, ask yourself, why don't they ban by IP address range? 235 00:12:15,240 --> 00:12:19,280 I've been banned so many times that they've never used my credit card as a banning tool. 236 00:12:19,480 --> 00:12:21,560 Every time I make a new account, I use the same credit card. 237 00:12:21,640 --> 00:12:22,760 Why don't they just immediately ban me? 238 00:12:22,760 --> 00:12:24,000 Oh, there's Greg again. Kill him. 239 00:12:24,180 --> 00:12:25,220 No, they want my money. 240 00:12:28,400 --> 00:12:29,380 Here's what a ban does. 241 00:12:29,820 --> 00:12:32,880 Approximately 50% of the banned accounts are repurchased shortly afterwards. 242 00:12:33,120 --> 00:12:36,240 You can measure that at about a half million to two million dollars in income. 243 00:12:36,560 --> 00:12:39,120 When they need the money on the balance sheet, time to do a ban. Boom. 244 00:12:39,660 --> 00:12:40,660 Now think about that. 245 00:12:40,820 --> 00:12:43,440 Public image and what really happens in the boardroom behind the scenes. 246 00:12:46,120 --> 00:12:47,360 All right, so that's that. 247 00:12:47,380 --> 00:12:49,860 That's a little influx there about how the gaming thing came to be. 248 00:12:49,980 --> 00:12:51,500 Let's talk about some DMCA stuff. 249 00:12:52,520 --> 00:12:54,200 Hey, when is my talk over, by the way? 250 00:12:56,100 --> 00:12:56,600 Ten of? 251 00:12:56,920 --> 00:12:58,360 Okay, I'm going to go pretty fast here. 252 00:12:58,660 --> 00:12:59,980 Now, I don't like the DMCA. 253 00:13:00,320 --> 00:13:01,840 Most of you probably don't like it either. 254 00:13:02,240 --> 00:13:05,420 Let's talk about this because it has legal ramifications for our business plan. 255 00:13:06,640 --> 00:13:08,520 You know that Blizzard likes to sue people. 256 00:13:08,880 --> 00:13:11,340 All right, they go and they threaten people all the time. 257 00:13:11,440 --> 00:13:14,380 So that would probably happen if you had a public bot and they were aware of it. 258 00:13:15,020 --> 00:13:19,840 If you do this kind of business, you will be violating the end user license agreement in terms of service. 259 00:13:20,660 --> 00:13:23,240 You need to avoid getting hit with the DMCA bat. 260 00:13:24,300 --> 00:13:29,500 Even though botting has nothing to do with copyright violations, 261 00:13:30,800 --> 00:13:33,880 Son and Shine, Wrath and Rosenfall, or whatever the hell their name is, 262 00:13:33,940 --> 00:13:38,620 is going to try to figure out how to make the DMCA apply to your bot because they do it. 263 00:13:38,640 --> 00:13:39,420 That's their job. 264 00:13:40,540 --> 00:13:43,580 They're doing it right now to Michael Donnelly and they'll do it to you. 265 00:13:44,520 --> 00:13:47,820 EULAs are not laws, so breaking a EULA does not mean you're breaking the law. 266 00:13:48,020 --> 00:13:49,840 It might be a misconception that you have. 267 00:13:50,040 --> 00:13:51,600 A EULA is only a contract. 268 00:13:52,100 --> 00:13:55,940 The best they can do is take you to court and try to sue you for violation of that contract. 269 00:13:57,060 --> 00:14:03,220 Now, Son and Shine, they've become experts of trying to make copyrights apply to pretty much everything. 270 00:14:03,440 --> 00:14:11,300 Their latest trick, I'm aware of, is they're trying to make the launching of the WoW.exe executable a violation of the DMCA. 271 00:14:11,600 --> 00:14:13,640 Because launching DMCA... 272 00:14:13,640 --> 00:14:19,300 Launching WoW is the same to them as making a copy of the CD, because it's the same bits. 273 00:14:19,540 --> 00:14:23,620 So launching the program is a violation of the DMCA. 274 00:14:23,980 --> 00:14:26,060 And that's what they're pulled on Michael Donnelly. 275 00:14:26,740 --> 00:14:30,340 You're going to have to actually do some reverse engineering in order to make a bot. 276 00:14:30,440 --> 00:14:36,440 For example, you'll have to locate the XYZ coordinates in memory, maximum hit points, what spell is currently active, 277 00:14:36,600 --> 00:14:38,860 the structure of the player character class, etc. 278 00:14:39,180 --> 00:14:42,820 Alright, so you are going to break the EULA when you do that. 279 00:14:43,640 --> 00:14:48,140 But nothing about XYZ coordinates has anything to do with making an illegal copy of WoW. 280 00:14:48,280 --> 00:14:50,520 But they're going to try to make that stick somehow. 281 00:14:51,620 --> 00:14:52,780 It's really ridiculous. 282 00:14:56,860 --> 00:15:02,480 So, with the WoW glider case and Michael Donnelly, they're trying to protect RAM as if it were actually a copy of the CD. 283 00:15:03,500 --> 00:15:06,260 And there's a link to the RuKit article that talks more about that. 284 00:15:08,320 --> 00:15:09,920 And we just talked about that too. 285 00:15:10,420 --> 00:15:12,060 Oh, but there's an interesting side note. 286 00:15:12,060 --> 00:15:17,260 How does Microsoft not violate the DMCA when explorer.exe launches WoW when you double-click it on the desktop then? 287 00:15:19,580 --> 00:15:22,080 They call this the copyrighted WoW gaming environment. 288 00:15:22,440 --> 00:15:24,560 You can read that in the documentation that they have out. 289 00:15:24,640 --> 00:15:27,060 Here's some common stuff that EULAs will throw out to you. 290 00:15:27,580 --> 00:15:30,920 Don't criticize in the public about this product. 291 00:15:31,140 --> 00:15:32,620 Don't reverse engineer, obviously. 292 00:15:33,060 --> 00:15:36,620 If you use this product, you will be remotely monitored, hence Worden. 293 00:15:37,160 --> 00:15:39,720 Don't use this product with other vendors' products. 294 00:15:40,800 --> 00:15:43,840 By signing this contract, you also agree to every future version of it. 295 00:15:43,860 --> 00:15:44,620 That's my personal favorite. 296 00:15:45,220 --> 00:15:49,380 They're going to send new versions of the EULA that you're not even aware of yet, and you've already agreed to it. 297 00:15:49,460 --> 00:15:50,720 Just because you agreed to the first one. 298 00:15:52,320 --> 00:15:55,680 And of course, they're never responsible if anything bad happens to your computer. 299 00:15:56,020 --> 00:15:57,260 So here's Blizzard's EULA. 300 00:15:57,440 --> 00:16:01,700 Your computer's RAM is monitored and will communicate information back to Blizzard. 301 00:16:02,700 --> 00:16:04,360 Here's Gator Corporation's EULA. 302 00:16:04,580 --> 00:16:09,220 Gator is a piece of spyware, by the way, and they have a 63-page EULA in their spyware. 303 00:16:09,840 --> 00:16:13,260 And it says that it is illegal for you to uninstall it. 304 00:16:18,380 --> 00:16:20,200 This is also on their Gator EULA. 305 00:16:20,280 --> 00:16:24,740 It's also illegal for you to sniff the traffic going back to its server. 306 00:16:24,980 --> 00:16:29,340 In other words, it's illegal for you to run Ethereum to determine what it's stealing from you. 307 00:16:34,320 --> 00:16:35,840 Microsoft FrontPage has a funny one. 308 00:16:35,960 --> 00:16:38,980 You can use FrontPage, but you can't use FrontPage to build a website 309 00:16:38,980 --> 00:16:40,300 that talks bad about Microsoft. 310 00:16:45,220 --> 00:16:47,160 This one's funny because this is a virus. 311 00:16:47,380 --> 00:16:50,160 And the virus came with a EULA that you actually would pop up. 312 00:16:50,240 --> 00:16:52,140 And you know how typically a user doesn't pay attention. 313 00:16:52,240 --> 00:16:52,740 They just click through. 314 00:16:52,860 --> 00:16:56,320 If you said yes, it would actually go through your email contacts 315 00:16:56,320 --> 00:16:58,180 and mail a copy of itself to all your friends. 316 00:16:58,800 --> 00:17:02,060 And the EULA specifically allowed that if you had hit OK. 317 00:17:02,160 --> 00:17:03,040 So they didn't break the law. 318 00:17:06,260 --> 00:17:08,000 And this is my personal favorite. 319 00:17:08,000 --> 00:17:08,580 My favorite, iTunes. 320 00:17:09,000 --> 00:17:11,620 At any time, we may modify this agreement. 321 00:17:11,760 --> 00:17:14,760 And it will be effective immediately and incorporated into this agreement. 322 00:17:14,940 --> 00:17:19,300 And your continued use of iTunes will be deemed your agreement and acceptance 323 00:17:19,920 --> 00:17:23,120 of the new EULA that you didn't yet agree to. 324 00:17:28,200 --> 00:17:30,000 Yeah, I really don't like Apple. 325 00:17:31,100 --> 00:17:32,220 So here's some ideas. 326 00:17:32,580 --> 00:17:35,260 First of all, obviously, don't release your public bot. 327 00:17:35,360 --> 00:17:36,180 Don't make a public bot. 328 00:17:36,300 --> 00:17:37,100 Don't put yourself downstream. 329 00:17:37,100 --> 00:17:38,660 Don't put yourself downstream of a DMCA lawsuit. 330 00:17:39,260 --> 00:17:41,020 And then here's some other crazy ideas. 331 00:17:41,380 --> 00:17:44,420 Make sure that you add to your bot some sort of strange packing system 332 00:17:44,420 --> 00:17:47,960 that does a challenge response with an authentication of some kind. 333 00:17:48,220 --> 00:17:50,500 So that in order to unpack the software, 334 00:17:50,760 --> 00:17:54,620 you have to have an authenticated account with some server that you control. 335 00:17:54,840 --> 00:17:58,980 So if Blizzard's engineers grab it and reverse engineer it, 336 00:17:59,040 --> 00:18:00,220 they're not going to have an account. 337 00:18:00,580 --> 00:18:04,300 And they're going to have to bypass an authentication scheme. 338 00:18:04,900 --> 00:18:07,080 Therefore, directly violating the DMCA. 339 00:18:07,100 --> 00:18:08,900 In order to reverse engineer your bot. 340 00:18:09,380 --> 00:18:11,460 And put them downstream of your own lawsuit. 341 00:18:19,180 --> 00:18:21,480 This one's kind of an obvious one, probably. 342 00:18:21,660 --> 00:18:23,800 But if someone in China has got this bot, 343 00:18:23,980 --> 00:18:25,780 and they're working for $6 a day, 344 00:18:25,840 --> 00:18:28,720 don't you think Blizzard would pay them $1,000 to get a copy of the bot 345 00:18:28,720 --> 00:18:30,240 so they could just go and ban everybody? 346 00:18:31,360 --> 00:18:33,000 I don't know if these guys have figured it out. 347 00:18:33,040 --> 00:18:35,700 They can walk out the front door and probably sell this thing on the black market. 348 00:18:35,840 --> 00:18:37,080 So you want to probably try this. 349 00:18:37,080 --> 00:18:38,760 You want to try to protect your bot in some way, 350 00:18:38,800 --> 00:18:39,980 in your farming organization, 351 00:18:40,440 --> 00:18:45,440 so that your employees don't basically do some insider threat on you. 352 00:18:47,020 --> 00:18:49,920 Alright, let's change subjects here and talk about some technology. 353 00:18:50,180 --> 00:18:50,880 How are bots built? 354 00:18:51,000 --> 00:18:52,300 There's different ways we build bots. 355 00:18:52,660 --> 00:18:54,420 There's kind of schools of thought here. 356 00:18:54,580 --> 00:18:55,680 And I'm going to go through the various ones. 357 00:18:56,760 --> 00:18:59,600 There's first and foremost the GUI-based macroing system. 358 00:18:59,880 --> 00:19:02,900 This is the most popular because it's the easiest for people to do. 359 00:19:03,060 --> 00:19:05,580 You sample pixels at defined XY coordinates. 360 00:19:05,820 --> 00:19:06,480 For example, 361 00:19:06,480 --> 00:19:07,540 when you're at maximum health, 362 00:19:07,660 --> 00:19:09,540 you know there's going to be red right here on the screen. 363 00:19:09,720 --> 00:19:10,380 When you're not, 364 00:19:10,380 --> 00:19:11,140 and you're at half health, 365 00:19:11,280 --> 00:19:11,960 it won't be red, 366 00:19:11,980 --> 00:19:12,680 but it will be red there. 367 00:19:12,760 --> 00:19:14,500 You can do sampling like that to determine where you are. 368 00:19:14,600 --> 00:19:15,480 It works really well, 369 00:19:15,600 --> 00:19:16,500 and it's really easy. 370 00:19:16,620 --> 00:19:18,480 I can build a bot like this in a couple of hours 371 00:19:18,840 --> 00:19:20,380 because it's just so easy to interact with it. 372 00:19:20,600 --> 00:19:22,960 And there's a couple of programs out there for you that will do it, 373 00:19:23,000 --> 00:19:24,080 make it very easy. 374 00:19:24,440 --> 00:19:26,960 I've used something called AC Tool before that works pretty well. 375 00:19:27,040 --> 00:19:30,540 It's essentially a QA tool designed to interact with the UI. 376 00:19:31,720 --> 00:19:33,660 Another way to do it is DLL injection. 377 00:19:34,080 --> 00:19:35,500 That is convenient because 378 00:19:35,500 --> 00:19:37,860 when you grab a structure in memory, 379 00:19:38,100 --> 00:19:40,040 you can directly dereference the pointers 380 00:19:40,040 --> 00:19:42,440 because you are in the memory space of the game. 381 00:19:42,620 --> 00:19:43,580 You're not outside of it, 382 00:19:43,620 --> 00:19:44,420 so you don't have to do any translations, 383 00:19:44,780 --> 00:19:46,020 making it very convenient, 384 00:19:46,120 --> 00:19:49,180 and therefore the most popular form of botting technology. 385 00:19:49,680 --> 00:19:51,020 Another one is debugger-based. 386 00:19:51,140 --> 00:19:52,160 You connect as a debugger, 387 00:19:52,180 --> 00:19:54,820 and you can use read and write process memory and breakpoints. 388 00:19:55,020 --> 00:19:56,360 It's just a different way to do it. 389 00:19:56,380 --> 00:19:57,900 It's slightly more of a pain in the ass, though, 390 00:19:57,940 --> 00:20:00,280 because you have to actually translate all the memory 391 00:20:00,280 --> 00:20:02,580 to the remote process space address coordinates. 392 00:20:02,740 --> 00:20:04,980 You can't just get a copy of something and then follow the pointer 393 00:20:04,980 --> 00:20:05,480 because it's not going to work. 394 00:20:05,500 --> 00:20:06,220 If it is in your local bot, 395 00:20:06,360 --> 00:20:07,540 that's not going to point to anything. 396 00:20:08,200 --> 00:20:10,060 And then, finally, client replacement. 397 00:20:10,420 --> 00:20:11,360 That's an interesting one 398 00:20:11,360 --> 00:20:13,020 where you actually don't even use wow.exe. 399 00:20:13,140 --> 00:20:15,580 You make your own gaming client from scratch 400 00:20:15,580 --> 00:20:16,940 that interacts with the target. 401 00:20:17,280 --> 00:20:18,560 That one's slightly hard, though, 402 00:20:18,580 --> 00:20:20,100 because when the warden comes down to do a check, 403 00:20:20,240 --> 00:20:21,680 it's going to fail all over the place. 404 00:20:21,860 --> 00:20:23,440 So you have to proxy the warden calls 405 00:20:23,440 --> 00:20:25,060 out to an actual running copy of wow 406 00:20:25,060 --> 00:20:26,320 just for the warden 407 00:20:26,320 --> 00:20:28,240 so that it finds the right hashes in memory 408 00:20:28,240 --> 00:20:28,960 at the right locations. 409 00:20:29,380 --> 00:20:31,860 Here's a screenshot of a GUI-based MacroIn bot. 410 00:20:32,500 --> 00:20:34,300 This is my character, Zanier, 411 00:20:34,300 --> 00:20:35,780 shortly before he got banned. 412 00:20:37,060 --> 00:20:38,240 I'll show you how this is working. 413 00:20:38,380 --> 00:20:39,860 He's actually backed up into a tent. 414 00:20:40,380 --> 00:20:41,360 He doesn't move. 415 00:20:41,860 --> 00:20:44,400 The tent protects him from someone coming in from behind, 416 00:20:44,640 --> 00:20:45,880 which, as you know from playing wow, 417 00:20:46,040 --> 00:20:47,540 you can't attack somebody who's behind you. 418 00:20:47,700 --> 00:20:49,340 So that's why he stands this way. 419 00:20:49,400 --> 00:20:51,500 He can't be killed from behind. 420 00:20:51,780 --> 00:20:53,560 And these guys, these deafiest messengers, 421 00:20:53,640 --> 00:20:54,320 or whatever the hell they are, 422 00:20:54,400 --> 00:20:55,180 they run up there, 423 00:20:55,280 --> 00:20:58,100 and they're within the aggro radius where he stands, 424 00:20:58,180 --> 00:21:00,260 and he just swings over and over and over again. 425 00:21:00,280 --> 00:21:01,340 The bodies just pile up. 426 00:21:01,520 --> 00:21:02,940 And I also added a feature 427 00:21:02,940 --> 00:21:05,040 where it would click on the screen within a matrix, 428 00:21:05,160 --> 00:21:07,860 and it would auto-loot everything that was down there in front of him. 429 00:21:08,320 --> 00:21:10,060 This could run for hours, no problem. 430 00:21:10,300 --> 00:21:12,520 So this took almost no time to build. 431 00:21:12,680 --> 00:21:14,900 This shows you the kinds of things you can do for botting 432 00:21:14,900 --> 00:21:17,140 that don't require a lot of reverse engineering skill 433 00:21:17,140 --> 00:21:18,120 or programming skill. 434 00:21:18,320 --> 00:21:20,720 They just take a little bit of your time and testing. 435 00:21:21,060 --> 00:21:22,280 You know, you've got to get the kinks worked out. 436 00:21:22,340 --> 00:21:23,980 And you've got to also find a good spot to do it. 437 00:21:24,040 --> 00:21:25,480 Like here, I've got this nice tent. 438 00:21:25,720 --> 00:21:27,020 Not everywhere is going to work well. 439 00:21:27,100 --> 00:21:28,240 You've got to find a spot in the world 440 00:21:28,240 --> 00:21:29,880 where this type of bot would work really well. 441 00:21:30,600 --> 00:21:32,040 Here are some snippets of code 442 00:21:32,040 --> 00:21:32,900 to show you how this works 443 00:21:32,900 --> 00:21:34,280 if you wanted to write your own macro win system. 444 00:21:35,680 --> 00:21:37,500 Here's how to get a color or pixel on the screen. 445 00:21:38,200 --> 00:21:39,520 All this, by the way, is in my book. 446 00:21:39,700 --> 00:21:40,820 I'm just throwing these on the slides 447 00:21:41,460 --> 00:21:42,980 just so I have some source code to show. 448 00:21:43,460 --> 00:21:44,900 So you can get the color or the pixel 449 00:21:44,900 --> 00:21:47,540 and determine if it's like red or blue. 450 00:21:47,620 --> 00:21:49,440 I have mana, I have energy, whatever. 451 00:21:50,120 --> 00:21:52,460 Here's how to post a left mouse click to the screen. 452 00:21:53,780 --> 00:21:55,340 Now, it's worth noting that if you're... 453 00:21:55,340 --> 00:21:56,940 This is a normal mouse click that would go 454 00:21:56,940 --> 00:21:58,300 as if you had done it right off the mouse, 455 00:21:58,380 --> 00:21:59,460 and you could do this for keystrokes. 456 00:21:59,960 --> 00:22:01,300 If you're using direct input, 457 00:22:01,400 --> 00:22:02,020 some games might do that. 458 00:22:02,040 --> 00:22:03,560 You can just do a Google search 459 00:22:03,560 --> 00:22:05,220 for DIK left and DIK right, 460 00:22:05,280 --> 00:22:07,240 and you'll find the same equivalent code 461 00:22:07,240 --> 00:22:08,220 but for direct input 462 00:22:08,220 --> 00:22:10,160 as opposed to the way I'm showing here. 463 00:22:10,560 --> 00:22:11,420 It's all the same stuff. 464 00:22:11,540 --> 00:22:12,600 You can also use send message 465 00:22:12,600 --> 00:22:15,340 and post a Windows message right into the target. 466 00:22:15,540 --> 00:22:16,780 That works really well with, like, 467 00:22:16,780 --> 00:22:17,520 Lord of the Rings Online, 468 00:22:17,880 --> 00:22:19,480 which I just made a bot for, by the way. 469 00:22:20,860 --> 00:22:23,260 And so you can actually minimize the window in that case 470 00:22:23,260 --> 00:22:24,400 and not even have it up on the screen, 471 00:22:24,500 --> 00:22:25,120 which is kind of nice. 472 00:22:25,920 --> 00:22:28,040 Here's an old, old hacking program 473 00:22:28,040 --> 00:22:29,760 which you wouldn't use anymore, 474 00:22:29,940 --> 00:22:31,080 but back in the day, 475 00:22:31,080 --> 00:22:32,820 this is actually an injected DOL 476 00:22:32,820 --> 00:22:35,240 that had its own Lua script associated with it, 477 00:22:35,260 --> 00:22:38,080 so it had a UI component called Bubba's Warcraft Hack, 478 00:22:38,200 --> 00:22:39,440 and these are all the locations 479 00:22:39,440 --> 00:22:40,960 that I have hot-keyed in there. 480 00:22:41,040 --> 00:22:41,900 This was a telehack. 481 00:22:41,900 --> 00:22:43,880 I could actually go directly to any of these locations 482 00:22:43,880 --> 00:22:45,040 just by clicking it. 483 00:22:45,100 --> 00:22:46,500 It would just change my X, Y, Z coordinates, 484 00:22:46,640 --> 00:22:47,900 and I was instantly there. 485 00:22:48,240 --> 00:22:49,280 It worked really well. 486 00:22:49,360 --> 00:22:52,200 There's a real good exploit in Gadgetazan, 487 00:22:52,560 --> 00:22:54,360 and there's this guy, a goblin, 488 00:22:54,380 --> 00:22:55,140 will give you this quest 489 00:22:55,140 --> 00:22:56,840 for going and collecting hippogriff eggs, 490 00:22:57,220 --> 00:22:59,040 and I had all the X, Y, Z coordinates 491 00:22:59,040 --> 00:23:00,380 for all the nests already in there, 492 00:23:00,380 --> 00:23:01,040 and I would go to him. 493 00:23:01,320 --> 00:23:02,320 It's a repeatable quest. 494 00:23:02,520 --> 00:23:04,380 Go to the eggs, pick it up, go back. 495 00:23:04,580 --> 00:23:07,120 I was making 1,500 experience every 30 seconds. 496 00:23:07,560 --> 00:23:08,660 My guild had me. 497 00:23:08,680 --> 00:23:09,600 I was at level 40. 498 00:23:09,760 --> 00:23:11,220 Three days later, I was level 55. 499 00:23:11,780 --> 00:23:13,120 I'm sitting there like this, you know. 500 00:23:14,020 --> 00:23:16,440 It's like over and over again, 501 00:23:16,560 --> 00:23:17,920 but here I am, level 55, 502 00:23:18,020 --> 00:23:18,560 and they're like, 503 00:23:18,640 --> 00:23:19,200 how did you do that? 504 00:23:19,440 --> 00:23:20,260 So it was really easy, 505 00:23:20,300 --> 00:23:22,660 just going around all the egg baskets, essentially. 506 00:23:24,640 --> 00:23:26,720 I've got to take a snippet of source code from this thing. 507 00:23:28,020 --> 00:23:28,880 This is kind of cool. 508 00:23:28,940 --> 00:23:29,940 It's template-based scanning. 509 00:23:30,780 --> 00:23:32,500 What the guy did is he wrote this. 510 00:23:32,580 --> 00:23:34,000 He actually, instead of reverse engineering 511 00:23:34,000 --> 00:23:35,700 a particular location in WoW, 512 00:23:35,840 --> 00:23:37,400 he found a location in WoW 513 00:23:37,400 --> 00:23:38,660 and then made the opcodes for it 514 00:23:38,660 --> 00:23:39,760 and then masked out some of them 515 00:23:39,760 --> 00:23:40,600 so whenever they patch, 516 00:23:40,820 --> 00:23:42,380 it would actually scan the binary 517 00:23:42,380 --> 00:23:43,300 and find the new location 518 00:23:43,300 --> 00:23:44,340 so with every patch, 519 00:23:44,560 --> 00:23:45,960 even though the stuff was moving around, 520 00:23:46,240 --> 00:23:47,980 he didn't need to release a new version of the bot. 521 00:23:48,200 --> 00:23:49,220 It worked pretty well. 522 00:23:51,060 --> 00:23:52,560 Here's a complete client replacement. 523 00:23:53,200 --> 00:23:54,580 This is a standalone program 524 00:23:54,580 --> 00:23:56,860 that logs directly into the WoW server and plays. 525 00:23:57,160 --> 00:23:58,940 It's got a number of interesting features, 526 00:23:59,120 --> 00:24:00,280 complete reverse engineering, 527 00:24:00,380 --> 00:24:01,360 of everything around you. 528 00:24:01,560 --> 00:24:03,220 These are the data structures being showed. 529 00:24:03,340 --> 00:24:04,540 I've redacted some of the data here. 530 00:24:06,160 --> 00:24:07,400 And here's a map. 531 00:24:07,560 --> 00:24:08,720 It's two-dimensional overhead. 532 00:24:08,920 --> 00:24:10,240 The black square represents you 533 00:24:10,240 --> 00:24:13,580 and then characters are shown in the other colors. 534 00:24:14,420 --> 00:24:16,380 And so this is directly communicating with the server 535 00:24:16,380 --> 00:24:17,540 and it's its own standalone client. 536 00:24:23,120 --> 00:24:24,980 This is another type of approach. 537 00:24:25,180 --> 00:24:26,380 This is actually called WoW Sniffer 538 00:24:26,380 --> 00:24:27,440 that you're seeing a screenshot of. 539 00:24:27,620 --> 00:24:30,000 It actually proxies or sniffs the packet stream 540 00:24:30,000 --> 00:24:30,700 going in and out. 541 00:24:31,400 --> 00:24:33,020 It's actually, in my book, 542 00:24:33,100 --> 00:24:35,000 I've had to redact all the decryption routines. 543 00:24:35,500 --> 00:24:37,840 But if you just go out and look for WoW Sniffer on the net, 544 00:24:37,980 --> 00:24:40,220 you get a nice clean copy of source code 545 00:24:40,220 --> 00:24:42,080 that will show all the decryption routines for WoW. 546 00:24:42,400 --> 00:24:45,060 And you can build your own sniffer of this type. 547 00:24:45,600 --> 00:24:48,340 And that could be used as a proxy system perhaps 548 00:24:48,340 --> 00:24:51,160 to control your character in the network stream. 549 00:24:51,480 --> 00:24:52,860 Here's another type of bot. 550 00:24:53,060 --> 00:24:55,960 I'm just putting this in because it is a common trick. 551 00:24:56,200 --> 00:24:59,500 It's not used with World of Warcraft type of botting 552 00:24:59,500 --> 00:25:00,960 but it is used for aim botting. 553 00:25:01,020 --> 00:25:03,080 You have a direct 3D library, OpenGL. 554 00:25:03,280 --> 00:25:05,200 You stand in front of that and you hook it 555 00:25:05,200 --> 00:25:07,340 and you can do all kinds of interesting things with the stream 556 00:25:07,340 --> 00:25:08,560 as it goes out to the video card. 557 00:25:09,960 --> 00:25:11,560 Some of you may have played Counter Strike 558 00:25:11,560 --> 00:25:12,780 and used aim bots in the past. 559 00:25:12,900 --> 00:25:14,240 This is a similar technique used there. 560 00:25:14,360 --> 00:25:15,800 You may recognize this screenshot. 561 00:25:16,120 --> 00:25:17,400 This is called a wall hack. 562 00:25:17,640 --> 00:25:20,600 And what's happening is the information being streamed 563 00:25:20,600 --> 00:25:22,340 to the video card is being modified on the fly 564 00:25:22,340 --> 00:25:23,800 so the video card renders it differently. 565 00:25:24,180 --> 00:25:26,540 Very simple to do out at the video card layer. 566 00:25:26,720 --> 00:25:28,300 And now you can see through the walls 567 00:25:28,300 --> 00:25:31,780 and actually see here there's a guy who's bisected by a wall 568 00:25:31,780 --> 00:25:33,880 and makes it very easy to aim at the blue part 569 00:25:33,880 --> 00:25:35,180 and shoot him where you'll hit him. 570 00:25:39,680 --> 00:25:41,640 Here's the proxy system in a little more detail. 571 00:25:41,800 --> 00:25:42,960 The game client runs normally 572 00:25:42,960 --> 00:25:44,980 but you pass it through the proxy 573 00:25:44,980 --> 00:25:46,880 that's doing the encrypted and decrypted packets 574 00:25:46,880 --> 00:25:49,440 and only when you need to grab data 575 00:25:49,440 --> 00:25:51,920 such as the positions of characters around your character 576 00:25:51,920 --> 00:25:53,560 you grab it out of the network stream. 577 00:25:53,780 --> 00:25:56,400 And you can also forge or inject messages 578 00:25:56,400 --> 00:25:57,420 into the network stream 579 00:25:57,420 --> 00:25:58,540 when you need to 580 00:25:58,540 --> 00:26:00,680 in order to automate the movement of your character 581 00:26:00,680 --> 00:26:01,920 to interact with the environment. 582 00:26:02,360 --> 00:26:04,620 This is very superior to the other ones 583 00:26:04,620 --> 00:26:06,840 because the proxy can't be detected 584 00:26:06,840 --> 00:26:08,020 by the warding client. 585 00:26:08,600 --> 00:26:10,800 Because it's not even running on the same machine as well. 586 00:26:11,480 --> 00:26:13,040 So this is actually a superior system. 587 00:26:13,220 --> 00:26:14,220 I don't have a working one 588 00:26:14,220 --> 00:26:15,380 but this is a nice idea 589 00:26:15,380 --> 00:26:18,300 and I hope somebody actually works on this 590 00:26:18,300 --> 00:26:19,560 and comes up with something. 591 00:26:21,060 --> 00:26:23,400 Even though I've told you not to release it to the public 592 00:26:23,400 --> 00:26:24,300 if you do come up with one 593 00:26:24,300 --> 00:26:25,140 can you give me a copy? 594 00:26:27,420 --> 00:26:28,540 This is a case for the proxy. 595 00:26:28,980 --> 00:26:30,840 It allows the client to handle all the state. 596 00:26:31,060 --> 00:26:32,700 So you don't have to reorganize 597 00:26:32,700 --> 00:26:34,240 and reimplement any of the state management 598 00:26:34,240 --> 00:26:35,180 which is very expensive. 599 00:26:35,920 --> 00:26:37,380 It lessens your chance from detection 600 00:26:37,380 --> 00:26:39,020 because we're not co-existing on the same machine 601 00:26:39,020 --> 00:26:39,780 as the warding client. 602 00:26:40,100 --> 00:26:41,340 There's less chance of change. 603 00:26:41,480 --> 00:26:42,340 Now this is an interesting one. 604 00:26:42,480 --> 00:26:43,700 Because the network stream 605 00:26:44,480 --> 00:26:45,400 requires changes 606 00:26:45,400 --> 00:26:46,500 anything in that protocol 607 00:26:46,500 --> 00:26:48,080 requires changes in both the client 608 00:26:48,080 --> 00:26:49,140 and the server 609 00:26:49,140 --> 00:26:50,580 it's much less likely 610 00:26:50,580 --> 00:26:52,420 that Blizzard will perform a patch 611 00:26:52,420 --> 00:26:53,240 on that protocol. 612 00:26:53,520 --> 00:26:54,860 It's much more likely 613 00:26:54,860 --> 00:26:56,780 that the class structures within the game 614 00:26:56,780 --> 00:26:57,880 itself will change. 615 00:26:58,120 --> 00:27:00,740 So the amount of overhead you have 616 00:27:00,740 --> 00:27:01,740 to reverse engineer patches 617 00:27:01,740 --> 00:27:02,800 should go down 618 00:27:02,800 --> 00:27:04,460 if you're using a proxy system. 619 00:27:08,300 --> 00:27:10,340 Alright, let's talk about the ultimate farming bot 620 00:27:10,340 --> 00:27:11,800 and what my ideal design would be. 621 00:27:12,760 --> 00:27:13,480 First of all 622 00:27:13,480 --> 00:27:15,400 you probably don't have contacts in China 623 00:27:15,400 --> 00:27:16,260 and you can't afford to 624 00:27:16,260 --> 00:27:17,080 go over there 625 00:27:17,080 --> 00:27:17,960 and find somebody in Shanghai 626 00:27:17,960 --> 00:27:18,980 to work for six bucks an hour. 627 00:27:19,100 --> 00:27:20,220 So what you'd like to do 628 00:27:20,220 --> 00:27:21,680 is go and put this in your garage. 629 00:27:22,200 --> 00:27:23,360 Now to do it in your garage 630 00:27:23,360 --> 00:27:25,340 you're going to need to scale the operation a bit better. 631 00:27:25,400 --> 00:27:26,760 Your farming bot's going to have to be able to 632 00:27:26,780 --> 00:27:29,140 handle at least 100 simultaneous running accounts 633 00:27:29,140 --> 00:27:30,100 without fouling up. 634 00:27:31,640 --> 00:27:33,700 You have to also be able to handle the auction house 635 00:27:34,340 --> 00:27:35,060 preferably automatically 636 00:27:35,060 --> 00:27:36,820 because you just don't have the time 637 00:27:36,820 --> 00:27:37,920 to manage all those green items 638 00:27:37,920 --> 00:27:38,800 up there on the auction house. 639 00:27:38,960 --> 00:27:39,680 It'll swamp you. 640 00:27:40,160 --> 00:27:41,660 You also have to be able to quest. 641 00:27:41,780 --> 00:27:42,840 The reason you have to be able to quest 642 00:27:42,840 --> 00:27:44,340 is because you also need to use this bot 643 00:27:44,340 --> 00:27:45,580 to auto-level all your characters. 644 00:27:45,700 --> 00:27:46,540 Grinding isn't enough. 645 00:27:46,720 --> 00:27:48,180 In order to get from level 1 to 70 646 00:27:48,180 --> 00:27:48,920 in such a short time 647 00:27:48,920 --> 00:27:49,740 you have to quest. 648 00:27:50,540 --> 00:27:52,740 And you have to pre-script the entire system 649 00:27:52,740 --> 00:27:54,380 so that you don't have any setup required. 650 00:27:54,680 --> 00:27:55,180 There's a lot of 651 00:27:55,180 --> 00:27:56,180 the current botting technology 652 00:27:56,780 --> 00:27:57,040 that takes a lot of time 653 00:27:57,040 --> 00:27:58,280 where the admin's just dinking around 654 00:27:58,280 --> 00:27:59,240 trying to get everything running. 655 00:27:59,500 --> 00:28:01,440 You want to eliminate all that overhead as well. 656 00:28:01,900 --> 00:28:02,980 So that's the ideal. 657 00:28:04,140 --> 00:28:06,120 The screen that manages it 658 00:28:06,120 --> 00:28:07,460 will have a series of postage stamps. 659 00:28:07,660 --> 00:28:10,000 These things are actually used in a VNC-style protocol 660 00:28:10,000 --> 00:28:11,840 to give you a remote desktop view 661 00:28:11,840 --> 00:28:13,200 of each of the running WoW instances. 662 00:28:13,640 --> 00:28:15,040 This is a mock-up, by the way. 663 00:28:15,140 --> 00:28:16,000 This is not real. 664 00:28:16,080 --> 00:28:16,980 I just made this for the slide. 665 00:28:17,460 --> 00:28:19,840 The games run on slave machines within VMware. 666 00:28:20,100 --> 00:28:21,220 You have a bunch of those running 667 00:28:21,220 --> 00:28:22,900 in your garage on the farm. 668 00:28:23,120 --> 00:28:24,880 And then you have all these little postage stamps 669 00:28:24,880 --> 00:28:25,800 on your monitoring app 670 00:28:25,800 --> 00:28:27,300 and you can click on any one of those 671 00:28:27,300 --> 00:28:27,960 and bring up a UI 672 00:28:27,960 --> 00:28:31,220 where you can configure and control the bot itself, 673 00:28:31,480 --> 00:28:33,480 like which script it's running, et cetera, 674 00:28:33,660 --> 00:28:34,440 what account it's using. 675 00:28:35,160 --> 00:28:36,660 And you could also interact directly 676 00:28:36,660 --> 00:28:38,260 with the particular WoW 677 00:28:38,260 --> 00:28:39,620 if you want to at that time. 678 00:28:40,660 --> 00:28:43,220 How the system works is pre-recorded WayPaths again. 679 00:28:43,400 --> 00:28:44,420 We're not doing anything weird 680 00:28:44,420 --> 00:28:46,600 like trying to figure out the 3D world 681 00:28:46,600 --> 00:28:48,220 and do A-star pathfinding, none of that. 682 00:28:48,380 --> 00:28:49,900 What we do is we simply record WayPaths 683 00:28:50,440 --> 00:28:51,800 so you're going to spend a lot of time 684 00:28:51,800 --> 00:28:53,360 recording WayPaths for the whole world. 685 00:28:54,100 --> 00:28:55,780 It's a skeleton and branch approach 686 00:28:55,800 --> 00:28:57,440 and you're going to need several things 687 00:28:57,440 --> 00:28:59,280 on your skeleton and branch WayPaths. 688 00:28:59,280 --> 00:28:59,900 Here's how it looks. 689 00:29:00,160 --> 00:29:02,920 We'll have a WayPath between every major town center. 690 00:29:03,080 --> 00:29:03,860 That's the black line. 691 00:29:04,300 --> 00:29:05,400 Notice these are labeled. 692 00:29:06,100 --> 00:29:09,160 Now, every single spawning location for your corpse 693 00:29:09,160 --> 00:29:11,280 and the graveyard will have to be connected 694 00:29:11,280 --> 00:29:14,120 from the graveyard down to the main black WayPath. 695 00:29:14,560 --> 00:29:18,420 Now, even if you're not connected to the black WayPath, 696 00:29:18,540 --> 00:29:20,660 your corpse would run to the black WayPath first, 697 00:29:20,840 --> 00:29:22,080 then traverse that, 698 00:29:22,360 --> 00:29:24,020 and then traverse one of the branches 699 00:29:24,020 --> 00:29:25,700 that comes off that to get back to your body. 700 00:29:25,800 --> 00:29:27,480 Now, you also have a patrol path. 701 00:29:27,620 --> 00:29:28,860 That's the little gray one on the bottom. 702 00:29:28,940 --> 00:29:31,180 That's where you're going to go hunt for different things. 703 00:29:31,500 --> 00:29:34,520 And then finally, you have a link to every NPC that matters. 704 00:29:35,140 --> 00:29:37,560 And all these paths are stored in your small database. 705 00:29:39,760 --> 00:29:41,280 Proximity hunting is how you kill things. 706 00:29:41,440 --> 00:29:42,940 You're on the WayPath. 707 00:29:43,560 --> 00:29:46,100 In your proximity, you detect a target that you can kill, 708 00:29:46,140 --> 00:29:48,860 and you leave the WayPath temporarily to go kill it. 709 00:29:49,200 --> 00:29:51,600 All the bots work that way now, so this is not a problem. 710 00:29:53,180 --> 00:29:55,320 Now, here's something that bots don't do 711 00:29:55,320 --> 00:29:55,880 that they should. 712 00:29:55,980 --> 00:29:58,780 They need to record everything they do 713 00:29:58,780 --> 00:29:59,900 when they come off the WayPath, 714 00:30:00,000 --> 00:30:02,220 because otherwise, when they run into something like a cave 715 00:30:02,220 --> 00:30:03,460 chasing after things, 716 00:30:03,720 --> 00:30:05,160 they're not going to be able to get back, 717 00:30:05,220 --> 00:30:06,260 and they stick on walls. 718 00:30:06,680 --> 00:30:08,560 So if you record every step you take 719 00:30:08,560 --> 00:30:10,800 as you leave the primary WayPath, 720 00:30:10,880 --> 00:30:12,380 you just retract your steps, 721 00:30:12,500 --> 00:30:14,660 and you can get back to the main WayPath 722 00:30:14,660 --> 00:30:15,360 without getting stuck. 723 00:30:15,660 --> 00:30:18,120 As you can see in this mocked-up screenshot here, 724 00:30:18,280 --> 00:30:20,660 the toon goes back through the red dots 725 00:30:20,660 --> 00:30:21,800 to the main WayPath. 726 00:30:24,440 --> 00:30:25,240 Now, questing. 727 00:30:25,320 --> 00:30:27,360 What you need to do is go pick up these two guides. 728 00:30:29,460 --> 00:30:31,820 I shall say they are available on P2P networks 729 00:30:31,820 --> 00:30:34,080 if you are a scooge and don't want to pay the 30 bucks. 730 00:30:35,340 --> 00:30:36,580 But these things are excellent. 731 00:30:36,780 --> 00:30:38,740 I've looked at, not Jonah's, but I've looked at the other one, 732 00:30:38,840 --> 00:30:40,480 and it works really well. 733 00:30:40,700 --> 00:30:41,920 So what you want to do is quest, 734 00:30:42,760 --> 00:30:44,380 build scripts to do the questing. 735 00:30:44,400 --> 00:30:46,060 Not all the quests in these guides 736 00:30:46,060 --> 00:30:47,780 are things that you can completely solo. 737 00:30:47,980 --> 00:30:49,660 So throw out all the stuff you can't solo. 738 00:30:49,940 --> 00:30:52,900 But what they do is they say, pick up this drop quest, 739 00:30:53,080 --> 00:30:54,820 pick up this kill quest, run to this area, 740 00:30:54,820 --> 00:30:57,180 and it optimizes the positions that you're in in the game 741 00:30:57,180 --> 00:30:58,800 so you don't spend a lot of time running back and forth. 742 00:30:58,960 --> 00:30:59,800 Works pretty well. 743 00:31:00,400 --> 00:31:02,660 So you then can prescript all your leveling, 744 00:31:03,100 --> 00:31:04,960 and some of the things that you can do, 745 00:31:05,020 --> 00:31:07,040 for example, is a collection or drop or kill quest. 746 00:31:07,280 --> 00:31:09,680 You would pick it up from the NPC pre-recorded path, 747 00:31:09,900 --> 00:31:11,800 and you go out on the main, do the patrol, 748 00:31:12,040 --> 00:31:13,560 come back, and talk to the NPC, 749 00:31:13,840 --> 00:31:15,180 and that's how you finish that quest. 750 00:31:16,300 --> 00:31:17,580 Delivery quests, similar deal. 751 00:31:17,760 --> 00:31:19,140 We just go from one NPC to another. 752 00:31:19,460 --> 00:31:21,020 Everything's connected, so that's not a problem. 753 00:31:22,920 --> 00:31:23,940 The bots run... 754 00:31:23,940 --> 00:31:26,120 A farming bot runs as a state machine. 755 00:31:26,460 --> 00:31:28,160 Here we see a small state diagram. 756 00:31:28,480 --> 00:31:29,860 So essentially, at any given time, 757 00:31:29,980 --> 00:31:31,480 your bot will be in one of these states, 758 00:31:31,600 --> 00:31:33,600 and the transitions are marked by edges here. 759 00:31:36,600 --> 00:31:38,380 So for example, if I have a target mob, 760 00:31:38,620 --> 00:31:39,860 I move to a new state where I'm attacking. 761 00:31:40,120 --> 00:31:42,240 If I'm low on health, I move to a state where I'm healing. 762 00:31:43,560 --> 00:31:44,920 That's the state machine approach. 763 00:31:48,940 --> 00:31:50,960 So, level 70 in about 20 days. 764 00:31:51,160 --> 00:31:52,540 You get gold while you're leveling. 765 00:31:52,540 --> 00:31:54,260 As soon as the account hits level 70, 766 00:31:54,360 --> 00:31:56,540 you put it up for auction at $500 an account, 767 00:31:56,760 --> 00:31:58,660 and until it's sold, you use it as a farming account. 768 00:32:07,040 --> 00:32:08,600 All right, let's talk about some technical stuff. 769 00:32:11,420 --> 00:32:12,040 Player position. 770 00:32:12,300 --> 00:32:14,080 Everything in the world has an XYZ coordinate. 771 00:32:14,120 --> 00:32:16,060 If it's instantiated, that's part of its data structure. 772 00:32:16,260 --> 00:32:17,220 You can find that in memory. 773 00:32:17,360 --> 00:32:18,600 Go to the proper offsets, 774 00:32:18,600 --> 00:32:20,340 and you have the XYZ floats for its location. 775 00:32:20,560 --> 00:32:21,400 You have that for yourself. 776 00:32:21,400 --> 00:32:22,660 You have that for the target. 777 00:32:22,780 --> 00:32:25,220 You can do geometry calculations and post keystrokes 778 00:32:25,220 --> 00:32:26,200 and move to the target. 779 00:32:26,960 --> 00:32:29,220 Until recently, you could also telehack, 780 00:32:29,320 --> 00:32:31,140 so you could just put yourself anywhere you wanted to be. 781 00:32:31,560 --> 00:32:32,940 That doesn't work in WoW anymore. 782 00:32:33,020 --> 00:32:33,880 They made a change recently. 783 00:32:34,000 --> 00:32:35,460 It's a client-side integrity check. 784 00:32:35,580 --> 00:32:36,740 I have yet to crack that one, 785 00:32:36,840 --> 00:32:38,560 so I haven't been able to telehack for a while. 786 00:32:39,480 --> 00:32:41,760 But once you've reverse engineered one of these data structures, 787 00:32:42,000 --> 00:32:43,920 all the other ones are derivations of that type, 788 00:32:44,060 --> 00:32:46,620 and so it becomes very easy to figure out the rest of the structures. 789 00:32:47,020 --> 00:32:49,180 Player movement can be injected via Windows messages, 790 00:32:49,300 --> 00:32:51,040 or you can make internal function calls. 791 00:32:51,040 --> 00:32:53,500 There's actually an internal function call for player movement 792 00:32:53,500 --> 00:32:55,780 that you can just call directly from the main thread 793 00:32:55,780 --> 00:32:56,980 if you've hijacked the main thread. 794 00:32:57,500 --> 00:32:59,480 You can also use KBDEVENT, et cetera, 795 00:32:59,640 --> 00:33:02,420 in order to inject the mouse or keyboard input. 796 00:33:04,180 --> 00:33:07,220 The world database can be captured directly from the video card. 797 00:33:07,320 --> 00:33:08,220 If you want to do it that way, 798 00:33:08,300 --> 00:33:09,500 you could actually catch the structures 799 00:33:09,500 --> 00:33:10,920 as they're put out to the card for rendering. 800 00:33:11,280 --> 00:33:13,140 You could also look on... 801 00:33:14,100 --> 00:33:15,180 What is that called? 802 00:33:15,320 --> 00:33:16,200 WoW Map View, I think. 803 00:33:16,240 --> 00:33:17,540 There's a project on SourceForge, 804 00:33:17,660 --> 00:33:19,680 and it actually renders the entire world in 3D, 805 00:33:19,680 --> 00:33:22,220 so you could actually do A-star path mining if you were so inclined. 806 00:33:22,780 --> 00:33:24,640 The database of all the things in the world 807 00:33:24,640 --> 00:33:26,460 are collected at runtime in my bots, 808 00:33:26,620 --> 00:33:28,080 and I just simply put them up in a hash table, 809 00:33:28,240 --> 00:33:30,760 and I actually can reference them from the hash table. 810 00:33:32,380 --> 00:33:33,760 Detecting mobs and NPCs. 811 00:33:33,760 --> 00:33:34,640 We go through the world... 812 00:33:34,640 --> 00:33:35,960 Okay, so here I'll explain this. 813 00:33:36,080 --> 00:33:37,140 There's something they changed recently. 814 00:33:37,320 --> 00:33:39,680 They used thread local storage, the TLS value, 815 00:33:39,920 --> 00:33:41,280 to store an object pointer. 816 00:33:41,460 --> 00:33:42,980 That object's called the object manager. 817 00:33:43,120 --> 00:33:45,220 From the object manager is a linked list. 818 00:33:45,400 --> 00:33:48,200 There's a series of hash buckets that each have a linked list of objects. 819 00:33:48,380 --> 00:33:49,460 I'm going to show you the source code 820 00:33:49,680 --> 00:33:50,920 and how that works in just a moment here. 821 00:33:51,500 --> 00:33:52,600 Once you have all that, 822 00:33:52,680 --> 00:33:54,820 you have the position of every single object 823 00:33:54,820 --> 00:33:57,480 that's relative to your character in the visible world around you. 824 00:33:57,500 --> 00:33:59,560 Behind you, in front of you, behind walls doesn't make any difference. 825 00:33:59,740 --> 00:34:01,320 All the data comes down from the server. 826 00:34:03,840 --> 00:34:04,680 Here's the code. 827 00:34:05,580 --> 00:34:09,100 Okay, so on the top we actually have the hash bucket, 828 00:34:09,260 --> 00:34:11,180 and on the bottom we have the object manager. 829 00:34:11,380 --> 00:34:14,620 The object manager has a pointer at 1C to the hash bucket array. 830 00:34:15,320 --> 00:34:16,600 You go to that... 831 00:34:16,600 --> 00:34:19,240 Okay, first of all you get the object manager from the TLS value. 832 00:34:19,680 --> 00:34:21,540 From that, you go down to the hash bucket, 833 00:34:21,680 --> 00:34:22,880 and you parse through the hash bucket, 834 00:34:23,060 --> 00:34:26,240 and you follow each of those hash buckets through an array of linked lists. 835 00:34:26,820 --> 00:34:27,860 I'm sorry, a linked list. 836 00:34:28,740 --> 00:34:29,960 And here's the linked list. 837 00:34:30,660 --> 00:34:31,760 That's not the linked list, hold on. 838 00:34:31,900 --> 00:34:34,760 TLS index, D87F38. 839 00:34:34,920 --> 00:34:36,820 That's actually in the last patch of WOW. 840 00:34:37,080 --> 00:34:39,060 You probably don't need this TLS index. 841 00:34:39,160 --> 00:34:40,600 In my experience, it's always been 0. 842 00:34:40,840 --> 00:34:42,200 So you can just hard code it to 0. 843 00:34:42,420 --> 00:34:46,640 Here's the assembly language to grab the object manager base out of the TLS. 844 00:34:46,720 --> 00:34:48,720 So you move that up, and you can see into EBX. 845 00:34:48,720 --> 00:34:51,440 We call off the FS register, offset 2C. 846 00:34:51,860 --> 00:34:53,500 Offset 2C is the object manager. 847 00:34:53,820 --> 00:34:57,860 We have that now, and we can begin parsing through the hash buckets and the linked lists. 848 00:34:58,740 --> 00:35:00,360 Here's some more screenshots of code. 849 00:35:00,900 --> 00:35:02,240 Here we have the object manager. 850 00:35:02,460 --> 00:35:05,300 We get the array base, the size of the bucket array, 851 00:35:05,440 --> 00:35:07,780 and we go through them one at a time as a linked list. 852 00:35:08,000 --> 00:35:09,780 There's actually this funny little line of code here. 853 00:35:10,500 --> 00:35:13,000 It looks like, and I'm not sure why this happens. 854 00:35:13,120 --> 00:35:14,960 It might be something that Blizzard put in on purpose. 855 00:35:15,380 --> 00:35:17,720 They'll actually make an odd address 856 00:35:17,720 --> 00:35:21,020 on the last object in the linked list. 857 00:35:21,220 --> 00:35:23,140 I think it's actually like an end sentinel. 858 00:35:23,420 --> 00:35:25,720 It actually is there to indicate the end of the list. 859 00:35:26,120 --> 00:35:28,160 Now that's what I've witnessed in the assembly language 860 00:35:28,160 --> 00:35:29,860 when I reverse engineered this thing in IDA Pro. 861 00:35:30,220 --> 00:35:32,100 So I just go ahead and put it here. 862 00:35:32,160 --> 00:35:33,780 If you don't, you walk right off the end of the list. 863 00:35:33,920 --> 00:35:35,500 So that's how they do it. That's how I do it. 864 00:35:35,660 --> 00:35:38,300 There's probably some kind of macro in their source code they use for that. 865 00:35:39,280 --> 00:35:39,860 All right. 866 00:35:39,920 --> 00:35:42,900 Now every object that we grab has a GUID, a 64-bit GUID, 867 00:35:42,980 --> 00:35:44,800 that identifies it uniquely in the world. 868 00:35:44,980 --> 00:35:45,940 It has a type. 869 00:35:46,400 --> 00:35:47,340 It has a position. 870 00:35:47,900 --> 00:35:50,800 And so what I'm doing here is I'm just putting all the objects 871 00:35:50,800 --> 00:35:54,560 into a GUID to unit hash table in my local bot. 872 00:35:56,240 --> 00:35:56,600 Okay. 873 00:35:58,020 --> 00:35:59,460 What is this a screenshot of? 874 00:35:59,560 --> 00:36:01,140 Oh, we're going through all the linked lists here. 875 00:36:01,820 --> 00:36:03,960 The linked list going through each one one at a time. 876 00:36:03,980 --> 00:36:05,480 I'm using assembly language to do that. 877 00:36:05,600 --> 00:36:08,200 We're following, it's essentially a list entry pointer. 878 00:36:09,000 --> 00:36:10,940 So we go to that and then go next. 879 00:36:11,100 --> 00:36:13,720 So it's like from one to the next to the next to the next to the next 880 00:36:13,720 --> 00:36:14,960 until we hit the 01. 881 00:36:15,140 --> 00:36:16,920 Again, you can see that at the bottom in the while loop. 882 00:36:16,920 --> 00:36:19,720 When we get the 01 on the end, we know we hit the end sentinel. 883 00:36:20,760 --> 00:36:22,840 Here's the structure for a WOW object. 884 00:36:23,860 --> 00:36:26,440 30 and 34 hex offsets are the GUID. 885 00:36:26,660 --> 00:36:27,820 We also have a type. 886 00:36:28,300 --> 00:36:32,120 The type is actually very important because the type tells us what it is. 887 00:36:32,360 --> 00:36:34,600 Container, item, unit, game object, corpse. 888 00:36:35,260 --> 00:36:38,060 And this is how we can detect if we're looking at an enemy that we can kill. 889 00:36:39,340 --> 00:36:41,420 Here's also a nice picture of how it works. 890 00:36:41,500 --> 00:36:44,120 The next pointer points to the beginning of the next object. 891 00:36:44,440 --> 00:36:45,640 But oddly enough, 892 00:36:45,640 --> 00:36:48,280 the previous pointer doesn't point to the beginning of the previous object. 893 00:36:48,460 --> 00:36:52,920 The previous pointer points to the last list entry record in the previous object. 894 00:36:53,100 --> 00:36:54,780 And you can see how the arrow actually points into the middle there. 895 00:36:55,120 --> 00:36:57,200 So that was the little thing that got me at first. 896 00:36:57,300 --> 00:36:58,960 But once I figured that out, it makes sense. 897 00:37:00,160 --> 00:37:01,000 Here's the coordinates. 898 00:37:01,140 --> 00:37:03,740 These are the current offsets that are working as of the last patch. 899 00:37:05,700 --> 00:37:08,160 B8, essentially there you have XYZ and heading. 900 00:37:08,760 --> 00:37:12,300 And that's enough to do all your vectoring in the game. 901 00:37:12,760 --> 00:37:15,620 Point towards the target, run towards the target, kill the target. 902 00:37:15,640 --> 00:37:17,480 Measure your distance from the target, et cetera. 903 00:37:21,300 --> 00:37:23,180 Yeah, I'm going to go a little faster. 904 00:37:23,240 --> 00:37:23,580 I'm running behind. 905 00:37:25,380 --> 00:37:27,480 All right, so we parse the database to the near objects. 906 00:37:27,660 --> 00:37:28,440 We get the player position. 907 00:37:28,620 --> 00:37:29,460 We find a suitable target. 908 00:37:29,640 --> 00:37:31,540 We set the PC's target GUID. 909 00:37:32,160 --> 00:37:33,320 There's actually a target field. 910 00:37:33,440 --> 00:37:35,020 You set it to the GUID of the thing you want to kill. 911 00:37:35,100 --> 00:37:38,580 What that does is immediately on the screen, a wow, boom, you have that target. 912 00:37:39,160 --> 00:37:41,520 Then if you hit one or something, you're going to attack that target, right? 913 00:37:41,680 --> 00:37:44,080 So you find the suitable target and you set that GUID. 914 00:37:44,120 --> 00:37:45,380 And then you have the target position. 915 00:37:45,640 --> 00:37:48,400 And you use some geometry to vector towards the target. 916 00:37:48,480 --> 00:37:49,080 You know your range. 917 00:37:49,240 --> 00:37:52,400 Once you're within 30 yards, you start slamming on your dots or whatever you're doing, 918 00:37:52,500 --> 00:37:53,900 sticking your pet on the target, and you're going. 919 00:37:55,040 --> 00:37:57,580 Now, one of the things that's really cool is the facing value. 920 00:37:57,920 --> 00:37:59,380 You can actually set that directly. 921 00:37:59,500 --> 00:38:01,780 You don't have to use arrow keys in order to, like, turn. 922 00:38:01,980 --> 00:38:04,540 You can directly set your facing and your pointing towards the target. 923 00:38:04,620 --> 00:38:05,460 So that helps out a lot. 924 00:38:08,480 --> 00:38:11,000 You can use a macro-based system with read and write process memory. 925 00:38:11,860 --> 00:38:14,620 That's, like I said before, we could, you know, read screen pixels 926 00:38:14,620 --> 00:38:15,980 and then post stuff into the target. 927 00:38:16,660 --> 00:38:18,120 We could use an injected DLL. 928 00:38:18,260 --> 00:38:19,380 We talked about that's one of the schools. 929 00:38:19,680 --> 00:38:23,900 And we can, you know, directly post keystrokes or use the send message function, 930 00:38:24,120 --> 00:38:26,200 actually post Windows messages in there to drive the character. 931 00:38:26,760 --> 00:38:30,540 We can inject a DLL and use thread hijacking off of the render world call 932 00:38:30,540 --> 00:38:34,640 so that we can actually make internal game function calls without having any thread safety issues. 933 00:38:35,360 --> 00:38:37,220 And that's actually a really cool trick. 934 00:38:39,380 --> 00:38:40,860 Here's a screenshot of how that works. 935 00:38:41,540 --> 00:38:43,200 Main thread of the application is running. 936 00:38:43,200 --> 00:38:43,960 We hit render world. 937 00:38:44,040 --> 00:38:45,080 There's a detour patch there. 938 00:38:45,180 --> 00:38:46,420 It jumps into our injected DLL. 939 00:38:46,620 --> 00:38:49,480 Once we're in the injected DLL, we can make calls directly into WoW. 940 00:38:50,220 --> 00:38:54,820 Cast spell by ID, for example, is a call we can make and just instantly cast a spell. 941 00:38:54,980 --> 00:38:57,780 And then when we're done, we're back at render world, and we continually loop around. 942 00:38:58,020 --> 00:39:01,000 Render world gets called hundreds of times a second, so we get plenty of processing time. 943 00:39:03,320 --> 00:39:08,040 Now, I did make a kernel mode version of that, and it has the benefit of not having any of these problems, 944 00:39:08,160 --> 00:39:09,240 which expose it to Worden. 945 00:39:10,680 --> 00:39:11,880 And I'll show you how that works. 946 00:39:14,020 --> 00:39:16,080 We're going to use a trick called shadow branching. 947 00:39:16,400 --> 00:39:18,900 So let me see if I have a good screenshot of that. 948 00:39:19,740 --> 00:39:20,920 The main thread runs. 949 00:39:21,120 --> 00:39:21,980 We hit a breakpoint. 950 00:39:22,600 --> 00:39:24,860 And then the supervisor code, which is running in the kernel, 951 00:39:25,360 --> 00:39:27,820 uncloaks a page of memory into the user mode space, 952 00:39:28,420 --> 00:39:34,940 jumps to it directly by hijacking the main thread using the context structure for that thread, 953 00:39:35,040 --> 00:39:37,440 changes the EIP right in the context structure in the kernel. 954 00:39:37,520 --> 00:39:40,780 So when it comes back into user mode, it's hyperspaced right into our code. 955 00:39:41,080 --> 00:39:42,460 It executes that code. 956 00:39:42,460 --> 00:39:47,560 Once the code is complete, it freezes the thread again, recloaks the memory, 957 00:39:47,720 --> 00:39:52,100 removes it out of the user mode process space, and changes the EIP back to what it was, 958 00:39:52,220 --> 00:39:54,000 hyperspacing it directly back to render world. 959 00:39:54,200 --> 00:39:59,440 And because Worden executes in the main thread, it'll never be exposed. 960 00:39:59,820 --> 00:40:02,060 This memory will never be exposed to a Worden query. 961 00:40:04,580 --> 00:40:08,020 We actually do release some of this source code, by the way, in our rootkit training class. 962 00:40:08,440 --> 00:40:10,200 So here's kind of a different picture of that. 963 00:40:10,200 --> 00:40:11,860 We allocate memory in the supervisor. 964 00:40:12,620 --> 00:40:14,120 We then have that over in user mode. 965 00:40:14,180 --> 00:40:15,380 We inject code into that. 966 00:40:15,480 --> 00:40:16,380 We branch to it. 967 00:40:16,400 --> 00:40:17,540 When it's done, we cloak it. 968 00:40:17,640 --> 00:40:20,980 By cloaking, we fill the original memory with capital A characters 969 00:40:20,980 --> 00:40:25,160 and move what was there up into kernel mode into a non-paged pool area. 970 00:40:25,520 --> 00:40:27,780 And then when we want it back again, when the hook fires, 971 00:40:27,980 --> 00:40:31,500 we uncloak by moving it back out over the capital As, branch to it again, 972 00:40:31,660 --> 00:40:34,020 and this process just repeats over and over and over again. 973 00:40:37,380 --> 00:40:39,940 So yes, this is code right here in OLLI debug. 974 00:40:41,640 --> 00:40:44,300 In OLLI debug, you can actually, if you drag the window fast enough, 975 00:40:44,340 --> 00:40:47,700 for a split second, sometimes you can actually see the code appear before the As come back. 976 00:40:51,740 --> 00:40:53,540 This is the injected code right here. 977 00:40:53,660 --> 00:40:56,240 It's actually much like a shellcode for a buffer overflow payload. 978 00:40:56,580 --> 00:40:57,600 It's position independent. 979 00:40:58,040 --> 00:41:00,380 It jumps to itself to find its location in memory. 980 00:41:00,560 --> 00:41:03,620 It does a fixup on a little data jump table, 981 00:41:03,700 --> 00:41:05,960 so it has access to all the function calls in kernel 32. 982 00:41:06,620 --> 00:41:08,380 It's very, very similar to shellcode, 983 00:41:08,520 --> 00:41:10,180 except in this case it's a little miniature. 984 00:41:10,200 --> 00:41:12,500 Virtual machine executing in the WoW environment. 985 00:41:14,140 --> 00:41:15,760 Now, how do we set hardware breakpoints? 986 00:41:15,960 --> 00:41:18,060 We're not going to detour render world directly. 987 00:41:18,480 --> 00:41:20,200 Rather, we're going to use hardware breakpoints. 988 00:41:20,300 --> 00:41:22,980 Doing that from the kernel is a real pain in the ass, I found out. 989 00:41:23,080 --> 00:41:25,480 You can't just set context on the thread. 990 00:41:25,720 --> 00:41:27,300 I had to hunt down some structures. 991 00:41:27,600 --> 00:41:28,780 But here's how we're going to do it. 992 00:41:28,820 --> 00:41:30,760 We set DR breakpoint on render world, 993 00:41:30,880 --> 00:41:32,440 and that's a protected breakpoint. 994 00:41:32,680 --> 00:41:35,240 If the warden tries to detect that the DR breakpoint is set, 995 00:41:35,360 --> 00:41:38,140 we will hijack that and give it a false answer. 996 00:41:38,540 --> 00:41:40,100 So we can actually control that from the kernel. 997 00:41:40,200 --> 00:41:42,800 So that's very little visibility to warden in this case. 998 00:41:42,940 --> 00:41:44,460 And then we pull off the trick I just described 999 00:41:44,460 --> 00:41:45,880 where we jump to the injected code page 1000 00:41:45,880 --> 00:41:47,520 whenever we hit the render world call. 1001 00:41:49,540 --> 00:41:51,860 Now, NTSet context thread does not work 1002 00:41:51,860 --> 00:41:53,980 with the context debug register's enumerated type. 1003 00:41:54,200 --> 00:41:55,500 That is our blue screen. 1004 00:41:56,560 --> 00:41:58,980 We don't want to go there, so I had to figure out a new way. 1005 00:41:59,440 --> 00:42:00,760 Let me show you how that works. 1006 00:42:01,260 --> 00:42:03,760 We go to the kernel trap frame for the thread. 1007 00:42:04,040 --> 00:42:05,220 So here's the structure. 1008 00:42:05,360 --> 00:42:08,540 In the kernel, FS0 points to the KPCR structure. 1009 00:42:08,840 --> 00:42:10,140 You go to that. Follow PR. 1010 00:42:10,200 --> 00:42:11,680 CRCB down to the current thread. 1011 00:42:11,800 --> 00:42:12,680 That points to an E thread. 1012 00:42:12,940 --> 00:42:14,000 Once you're in the E thread, 1013 00:42:14,080 --> 00:42:15,380 you follow the initial stack pointer 1014 00:42:15,380 --> 00:42:16,620 to the top of the kernel stack. 1015 00:42:17,940 --> 00:42:19,120 You go down to the bottom 1016 00:42:19,120 --> 00:42:21,100 and subtract off the size of the K trap frame. 1017 00:42:21,480 --> 00:42:23,160 Within that K trap frame structure 1018 00:42:23,160 --> 00:42:24,960 are the DR breakpoint register values. 1019 00:42:25,120 --> 00:42:25,840 You set them directly, 1020 00:42:26,020 --> 00:42:28,060 and as soon as that thread goes back into user mode, 1021 00:42:28,120 --> 00:42:29,240 the DR breakpoints are set. 1022 00:42:30,280 --> 00:42:31,000 Everybody get that? 1023 00:42:33,840 --> 00:42:34,380 All right. 1024 00:42:36,460 --> 00:42:38,360 Yeah, okay, so we control the DR from there. 1025 00:42:38,520 --> 00:42:39,260 In order to do that, 1026 00:42:39,260 --> 00:42:41,020 we have to schedule a kernel mode APC, 1027 00:42:41,100 --> 00:42:43,140 so this will run in the context of the target thread, 1028 00:42:43,240 --> 00:42:44,160 but in kernel mode. 1029 00:42:44,420 --> 00:42:45,920 There are different kinds of APCs, 1030 00:42:46,100 --> 00:42:47,500 so just suffice it to say, 1031 00:42:47,620 --> 00:42:48,780 this is a documented method. 1032 00:42:48,960 --> 00:42:51,060 You schedule a kernel mode APC for the target, 1033 00:42:51,140 --> 00:42:52,340 and then once you're in the target thread, 1034 00:42:52,520 --> 00:42:53,580 you perform the following. 1035 00:42:53,740 --> 00:42:55,580 You go through that little diagram that I just showed. 1036 00:42:55,740 --> 00:42:57,120 Now, if you want to know those data structures, 1037 00:42:57,400 --> 00:42:59,900 go up on the net and look for React OS. 1038 00:43:01,460 --> 00:43:02,560 Google for React OS. 1039 00:43:03,460 --> 00:43:04,860 The guy that wrote React OS 1040 00:43:04,860 --> 00:43:07,340 clearly stole the source code to Windows. 1041 00:43:09,340 --> 00:43:11,440 So now you can read the source code to Windows 1042 00:43:11,440 --> 00:43:12,620 without reading the source code to Windows 1043 00:43:12,620 --> 00:43:13,620 by using React OS. 1044 00:43:14,920 --> 00:43:16,700 And he'll have all those structures up there. 1045 00:43:16,860 --> 00:43:18,340 It's a very valuable resource. 1046 00:43:19,600 --> 00:43:21,180 Multi-processor safe interrupt hooking 1047 00:43:21,180 --> 00:43:22,500 is another problem we have to solve. 1048 00:43:22,640 --> 00:43:25,100 That dual core systems, anything like that, 1049 00:43:25,180 --> 00:43:26,060 we'll have to deal with that. 1050 00:43:26,160 --> 00:43:28,940 So how many interrupt tables are on a dual CPU system? 1051 00:43:30,940 --> 00:43:31,680 Come on, guys. 1052 00:43:33,700 --> 00:43:34,520 Oh, come on. 1053 00:43:34,560 --> 00:43:35,260 Someone knows. 1054 00:43:35,980 --> 00:43:38,540 How many interrupt tables on a two CPU system? 1055 00:43:39,020 --> 00:43:39,460 Two. 1056 00:43:39,560 --> 00:43:40,000 Two. 1057 00:43:40,000 --> 00:43:40,440 Thank you. 1058 00:43:40,500 --> 00:43:41,480 One for every processor. 1059 00:43:42,160 --> 00:43:44,800 So we have to schedule a deferred procedure call 1060 00:43:44,800 --> 00:43:46,320 for each processor. 1061 00:43:46,520 --> 00:43:48,760 The deferred procedure calls allow us to specify 1062 00:43:48,760 --> 00:43:50,720 which processor the code should run on. 1063 00:43:50,920 --> 00:43:51,940 So by doing that, 1064 00:43:52,120 --> 00:43:55,080 a callback will be fired on the processor in question. 1065 00:43:55,160 --> 00:43:56,680 We disable interrupts, patch interrupt table, 1066 00:43:56,840 --> 00:43:57,980 and then re-enable interrupts. 1067 00:43:58,000 --> 00:43:59,500 We then wait on a waitable object. 1068 00:43:59,600 --> 00:44:00,800 We do that one for each processor, 1069 00:44:00,940 --> 00:44:02,860 and we now have multi-CPU safe interrupt hooking. 1070 00:44:05,000 --> 00:44:07,040 There's code for that on rootkit.com, by the way. 1071 00:44:08,540 --> 00:44:08,860 Okay. 1072 00:44:08,920 --> 00:44:10,700 Now, I only have a couple minutes left, 1073 00:44:10,780 --> 00:44:12,080 and I want to cover PvP botting. 1074 00:44:12,160 --> 00:44:14,920 It doesn't have anything to do with the farming stuff 1075 00:44:14,920 --> 00:44:15,740 I was just talking about, 1076 00:44:15,820 --> 00:44:17,340 but it is a new area I've been exploring. 1077 00:44:18,020 --> 00:44:19,600 Who here likes to play PvP? 1078 00:44:20,560 --> 00:44:23,120 Who here has an undead warlock that melts people's faces? 1079 00:44:23,860 --> 00:44:24,280 Yeah. 1080 00:44:26,080 --> 00:44:26,500 Okay. 1081 00:44:26,700 --> 00:44:27,500 PvP botting. 1082 00:44:27,540 --> 00:44:28,380 Let's talk about the idea. 1083 00:44:28,760 --> 00:44:30,800 Every single thing you can do in PvP 1084 00:44:30,800 --> 00:44:33,380 can be countered by a logical phrase or sequence of attacks 1085 00:44:33,380 --> 00:44:36,500 or dots or buffs or debuffs. 1086 00:44:36,840 --> 00:44:38,220 It's set up that way in WoW 1087 00:44:38,220 --> 00:44:38,920 to be played that way, 1088 00:44:39,000 --> 00:44:39,960 and if you're a really good player, 1089 00:44:40,020 --> 00:44:42,620 you already have muscle memory figured out for a lot of your targets. 1090 00:44:42,780 --> 00:44:44,560 But every single target's different. 1091 00:44:44,780 --> 00:44:47,800 They may be wearing a different kind of armor set, for example, 1092 00:44:47,900 --> 00:44:48,640 that you have to counter, 1093 00:44:48,800 --> 00:44:50,420 or they may be carrying certain buffs. 1094 00:44:50,680 --> 00:44:52,280 You can't think of all the things, 1095 00:44:52,360 --> 00:44:55,180 but you can build a bot that knows everything to do. 1096 00:44:55,280 --> 00:44:58,600 You pre-script every possible scenario into the bot, 1097 00:44:58,740 --> 00:45:01,320 and it knows what to cast on yourself and your target 1098 00:45:01,320 --> 00:45:04,040 to maximize your DPS and kill your target as quickly as possible. 1099 00:45:04,860 --> 00:45:06,320 That's the idea of a PvP 1100 00:45:06,320 --> 00:45:08,920 in a WoW-type universe. 1101 00:45:13,160 --> 00:45:14,620 Now, unlike the farming bot, 1102 00:45:14,760 --> 00:45:15,400 this is not... 1103 00:45:15,400 --> 00:45:16,360 I actually struggled with this. 1104 00:45:16,400 --> 00:45:18,840 I tried to make a PvP bot that was based on a state machine. 1105 00:45:19,000 --> 00:45:19,540 It doesn't work. 1106 00:45:19,660 --> 00:45:23,480 The state machine takes too much time to pick up and carry the events. 1107 00:45:23,660 --> 00:45:24,740 So I made this event-based. 1108 00:45:24,920 --> 00:45:26,880 As soon as an event rolls in of any kind, 1109 00:45:26,980 --> 00:45:28,600 you immediately respond to it. 1110 00:45:29,620 --> 00:45:31,360 So the PvP script I'm going to show you 1111 00:45:31,360 --> 00:45:33,600 is a pseudocode designed for level 60+, 1112 00:45:33,600 --> 00:45:34,840 undead, warlock, and WoW. 1113 00:45:36,020 --> 00:45:37,240 There's an on-event handler. 1114 00:45:37,540 --> 00:45:39,260 There's many different types of events. 1115 00:45:40,500 --> 00:45:42,680 One of the types, for example, is hostile event. 1116 00:45:42,820 --> 00:45:44,420 That would be if someone tried to come up and punk you, 1117 00:45:44,480 --> 00:45:46,580 or some rogue came up and zapped you, or something like that. 1118 00:45:46,740 --> 00:45:48,760 So you can immediately get an event hostile type. 1119 00:45:49,460 --> 00:45:50,680 There's also a timer event. 1120 00:45:50,780 --> 00:45:52,100 The timer event I had to throw in. 1121 00:45:52,340 --> 00:45:56,540 It's the most similar to a state-based approach that we can get, 1122 00:45:56,600 --> 00:45:57,660 but it's not actually state-based. 1123 00:45:57,800 --> 00:46:00,420 In the timer event, we just check for things like mana and health, 1124 00:46:00,560 --> 00:46:02,800 eat food, drink water, all that stuff. 1125 00:46:03,240 --> 00:46:04,420 If we have a target, 1126 00:46:04,420 --> 00:46:06,080 we'll then call into the combat handler. 1127 00:46:07,820 --> 00:46:10,040 And hostile events, I'll give you an example. 1128 00:46:10,220 --> 00:46:11,620 If we just got charmed or feared, 1129 00:46:12,460 --> 00:46:15,800 we immediately call the break fear, etc. subroutine. 1130 00:46:16,020 --> 00:46:18,220 Just to give you an example of one thing we would be responding to. 1131 00:46:18,400 --> 00:46:21,140 And our fear breaker simply casts Will of the Forsaken, 1132 00:46:21,220 --> 00:46:22,080 and if that doesn't work, 1133 00:46:22,240 --> 00:46:24,680 it uses the insignia of the Horde, Trinket. 1134 00:46:25,500 --> 00:46:26,180 Pretty simple. 1135 00:46:26,600 --> 00:46:29,420 So now the guy that just tried to fear me or sheep me, whatever, 1136 00:46:29,860 --> 00:46:31,960 I've now countered immediately and I'm ready to attack. 1137 00:46:32,240 --> 00:46:33,640 Then the combat script runs. 1138 00:46:34,420 --> 00:46:35,740 I fix my pet on the target. 1139 00:46:36,600 --> 00:46:38,980 I'll cast Death Coil in order to prevent myself 1140 00:46:38,980 --> 00:46:41,320 from being interrupted on my next fear spell. 1141 00:46:41,640 --> 00:46:42,800 The fear will then fire, 1142 00:46:42,960 --> 00:46:44,780 so your target's now feared and running away. 1143 00:46:45,100 --> 00:46:48,120 If I have the Voidwalker, I'll immediately sacrifice him, 1144 00:46:48,240 --> 00:46:49,740 giving myself a nice bubble. 1145 00:46:50,380 --> 00:46:52,600 And then I'll call Fel Domination, 1146 00:46:52,660 --> 00:46:55,920 which reduced the casting time for my Felguard to almost nil, 1147 00:46:55,960 --> 00:46:57,280 and I basically get instant Felguard. 1148 00:46:57,660 --> 00:46:59,740 So the guy that just came up to try to sap me, 1149 00:46:59,860 --> 00:47:01,800 just got me, I countered his sap, 1150 00:47:01,980 --> 00:47:03,300 instantly got a bubble, 1151 00:47:03,300 --> 00:47:05,700 and now there's a Felguard chasing around and beating on him. 1152 00:47:06,000 --> 00:47:08,280 And, by the way, I'm slapping a couple dots on him as well. 1153 00:47:11,160 --> 00:47:11,740 Manage dots. 1154 00:47:12,160 --> 00:47:12,800 Gets called. 1155 00:47:13,180 --> 00:47:15,980 So we call our friend Curse of Agony in this course. 1156 00:47:16,020 --> 00:47:17,160 We're checking our mana percentage, 1157 00:47:17,320 --> 00:47:18,700 so we're doing some amount of management here. 1158 00:47:18,880 --> 00:47:19,820 We call Corruption. 1159 00:47:20,040 --> 00:47:21,600 Something to notice about this, though, 1160 00:47:21,680 --> 00:47:25,360 we actually pause in this script at this point in time 1161 00:47:25,360 --> 00:47:27,140 until the casting is complete. 1162 00:47:27,380 --> 00:47:28,860 We don't queue them and run them. 1163 00:47:29,060 --> 00:47:30,400 My first version was queuing, 1164 00:47:30,460 --> 00:47:32,440 but it turns out I had a lot of multi-threaded, 1165 00:47:32,440 --> 00:47:33,960 kind of overlapping issues occurring. 1166 00:47:34,180 --> 00:47:37,300 So what we do is we actually halt on there until Curse of Agony is finished, 1167 00:47:37,460 --> 00:47:38,560 then Corruption is finished, 1168 00:47:38,780 --> 00:47:40,420 and then finally, if we can pull one off, 1169 00:47:40,460 --> 00:47:41,580 we'll cast Annihilate as well. 1170 00:47:44,720 --> 00:47:47,180 We have to stop moving temporarily while we cast Annihilate. 1171 00:47:47,220 --> 00:47:48,580 That's what the code's doing at the bottom there. 1172 00:47:50,340 --> 00:47:50,700 Okay. 1173 00:47:52,420 --> 00:47:54,000 So here's just a summary of how it works. 1174 00:47:54,080 --> 00:47:55,000 Timer events don't queue. 1175 00:47:55,100 --> 00:47:57,160 If you're already in the timer taking your time, 1176 00:47:57,200 --> 00:47:58,780 and another timer event fires, 1177 00:47:58,860 --> 00:48:00,180 it just gets thrown in the trash bucket, 1178 00:48:00,320 --> 00:48:02,400 because you don't want to get cascaded of those happening. 1179 00:48:02,440 --> 00:48:07,360 Any kind of status update or hostile event all queues up, 1180 00:48:07,440 --> 00:48:09,260 because you want to process all of those no matter what, 1181 00:48:09,320 --> 00:48:11,200 because they change the state of your script. 1182 00:48:12,280 --> 00:48:14,360 Multiple callbacks do not occur at the same time. 1183 00:48:14,440 --> 00:48:14,820 They queue up. 1184 00:48:14,860 --> 00:48:15,800 This is a single-threaded system. 1185 00:48:16,940 --> 00:48:18,520 Now I want to show you back-sticking. 1186 00:48:18,880 --> 00:48:20,620 This is one trick that I've been working on. 1187 00:48:20,820 --> 00:48:22,420 You know that if you're facing your target, 1188 00:48:22,500 --> 00:48:23,080 you can hit them, 1189 00:48:23,140 --> 00:48:25,180 but a lot of times if you're not facing your target, 1190 00:48:25,260 --> 00:48:26,420 you can't hit the target. 1191 00:48:27,140 --> 00:48:31,420 So my trick is to move my character behind the target at all times, 1192 00:48:31,420 --> 00:48:32,720 so no matter which way he turns, 1193 00:48:32,940 --> 00:48:34,160 he can't face me. 1194 00:48:34,740 --> 00:48:36,560 That would be really good for a back-stabbing rogue. 1195 00:48:37,380 --> 00:48:39,460 Now, tele-hacking would be the best way to do that, 1196 00:48:39,540 --> 00:48:40,860 but since they patched tele-hacking, 1197 00:48:41,000 --> 00:48:42,340 until I get that working again, 1198 00:48:42,380 --> 00:48:43,600 I actually have to use keystrokes. 1199 00:48:43,680 --> 00:48:46,980 I'm going to show you a short movie of a PvP bot using back-sticking. 1200 00:48:47,240 --> 00:48:48,700 Here's a diagram of how it works. 1201 00:48:48,860 --> 00:48:49,940 My target is in red. 1202 00:48:50,260 --> 00:48:51,200 Blue runs up. 1203 00:48:51,300 --> 00:48:52,580 All right, I've got to go real fast here. 1204 00:48:52,720 --> 00:48:53,780 Blue guy runs up, 1205 00:48:53,840 --> 00:48:55,860 faces the same direction as the red guy, 1206 00:48:55,940 --> 00:48:57,300 and then backs up a couple of steps. 1207 00:48:57,660 --> 00:48:58,860 Red guy tries to move. 1208 00:48:59,000 --> 00:48:59,740 I do it again. 1209 00:48:59,740 --> 00:49:02,460 And there's sort of this humping action going on. 1210 00:49:04,460 --> 00:49:06,600 So let me go ahead and show the movie for that, 1211 00:49:06,660 --> 00:49:07,240 because we're out of time. 1212 00:49:17,120 --> 00:49:20,340 Okay, I'll go quick here. 1213 00:49:20,480 --> 00:49:21,580 Here's the star of our show. 1214 00:49:24,020 --> 00:49:25,380 Now, I'm clicking on targets. 1215 00:49:25,440 --> 00:49:29,100 You can see she immediately faces NPCs, players, and pets. 1216 00:49:29,740 --> 00:49:31,220 Notice the immediate heading changes. 1217 00:49:31,600 --> 00:49:33,200 That's just illustrating the heading control. 1218 00:49:33,600 --> 00:49:36,280 Let me show that on NPC, this dude here walking. 1219 00:49:36,540 --> 00:49:38,500 You can see she's auto-correcting her heading. 1220 00:49:38,620 --> 00:49:39,580 I'll click on her now. 1221 00:49:39,820 --> 00:49:42,000 Instantly fixes on her as she walks by. 1222 00:49:42,300 --> 00:49:44,260 Now let's pick on a target that actually moves, 1223 00:49:44,380 --> 00:49:45,580 and we'll turn on the movement. 1224 00:49:46,060 --> 00:49:47,540 Okay, this guy's walking around, 1225 00:49:47,740 --> 00:49:50,360 and now we have the kind of humping action, 1226 00:49:50,440 --> 00:49:51,820 although it doesn't actually show up too well here, 1227 00:49:51,880 --> 00:49:52,980 because he's actually moving. 1228 00:49:53,140 --> 00:49:54,540 If he were to stop moving, 1229 00:49:54,840 --> 00:49:56,160 you'd see it a lot more clearly. 1230 00:49:56,340 --> 00:49:57,600 So he's turning a corner, 1231 00:49:58,100 --> 00:49:59,720 and you can see she's tracking right back. 1232 00:49:59,720 --> 00:50:00,200 Right behind him. 1233 00:50:00,980 --> 00:50:02,520 So the tracking works quite well. 1234 00:50:08,360 --> 00:50:08,760 Okay. 1235 00:50:13,260 --> 00:50:13,980 Here's a player. 1236 00:50:14,560 --> 00:50:16,280 He's going to try to turn around in a minute, 1237 00:50:16,420 --> 00:50:17,920 because I'm really annoying him. 1238 00:50:19,040 --> 00:50:20,980 Now, she noticed she keeps running up and backing up. 1239 00:50:21,040 --> 00:50:23,180 Now, he's going to try to turn and face me. 1240 00:50:23,960 --> 00:50:24,560 All right. 1241 00:50:25,240 --> 00:50:26,780 Sorry, the movie's a little choppy. 1242 00:50:27,500 --> 00:50:28,300 Now, there he goes. 1243 00:50:28,320 --> 00:50:28,960 He tried to turn, 1244 00:50:29,720 --> 00:50:30,180 and I immediately corrected. 1245 00:50:31,520 --> 00:50:32,500 Now, he's turning again, 1246 00:50:32,720 --> 00:50:34,160 and he still can't face me. 1247 00:50:35,960 --> 00:50:37,580 And he's going to turn again, 1248 00:50:37,740 --> 00:50:39,200 and again, I autocorrected. 1249 00:50:39,280 --> 00:50:40,040 There he goes again. 1250 00:50:40,280 --> 00:50:41,020 Sorry, mister. 1251 00:50:41,180 --> 00:50:41,880 Look at me. 1252 00:50:42,120 --> 00:50:43,440 I know you want to look at me, 1253 00:50:43,460 --> 00:50:44,300 but you can't look at me. 1254 00:50:44,400 --> 00:50:44,500 Okay. 1255 00:50:44,600 --> 00:50:46,740 So this shows you how the back sticking kind of works. 1256 00:50:46,800 --> 00:50:47,340 Now, this guy, 1257 00:50:47,540 --> 00:50:49,180 I pick on him for a while. 1258 00:50:49,340 --> 00:50:50,220 He's standing there. 1259 00:50:50,340 --> 00:50:52,240 He actually kind of gets a little pissed off and runs away. 1260 00:50:52,800 --> 00:50:54,160 But he can't get away. 1261 00:50:54,400 --> 00:50:55,180 That's the problem. 1262 00:50:55,660 --> 00:50:58,340 So he actually is going to run into a building here shortly. 1263 00:50:59,720 --> 00:51:00,500 Off he goes. 1264 00:51:00,620 --> 00:51:01,900 He's going to go into the weapon vendor. 1265 00:51:02,520 --> 00:51:02,840 Okay. 1266 00:51:02,860 --> 00:51:04,520 Now, I actually cut the film here to save time. 1267 00:51:04,920 --> 00:51:06,500 She's running and just backing up. 1268 00:51:06,580 --> 00:51:07,160 Now, this actually, 1269 00:51:07,260 --> 00:51:08,260 I cut the film here. 1270 00:51:08,300 --> 00:51:09,140 This goes on for about, 1271 00:51:09,720 --> 00:51:11,040 I got to finish this video. 1272 00:51:11,220 --> 00:51:12,260 I got to finish this video. 1273 00:51:12,520 --> 00:51:13,240 Two more minutes. 1274 00:51:13,320 --> 00:51:14,800 He's actually talking to me down there, 1275 00:51:14,840 --> 00:51:15,840 and he's getting really mad. 1276 00:51:16,980 --> 00:51:19,900 So he's going to run out of the building and try to get away. 1277 00:51:20,520 --> 00:51:22,120 And again, I'm still following him. 1278 00:51:22,180 --> 00:51:22,800 And right here, 1279 00:51:22,940 --> 00:51:24,320 he finally has it, 1280 00:51:24,360 --> 00:51:25,120 and he logs off. 1281 00:51:25,240 --> 00:51:25,520 Boom. 1282 00:51:28,260 --> 00:51:28,940 All right. 1283 00:51:29,000 --> 00:51:31,000 So just to show you again how that works, 1284 00:51:31,140 --> 00:51:32,800 here's another guy I'm following around. 1285 00:51:32,960 --> 00:51:35,320 He's running around inside of one of the buildings, 1286 00:51:35,360 --> 00:51:37,000 and you can see the tracking is working very well. 1287 00:51:37,040 --> 00:51:37,580 Up the stairs, 1288 00:51:37,680 --> 00:51:38,340 around the stairs, 1289 00:51:38,520 --> 00:51:39,740 and there's no problem. 1290 00:51:39,840 --> 00:51:41,200 She follows him all the way around. 1291 00:51:41,600 --> 00:51:43,280 He's going to stand here for a moment. 1292 00:51:43,400 --> 00:51:45,420 This movie is only about one minute more, 1293 00:51:45,520 --> 00:51:46,200 so it's almost done. 1294 00:51:46,940 --> 00:51:48,700 She's doing this backup thing again, 1295 00:51:48,840 --> 00:51:51,640 and he's not really paying attention to me at the time, 1296 00:51:51,660 --> 00:51:53,540 but now I've been following him for like 20 minutes. 1297 00:51:54,780 --> 00:51:55,180 Okay. 1298 00:51:55,220 --> 00:51:55,500 And he's done. 1299 00:51:55,520 --> 00:51:56,020 He's about had it. 1300 00:51:56,060 --> 00:51:56,360 Now watch. 1301 00:51:56,440 --> 00:51:57,580 He's going to try to run away around this. 1302 00:51:57,660 --> 00:51:57,980 Just again, 1303 00:51:58,080 --> 00:51:59,460 the tracking shows off really well here. 1304 00:51:59,640 --> 00:52:01,040 He's going to run around the tree, 1305 00:52:01,480 --> 00:52:04,120 and she'll follow him very nicely around the tree. 1306 00:52:05,020 --> 00:52:07,180 He's going to try to jump over the fence, 1307 00:52:07,620 --> 00:52:08,940 and we're going to follow him. 1308 00:52:09,820 --> 00:52:10,540 There he goes. 1309 00:52:11,000 --> 00:52:12,400 He's going to run around a pillar. 1310 00:52:12,800 --> 00:52:13,160 Again, 1311 00:52:13,360 --> 00:52:14,700 he's not able to get away, 1312 00:52:14,780 --> 00:52:16,100 no matter all these obstacles and things. 1313 00:52:16,200 --> 00:52:17,260 So the trick works pretty well. 1314 00:52:19,180 --> 00:52:20,880 I think I have one more example, 1315 00:52:21,380 --> 00:52:22,100 very short, 1316 00:52:22,120 --> 00:52:22,580 in here. 1317 00:52:23,080 --> 00:52:23,920 He's going to run away. 1318 00:52:23,920 --> 00:52:27,040 I think I have a picture of some NPC action here. 1319 00:52:28,580 --> 00:52:30,020 I actually let him get away. 1320 00:52:30,820 --> 00:52:31,380 Oh yeah, 1321 00:52:31,440 --> 00:52:32,700 this is the end of the movie. 1322 00:52:33,240 --> 00:52:34,240 Just wanted to show you, 1323 00:52:34,280 --> 00:52:35,440 you can also click on animals, 1324 00:52:35,600 --> 00:52:37,220 and so she's going to eat horse butt. 1325 00:52:40,480 --> 00:52:41,140 Thank you. 1326 00:52:41,320 --> 00:52:42,400 There's some Q&A. 1327 00:52:42,580 --> 00:52:44,560 You can come talk to me more about this stuff.