1 00:00:00,000 --> 00:00:07,020 Hello everyone, good afternoon. My name is Alexandre Borges. I'm a malware and security 2 00:00:07,020 --> 00:00:15,600 researcher at BlackStorm Security. Let's talk about malware, the obfuscation and 3 00:00:15,600 --> 00:00:27,860 emulation. It's a very short presentation, only 190 slides, so let's go. It's my 4 00:00:27,860 --> 00:00:37,320 profile and that's my agenda for today. We will see something about anti-reversing, 5 00:00:37,360 --> 00:00:45,740 metasm framework, we will see something about Miasm, Triton, Radar, we touch 6 00:00:45,740 --> 00:00:52,880 something about gtracing on Windows, and finally a very interesting trick using 7 00:00:52,880 --> 00:00:56,340 as an anti-virtual machine detection. 8 00:00:58,800 --> 00:01:11,380 Let's start. I've been analyzing malware for many years. Honestly, most of them use 9 00:01:13,120 --> 00:01:20,640 these speckers, speck, armadillo, petit and so on. It's okay. We know how to unpack them. 10 00:01:20,760 --> 00:01:25,500 It's so easy. Most of them are pretty easy to unpack. 11 00:01:26,720 --> 00:01:27,840 We also know how to do a lot of things. We know how to do a lot of things. We know how 12 00:01:27,840 --> 00:01:39,380 to do a lot of things. We also know the main memory APIs, like these ones in red. We also 13 00:01:39,380 --> 00:01:48,340 know how to use a debugger. We know how to set up some break points. We know how 14 00:01:48,340 --> 00:01:57,820 to dump, unpack binary from memory. How to dump inject code from memory. We also know 15 00:01:57,840 --> 00:02:07,500 We can use very special tools like PCB for hasherzad, it's an excellent tool. 16 00:02:08,520 --> 00:02:16,980 We can use volatility to dump, inject code and unpack the code from the memory and fix. 17 00:02:17,570 --> 00:02:24,680 It's in part understandable by using, for example, a very special plugin named GimpScan. 18 00:02:24,680 --> 00:02:25,860 It's so easy to do that. 19 00:02:29,960 --> 00:02:35,000 We can also write very short scripts for debuggers. 20 00:02:35,060 --> 00:02:45,700 For example, in this case, I wrote a very short script to dump unpacked injected code from memory in x64 debugger. 21 00:02:45,820 --> 00:02:47,980 It's so easy to do that. 22 00:02:48,300 --> 00:02:52,180 I tried to comment line by line to help you later. 23 00:02:54,740 --> 00:03:01,960 We have one, two, and three slides containing these scripts. 24 00:03:02,180 --> 00:03:04,840 It's so easy to do that. 25 00:03:07,340 --> 00:03:11,720 However, the real world is a bit different. 26 00:03:12,520 --> 00:03:18,680 In the real world, things are different. 27 00:03:18,800 --> 00:03:23,940 For example, yes, I can write some plugins in AIDA Pro. 28 00:03:24,160 --> 00:03:24,660 It's simple. 29 00:03:24,680 --> 00:03:28,180 It's so common to do that. 30 00:03:28,400 --> 00:03:37,240 I can write new loaders, for example, to load some node binary like, for example, MBR file. 31 00:03:40,580 --> 00:03:49,680 But modern packers have been using different tricks, different anti-reverse tricks to make our lives harder. 32 00:03:51,560 --> 00:03:54,660 Some packers, such as Vue, 33 00:03:54,660 --> 00:04:03,400 VMProtect, Temida, Arxan, and Agile have been using different tricks, hard tricks to bypass. 34 00:04:03,920 --> 00:04:13,060 And our goal here is try to explain what can I do to circumvent some of these tricks. 35 00:04:17,440 --> 00:04:22,520 Most of these packers have been focused on 64 code. 36 00:04:27,340 --> 00:04:31,940 They have been using so different tricks to do that. 37 00:04:32,320 --> 00:04:41,200 For example, these packers, these advanced packers, remove the imported tables, of course. 38 00:04:41,760 --> 00:04:47,660 They try to encrypt every single string inside the code. 39 00:04:49,740 --> 00:04:54,640 They try to protect the memory using a kind of memory chip. 40 00:04:54,640 --> 00:05:03,060 So, in this case, it's almost impossible to dump the code from memory because the code is encrypted on the memory. 41 00:05:03,300 --> 00:05:09,180 In this case, it's impossible to modify or dump the whole code from memory. 42 00:05:12,820 --> 00:05:23,060 These packers use, for example, very interesting tricks when protecting .NET code. 43 00:05:23,060 --> 00:05:27,480 For example, rename classes, methods, fields, and so on. 44 00:05:27,620 --> 00:05:39,500 But much worse, these packers virtualize Intel instructions to a very special kind of instructions. 45 00:05:39,680 --> 00:05:48,820 I mean, I have an Intel instruction being virtualized to a virtual machine environment 46 00:05:50,100 --> 00:05:51,940 using Spark. 47 00:05:51,940 --> 00:05:55,640 Using Spark sometimes, using a RISC code. 48 00:05:55,900 --> 00:05:59,760 In this case, it's so complicated to bypass. 49 00:06:04,180 --> 00:06:07,860 Additional tricks are used by these advanced packers. 50 00:06:10,520 --> 00:06:14,040 All instructions are encrypted, unfortunately. 51 00:06:16,740 --> 00:06:20,020 Most of the obfuscation is stack-based. 52 00:06:20,180 --> 00:06:21,920 So, it's so hard to... 53 00:06:21,940 --> 00:06:23,240 ...handle statically. 54 00:06:26,560 --> 00:06:29,600 The virtualized code is polymorphic. 55 00:06:29,740 --> 00:06:37,920 In this case, for example, one Intel instruction can be mapped to several different virtualized instructions. 56 00:06:40,760 --> 00:06:44,660 We have lots of fake push instructions. 57 00:06:45,860 --> 00:06:48,760 We have many dead codes. 58 00:06:48,760 --> 00:06:51,640 We have code reordering. 59 00:06:51,740 --> 00:06:54,980 In this case, it's a kind of spaghetti code. 60 00:06:56,680 --> 00:07:01,840 We have a very special trick named code flattening. 61 00:07:01,860 --> 00:07:04,640 I will speak about that later. 62 00:07:06,060 --> 00:07:11,040 And we have tons of anti-debugger and anti-virtual machine techniques. 63 00:07:16,780 --> 00:07:18,020 We don't know. 64 00:07:21,680 --> 00:07:27,260 Nothing about the internals of these virtual machines. 65 00:07:27,720 --> 00:07:32,760 These protectors have been using very special and private virtual machines 66 00:07:33,760 --> 00:07:38,520 to translate the Intel code to a virtualized code. 67 00:07:39,620 --> 00:07:42,500 We don't know anything about that. 68 00:07:43,570 --> 00:07:46,200 However, we know that... 69 00:07:46,200 --> 00:07:53,900 ...the general idea is always the same. 70 00:07:55,680 --> 00:07:59,940 Instruction must be factored, decoded. 71 00:08:00,780 --> 00:08:05,780 We have to find the pointer to the handlers. 72 00:08:06,020 --> 00:08:11,620 And finally, we have to execute each one of these handlers. 73 00:08:14,620 --> 00:08:16,460 That's the general idea. 74 00:08:16,820 --> 00:08:18,100 I have an instruction. 75 00:08:19,180 --> 00:08:22,060 This instruction is decoded. 76 00:08:23,320 --> 00:08:26,840 And once the instruction is decoded, 77 00:08:28,320 --> 00:08:34,240 the dispatcher picks up one of these handlers to process the instruction. 78 00:08:40,460 --> 00:08:45,380 In the real world, it's a bit more complicated. 79 00:08:45,540 --> 00:08:51,460 Because the virtualized instructions are organized into an array. 80 00:08:51,760 --> 00:08:57,960 In this case, you won't see so many opcodes in the virtualized code. 81 00:08:58,180 --> 00:09:00,240 You will see some indexes. 82 00:09:01,420 --> 00:09:04,020 Indexes point to the encryption. 83 00:09:04,220 --> 00:09:06,140 Instruction. 84 00:09:06,900 --> 00:09:10,040 Once the instruction is decoded, 85 00:09:10,860 --> 00:09:15,800 we have the opcode point to the function pointer. 86 00:09:16,120 --> 00:09:20,180 And finally, from the function pointer, 87 00:09:20,500 --> 00:09:22,580 we have the handler being executed. 88 00:09:25,820 --> 00:09:30,300 Additionally, we have other tricks, 89 00:09:30,600 --> 00:09:33,760 other anti-reverse techniques being used. 90 00:09:33,760 --> 00:09:36,240 For example, code unfolding. 91 00:09:36,620 --> 00:09:44,720 In this case, these advanced packers take one constant 92 00:09:45,650 --> 00:09:49,180 and turn it into several constants. 93 00:09:50,280 --> 00:09:53,520 We have pattern-based obfuscation. 94 00:09:53,780 --> 00:09:55,680 I will talk about that later. 95 00:09:57,600 --> 00:10:01,920 We have so many inline functions inside the code. 96 00:10:01,920 --> 00:10:06,760 We have tons of anti-virtual machine techniques. 97 00:10:08,760 --> 00:10:12,320 We have tons of garbage codes. 98 00:10:13,320 --> 00:10:19,840 And of course, we have many, many, many duplicated codes. 99 00:10:23,320 --> 00:10:27,120 Furthermore, we have other tricks being used. 100 00:10:27,280 --> 00:10:28,940 In this case, for example, 101 00:10:28,940 --> 00:10:32,540 we have some contouring direction. 102 00:10:33,840 --> 00:10:38,320 There are some very interesting tricks being used here. 103 00:10:39,140 --> 00:10:44,620 For example, using the return instruction to skip codes. 104 00:10:44,800 --> 00:10:46,040 Skip that code. 105 00:10:47,700 --> 00:10:49,760 These packers use exceptions. 106 00:10:50,680 --> 00:10:54,420 These packers also use opaque predicates. 107 00:10:54,560 --> 00:10:56,920 Opaque predicates is a very known trick. 108 00:10:56,920 --> 00:11:04,220 It's basically a back-to-back jump and jump and z-instruction. 109 00:11:05,280 --> 00:11:07,960 Apparently, you have a conditional jump, 110 00:11:08,180 --> 00:11:13,460 but indeed, the same instruction is taken, 111 00:11:13,660 --> 00:11:15,120 the same branch is taken, 112 00:11:15,180 --> 00:11:18,260 and the other one is never taken. 113 00:11:20,860 --> 00:11:23,800 I will talk about that later, too. 114 00:11:23,960 --> 00:11:26,900 I have a very educational example. 115 00:11:29,340 --> 00:11:35,000 I know that we don't have enough time to see and learn 116 00:11:35,000 --> 00:11:38,260 how to write IDAPA plugins here, 117 00:11:38,460 --> 00:11:44,060 but I left some procedures step-by-step for helping later 118 00:11:44,060 --> 00:11:47,820 about how to set up your environment 119 00:11:47,820 --> 00:11:51,840 to write IDAPA plugins using Visual Studio. 120 00:11:52,780 --> 00:11:56,340 In this case, we have one. 121 00:11:56,340 --> 00:12:02,520 It's true in three slides explaining how to set up your environment 122 00:12:02,520 --> 00:12:05,380 to write IDAPA plugin. 123 00:12:06,180 --> 00:12:11,640 I've been using IDAPA plugin to handle these complex and reverse cases. 124 00:12:11,940 --> 00:12:15,920 Of course, we don't have enough time here, unfortunately. 125 00:12:16,460 --> 00:12:21,700 But I wrote a very simple IDAPA plugin. 126 00:12:23,320 --> 00:12:25,740 This plugin is so basic. 127 00:12:25,740 --> 00:12:28,620 I tried to comment line by line to help you. 128 00:12:29,840 --> 00:12:35,940 And this plugin aims to find web links inside a binary. 129 00:12:38,100 --> 00:12:41,480 So I wrote this plugin here. 130 00:12:42,540 --> 00:12:45,980 I tried to comment every single line, 131 00:12:46,060 --> 00:12:47,560 every single important instruction. 132 00:12:50,380 --> 00:12:52,560 And I executed it. 133 00:12:52,580 --> 00:12:54,860 As you see, it works. 134 00:12:56,460 --> 00:13:02,240 I'm able to find, for example, web links inside a binary. 135 00:13:06,560 --> 00:13:13,920 You can also use processor models as an extension of plugins in IDAPRO. 136 00:13:14,440 --> 00:13:17,740 It's so hard to explain that now, 137 00:13:18,000 --> 00:13:24,360 but I left some very basic explanation here for help. 138 00:13:24,360 --> 00:13:27,340 But returning to our problem, 139 00:13:28,080 --> 00:13:29,500 imagine this program. 140 00:13:30,140 --> 00:13:32,560 It's a very, very, very simple program 141 00:13:33,620 --> 00:13:35,460 written in C language. 142 00:13:35,660 --> 00:13:36,980 C is quite easy. 143 00:13:39,160 --> 00:13:41,740 And this program has a linear execution. 144 00:13:43,180 --> 00:13:45,680 I mean, the execution is straight. 145 00:13:47,040 --> 00:13:48,340 Only these blocks. 146 00:13:51,100 --> 00:13:52,860 Of course, obviously, 147 00:13:52,860 --> 00:13:56,580 we don't have any kind of obfuscation here. 148 00:13:56,760 --> 00:13:58,940 We don't have obfuscation here. 149 00:14:01,360 --> 00:14:04,920 When we disassemble it in the IDAPRO, 150 00:14:06,100 --> 00:14:08,200 the code is so simple, too. 151 00:14:12,420 --> 00:14:15,740 But my idea is using a very old trick, 152 00:14:15,940 --> 00:14:17,060 an anti-versity trick, 153 00:14:17,120 --> 00:14:18,880 named code flattening. 154 00:14:19,500 --> 00:14:22,700 When I apply code flattening techniques, 155 00:14:22,860 --> 00:14:24,040 on this code, 156 00:14:24,810 --> 00:14:26,560 I transform this code 157 00:14:26,560 --> 00:14:28,220 from linear execution 158 00:14:28,860 --> 00:14:30,400 to multi-branch execution. 159 00:14:32,280 --> 00:14:33,120 You know, 160 00:14:35,300 --> 00:14:36,440 it's the same code, 161 00:14:37,440 --> 00:14:39,140 but in this case, 162 00:14:39,670 --> 00:14:41,020 we have a linear execution, 163 00:14:41,980 --> 00:14:43,400 and in this case, 164 00:14:43,540 --> 00:14:45,640 we have a multi-branch execution. 165 00:14:47,760 --> 00:14:50,440 When I open this code 166 00:14:51,080 --> 00:14:52,280 in the IDAPRO, 167 00:14:54,400 --> 00:14:55,620 I will see 168 00:14:57,300 --> 00:14:59,640 a multi-branch disassembly. 169 00:14:59,840 --> 00:15:01,060 You can try 170 00:15:03,300 --> 00:15:05,180 and make some tests 171 00:15:05,180 --> 00:15:06,800 using code flattening. 172 00:15:06,960 --> 00:15:08,060 For example, 173 00:15:09,020 --> 00:15:11,980 I use the obfuscator WLVM 174 00:15:11,980 --> 00:15:13,140 to do that. 175 00:15:13,460 --> 00:15:17,280 I left the complete procedure 176 00:15:17,280 --> 00:15:19,280 about how to install it. 177 00:15:20,540 --> 00:15:21,620 At the bottom, 178 00:15:21,620 --> 00:15:22,880 I show you 179 00:15:22,880 --> 00:15:24,980 how to run 180 00:15:25,720 --> 00:15:28,100 this kind of obfuscator. 181 00:15:30,180 --> 00:15:31,960 And, as you see, 182 00:15:33,880 --> 00:15:36,240 we got the same code 183 00:15:36,240 --> 00:15:37,480 obfuscated. 184 00:15:38,420 --> 00:15:39,160 Pay attention. 185 00:15:39,420 --> 00:15:40,200 Look at that. 186 00:15:40,800 --> 00:15:42,020 The same code, 187 00:15:42,220 --> 00:15:43,060 but this time, 188 00:15:43,540 --> 00:15:45,400 we have a multi-branch execution. 189 00:15:47,600 --> 00:15:48,640 Obfuscation is 190 00:15:49,600 --> 00:15:50,300 so used 191 00:15:50,300 --> 00:15:52,220 in the industry. 192 00:15:53,800 --> 00:15:55,500 It's so hard 193 00:15:55,500 --> 00:15:56,440 to circumvent it, 194 00:15:57,300 --> 00:16:00,340 but we have some techniques 195 00:16:00,340 --> 00:16:00,860 to do that. 196 00:16:01,980 --> 00:16:03,520 This is 197 00:16:03,520 --> 00:16:04,900 an overview. 198 00:16:06,900 --> 00:16:08,160 And this is 199 00:16:08,160 --> 00:16:09,140 the decompiled code. 200 00:16:10,100 --> 00:16:10,840 Look at that. 201 00:16:12,280 --> 00:16:13,200 Originally, 202 00:16:14,100 --> 00:16:15,680 we had only one 203 00:16:16,300 --> 00:16:17,440 while statement. 204 00:16:17,820 --> 00:16:18,620 Now, 205 00:16:18,620 --> 00:16:21,340 we have one while statement, 206 00:16:21,720 --> 00:16:23,480 three if statements, 207 00:16:23,840 --> 00:16:25,260 and one while statement. 208 00:16:28,900 --> 00:16:30,020 This is 209 00:16:30,020 --> 00:16:32,780 a very short example about 210 00:16:34,820 --> 00:16:36,280 opaque predicates. 211 00:16:39,520 --> 00:16:40,700 Take a look. 212 00:16:41,420 --> 00:16:42,120 We have 213 00:16:42,120 --> 00:16:46,100 two jump conditionals, 214 00:16:46,140 --> 00:16:47,180 jump z, 215 00:16:47,180 --> 00:16:48,980 and jump energy 216 00:16:48,980 --> 00:16:50,100 instructions 217 00:16:51,180 --> 00:16:52,060 back to back 218 00:16:52,060 --> 00:16:52,700 together. 219 00:16:53,900 --> 00:16:54,820 However, 220 00:16:55,100 --> 00:16:57,160 the exact instructions above 221 00:16:58,680 --> 00:17:00,400 is establishing that 222 00:17:00,900 --> 00:17:02,680 only the jump zero 223 00:17:03,180 --> 00:17:04,040 is taken. 224 00:17:04,300 --> 00:17:05,440 The another jump 225 00:17:05,440 --> 00:17:06,540 is never taken. 226 00:17:06,960 --> 00:17:08,960 It's a very low trick 227 00:17:08,960 --> 00:17:11,060 when you are handling 228 00:17:12,180 --> 00:17:13,760 anti-reversing tricks. 229 00:17:15,320 --> 00:17:17,400 This is a shellcode, 230 00:17:17,540 --> 00:17:18,520 a very simple shellcode. 231 00:17:19,840 --> 00:17:20,540 There, 232 00:17:20,760 --> 00:17:21,540 at the top, 233 00:17:21,560 --> 00:17:22,000 in red, 234 00:17:22,260 --> 00:17:23,440 we have 235 00:17:23,440 --> 00:17:27,420 the decryption 236 00:17:27,420 --> 00:17:27,800 routine. 237 00:17:29,200 --> 00:17:30,300 Very simple. 238 00:17:30,560 --> 00:17:32,380 And once I wrote 239 00:17:32,380 --> 00:17:33,280 a very simple 240 00:17:33,280 --> 00:17:34,800 IDAPRO script, 241 00:17:37,700 --> 00:17:39,100 I decoded 242 00:17:39,100 --> 00:17:39,360 this 243 00:17:39,360 --> 00:17:39,940 tactically, 244 00:17:40,020 --> 00:17:41,140 and you see 245 00:17:41,140 --> 00:17:42,200 the decrypted 246 00:17:42,200 --> 00:17:42,820 shellcode 247 00:17:42,820 --> 00:17:43,660 in light 248 00:17:43,660 --> 00:17:43,740 light. 249 00:17:43,740 --> 00:17:43,860 It's blue 250 00:17:43,860 --> 00:17:44,700 below. 251 00:17:47,840 --> 00:17:50,080 Another anti-reversing trick 252 00:17:50,740 --> 00:17:51,800 so used 253 00:17:51,800 --> 00:17:52,640 is 254 00:17:53,400 --> 00:17:54,960 call stack manipulation. 255 00:17:57,300 --> 00:17:58,180 Apparently, 256 00:17:58,300 --> 00:17:59,180 it's a very 257 00:18:00,540 --> 00:18:01,920 easy code to read. 258 00:18:02,140 --> 00:18:02,580 However, 259 00:18:03,360 --> 00:18:04,120 pay attention. 260 00:18:06,600 --> 00:18:08,740 The ratting instruction, 261 00:18:09,420 --> 00:18:10,300 the return 262 00:18:10,300 --> 00:18:10,840 instruction 263 00:18:10,840 --> 00:18:11,980 is not true. 264 00:18:11,980 --> 00:18:12,980 It's not 265 00:18:12,980 --> 00:18:13,460 a true 266 00:18:13,810 --> 00:18:14,340 return. 267 00:18:14,880 --> 00:18:15,940 This 268 00:18:15,940 --> 00:18:16,540 return 269 00:18:16,540 --> 00:18:16,980 instruction 270 00:18:17,570 --> 00:18:18,100 is 271 00:18:18,100 --> 00:18:18,740 skipping 272 00:18:19,970 --> 00:18:20,500 these 273 00:18:20,500 --> 00:18:21,160 blue 274 00:18:21,490 --> 00:18:22,020 instructions 275 00:18:22,020 --> 00:18:22,800 and the 276 00:18:22,800 --> 00:18:23,300 true 277 00:18:24,780 --> 00:18:25,840 return 278 00:18:25,840 --> 00:18:26,360 instruction 279 00:18:26,510 --> 00:18:27,040 is 280 00:18:27,040 --> 00:18:27,460 this one. 281 00:18:27,740 --> 00:18:28,920 This is 282 00:18:28,920 --> 00:18:29,100 a 283 00:18:29,100 --> 00:18:30,640 very 284 00:18:30,640 --> 00:18:31,540 used 285 00:18:31,540 --> 00:18:32,200 technique 286 00:18:33,810 --> 00:18:34,340 by 287 00:18:34,340 --> 00:18:34,940 this kind 288 00:18:34,940 --> 00:18:35,200 of 289 00:18:35,200 --> 00:18:35,740 advanced 290 00:18:35,740 --> 00:18:36,620 protectors. 291 00:18:39,950 --> 00:18:40,480 So, 292 00:18:40,600 --> 00:18:41,900 as I promised, 293 00:18:41,980 --> 00:18:43,320 I will 294 00:18:43,320 --> 00:18:43,820 show some 295 00:18:43,820 --> 00:18:44,320 tricks 296 00:18:44,500 --> 00:18:45,320 to handle 297 00:18:45,740 --> 00:18:46,260 different 298 00:18:46,260 --> 00:18:46,660 kinds 299 00:18:46,660 --> 00:18:47,080 of 300 00:18:48,980 --> 00:18:50,020 obfuscation. 301 00:18:52,800 --> 00:18:53,840 Let's 302 00:18:53,840 --> 00:18:54,280 take a 303 00:18:54,280 --> 00:18:54,760 very 304 00:18:54,760 --> 00:18:55,840 educational 305 00:18:55,840 --> 00:18:56,240 sample. 306 00:18:58,580 --> 00:18:59,620 Imagine 307 00:18:59,620 --> 00:19:00,000 this 308 00:19:00,000 --> 00:19:00,380 scenario. 309 00:19:01,800 --> 00:19:02,320 I 310 00:19:02,320 --> 00:19:02,560 have 311 00:19:03,960 --> 00:19:04,480 just 312 00:19:04,480 --> 00:19:05,100 one 313 00:19:05,100 --> 00:19:05,540 instruction 314 00:19:05,540 --> 00:19:06,140 in 315 00:19:06,140 --> 00:19:07,040 green 316 00:19:07,040 --> 00:19:07,760 at 317 00:19:07,760 --> 00:19:08,620 EAX 318 00:19:08,620 --> 00:19:09,880 ECX. 319 00:19:11,980 --> 00:19:12,200 Once 320 00:19:12,980 --> 00:19:14,000 this instruction 321 00:19:14,000 --> 00:19:14,600 is 322 00:19:14,600 --> 00:19:15,500 obfuscated, 323 00:19:15,640 --> 00:19:16,560 we have 324 00:19:16,560 --> 00:19:17,460 the second 325 00:19:17,460 --> 00:19:18,220 stage in 326 00:19:18,220 --> 00:19:18,600 yellow. 327 00:19:20,580 --> 00:19:21,420 Obfuscate 328 00:19:21,420 --> 00:19:21,740 again, 329 00:19:22,060 --> 00:19:23,040 we have 330 00:19:23,040 --> 00:19:24,100 the third 331 00:19:24,720 --> 00:19:25,140 stage 332 00:19:25,140 --> 00:19:26,320 in orange. 333 00:19:26,920 --> 00:19:27,760 Finally, 334 00:19:27,780 --> 00:19:29,080 we have 335 00:19:29,080 --> 00:19:29,620 the last 336 00:19:29,620 --> 00:19:30,060 stage 337 00:19:31,040 --> 00:19:31,880 four 338 00:19:31,880 --> 00:19:32,840 in red. 339 00:19:33,880 --> 00:19:34,300 The 340 00:19:34,300 --> 00:19:34,680 question 341 00:19:34,680 --> 00:19:34,980 is, 342 00:19:36,100 --> 00:19:36,940 how 343 00:19:36,940 --> 00:19:37,460 can I 344 00:19:37,460 --> 00:19:38,440 reverse 345 00:19:38,440 --> 00:19:39,640 the process? 346 00:19:39,640 --> 00:19:40,760 How 347 00:19:40,760 --> 00:19:41,380 can I 348 00:19:41,380 --> 00:19:42,540 go 349 00:19:42,540 --> 00:19:43,740 from 350 00:19:43,740 --> 00:19:44,680 the 351 00:19:44,680 --> 00:19:45,020 stage 352 00:19:45,020 --> 00:19:45,380 four 353 00:19:45,380 --> 00:19:47,120 and find 354 00:19:47,120 --> 00:19:47,640 that 355 00:19:47,640 --> 00:19:48,800 all of 356 00:19:48,800 --> 00:19:49,020 these 357 00:19:49,020 --> 00:19:49,480 instructions 358 00:19:49,480 --> 00:19:51,640 are equal 359 00:19:51,640 --> 00:19:52,020 to 360 00:19:53,560 --> 00:19:54,080 just 361 00:19:54,260 --> 00:19:54,780 one 362 00:19:54,780 --> 00:19:55,580 instruction 363 00:19:55,580 --> 00:19:56,100 at 364 00:19:56,100 --> 00:19:57,160 EAX 365 00:19:57,160 --> 00:19:57,820 ECX? 366 00:20:03,420 --> 00:20:03,940 First, 367 00:20:04,160 --> 00:20:05,660 I 368 00:20:05,660 --> 00:20:06,160 will use 369 00:20:06,160 --> 00:20:06,380 a 370 00:20:06,380 --> 00:20:07,280 very 371 00:20:07,280 --> 00:20:07,620 interesting 372 00:20:09,640 --> 00:20:09,760 framework, 373 00:20:09,760 --> 00:20:10,460 Metasme 374 00:20:10,460 --> 00:20:11,160 is an 375 00:20:11,160 --> 00:20:12,120 amazing 376 00:20:12,120 --> 00:20:13,200 framework. 377 00:20:15,300 --> 00:20:16,060 Metasme 378 00:20:16,060 --> 00:20:16,280 supports 379 00:20:16,280 --> 00:20:16,700 different 380 00:20:16,700 --> 00:20:17,240 platforms. 381 00:20:18,740 --> 00:20:19,500 And 382 00:20:19,500 --> 00:20:20,120 I show 383 00:20:20,120 --> 00:20:20,900 you how 384 00:20:20,900 --> 00:20:21,560 to install 385 00:20:21,560 --> 00:20:22,180 Metasme 386 00:20:22,180 --> 00:20:22,920 at bottom, 387 00:20:23,100 --> 00:20:24,160 step by 388 00:20:24,160 --> 00:20:24,380 step. 389 00:20:24,680 --> 00:20:25,280 OK? 390 00:20:25,460 --> 00:20:26,220 I test it. 391 00:20:28,260 --> 00:20:29,020 And 392 00:20:29,020 --> 00:20:30,280 let's 393 00:20:30,280 --> 00:20:30,420 go. 394 00:20:33,320 --> 00:20:34,080 Take 395 00:20:34,080 --> 00:20:34,260 a 396 00:20:34,260 --> 00:20:34,400 look. 397 00:20:37,860 --> 00:20:38,620 I 398 00:20:38,620 --> 00:20:38,800 pick 399 00:20:38,800 --> 00:20:39,040 up 400 00:20:39,640 --> 00:20:40,300 all 401 00:20:40,300 --> 00:20:40,980 of 402 00:20:40,980 --> 00:20:41,280 these 403 00:20:41,280 --> 00:20:41,840 instructions 404 00:20:42,760 --> 00:20:43,720 in the 405 00:20:43,720 --> 00:20:43,960 stage 406 00:20:43,960 --> 00:20:44,340 four. 407 00:20:47,390 --> 00:20:47,800 Sorry. 408 00:20:48,260 --> 00:20:49,180 And I 409 00:20:49,180 --> 00:20:49,440 start 410 00:20:49,440 --> 00:20:50,060 here. 411 00:20:53,530 --> 00:20:53,940 My 412 00:20:53,940 --> 00:20:54,380 choice 413 00:20:54,380 --> 00:20:55,640 is 414 00:20:55,640 --> 00:20:56,480 using 415 00:20:56,480 --> 00:20:57,600 32 416 00:20:57,600 --> 00:20:58,000 bits. 417 00:20:58,340 --> 00:20:59,340 And I 418 00:20:59,340 --> 00:20:59,760 try 419 00:20:59,760 --> 00:21:01,260 comments 420 00:21:01,260 --> 00:21:02,560 line 421 00:21:02,560 --> 00:21:03,060 by line, 422 00:21:03,280 --> 00:21:03,740 block 423 00:21:03,740 --> 00:21:04,420 by block, 424 00:21:04,440 --> 00:21:05,520 block 425 00:21:05,520 --> 00:21:06,000 by block 426 00:21:06,000 --> 00:21:06,780 to help 427 00:21:06,780 --> 00:21:07,140 you later. 428 00:21:11,720 --> 00:21:12,220 Basically, 429 00:21:15,780 --> 00:21:17,320 the key 430 00:21:17,320 --> 00:21:17,980 points here 431 00:21:17,980 --> 00:21:19,040 are the 432 00:21:19,040 --> 00:21:20,160 yellow line 433 00:21:20,160 --> 00:21:21,420 because I 434 00:21:21,940 --> 00:21:22,440 initialize 435 00:21:22,440 --> 00:21:22,700 in the 436 00:21:22,700 --> 00:21:23,280 backtracking 437 00:21:23,280 --> 00:21:23,900 engine. 438 00:21:26,940 --> 00:21:27,440 And 439 00:21:27,440 --> 00:21:29,160 I will 440 00:21:29,160 --> 00:21:29,560 try 441 00:21:29,560 --> 00:21:30,540 to 442 00:21:31,600 --> 00:21:32,100 solve 443 00:21:32,100 --> 00:21:32,460 our 444 00:21:32,460 --> 00:21:32,940 problem 445 00:21:32,940 --> 00:21:33,880 symbolically 446 00:21:36,000 --> 00:21:36,100 using 447 00:21:36,100 --> 00:21:36,660 opcodes. 448 00:21:40,540 --> 00:21:41,060 I'm 449 00:21:41,060 --> 00:21:41,360 logging 450 00:21:42,660 --> 00:21:43,180 each 451 00:21:44,000 --> 00:21:44,720 executed 452 00:21:44,720 --> 00:21:45,200 instruction. 453 00:21:46,520 --> 00:21:47,040 And 454 00:21:47,040 --> 00:21:47,640 finally, 455 00:21:47,720 --> 00:21:48,740 I'm 456 00:21:48,740 --> 00:21:49,060 showing 457 00:21:49,060 --> 00:21:49,360 you 458 00:21:49,360 --> 00:21:50,700 only 459 00:21:50,700 --> 00:21:51,020 the 460 00:21:51,020 --> 00:21:52,040 effective 461 00:21:52,040 --> 00:21:53,560 instructions 462 00:21:53,560 --> 00:21:53,980 here. 463 00:21:56,600 --> 00:21:57,640 I 464 00:21:57,640 --> 00:21:58,380 run 465 00:21:58,380 --> 00:21:58,720 our 466 00:21:58,720 --> 00:21:59,060 code. 467 00:21:59,260 --> 00:21:59,520 Our 468 00:21:59,520 --> 00:21:59,840 code 469 00:21:59,840 --> 00:22:00,920 was 470 00:22:02,740 --> 00:22:03,620 written 471 00:22:03,620 --> 00:22:04,340 in 472 00:22:04,340 --> 00:22:04,780 Ruby. 473 00:22:06,520 --> 00:22:07,840 There we 474 00:22:07,840 --> 00:22:08,500 have our 475 00:22:08,500 --> 00:22:09,040 initial 476 00:22:09,680 --> 00:22:10,120 opcodes 477 00:22:10,120 --> 00:22:10,520 code. 478 00:22:11,020 --> 00:22:11,900 And 479 00:22:11,900 --> 00:22:12,980 if you 480 00:22:12,980 --> 00:22:13,320 take a 481 00:22:13,320 --> 00:22:13,560 look, 482 00:22:15,520 --> 00:22:15,960 we 483 00:22:15,960 --> 00:22:16,240 have 484 00:22:16,240 --> 00:22:16,480 here 485 00:22:18,500 --> 00:22:19,380 instructions 486 00:22:19,380 --> 00:22:20,800 being 487 00:22:20,800 --> 00:22:21,720 executed 488 00:22:23,800 --> 00:22:24,240 one 489 00:22:24,240 --> 00:22:24,480 by 490 00:22:24,480 --> 00:22:24,800 one 491 00:22:25,960 --> 00:22:26,840 containing 492 00:22:26,840 --> 00:22:27,860 all 493 00:22:27,860 --> 00:22:28,080 the 494 00:22:28,080 --> 00:22:28,680 registered 495 00:22:28,680 --> 00:22:29,700 information 496 00:22:29,700 --> 00:22:30,860 and flags 497 00:22:30,860 --> 00:22:32,380 one by 498 00:22:32,380 --> 00:22:32,660 one. 499 00:22:32,960 --> 00:22:33,760 And 500 00:22:33,760 --> 00:22:34,280 finally, 501 00:22:34,400 --> 00:22:35,320 we have 502 00:22:36,080 --> 00:22:36,860 EAX 503 00:22:36,860 --> 00:22:37,600 at 504 00:22:37,600 --> 00:22:38,240 top 505 00:22:39,080 --> 00:22:40,140 is 506 00:22:40,140 --> 00:22:40,460 equal 507 00:22:42,200 --> 00:22:43,400 EAX 508 00:22:43,400 --> 00:22:44,140 plus 509 00:22:44,140 --> 00:22:46,440 ECX. 510 00:22:48,560 --> 00:22:49,160 You 511 00:22:49,160 --> 00:22:49,400 see 512 00:22:51,600 --> 00:22:52,200 it's 513 00:22:52,800 --> 00:22:53,200 possible 514 00:22:53,200 --> 00:22:53,460 to 515 00:22:53,460 --> 00:22:53,820 de- 516 00:22:53,820 --> 00:22:54,600 obfuscate 517 00:22:54,600 --> 00:22:55,940 all 518 00:22:55,940 --> 00:22:56,660 or 519 00:22:56,660 --> 00:22:57,960 obfuscate 520 00:22:57,960 --> 00:22:58,160 code 521 00:22:58,640 --> 00:22:59,920 and find 522 00:22:59,920 --> 00:23:00,740 that 523 00:23:00,740 --> 00:23:01,900 the bunch 524 00:23:01,900 --> 00:23:02,480 of instructions, 525 00:23:02,820 --> 00:23:03,580 the bunch 526 00:23:03,580 --> 00:23:03,760 of 527 00:23:03,760 --> 00:23:04,720 obfuscation 528 00:23:04,720 --> 00:23:04,980 instructions 529 00:23:04,980 --> 00:23:06,020 are equal 530 00:23:07,760 --> 00:23:08,160 EAX 531 00:23:08,660 --> 00:23:09,700 to ECX. 532 00:23:09,900 --> 00:23:10,480 So easy. 533 00:23:13,640 --> 00:23:14,420 The effective 534 00:23:14,420 --> 00:23:14,820 instructions 535 00:23:16,760 --> 00:23:17,400 are those 536 00:23:17,400 --> 00:23:17,580 ones. 537 00:23:19,980 --> 00:23:20,780 Additionally, 538 00:23:20,900 --> 00:23:21,660 I 539 00:23:21,660 --> 00:23:22,180 try to 540 00:23:22,180 --> 00:23:22,800 use 541 00:23:22,800 --> 00:23:23,660 emulation 542 00:23:24,520 --> 00:23:25,320 using 543 00:23:25,940 --> 00:23:26,780 very nice 544 00:23:26,780 --> 00:23:27,280 combination 545 00:23:27,740 --> 00:23:28,140 between 546 00:23:28,560 --> 00:23:28,960 the 547 00:23:28,960 --> 00:23:29,560 Keystone 548 00:23:29,560 --> 00:23:30,420 and 549 00:23:30,420 --> 00:23:31,300 UEMU. 550 00:23:31,420 --> 00:23:32,340 UEMU is 551 00:23:32,340 --> 00:23:32,480 a 552 00:23:32,480 --> 00:23:33,420 . 553 00:23:35,660 --> 00:23:36,420 Once again, 554 00:23:36,620 --> 00:23:37,620 I show you 555 00:23:37,620 --> 00:23:38,020 how to 556 00:23:38,020 --> 00:23:38,620 install 557 00:23:38,620 --> 00:23:39,060 Keystone 558 00:23:39,060 --> 00:23:39,300 here. 559 00:23:41,560 --> 00:23:42,360 And 560 00:23:42,800 --> 00:23:43,200 this 561 00:23:43,200 --> 00:23:43,500 time, 562 00:23:45,740 --> 00:23:46,140 my 563 00:23:46,140 --> 00:23:46,420 choice 564 00:23:46,420 --> 00:23:46,800 was 565 00:23:49,020 --> 00:23:49,820 write 566 00:23:49,820 --> 00:23:50,140 a 567 00:23:50,140 --> 00:23:50,540 C 568 00:23:50,540 --> 00:23:51,500 language 569 00:23:51,500 --> 00:23:51,900 program. 570 00:23:52,540 --> 00:23:53,340 I 571 00:23:53,340 --> 00:23:53,820 try to 572 00:23:53,820 --> 00:23:54,400 comment line 573 00:23:54,400 --> 00:23:54,860 by line 574 00:23:54,860 --> 00:23:56,280 again for 575 00:23:56,280 --> 00:23:56,540 help. 576 00:24:00,020 --> 00:24:01,140 If you 577 00:24:01,140 --> 00:24:01,440 take a 578 00:24:01,440 --> 00:24:01,700 look, 579 00:24:03,020 --> 00:24:03,580 the 580 00:24:04,160 --> 00:24:04,720 keyline 581 00:24:04,720 --> 00:24:05,360 is the 582 00:24:05,360 --> 00:24:05,720 second 583 00:24:05,720 --> 00:24:07,060 one and 584 00:24:07,060 --> 00:24:07,460 the third 585 00:24:07,460 --> 00:24:07,680 one. 586 00:24:08,040 --> 00:24:08,740 In the 587 00:24:08,740 --> 00:24:09,300 second one, 588 00:24:09,440 --> 00:24:09,740 I'm 589 00:24:09,740 --> 00:24:10,260 creating a 590 00:24:10,260 --> 00:24:10,540 Keystone 591 00:24:10,540 --> 00:24:10,800 engine. 592 00:24:11,080 --> 00:24:11,600 In this 593 00:24:11,600 --> 00:24:12,280 case, 594 00:24:16,120 --> 00:24:16,560 Keystone 595 00:24:16,560 --> 00:24:17,160 is an 596 00:24:17,780 --> 00:24:18,340 assembler. 597 00:24:18,340 --> 00:24:18,800 So, 598 00:24:19,020 --> 00:24:19,340 I'm 599 00:24:19,340 --> 00:24:19,840 assembling 600 00:24:19,840 --> 00:24:20,760 the 601 00:24:20,760 --> 00:24:21,340 instructions 602 00:24:22,960 --> 00:24:23,900 in 603 00:24:23,900 --> 00:24:24,360 opcode 604 00:24:24,360 --> 00:24:25,060 to 605 00:24:25,060 --> 00:24:25,460 x 606 00:24:25,460 --> 00:24:26,040 decimal. 607 00:24:27,140 --> 00:24:28,080 I 608 00:24:28,080 --> 00:24:28,440 executed 609 00:24:28,440 --> 00:24:29,480 and 610 00:24:29,480 --> 00:24:31,140 at 611 00:24:31,140 --> 00:24:31,200 the 612 00:24:31,200 --> 00:24:31,440 middle, 613 00:24:31,580 --> 00:24:33,080 I 614 00:24:33,080 --> 00:24:33,580 got 615 00:24:33,580 --> 00:24:34,620 the 616 00:24:34,620 --> 00:24:34,960 x 617 00:24:34,960 --> 00:24:35,420 decimal 618 00:24:35,420 --> 00:24:36,140 equivalent 619 00:24:36,140 --> 00:24:36,560 to 620 00:24:36,560 --> 00:24:37,040 our 621 00:24:37,040 --> 00:24:37,580 opcodes. 622 00:24:37,880 --> 00:24:38,760 I 623 00:24:38,760 --> 00:24:39,080 save 624 00:24:39,080 --> 00:24:39,200 it 625 00:24:39,200 --> 00:24:39,760 in 626 00:24:39,760 --> 00:24:39,960 a 627 00:24:48,580 --> 00:24:49,480 program 628 00:24:49,480 --> 00:24:49,660 I 629 00:24:49,660 --> 00:24:51,300 was 630 00:24:51,300 --> 00:24:52,340 right. 631 00:24:53,320 --> 00:24:54,220 I 632 00:24:54,220 --> 00:24:54,460 make 633 00:24:54,460 --> 00:24:54,720 another 634 00:24:54,720 --> 00:24:55,280 program 635 00:24:55,280 --> 00:24:55,640 using 636 00:24:55,640 --> 00:24:56,160 this 637 00:24:56,160 --> 00:24:56,440 time 638 00:24:56,440 --> 00:24:57,140 Capstone. 639 00:24:57,320 --> 00:24:57,740 Capstone 640 00:24:57,740 --> 00:24:58,800 make 641 00:24:58,800 --> 00:24:59,020 the 642 00:24:59,020 --> 00:24:59,520 inverse 643 00:24:59,520 --> 00:25:00,100 process. 644 00:25:00,500 --> 00:25:01,080 This 645 00:25:01,080 --> 00:25:01,540 time, 646 00:25:01,560 --> 00:25:02,000 I'm 647 00:25:02,000 --> 00:25:02,800 disassembling. 648 00:25:02,920 --> 00:25:03,160 I 649 00:25:03,160 --> 00:25:03,640 inserted 650 00:25:03,640 --> 00:25:04,220 our 651 00:25:04,220 --> 00:25:05,060 output 652 00:25:05,060 --> 00:25:05,380 from 653 00:25:05,380 --> 00:25:06,000 last 654 00:25:06,000 --> 00:25:06,380 slide. 655 00:25:18,400 --> 00:25:19,280 I 656 00:25:19,280 --> 00:25:19,540 was 657 00:25:19,540 --> 00:25:19,820 right. 658 00:25:20,440 --> 00:25:21,320 I 659 00:25:21,320 --> 00:25:22,340 got 660 00:25:22,340 --> 00:25:23,220 the same 661 00:25:23,220 --> 00:25:23,880 inserted 662 00:25:23,880 --> 00:25:24,160 codes. 663 00:25:24,500 --> 00:25:25,080 But 664 00:25:25,080 --> 00:25:26,000 returning 665 00:25:26,000 --> 00:25:26,260 to 666 00:25:26,260 --> 00:25:26,660 our 667 00:25:26,660 --> 00:25:27,080 problem, 668 00:25:27,280 --> 00:25:28,640 I 669 00:25:28,640 --> 00:25:29,040 open 670 00:25:29,040 --> 00:25:29,480 our 671 00:25:29,480 --> 00:25:29,940 file 672 00:25:29,940 --> 00:25:30,620 defcon 673 00:25:30,620 --> 00:25:33,300 2009.bin 674 00:25:33,300 --> 00:25:34,100 in 675 00:25:34,100 --> 00:25:34,260 the 676 00:25:34,260 --> 00:25:34,480 IDA 677 00:25:34,480 --> 00:25:34,600 Pro. 678 00:25:37,960 --> 00:25:38,840 It 679 00:25:38,840 --> 00:25:39,240 opened 680 00:25:39,240 --> 00:25:39,920 perfectly. 681 00:25:41,640 --> 00:25:42,520 And 682 00:25:42,520 --> 00:25:42,760 I 683 00:25:42,760 --> 00:25:43,060 used 684 00:25:43,060 --> 00:25:43,240 the 685 00:25:48,340 --> 00:25:48,740 I 686 00:25:48,740 --> 00:25:49,360 set up 687 00:25:49,360 --> 00:25:49,660 the 688 00:25:49,660 --> 00:25:50,360 EAX 689 00:25:50,360 --> 00:25:50,840 to 690 00:25:50,840 --> 00:25:51,360 3. 691 00:25:51,520 --> 00:25:52,200 I 692 00:25:52,200 --> 00:25:52,740 set up 693 00:25:52,740 --> 00:25:53,660 ECX 694 00:25:53,660 --> 00:25:54,460 to 695 00:25:54,460 --> 00:25:54,880 6. 696 00:25:55,120 --> 00:25:55,880 And 697 00:25:55,880 --> 00:25:56,140 I 698 00:25:56,140 --> 00:25:57,340 emulated 699 00:25:57,340 --> 00:25:57,840 using 700 00:25:57,840 --> 00:25:58,580 UMU. 701 00:25:58,660 --> 00:25:59,300 Finally, 702 00:25:59,340 --> 00:26:00,360 I found 703 00:26:00,360 --> 00:26:01,480 EAX 704 00:26:01,480 --> 00:26:01,880 is 705 00:26:01,880 --> 00:26:02,500 equal 706 00:26:02,500 --> 00:26:03,340 EAX 707 00:26:03,340 --> 00:26:03,480 to 708 00:26:03,480 --> 00:26:04,060 ECX 709 00:26:04,060 --> 00:26:04,880 9. 710 00:26:05,200 --> 00:26:06,040 In 711 00:26:06,040 --> 00:26:06,160 this 712 00:26:06,160 --> 00:26:06,340 case, 713 00:26:06,990 --> 00:26:07,380 I 714 00:26:08,160 --> 00:26:08,660 solved 715 00:26:08,660 --> 00:26:09,700 numerically. 716 00:26:12,760 --> 00:26:13,540 I 717 00:26:13,540 --> 00:26:13,780 also 718 00:26:13,780 --> 00:26:14,180 used 719 00:26:14,180 --> 00:26:14,300 the 720 00:26:17,180 --> 00:26:17,960 Unicorn. 721 00:26:18,380 --> 00:26:19,160 Unicorn 722 00:26:19,160 --> 00:26:19,620 is 723 00:26:19,620 --> 00:26:19,900 an 724 00:26:19,900 --> 00:26:21,240 emulator. 725 00:26:23,060 --> 00:26:23,840 Once 726 00:26:23,840 --> 00:26:24,100 again, 727 00:26:25,360 --> 00:26:26,140 I 728 00:26:26,140 --> 00:26:27,220 wrote 729 00:26:27,220 --> 00:26:27,440 a 730 00:26:27,440 --> 00:26:27,660 very 731 00:26:27,660 --> 00:26:28,040 simple 732 00:26:28,040 --> 00:26:28,380 program 733 00:26:28,380 --> 00:26:28,780 in C 734 00:26:28,780 --> 00:26:29,120 language. 735 00:26:30,580 --> 00:26:31,360 I 736 00:26:31,360 --> 00:26:31,840 inserted 737 00:26:31,840 --> 00:26:32,340 our 738 00:26:32,340 --> 00:26:33,620 X 739 00:26:33,620 --> 00:26:34,140 decimal 740 00:26:34,140 --> 00:26:34,460 here. 741 00:26:35,360 --> 00:26:36,140 And 742 00:26:37,480 --> 00:26:38,160 I 743 00:26:38,160 --> 00:26:38,860 created 744 00:26:38,860 --> 00:26:39,220 a 745 00:26:40,060 --> 00:26:40,740 macro 746 00:26:40,740 --> 00:26:41,140 named 747 00:26:41,140 --> 00:26:41,800 Defcon 748 00:26:41,800 --> 00:26:42,080 Code. 749 00:26:44,400 --> 00:26:45,080 I 750 00:26:45,080 --> 00:26:45,520 tried 751 00:26:45,520 --> 00:26:45,740 to 752 00:26:45,740 --> 00:26:46,140 comment 753 00:26:46,140 --> 00:26:46,400 this 754 00:26:46,400 --> 00:26:46,740 program 755 00:26:46,740 --> 00:26:47,020 line 756 00:26:47,020 --> 00:26:47,260 by 757 00:26:47,260 --> 00:26:47,620 line 758 00:26:47,620 --> 00:26:47,820 or 759 00:26:47,820 --> 00:26:48,060 block 760 00:26:48,060 --> 00:26:48,240 by 761 00:26:48,240 --> 00:26:48,560 block. 762 00:26:48,880 --> 00:26:49,560 My 763 00:26:49,560 --> 00:26:49,940 comments 764 00:26:49,940 --> 00:26:50,200 are 765 00:26:50,200 --> 00:26:50,460 in 766 00:26:50,460 --> 00:26:50,860 blue, 767 00:26:51,020 --> 00:26:51,620 light 768 00:26:51,620 --> 00:26:51,880 blue. 769 00:26:58,620 --> 00:26:59,340 Here, 770 00:26:59,680 --> 00:27:00,160 we 771 00:27:00,160 --> 00:27:00,480 have 772 00:27:00,480 --> 00:27:01,500 two 773 00:27:01,500 --> 00:27:02,340 key 774 00:27:02,340 --> 00:27:02,660 points. 775 00:27:02,920 --> 00:27:03,640 First, 776 00:27:04,520 --> 00:27:05,460 I set 777 00:27:05,460 --> 00:27:05,680 up 778 00:27:05,680 --> 00:27:07,200 I set 779 00:27:07,200 --> 00:27:07,460 the 780 00:27:07,460 --> 00:27:08,140 EAX 781 00:27:08,140 --> 00:27:08,360 to 782 00:27:08,360 --> 00:27:08,580 4. 783 00:27:09,080 --> 00:27:09,800 I 784 00:27:09,800 --> 00:27:10,080 set 785 00:27:10,080 --> 00:27:10,800 ECX 786 00:27:10,800 --> 00:27:11,100 to 787 00:27:11,100 --> 00:27:11,780 7. 788 00:27:12,220 --> 00:27:12,940 And 789 00:27:12,940 --> 00:27:13,120 I 790 00:27:13,120 --> 00:27:13,440 set 791 00:27:13,440 --> 00:27:14,840 stack 792 00:27:14,840 --> 00:27:15,240 size. 793 00:27:20,720 --> 00:27:21,440 I 794 00:27:21,880 --> 00:27:22,340 start the 795 00:27:22,880 --> 00:27:23,320 emulation 796 00:27:23,320 --> 00:27:24,280 here in 797 00:27:24,280 --> 00:27:24,680 the second 798 00:27:24,680 --> 00:27:24,960 line. 799 00:27:26,020 --> 00:27:26,660 Sorry. 800 00:27:26,860 --> 00:27:27,680 I started 801 00:27:27,680 --> 00:27:28,720 the emulation 802 00:27:28,720 --> 00:27:29,720 here in 803 00:27:29,720 --> 00:27:30,100 the first 804 00:27:30,100 --> 00:27:30,740 line in 805 00:27:30,740 --> 00:27:31,020 yellow. 806 00:27:34,020 --> 00:27:34,660 Once 807 00:27:34,660 --> 00:27:34,940 more, 808 00:27:35,740 --> 00:27:36,380 I 809 00:27:36,380 --> 00:27:37,040 executed 810 00:27:37,040 --> 00:27:37,380 our 811 00:27:37,380 --> 00:27:37,780 program. 812 00:27:38,440 --> 00:27:39,080 Our 813 00:27:39,080 --> 00:27:39,580 initial 814 00:27:39,580 --> 00:27:40,200 values 815 00:27:40,200 --> 00:27:40,500 are 816 00:27:40,500 --> 00:27:41,480 EAX 817 00:27:41,480 --> 00:27:41,840 4, 818 00:27:42,060 --> 00:27:42,780 ECX 819 00:27:42,780 --> 00:27:43,340 7. 820 00:27:45,060 --> 00:27:45,700 Line 821 00:27:45,700 --> 00:27:45,920 by 822 00:27:45,920 --> 00:27:46,020 line, 823 00:27:46,300 --> 00:27:46,660 instruction 824 00:27:46,660 --> 00:27:47,040 by 825 00:27:47,040 --> 00:27:47,300 instruction 826 00:27:47,300 --> 00:27:48,140 are 827 00:27:48,140 --> 00:27:48,720 executed. 828 00:27:49,080 --> 00:27:49,840 And 829 00:27:49,840 --> 00:27:51,500 our 830 00:27:51,500 --> 00:27:52,040 final 831 00:27:52,040 --> 00:27:52,460 result, 832 00:27:53,360 --> 00:27:54,200 EAX 833 00:27:54,200 --> 00:27:54,960 is 834 00:27:54,960 --> 00:27:55,360 equal 835 00:27:55,360 --> 00:27:56,580 EAX 836 00:27:56,580 --> 00:27:56,780 to 837 00:27:56,780 --> 00:27:57,360 ECX 838 00:27:57,360 --> 00:27:58,620 B11 839 00:27:58,620 --> 00:27:59,240 in 840 00:27:59,240 --> 00:27:59,500 decimal. 841 00:28:06,520 --> 00:28:06,940 I've 842 00:28:06,940 --> 00:28:07,080 also 843 00:28:07,080 --> 00:28:07,460 used 844 00:28:07,460 --> 00:28:08,620 Miasmi. 845 00:28:08,660 --> 00:28:08,920 Miasmi 846 00:28:08,920 --> 00:28:09,280 is 847 00:28:09,280 --> 00:28:09,540 another 848 00:28:09,540 --> 00:28:10,260 amazing 849 00:28:10,260 --> 00:28:10,920 framework 850 00:28:16,040 --> 00:28:16,720 that 851 00:28:16,720 --> 00:28:16,920 works 852 00:28:17,700 --> 00:28:18,040 so 853 00:28:18,040 --> 00:28:18,260 well 854 00:28:18,260 --> 00:28:18,460 in 855 00:28:18,460 --> 00:28:18,740 different 856 00:28:18,740 --> 00:28:19,240 platforms. 857 00:28:20,680 --> 00:28:21,360 Once 858 00:28:21,360 --> 00:28:21,660 again, 859 00:28:21,880 --> 00:28:22,460 I show 860 00:28:22,460 --> 00:28:22,820 you how 861 00:28:22,820 --> 00:28:23,000 to 862 00:28:23,000 --> 00:28:23,680 install 863 00:28:23,680 --> 00:28:24,040 Miasmi 864 00:28:24,040 --> 00:28:24,480 step 865 00:28:24,480 --> 00:28:24,720 by 866 00:28:24,720 --> 00:28:25,060 step 867 00:28:25,060 --> 00:28:25,660 to 868 00:28:25,660 --> 00:28:25,900 help 869 00:28:25,900 --> 00:28:26,080 you. 870 00:28:28,260 --> 00:28:28,940 I 871 00:28:28,940 --> 00:28:29,280 test 872 00:28:29,280 --> 00:28:29,740 Miasmi. 873 00:28:30,720 --> 00:28:31,400 It 874 00:28:31,400 --> 00:28:31,940 generates 875 00:28:31,940 --> 00:28:32,300 a 876 00:28:32,300 --> 00:28:32,920 very 877 00:28:32,920 --> 00:28:33,160 nice 878 00:28:33,160 --> 00:28:33,460 graph. 879 00:28:34,000 --> 00:28:34,680 But 880 00:29:00,160 --> 00:29:01,560 I'm 881 00:29:03,720 --> 00:29:05,120 you 882 00:29:08,040 --> 00:29:09,440 how 883 00:29:09,440 --> 00:29:10,720 works. 884 00:29:11,660 --> 00:29:12,160 So 885 00:29:12,160 --> 00:29:12,220 let's 886 00:29:12,220 --> 00:29:12,280 works. 887 00:29:12,280 --> 00:29:13,520 let's 888 00:29:13,520 --> 00:29:15,720 see 889 00:29:15,720 --> 00:29:15,740 how 890 00:29:15,740 --> 00:29:15,820 it 891 00:29:15,820 --> 00:29:15,840 works. 892 00:29:15,840 --> 00:29:15,940 break 893 00:29:15,940 --> 00:29:16,260 point 894 00:29:16,260 --> 00:29:17,600 here. 895 00:29:19,320 --> 00:29:20,160 Once 896 00:29:20,160 --> 00:29:20,340 I 897 00:29:20,340 --> 00:29:20,520 run, 898 00:29:23,140 --> 00:29:23,980 we 899 00:29:23,980 --> 00:29:24,240 have 900 00:29:24,240 --> 00:29:24,480 our 901 00:29:24,480 --> 00:29:25,160 code 902 00:29:25,160 --> 00:29:25,940 disassembled. 903 00:29:28,980 --> 00:29:29,820 Each 904 00:29:29,820 --> 00:29:30,500 instructions 905 00:29:30,500 --> 00:29:30,880 are 906 00:29:30,880 --> 00:29:31,380 executed 907 00:29:31,380 --> 00:29:31,900 line 908 00:29:31,900 --> 00:29:32,200 by 909 00:29:32,200 --> 00:29:32,480 line. 910 00:29:32,800 --> 00:29:33,380 And 911 00:29:33,380 --> 00:29:33,840 finally, 912 00:29:33,960 --> 00:29:34,460 I 913 00:29:34,460 --> 00:29:34,800 have 914 00:29:34,800 --> 00:29:35,140 our 915 00:29:36,640 --> 00:29:37,480 numerical 916 00:29:37,480 --> 00:29:38,520 result 917 00:29:38,520 --> 00:29:39,160 here. 918 00:29:45,840 --> 00:29:46,040 This is 919 00:29:48,760 --> 00:29:49,120 Additionally, 920 00:29:50,640 --> 00:29:51,360 I 921 00:29:51,360 --> 00:29:51,620 also 922 00:29:51,620 --> 00:29:51,820 have 923 00:29:51,820 --> 00:29:52,060 our 924 00:29:52,060 --> 00:29:52,420 program 925 00:29:52,420 --> 00:29:52,600 use 926 00:29:52,600 --> 00:29:53,500 symbolic 927 00:29:53,500 --> 00:29:53,920 execution. 928 00:29:57,400 --> 00:29:58,120 Almost 929 00:29:58,120 --> 00:29:58,320 the 930 00:29:58,320 --> 00:29:58,620 same. 931 00:29:58,820 --> 00:29:59,540 However, 932 00:30:00,360 --> 00:30:01,080 the 933 00:30:01,080 --> 00:30:01,780 only 934 00:30:01,780 --> 00:30:02,160 change 935 00:30:02,160 --> 00:30:02,740 is 936 00:30:02,740 --> 00:30:03,180 at 937 00:30:03,180 --> 00:30:03,540 bottom. 938 00:30:03,820 --> 00:30:04,220 I 939 00:30:04,220 --> 00:30:04,440 use 940 00:30:04,440 --> 00:30:04,680 a 941 00:30:04,680 --> 00:30:05,120 symbolic 942 00:30:05,120 --> 00:30:06,340 execution 943 00:30:06,340 --> 00:30:06,700 engine 944 00:30:06,700 --> 00:30:06,940 here. 945 00:30:10,080 --> 00:30:10,800 I 946 00:30:10,800 --> 00:30:11,100 execute 947 00:30:11,100 --> 00:30:11,780 our 948 00:30:11,780 --> 00:30:12,200 program 949 00:30:12,200 --> 00:30:13,500 once 950 00:30:13,500 --> 00:30:14,700 more. 951 00:30:15,680 --> 00:30:16,580 Instruction 952 00:30:16,580 --> 00:30:16,840 by 953 00:30:16,840 --> 00:30:17,040 instruction. 954 00:30:18,760 --> 00:30:19,660 And 955 00:30:20,800 --> 00:30:21,340 finally, 956 00:30:21,500 --> 00:30:22,280 I 957 00:30:22,280 --> 00:30:22,560 have 958 00:30:22,560 --> 00:30:22,760 the 959 00:30:25,020 --> 00:30:25,920 EAX 960 00:30:25,920 --> 00:30:26,500 is 961 00:30:26,500 --> 00:30:27,300 equal 962 00:30:27,300 --> 00:30:27,580 to 963 00:30:27,580 --> 00:30:28,300 EAX 964 00:30:28,300 --> 00:30:28,620 initial 965 00:30:28,620 --> 00:30:29,680 plus 966 00:30:29,680 --> 00:30:31,260 ECX 967 00:30:31,260 --> 00:30:31,580 initial. 968 00:30:31,960 --> 00:30:32,600 As 969 00:30:32,600 --> 00:30:32,980 you see, 970 00:30:33,080 --> 00:30:33,620 I'm 971 00:30:33,620 --> 00:30:33,840 able 972 00:30:33,840 --> 00:30:34,100 to 973 00:30:34,100 --> 00:30:35,120 a 974 00:30:35,120 --> 00:30:35,280 very 975 00:30:36,930 --> 00:30:37,380 simple 976 00:30:37,380 --> 00:30:38,380 code by 977 00:30:38,380 --> 00:30:38,620 using 978 00:30:38,620 --> 00:30:39,000 different 979 00:30:39,000 --> 00:30:39,520 platforms, 980 00:30:39,920 --> 00:30:40,700 by 981 00:30:40,700 --> 00:30:40,920 using 982 00:30:40,920 --> 00:30:41,300 different 983 00:30:41,300 --> 00:30:42,600 frameworks. 984 00:30:45,900 --> 00:30:46,800 I've 985 00:30:46,800 --> 00:30:46,960 also 986 00:30:46,960 --> 00:30:47,400 used 987 00:30:47,400 --> 00:30:48,200 Triton. 988 00:30:48,380 --> 00:30:48,660 Triton 989 00:30:48,660 --> 00:30:48,880 has 990 00:30:48,880 --> 00:30:49,160 another 991 00:30:49,160 --> 00:30:49,660 very 992 00:30:49,660 --> 00:30:50,060 interesting 993 00:30:50,060 --> 00:30:50,520 platform. 994 00:30:51,980 --> 00:30:52,880 In 995 00:30:52,880 --> 00:30:53,020 this 996 00:30:53,020 --> 00:30:53,260 case, 997 00:30:53,420 --> 00:30:54,020 Triton 998 00:30:54,020 --> 00:30:54,380 supports 999 00:30:55,940 --> 00:30:56,840 X86 1000 00:30:56,840 --> 00:30:57,560 and 1001 00:30:57,560 --> 00:30:58,800 X64 1002 00:30:59,920 --> 00:31:00,800 architectures. 1003 00:31:02,640 --> 00:31:03,520 Triton 1004 00:31:03,520 --> 00:31:03,720 supports 1005 00:31:03,720 --> 00:31:04,460 symbolic 1006 00:31:04,460 --> 00:31:05,000 execution. 1007 00:31:05,340 --> 00:31:05,860 In 1008 00:31:05,860 --> 00:31:06,020 this 1009 00:31:06,020 --> 00:31:06,320 case, 1010 00:31:06,340 --> 00:31:07,060 I'm 1011 00:31:07,060 --> 00:31:08,320 able 1012 00:31:08,320 --> 00:31:08,680 to 1013 00:31:08,680 --> 00:31:10,160 emulate 1014 00:31:10,160 --> 00:31:10,780 only 1015 00:31:10,780 --> 00:31:11,320 part 1016 00:31:11,320 --> 00:31:11,600 of 1017 00:31:11,600 --> 00:31:11,840 my 1018 00:31:11,840 --> 00:31:12,140 program. 1019 00:31:13,220 --> 00:31:14,100 But 1020 00:31:14,100 --> 00:31:14,460 I 1021 00:31:14,460 --> 00:31:14,820 can 1022 00:31:14,820 --> 00:31:16,260 use 1023 00:31:16,260 --> 00:31:16,620 the 1024 00:31:16,620 --> 00:31:16,840 concrete 1025 00:31:16,840 --> 00:31:18,120 execution 1026 00:31:18,120 --> 00:31:18,720 to 1027 00:31:18,720 --> 00:31:19,620 analyze 1028 00:31:19,620 --> 00:31:20,400 the whole 1029 00:31:20,400 --> 00:31:20,740 program. 1030 00:31:22,220 --> 00:31:22,860 Once 1031 00:31:22,860 --> 00:31:23,160 again, 1032 00:31:23,340 --> 00:31:24,100 I'll 1033 00:31:24,100 --> 00:31:24,440 show you 1034 00:31:24,440 --> 00:31:24,940 how to 1035 00:31:24,940 --> 00:31:25,460 install 1036 00:31:25,460 --> 00:31:25,860 Triton. 1037 00:31:27,540 --> 00:31:28,180 In 1038 00:31:28,180 --> 00:31:28,720 this case, 1039 00:31:28,740 --> 00:31:29,000 without 1040 00:31:29,000 --> 00:31:29,400 using 1041 00:31:29,400 --> 00:31:29,860 PIN 1042 00:31:29,860 --> 00:31:30,240 from 1043 00:31:30,240 --> 00:31:30,500 Intel. 1044 00:31:31,040 --> 00:31:31,680 In 1045 00:31:31,680 --> 00:31:31,880 the 1046 00:31:31,880 --> 00:31:32,360 next 1047 00:31:32,360 --> 00:31:32,640 slide, 1048 00:31:32,900 --> 00:31:33,540 using 1049 00:31:33,540 --> 00:31:33,960 PIN 1050 00:31:33,960 --> 00:31:34,340 from 1051 00:31:34,340 --> 00:31:34,580 Intel. 1052 00:31:35,760 --> 00:31:36,400 Step 1053 00:31:36,400 --> 00:31:36,680 by 1054 00:31:36,680 --> 00:31:36,900 step, 1055 00:31:37,900 --> 00:31:38,540 it's 1056 00:31:38,540 --> 00:31:38,800 working. 1057 00:31:40,640 --> 00:31:41,440 I 1058 00:31:41,440 --> 00:31:42,220 wrote a 1059 00:31:42,220 --> 00:31:42,600 very 1060 00:31:42,600 --> 00:31:43,000 simple 1061 00:31:43,000 --> 00:31:44,180 program 1062 00:31:44,180 --> 00:31:44,500 in 1063 00:31:44,500 --> 00:31:44,920 Python. 1064 00:31:45,160 --> 00:31:45,720 I 1065 00:31:45,720 --> 00:31:46,000 start 1066 00:31:46,000 --> 00:31:46,460 our 1067 00:31:48,440 --> 00:31:49,240 code 1068 00:31:49,240 --> 00:31:49,580 here 1069 00:31:51,700 --> 00:31:52,500 using 1070 00:31:52,500 --> 00:31:52,940 X 1071 00:31:52,940 --> 00:31:53,360 decimal. 1072 00:31:56,640 --> 00:31:57,040 I 1073 00:31:57,440 --> 00:31:57,660 try 1074 00:31:57,660 --> 00:31:57,940 to 1075 00:31:57,940 --> 00:31:58,340 comment 1076 00:31:58,340 --> 00:31:58,940 again 1077 00:31:58,940 --> 00:31:59,480 line 1078 00:31:59,480 --> 00:31:59,700 by 1079 00:31:59,700 --> 00:32:00,000 line, 1080 00:32:00,100 --> 00:32:00,320 block 1081 00:32:00,320 --> 00:32:00,600 by 1082 00:32:00,600 --> 00:32:00,920 block 1083 00:32:00,920 --> 00:32:01,360 in 1084 00:32:01,360 --> 00:32:01,900 blue 1085 00:32:02,580 --> 00:32:03,560 for help 1086 00:32:03,560 --> 00:32:03,740 you. 1087 00:32:10,070 --> 00:32:10,400 And 1088 00:32:11,250 --> 00:32:11,580 oh, 1089 00:32:11,700 --> 00:32:12,280 here is 1090 00:32:12,280 --> 00:32:12,500 very 1091 00:32:12,500 --> 00:32:12,760 interesting 1092 00:32:12,760 --> 00:32:13,200 because 1093 00:32:13,200 --> 00:32:14,440 some people 1094 00:32:14,440 --> 00:32:14,760 don't 1095 00:32:14,760 --> 00:32:14,920 know 1096 00:32:14,920 --> 00:32:15,380 how to 1097 00:32:15,380 --> 00:32:15,760 convert 1098 00:32:15,760 --> 00:32:16,380 from 1099 00:32:16,380 --> 00:32:16,820 opcode 1100 00:32:16,820 --> 00:32:17,680 to 1101 00:32:17,680 --> 00:32:18,440 Xcode. 1102 00:32:18,660 --> 00:32:19,380 So I 1103 00:32:19,380 --> 00:32:20,000 show you 1104 00:32:20,000 --> 00:32:20,960 how to 1105 00:32:20,960 --> 00:32:21,440 do that 1106 00:32:21,440 --> 00:32:22,540 using 1107 00:32:22,540 --> 00:32:22,820 a 1108 00:32:23,460 --> 00:32:23,740 RASM 1109 00:32:23,740 --> 00:32:24,340 from 1110 00:32:24,340 --> 00:32:24,780 RADAR. 1111 00:32:25,460 --> 00:32:26,020 Of 1112 00:32:26,820 --> 00:32:27,380 course, 1113 00:32:27,400 --> 00:32:28,080 you can 1114 00:32:28,080 --> 00:32:28,520 use 1115 00:32:28,520 --> 00:32:28,760 either 1116 00:32:28,760 --> 00:32:29,140 PRO, 1117 00:32:29,320 --> 00:32:29,900 GIDRA, 1118 00:32:29,980 --> 00:32:30,280 and so 1119 00:32:30,280 --> 00:32:30,700 on to 1120 00:32:30,700 --> 00:32:30,860 do 1121 00:32:30,860 --> 00:32:31,060 that, 1122 00:32:31,180 --> 00:32:32,180 but I 1123 00:32:32,180 --> 00:32:32,620 show you 1124 00:32:32,620 --> 00:32:33,680 how to 1125 00:32:33,680 --> 00:32:33,840 do 1126 00:32:33,840 --> 00:32:34,000 that 1127 00:32:34,000 --> 00:32:34,560 using 1128 00:32:35,920 --> 00:32:36,480 RADAR, 1129 00:32:37,120 --> 00:32:37,680 RASM. 1130 00:32:39,520 --> 00:32:40,640 So I 1131 00:32:40,640 --> 00:32:41,040 executed 1132 00:32:41,040 --> 00:32:41,500 our 1133 00:32:42,100 --> 00:32:42,660 Python 1134 00:32:42,660 --> 00:32:43,020 program 1135 00:32:43,020 --> 00:32:43,960 using 1136 00:32:43,960 --> 00:32:44,660 Triton, 1137 00:32:44,820 --> 00:32:45,360 and 1138 00:32:45,960 --> 00:32:46,660 I 1139 00:32:46,660 --> 00:32:47,160 was able 1140 00:32:47,160 --> 00:32:47,420 to 1141 00:32:47,420 --> 00:32:48,640 symbolically 1142 00:32:48,640 --> 00:32:49,800 solve 1143 00:32:49,800 --> 00:32:50,240 our 1144 00:32:50,240 --> 00:32:50,820 problem. 1145 00:32:51,120 --> 00:32:52,400 Once again, 1146 00:32:52,600 --> 00:32:53,040 all 1147 00:32:53,040 --> 00:32:53,720 instructions 1148 00:32:53,720 --> 00:32:54,540 are shown. 1149 00:32:56,540 --> 00:32:57,540 And 1150 00:32:57,540 --> 00:32:58,600 finally, 1151 00:32:58,780 --> 00:32:59,500 I 1152 00:32:59,500 --> 00:32:59,740 know 1153 00:32:59,740 --> 00:33:00,060 that 1154 00:33:00,060 --> 00:33:00,980 all 1155 00:33:00,980 --> 00:33:02,380 the 1156 00:33:02,380 --> 00:33:02,880 opcode 1157 00:33:02,880 --> 00:33:03,600 is 1158 00:33:03,600 --> 00:33:04,320 equivalent 1159 00:33:04,320 --> 00:33:04,600 to 1160 00:33:04,600 --> 00:33:05,220 a 1161 00:33:05,220 --> 00:33:05,520 simple 1162 00:33:05,520 --> 00:33:06,080 add 1163 00:33:06,080 --> 00:33:06,460 operation. 1164 00:33:08,440 --> 00:33:09,440 I 1165 00:33:09,440 --> 00:33:09,900 try to 1166 00:33:09,900 --> 00:33:10,320 solve 1167 00:33:10,320 --> 00:33:10,460 it 1168 00:33:10,460 --> 00:33:11,600 using 1169 00:33:11,600 --> 00:33:11,940 a 1170 00:33:13,240 --> 00:33:13,960 numerical 1171 00:33:13,960 --> 00:33:14,940 approach 1172 00:33:14,940 --> 00:33:16,300 using 1173 00:33:16,300 --> 00:33:16,540 the 1174 00:33:16,540 --> 00:33:16,900 same 1175 00:33:16,900 --> 00:33:17,740 Triton 1176 00:33:17,740 --> 00:33:18,420 framework. 1177 00:33:20,220 --> 00:33:20,940 Sorry. 1178 00:33:21,380 --> 00:33:22,100 I 1179 00:33:22,100 --> 00:33:22,340 wrote 1180 00:33:22,340 --> 00:33:23,000 another 1181 00:33:23,000 --> 00:33:23,780 program 1182 00:33:23,780 --> 00:33:24,140 in 1183 00:33:24,140 --> 00:33:24,620 Python. 1184 00:33:27,260 --> 00:33:27,980 I 1185 00:33:27,980 --> 00:33:28,340 inserted 1186 00:33:28,340 --> 00:33:28,540 the 1187 00:33:28,540 --> 00:33:28,860 same 1188 00:33:28,860 --> 00:33:29,120 code 1189 00:33:29,120 --> 00:33:29,380 there, 1190 00:33:29,540 --> 00:33:29,640 the 1191 00:33:29,640 --> 00:33:29,900 same 1192 00:33:29,900 --> 00:33:30,240 opcode 1193 00:33:30,240 --> 00:33:30,800 code 1194 00:33:30,800 --> 00:33:30,920 in 1195 00:33:40,200 --> 00:33:40,960 I set 1196 00:33:40,960 --> 00:33:41,120 up 1197 00:33:41,120 --> 00:33:42,040 the 1198 00:33:42,040 --> 00:33:42,620 initial 1199 00:33:42,620 --> 00:33:43,640 value 1200 00:33:43,640 --> 00:33:44,000 of 1201 00:33:44,000 --> 00:33:44,400 each 1202 00:33:44,400 --> 00:33:45,180 register, 1203 00:33:46,500 --> 00:33:47,500 ESP, 1204 00:33:47,500 --> 00:33:48,260 EBP, 1205 00:33:48,320 --> 00:33:49,140 EAX, 1206 00:33:49,220 --> 00:33:49,720 BX, 1207 00:33:49,860 --> 00:33:50,420 CX, 1208 00:33:50,460 --> 00:33:50,660 DX. 1209 00:33:54,140 --> 00:33:55,140 I 1210 00:33:56,440 --> 00:33:56,980 set 1211 00:33:56,980 --> 00:33:57,180 up 1212 00:33:57,180 --> 00:33:57,380 the 1213 00:33:57,380 --> 00:33:57,820 entry 1214 00:33:57,820 --> 00:33:58,120 point 1215 00:33:59,420 --> 00:34:00,420 address, 1216 00:34:00,920 --> 00:34:01,560 and 1217 00:34:01,560 --> 00:34:03,400 I 1218 00:34:03,400 --> 00:34:03,780 started 1219 00:34:03,780 --> 00:34:03,940 the 1220 00:34:03,940 --> 00:34:04,260 processing. 1221 00:34:06,100 --> 00:34:07,100 Each 1222 00:34:08,180 --> 00:34:08,680 instruction 1223 00:34:10,060 --> 00:34:10,780 is 1224 00:34:10,780 --> 00:34:11,160 executed 1225 00:34:11,160 --> 00:34:12,260 one by 1226 00:34:12,260 --> 00:34:12,500 one. 1227 00:34:12,680 --> 00:34:13,840 And finally, 1228 00:34:13,920 --> 00:34:14,380 at the 1229 00:34:14,380 --> 00:34:14,720 bottom, 1230 00:34:14,800 --> 00:34:15,060 in 1231 00:34:15,060 --> 00:34:16,480 yellow, 1232 00:34:16,720 --> 00:34:17,560 we 1233 00:34:17,560 --> 00:34:17,780 have 1234 00:34:17,780 --> 00:34:17,920 the 1235 00:34:17,920 --> 00:34:18,200 answer. 1236 00:34:21,960 --> 00:34:22,680 We 1237 00:34:22,680 --> 00:34:22,800 can 1238 00:34:22,800 --> 00:34:23,080 use 1239 00:34:23,080 --> 00:34:24,440 hardware 1240 00:34:24,440 --> 00:34:25,580 to 1241 00:34:25,580 --> 00:34:25,920 handle 1242 00:34:25,920 --> 00:34:26,240 our 1243 00:34:26,240 --> 00:34:27,480 problem. 1244 00:34:28,300 --> 00:34:29,020 I 1245 00:34:29,020 --> 00:34:29,600 start 1246 00:34:29,600 --> 00:34:29,880 hardware 1247 00:34:29,880 --> 00:34:30,520 using 1248 00:34:30,520 --> 00:34:31,060 32 1249 00:34:31,060 --> 00:34:31,400 bits. 1250 00:34:32,420 --> 00:34:33,140 I 1251 00:34:33,140 --> 00:34:33,820 enabled 1252 00:34:33,820 --> 00:34:34,280 the 1253 00:34:39,720 --> 00:34:40,520 program. 1254 00:34:40,520 --> 00:34:40,880 As you 1255 00:34:40,880 --> 00:34:41,160 can 1256 00:34:41,160 --> 00:34:41,540 see, 1257 00:34:41,620 --> 00:34:42,660 there are 1258 00:34:42,660 --> 00:34:43,080 many 1259 00:34:43,080 --> 00:34:43,800 ECU 1260 00:34:43,800 --> 00:34:44,060 commands 1261 00:34:44,060 --> 00:34:44,300 here. 1262 00:34:48,420 --> 00:34:49,220 I 1263 00:34:50,360 --> 00:34:50,760 set 1264 00:34:50,760 --> 00:34:51,160 the 1265 00:34:51,160 --> 00:34:51,800 EAX 1266 00:34:51,800 --> 00:34:52,020 to 1267 00:34:52,020 --> 00:34:52,420 7, 1268 00:34:52,620 --> 00:34:53,860 ECX 1269 00:34:53,860 --> 00:34:54,300 to 1270 00:34:54,300 --> 00:34:55,500 2. 1271 00:34:56,760 --> 00:34:57,560 I 1272 00:34:57,560 --> 00:34:57,880 set 1273 00:34:57,880 --> 00:34:58,760 the 1274 00:34:58,760 --> 00:34:59,200 break 1275 00:34:59,200 --> 00:34:59,560 point 1276 00:34:59,560 --> 00:35:00,960 here. 1277 00:35:02,600 --> 00:35:03,400 And 1278 00:35:03,400 --> 00:35:03,800 I 1279 00:35:03,800 --> 00:35:04,240 run 1280 00:35:07,240 --> 00:35:07,640 our 1281 00:35:07,640 --> 00:35:07,900 program. 1282 00:35:08,920 --> 00:35:09,740 As you 1283 00:35:09,740 --> 00:35:10,080 see, 1284 00:35:10,140 --> 00:35:11,220 we 1285 00:35:11,220 --> 00:35:11,520 have 1286 00:35:11,520 --> 00:35:11,740 the 1287 00:35:12,500 --> 00:35:13,180 EAX 1288 00:35:13,180 --> 00:35:13,420 is 1289 00:35:13,420 --> 00:35:13,760 equal 1290 00:35:13,760 --> 00:35:14,780 EAX 1291 00:35:14,780 --> 00:35:14,960 to 1292 00:35:14,960 --> 00:35:15,480 ECX 1293 00:35:15,480 --> 00:35:16,700 9. 1294 00:35:19,320 --> 00:35:20,000 We 1295 00:35:20,000 --> 00:35:20,280 can 1296 00:35:20,280 --> 00:35:21,140 integrate 1297 00:35:21,140 --> 00:35:21,520 hardware 1298 00:35:21,520 --> 00:35:21,980 to 1299 00:35:21,980 --> 00:35:22,540 miasma. 1300 00:35:22,880 --> 00:35:23,080 In 1301 00:35:23,080 --> 00:35:23,240 this 1302 00:35:23,240 --> 00:35:23,700 case, 1303 00:35:23,760 --> 00:35:24,180 the 1304 00:35:24,180 --> 00:35:24,560 miasma 1305 00:35:24,560 --> 00:35:24,920 is 1306 00:35:24,920 --> 00:35:25,100 the 1307 00:35:25,100 --> 00:35:25,500 working 1308 00:35:25,500 --> 00:35:25,840 gene. 1309 00:35:36,340 --> 00:35:37,020 And 1310 00:35:37,020 --> 00:35:37,220 it's 1311 00:35:37,220 --> 00:35:37,720 quite easy 1312 00:35:37,720 --> 00:35:38,080 to do 1313 00:35:38,080 --> 00:35:38,280 that. 1314 00:35:38,480 --> 00:35:39,400 I show 1315 00:35:39,400 --> 00:35:39,760 it here 1316 00:35:39,760 --> 00:35:40,440 step by 1317 00:35:40,440 --> 00:35:40,700 step. 1318 00:35:42,200 --> 00:35:42,940 And 1319 00:35:42,940 --> 00:35:43,340 I 1320 00:35:43,340 --> 00:35:44,780 run 1321 00:35:44,780 --> 00:35:45,380 hardware 1322 00:35:45,380 --> 00:35:45,940 using 1323 00:35:45,940 --> 00:35:46,860 miasma 1324 00:35:46,860 --> 00:35:47,640 integrated. 1325 00:35:48,840 --> 00:35:49,580 As 1326 00:35:49,580 --> 00:35:49,740 you 1327 00:35:49,740 --> 00:35:50,040 see, 1328 00:35:50,080 --> 00:35:50,980 we 1329 00:35:50,980 --> 00:35:51,260 can 1330 00:35:51,260 --> 00:35:51,800 see 1331 00:35:51,800 --> 00:35:52,540 all 1332 00:35:52,540 --> 00:35:53,200 ECU 1333 00:35:53,200 --> 00:35:53,480 commands 1334 00:35:53,480 --> 00:35:53,800 here 1335 00:35:54,640 --> 00:35:55,380 coming 1336 00:35:55,380 --> 00:35:55,740 from 1337 00:35:56,760 --> 00:35:57,500 miasma 1338 00:35:57,500 --> 00:35:58,340 but 1339 00:35:58,340 --> 00:35:58,800 translated 1340 00:35:58,800 --> 00:35:59,160 to 1341 00:36:00,180 --> 00:36:00,600 ECU 1342 00:36:00,600 --> 00:36:00,840 commands 1343 00:36:00,840 --> 00:36:01,140 in 1344 00:36:01,140 --> 00:36:01,340 hardware. 1345 00:36:06,080 --> 00:36:06,500 The 1346 00:36:06,500 --> 00:36:06,840 trace 1347 00:36:06,840 --> 00:36:07,880 is 1348 00:36:07,880 --> 00:36:08,100 an 1349 00:36:10,100 --> 00:36:10,520 outstanding 1350 00:36:10,520 --> 00:36:11,000 tool. 1351 00:36:12,140 --> 00:36:12,560 The 1352 00:36:12,560 --> 00:36:12,940 trace 1353 00:36:14,080 --> 00:36:14,500 was 1354 00:36:14,500 --> 00:36:15,140 introduced 1355 00:36:15,140 --> 00:36:15,560 in 1356 00:36:15,560 --> 00:36:16,620 Solaris 1357 00:36:16,620 --> 00:36:16,740 10, 1358 00:36:17,000 --> 00:36:17,960 15 years 1359 00:36:17,960 --> 00:36:18,200 ago. 1360 00:36:18,760 --> 00:36:19,600 It's 1361 00:36:19,600 --> 00:36:19,700 an 1362 00:36:19,700 --> 00:36:21,040 amazing 1363 00:36:21,040 --> 00:36:21,980 dynamic 1364 00:36:21,980 --> 00:36:22,380 tracing 1365 00:36:22,380 --> 00:36:22,680 tool. 1366 00:36:22,680 --> 00:36:23,640 And 1367 00:36:23,640 --> 00:36:24,420 recently 1368 00:36:24,420 --> 00:36:25,300 the 1369 00:36:25,300 --> 00:36:25,600 trace 1370 00:36:25,600 --> 00:36:26,000 was 1371 00:36:26,000 --> 00:36:26,380 supported 1372 00:36:26,380 --> 00:36:26,580 through 1373 00:36:26,580 --> 00:36:26,940 Windows 1374 00:36:26,940 --> 00:36:27,200 two 1375 00:36:27,200 --> 00:36:27,380 months 1376 00:36:27,380 --> 00:36:27,580 ago. 1377 00:36:31,940 --> 00:36:32,660 Honestly, 1378 00:36:32,940 --> 00:36:33,480 the 1379 00:36:33,480 --> 00:36:33,860 trace 1380 00:36:33,860 --> 00:36:34,100 is 1381 00:36:34,100 --> 00:36:34,300 a 1382 00:36:35,680 --> 00:36:36,400 set 1383 00:36:36,400 --> 00:36:36,640 of 1384 00:36:36,640 --> 00:36:37,300 probes. 1385 00:36:37,900 --> 00:36:38,620 Basically, 1386 00:36:40,020 --> 00:36:40,740 probes 1387 00:36:40,740 --> 00:36:40,940 are 1388 00:36:40,940 --> 00:36:41,340 scattered 1389 00:36:41,340 --> 00:36:42,020 on 1390 00:36:42,020 --> 00:36:42,220 the 1391 00:36:42,220 --> 00:36:42,620 kernel. 1392 00:36:43,220 --> 00:36:43,940 And 1393 00:36:43,940 --> 00:36:44,280 each 1394 00:36:44,280 --> 00:36:44,580 time 1395 00:36:44,580 --> 00:36:44,760 that 1396 00:36:56,100 --> 00:36:56,980 a 1397 00:37:04,240 --> 00:37:05,120 probe 1398 00:37:05,120 --> 00:37:05,260 node, 1399 00:37:05,260 --> 00:37:05,540 it 1400 00:37:05,540 --> 00:37:05,840 will 1401 00:37:05,840 --> 00:37:05,940 very 1402 00:37:05,940 --> 00:37:07,160 unusual 1403 00:37:07,160 --> 00:37:07,720 language, 1404 00:37:08,060 --> 00:37:08,280 D 1405 00:37:08,280 --> 00:37:08,780 language. 1406 00:37:09,260 --> 00:37:10,140 And 1407 00:37:10,140 --> 00:37:10,420 the 1408 00:37:10,420 --> 00:37:11,000 general 1409 00:37:11,000 --> 00:37:11,380 composition, 1410 00:37:11,900 --> 00:37:12,140 the 1411 00:37:12,140 --> 00:37:13,060 general 1412 00:37:14,860 --> 00:37:15,740 format 1413 00:37:22,680 --> 00:37:22,980 name. 1414 00:37:23,740 --> 00:37:24,300 Provider 1415 00:37:24,300 --> 00:37:24,640 is 1416 00:37:24,640 --> 00:37:24,780 the 1417 00:37:24,780 --> 00:37:25,120 library. 1418 00:37:25,500 --> 00:37:26,060 Model 1419 00:37:26,060 --> 00:37:26,480 is 1420 00:37:26,480 --> 00:37:26,680 the 1421 00:37:26,680 --> 00:37:26,940 kernel 1422 00:37:26,940 --> 00:37:27,240 model. 1423 00:37:27,920 --> 00:37:28,480 Function 1424 00:37:28,480 --> 00:37:28,760 is 1425 00:37:28,760 --> 00:37:29,080 the 1426 00:37:29,080 --> 00:37:29,320 system 1427 00:37:29,320 --> 00:37:29,620 call. 1428 00:37:30,160 --> 00:37:30,720 And 1429 00:37:30,720 --> 00:37:31,000 name 1430 00:37:31,000 --> 00:37:31,240 is 1431 00:37:31,240 --> 00:37:31,400 the 1432 00:37:31,400 --> 00:37:31,580 name 1433 00:37:31,580 --> 00:37:31,720 of 1434 00:37:31,720 --> 00:37:31,840 the 1435 00:37:31,840 --> 00:37:32,080 probe. 1436 00:37:35,260 --> 00:37:35,820 I 1437 00:37:35,820 --> 00:37:36,060 show 1438 00:37:36,060 --> 00:37:36,260 you 1439 00:37:36,260 --> 00:37:36,480 how 1440 00:37:36,480 --> 00:37:36,660 to 1441 00:37:36,660 --> 00:37:36,880 install 1442 00:37:36,880 --> 00:37:37,560 the 1443 00:37:37,560 --> 00:37:37,820 trace 1444 00:37:37,820 --> 00:37:38,180 on 1445 00:37:38,180 --> 00:37:38,800 Windows 1446 00:37:38,800 --> 00:37:39,180 10. 1447 00:37:40,420 --> 00:37:41,060 It's 1448 00:37:41,060 --> 00:37:41,620 quite easy 1449 00:37:41,620 --> 00:37:42,060 to do 1450 00:37:42,060 --> 00:37:42,320 that. 1451 00:37:46,800 --> 00:37:47,440 And 1452 00:37:47,440 --> 00:37:47,800 here, 1453 00:37:47,940 --> 00:37:48,860 I show 1454 00:37:48,860 --> 00:37:49,640 some 1455 00:37:49,640 --> 00:37:50,520 commands 1456 00:37:50,520 --> 00:37:51,240 using 1457 00:37:51,240 --> 00:37:51,580 D 1458 00:37:51,580 --> 00:37:51,780 trace. 1459 00:37:52,260 --> 00:37:53,140 I list 1460 00:37:53,140 --> 00:37:53,680 all the 1461 00:37:53,680 --> 00:37:54,120 probes 1462 00:37:54,120 --> 00:37:54,400 using 1463 00:37:54,400 --> 00:37:54,680 D 1464 00:37:54,680 --> 00:37:54,980 trace 1465 00:37:54,980 --> 00:37:55,720 minus 1466 00:37:55,720 --> 00:37:56,160 L. 1467 00:37:58,300 --> 00:37:58,940 I 1468 00:37:58,940 --> 00:37:59,140 list 1469 00:37:59,140 --> 00:38:00,100 all 1470 00:38:09,300 --> 00:38:10,000 the 1471 00:38:14,020 --> 00:38:14,720 probes 1472 00:38:14,720 --> 00:38:15,040 related 1473 00:38:15,040 --> 00:38:15,580 to 1474 00:38:15,580 --> 00:38:16,180 system 1475 00:38:16,180 --> 00:38:16,620 calls. 1476 00:38:16,880 --> 00:38:17,280 In 1477 00:38:17,280 --> 00:38:17,440 this 1478 00:38:17,440 --> 00:38:17,760 case, 1479 00:38:17,900 --> 00:38:18,960 read 1480 00:38:18,960 --> 00:38:19,240 system 1481 00:38:19,240 --> 00:38:19,640 calls, 1482 00:38:19,940 --> 00:38:20,820 write 1483 00:38:20,820 --> 00:38:21,160 system 1484 00:38:21,160 --> 00:38:21,660 calls, 1485 00:38:21,780 --> 00:38:22,620 and 1486 00:38:22,620 --> 00:38:23,380 view 1487 00:38:23,380 --> 00:38:23,660 system 1488 00:38:23,660 --> 00:38:24,000 calls. 1489 00:38:24,260 --> 00:38:24,720 It's 1490 00:38:24,720 --> 00:38:25,340 quite easy 1491 00:38:25,340 --> 00:38:25,660 to do 1492 00:38:25,660 --> 00:38:25,840 that. 1493 00:38:27,620 --> 00:38:28,320 Here's 1494 00:38:28,320 --> 00:38:28,820 a very 1495 00:38:28,820 --> 00:38:29,160 short 1496 00:38:29,160 --> 00:38:29,760 example 1497 00:38:29,760 --> 00:38:30,260 about 1498 00:38:30,260 --> 00:38:30,620 D 1499 00:38:30,620 --> 00:38:31,100 trace. 1500 00:38:32,560 --> 00:38:33,340 In 1501 00:38:33,340 --> 00:38:33,680 this 1502 00:38:33,680 --> 00:38:35,200 case, 1503 00:38:35,340 --> 00:38:35,840 I'm 1504 00:38:35,840 --> 00:38:36,180 counting 1505 00:38:36,180 --> 00:38:37,660 the 1506 00:38:37,660 --> 00:38:38,220 number 1507 00:38:38,220 --> 00:38:38,480 of 1508 00:38:38,480 --> 00:38:39,420 times 1509 00:38:39,420 --> 00:38:39,940 that 1510 00:38:39,940 --> 00:38:40,160 a 1511 00:38:40,160 --> 00:38:40,500 system 1512 00:38:40,500 --> 00:38:40,860 call 1513 00:38:40,860 --> 00:38:41,420 is 1514 00:38:41,420 --> 00:38:41,740 called 1515 00:38:41,740 --> 00:38:43,180 when 1516 00:38:43,180 --> 00:38:43,500 I'm 1517 00:38:43,500 --> 00:38:43,840 using 1518 00:38:43,840 --> 00:38:44,740 Notepad, 1519 00:38:44,860 --> 00:38:44,980 for 1520 00:38:44,980 --> 00:38:45,360 example. 1521 00:38:50,680 --> 00:38:51,460 Another 1522 00:38:51,460 --> 00:38:51,820 very 1523 00:38:51,820 --> 00:38:52,340 interesting 1524 00:38:52,340 --> 00:38:53,640 example, 1525 00:38:55,400 --> 00:38:56,180 I 1526 00:39:00,720 --> 00:39:01,480 run 1527 00:39:04,160 --> 00:39:04,920 this 1528 00:39:04,920 --> 00:39:05,460 very 1529 00:39:05,460 --> 00:39:05,940 simple 1530 00:39:05,940 --> 00:39:06,280 line, 1531 00:39:06,460 --> 00:39:06,800 very 1532 00:39:06,800 --> 00:39:07,180 simple 1533 00:39:07,180 --> 00:39:07,500 command 1534 00:39:07,500 --> 00:39:07,780 using 1535 00:39:07,780 --> 00:39:08,240 D 1536 00:39:08,240 --> 00:39:08,760 trace, 1537 00:39:08,980 --> 00:39:09,860 and I 1538 00:39:09,860 --> 00:39:10,160 could 1539 00:39:11,220 --> 00:39:11,980 get 1540 00:39:11,980 --> 00:39:13,000 the 1541 00:39:13,000 --> 00:39:13,320 running 1542 00:39:13,320 --> 00:39:13,760 process 1543 00:39:13,760 --> 00:39:14,760 on my 1544 00:39:14,760 --> 00:39:15,080 machine. 1545 00:39:16,800 --> 00:39:17,700 This is 1546 00:39:17,700 --> 00:39:17,820 a 1547 00:39:18,880 --> 00:39:19,640 bit 1548 00:39:19,640 --> 00:39:19,920 more 1549 00:39:19,920 --> 00:39:20,540 complicated 1550 00:39:20,540 --> 00:39:20,980 sample. 1551 00:39:22,760 --> 00:39:23,520 In 1552 00:39:23,520 --> 00:39:23,640 this 1553 00:39:23,640 --> 00:39:23,880 case, 1554 00:39:29,840 --> 00:39:30,600 I 1555 00:39:30,600 --> 00:39:31,320 the 1556 00:39:31,320 --> 00:39:31,900 Chrome 1557 00:39:32,640 --> 00:39:33,340 during 1558 00:39:33,340 --> 00:39:34,060 only 1559 00:39:35,080 --> 00:39:35,780 five 1560 00:39:35,780 --> 00:39:36,220 seconds. 1561 00:39:40,430 --> 00:39:40,780 Another 1562 00:39:43,100 --> 00:39:43,800 example 1563 00:39:43,800 --> 00:39:44,320 here, 1564 00:39:44,500 --> 00:39:45,060 I 1565 00:39:45,060 --> 00:39:45,240 will 1566 00:39:45,240 --> 00:39:45,440 list 1567 00:39:45,440 --> 00:39:45,660 the 1568 00:39:45,660 --> 00:39:46,600 number 1569 00:39:46,600 --> 00:39:46,760 of 1570 00:39:46,760 --> 00:39:47,040 times 1571 00:39:47,040 --> 00:39:47,440 that a 1572 00:39:47,440 --> 00:39:47,760 system 1573 00:39:47,760 --> 00:39:48,040 call 1574 00:39:48,040 --> 00:39:48,200 is 1575 00:39:48,200 --> 00:39:48,420 called 1576 00:39:48,420 --> 00:39:49,760 in 1577 00:39:49,760 --> 00:39:50,060 my 1578 00:39:50,060 --> 00:39:50,200 whole 1579 00:39:50,200 --> 00:39:50,540 machine. 1580 00:39:53,680 --> 00:39:54,640 The 1581 00:39:54,640 --> 00:39:54,960 trace 1582 00:39:54,960 --> 00:39:55,800 has a 1583 00:39:55,800 --> 00:39:56,480 very 1584 00:39:57,560 --> 00:39:58,520 interesting 1585 00:39:58,660 --> 00:39:59,140 provider 1586 00:39:59,140 --> 00:39:59,960 named 1587 00:40:00,620 --> 00:40:01,100 Function 1588 00:40:01,100 --> 00:40:01,700 Boundary 1589 00:40:01,700 --> 00:40:02,120 Tracing. 1590 00:40:04,700 --> 00:40:05,660 Using 1591 00:40:05,660 --> 00:40:06,160 Function 1592 00:40:06,160 --> 00:40:06,520 Boundary 1593 00:40:06,520 --> 00:40:06,940 Tracing, 1594 00:40:07,020 --> 00:40:07,380 I'm 1595 00:40:07,380 --> 00:40:07,800 able to 1596 00:40:07,800 --> 00:40:08,360 trace 1597 00:40:08,360 --> 00:40:10,140 the 1598 00:40:10,140 --> 00:40:10,760 system 1599 00:40:10,760 --> 00:40:11,160 calls 1600 00:40:11,160 --> 00:40:11,660 being 1601 00:40:11,660 --> 00:40:12,040 called 1602 00:40:12,040 --> 00:40:12,560 in 1603 00:40:12,560 --> 00:40:13,020 the 1604 00:40:13,020 --> 00:40:13,480 kernel 1605 00:40:13,480 --> 00:40:13,820 end. 1606 00:40:14,100 --> 00:40:14,960 To do 1607 00:40:14,960 --> 00:40:15,800 that, I 1608 00:40:15,800 --> 00:40:16,140 need to 1609 00:40:16,140 --> 00:40:17,540 attach a 1610 00:40:17,540 --> 00:40:17,880 kernel 1611 00:40:17,880 --> 00:40:18,440 debugger 1612 00:40:19,360 --> 00:40:20,040 to 1613 00:40:20,040 --> 00:40:21,480 Windows 10, 1614 00:40:21,720 --> 00:40:22,740 and 1615 00:40:22,740 --> 00:40:23,040 this 1616 00:40:23,040 --> 00:40:23,380 fact 1617 00:40:23,380 --> 00:40:24,040 enable 1618 00:40:24,760 --> 00:40:25,440 Function 1619 00:40:25,440 --> 00:40:25,820 Boundary 1620 00:40:25,820 --> 00:40:26,260 Tracing. 1621 00:40:26,340 --> 00:40:26,620 For 1622 00:40:28,900 --> 00:40:29,580 example, 1623 00:40:29,840 --> 00:40:30,020 in 1624 00:40:30,020 --> 00:40:30,180 this 1625 00:40:30,180 --> 00:40:30,560 case, 1626 00:40:30,620 --> 00:40:30,920 I 1627 00:40:30,920 --> 00:40:31,140 can 1628 00:40:31,140 --> 00:40:31,380 use 1629 00:40:31,380 --> 00:40:31,800 Win 1630 00:40:31,800 --> 00:40:31,900 the 1631 00:40:31,900 --> 00:40:32,080 Bag 1632 00:40:32,080 --> 00:40:32,680 to 1633 00:40:32,680 --> 00:40:32,920 attach 1634 00:40:32,920 --> 00:40:33,660 to 1635 00:40:33,660 --> 00:40:34,360 Windows 10 1636 00:40:34,360 --> 00:40:35,520 and enable 1637 00:40:35,520 --> 00:40:36,360 Function 1638 00:40:36,360 --> 00:40:36,680 Boundary 1639 00:40:36,680 --> 00:40:37,080 Tracing. 1640 00:40:40,300 --> 00:40:41,100 Look at 1641 00:40:41,100 --> 00:40:41,240 that. 1642 00:40:41,460 --> 00:40:41,760 I 1643 00:40:41,760 --> 00:40:41,960 can 1644 00:40:41,960 --> 00:40:42,540 trace 1645 00:40:43,520 --> 00:40:44,200 all 1646 00:40:44,200 --> 00:40:44,660 system 1647 00:40:44,660 --> 00:40:45,000 calls 1648 00:40:45,000 --> 00:40:45,420 related 1649 00:40:45,420 --> 00:40:45,660 to 1650 00:40:45,660 --> 00:40:46,640 NTFS 1651 00:40:48,280 --> 00:40:48,960 for 1652 00:40:48,960 --> 00:40:49,200 the 1653 00:40:49,200 --> 00:40:49,740 WinHard 1654 00:40:49,740 --> 00:40:49,920 program. 1655 00:40:51,000 --> 00:40:51,680 It's 1656 00:40:51,680 --> 00:40:51,880 quite 1657 00:40:51,880 --> 00:40:52,140 easy. 1658 00:40:52,320 --> 00:40:52,680 I've 1659 00:40:52,680 --> 00:40:52,800 been 1660 00:40:52,800 --> 00:40:53,140 using 1661 00:40:53,140 --> 00:40:53,420 that 1662 00:40:54,140 --> 00:40:54,500 to 1663 00:40:54,500 --> 00:40:55,080 analyze 1664 00:40:55,080 --> 00:40:55,400 some 1665 00:40:55,400 --> 00:40:55,660 numbers. 1666 00:40:56,080 --> 00:40:56,800 Of 1667 00:40:56,800 --> 00:40:57,220 course, 1668 00:40:57,280 --> 00:40:57,900 unfortunately, 1669 00:40:58,520 --> 00:40:59,120 the 1670 00:40:59,120 --> 00:40:59,660 trace is 1671 00:40:59,660 --> 00:41:00,140 so new 1672 00:41:00,140 --> 00:41:00,560 on 1673 00:41:00,560 --> 00:41:01,340 Windows, 1674 00:41:01,560 --> 00:41:02,480 and 1675 00:41:02,480 --> 00:41:03,080 some 1676 00:41:03,080 --> 00:41:03,420 problems 1677 00:41:03,420 --> 00:41:03,660 happen. 1678 00:41:04,000 --> 00:41:04,520 In 1679 00:41:04,520 --> 00:41:04,680 my 1680 00:41:04,680 --> 00:41:05,120 case, 1681 00:41:05,160 --> 00:41:05,820 my 1682 00:41:05,820 --> 00:41:06,500 system 1683 00:41:06,500 --> 00:41:06,960 crashed, 1684 00:41:07,240 --> 00:41:08,260 and 1685 00:41:08,260 --> 00:41:08,440 I 1686 00:41:08,440 --> 00:41:08,800 provide 1687 00:41:08,800 --> 00:41:09,160 you 1688 00:41:09,160 --> 00:41:09,640 a 1689 00:41:09,640 --> 00:41:10,700 very 1690 00:41:10,700 --> 00:41:11,040 short 1691 00:41:23,160 --> 00:41:24,060 demo 1692 00:41:24,060 --> 00:41:24,320 the 1693 00:41:24,320 --> 00:41:25,840 main 1694 00:41:25,840 --> 00:41:26,400 model 1695 00:41:26,400 --> 00:41:27,020 of 1696 00:41:27,020 --> 00:41:27,180 the 1697 00:41:27,180 --> 00:41:27,480 trace. 1698 00:41:27,800 --> 00:41:28,360 I 1699 00:41:28,360 --> 00:41:28,660 show 1700 00:41:28,660 --> 00:41:28,860 you 1701 00:41:28,860 --> 00:41:29,400 step 1702 00:41:29,400 --> 00:41:29,660 by 1703 00:41:29,660 --> 00:41:29,960 step 1704 00:41:32,000 --> 00:41:32,900 how 1705 00:41:32,900 --> 00:41:34,200 I 1706 00:41:34,200 --> 00:41:34,760 can 1707 00:41:34,760 --> 00:41:35,320 investigate 1708 00:41:35,320 --> 00:41:35,960 the 1709 00:41:35,960 --> 00:41:36,340 problem. 1710 00:41:36,540 --> 00:41:37,340 And 1711 00:41:37,340 --> 00:41:37,900 finally, 1712 00:41:38,000 --> 00:41:38,460 I 1713 00:41:38,460 --> 00:41:38,800 found 1714 00:41:38,800 --> 00:41:39,120 that 1715 00:41:39,120 --> 00:41:39,680 the 1716 00:41:39,680 --> 00:41:40,120 Gilt 1717 00:41:40,120 --> 00:41:40,560 problem, 1718 00:41:41,620 --> 00:41:42,520 the 1719 00:41:42,520 --> 00:41:42,840 one 1720 00:41:42,840 --> 00:41:43,280 in 1721 00:41:43,280 --> 00:41:43,540 green. 1722 00:41:44,320 --> 00:41:45,340 I didn't 1723 00:41:45,340 --> 00:41:45,600 have 1724 00:41:45,600 --> 00:41:46,340 enough 1725 00:41:46,340 --> 00:41:46,740 time 1726 00:41:46,740 --> 00:41:46,900 to 1727 00:41:46,900 --> 00:41:48,040 notify 1728 00:41:48,040 --> 00:41:48,320 the 1729 00:41:48,320 --> 00:41:48,760 Microsoft, 1730 00:41:49,120 --> 00:41:50,060 but 1731 00:41:52,000 --> 00:41:52,800 that's 1732 00:41:52,800 --> 00:41:52,940 it. 1733 00:41:53,900 --> 00:41:54,700 Finally, 1734 00:41:56,160 --> 00:41:56,960 a 1735 00:41:56,960 --> 00:41:57,260 few 1736 00:41:57,260 --> 00:41:57,440 months 1737 00:41:57,440 --> 00:41:57,700 ago, 1738 00:41:57,880 --> 00:41:59,680 I saw 1739 00:41:59,680 --> 00:42:00,340 a very 1740 00:42:00,340 --> 00:42:00,960 strange, 1741 00:42:01,120 --> 00:42:01,680 very 1742 00:42:01,680 --> 00:42:02,260 strange 1743 00:42:02,260 --> 00:42:03,340 anti-virtual 1744 00:42:03,340 --> 00:42:03,560 machine 1745 00:42:03,560 --> 00:42:04,140 technique 1746 00:42:04,140 --> 00:42:05,280 being 1747 00:42:05,280 --> 00:42:05,540 used 1748 00:42:05,540 --> 00:42:06,320 by 1749 00:42:06,320 --> 00:42:06,720 an 1750 00:42:06,720 --> 00:42:07,380 advanced 1751 00:42:07,380 --> 00:42:07,780 protector. 1752 00:42:15,460 --> 00:42:15,920 Usually, 1753 00:42:16,280 --> 00:42:17,040 most 1754 00:42:17,040 --> 00:42:18,720 mirrors, 1755 00:42:19,060 --> 00:42:19,780 most 1756 00:42:19,780 --> 00:42:20,180 mirror 1757 00:42:20,180 --> 00:42:20,620 samples 1758 00:42:20,620 --> 00:42:22,160 have 1759 00:42:22,160 --> 00:42:22,340 been 1760 00:42:22,340 --> 00:42:22,580 used 1761 00:42:22,580 --> 00:42:23,700 different 1762 00:42:23,700 --> 00:42:25,280 anti-virtual 1763 00:42:25,280 --> 00:42:25,540 machine 1764 00:42:25,540 --> 00:42:26,000 techniques 1765 00:42:26,000 --> 00:42:26,960 to 1766 00:42:26,960 --> 00:42:27,200 detect 1767 00:42:27,200 --> 00:42:28,180 virtual 1768 00:42:28,180 --> 00:42:28,600 machines 1769 00:42:28,600 --> 00:42:29,040 such 1770 00:42:29,040 --> 00:42:29,440 as 1771 00:42:35,540 --> 00:42:35,840 virtual 1772 00:42:35,840 --> 00:42:35,940 to 1773 00:42:35,940 --> 00:42:36,900 write 1774 00:42:36,900 --> 00:42:38,180 a C-sharp 1775 00:42:38,180 --> 00:42:38,540 program 1776 00:42:38,540 --> 00:42:39,840 to detect 1777 00:42:39,840 --> 00:42:40,460 a virtual 1778 00:42:40,460 --> 00:42:40,820 machine. 1779 00:42:41,160 --> 00:42:41,760 It's 1780 00:42:41,760 --> 00:42:42,320 quite 1781 00:42:42,320 --> 00:42:42,500 easy. 1782 00:42:42,740 --> 00:42:43,260 You 1783 00:42:43,260 --> 00:42:43,800 can use, 1784 00:42:43,820 --> 00:42:43,980 for 1785 00:42:43,980 --> 00:42:44,340 example, 1786 00:42:44,600 --> 00:42:45,540 this class, 1787 00:42:45,720 --> 00:42:46,540 Win32 1788 00:42:47,360 --> 00:42:47,960 BIOS 1789 00:42:47,960 --> 00:42:48,320 Manager 1790 00:42:48,320 --> 00:42:48,720 class, 1791 00:42:48,920 --> 00:42:49,240 to do 1792 00:42:49,240 --> 00:42:49,420 that. 1793 00:42:49,600 --> 00:42:49,880 It's 1794 00:42:49,880 --> 00:42:50,120 quite 1795 00:42:50,120 --> 00:42:50,380 easy. 1796 00:42:50,380 --> 00:42:51,400 And I show 1797 00:42:51,400 --> 00:42:51,840 you here 1798 00:42:52,380 --> 00:42:53,400 a very, 1799 00:42:53,420 --> 00:42:53,760 very, 1800 00:42:53,780 --> 00:42:54,040 very 1801 00:42:55,090 --> 00:42:55,460 simple 1802 00:42:55,460 --> 00:42:56,040 code to 1803 00:42:56,040 --> 00:42:56,400 detect 1804 00:42:56,400 --> 00:42:56,840 virtual 1805 00:42:56,840 --> 00:42:57,260 machines. 1806 00:42:59,280 --> 00:43:00,600 I run 1807 00:43:00,600 --> 00:43:01,040 this code. 1808 00:43:01,640 --> 00:43:02,380 I 1809 00:43:02,380 --> 00:43:03,220 comment 1810 00:43:03,220 --> 00:43:04,480 some lines 1811 00:43:04,480 --> 00:43:05,380 there at 1812 00:43:05,380 --> 00:43:05,660 top. 1813 00:43:06,160 --> 00:43:07,220 I comment 1814 00:43:07,220 --> 00:43:07,400 the 1815 00:43:07,400 --> 00:43:08,260 user 1816 00:43:08,260 --> 00:43:08,560 functions. 1817 00:43:09,400 --> 00:43:10,360 And at 1818 00:43:10,360 --> 00:43:10,800 bottom, 1819 00:43:10,900 --> 00:43:11,780 as you 1820 00:43:11,780 --> 00:43:12,080 see, 1821 00:43:12,220 --> 00:43:13,160 I run 1822 00:43:13,160 --> 00:43:14,520 my program 1823 00:43:15,380 --> 00:43:16,320 in a 1824 00:43:16,320 --> 00:43:16,700 physical 1825 00:43:16,700 --> 00:43:18,480 host in 1826 00:43:18,480 --> 00:43:19,520 a guest 1827 00:43:19,520 --> 00:43:19,820 virtual 1828 00:43:19,820 --> 00:43:20,280 machine. 1829 00:43:20,600 --> 00:43:21,400 As you 1830 00:43:21,400 --> 00:43:21,680 see, 1831 00:43:21,740 --> 00:43:22,380 it's 1832 00:43:22,380 --> 00:43:23,320 quite easy 1833 00:43:23,320 --> 00:43:23,940 to know 1834 00:43:23,940 --> 00:43:26,140 that at 1835 00:43:26,140 --> 00:43:26,520 the right 1836 00:43:26,520 --> 00:43:26,820 side, 1837 00:43:27,000 --> 00:43:27,680 I'm 1838 00:43:27,680 --> 00:43:28,060 using 1839 00:43:28,060 --> 00:43:29,080 a virtual 1840 00:43:29,080 --> 00:43:29,440 machine. 1841 00:43:29,720 --> 00:43:30,300 However, 1842 00:43:30,540 --> 00:43:31,320 it's 1843 00:43:31,320 --> 00:43:31,660 not the 1844 00:43:31,660 --> 00:43:32,080 problem. 1845 00:43:32,220 --> 00:43:32,600 It's 1846 00:43:32,600 --> 00:43:32,860 not the 1847 00:43:32,860 --> 00:43:33,380 question. 1848 00:43:33,840 --> 00:43:34,520 It's 1849 00:43:34,520 --> 00:43:34,840 not the 1850 00:43:34,840 --> 00:43:35,220 issue. 1851 00:43:39,140 --> 00:43:39,820 I 1852 00:43:39,820 --> 00:43:40,180 saw 1853 00:43:40,180 --> 00:43:42,400 a very 1854 00:43:42,400 --> 00:43:42,780 strange 1855 00:43:42,780 --> 00:43:43,160 technique 1856 00:43:44,720 --> 00:43:45,520 using 1857 00:43:45,980 --> 00:43:46,380 temperature. 1858 00:43:49,060 --> 00:43:49,860 I 1859 00:43:49,860 --> 00:43:50,260 thought, 1860 00:43:50,400 --> 00:43:50,680 whoa, 1861 00:43:50,820 --> 00:43:51,900 how can I 1862 00:43:51,900 --> 00:43:52,080 use 1863 00:43:52,080 --> 00:43:52,460 temperature 1864 00:43:52,460 --> 00:43:53,940 to detect 1865 00:43:55,120 --> 00:43:55,920 virtual 1866 00:43:55,920 --> 00:43:56,320 machines? 1867 00:43:56,980 --> 00:43:57,780 I 1868 00:43:57,780 --> 00:43:58,240 try to 1869 00:43:58,240 --> 00:43:58,800 reproduce 1870 00:43:58,800 --> 00:43:59,600 this 1871 00:43:59,600 --> 00:44:00,740 technique 1872 00:44:00,740 --> 00:44:01,440 using 1873 00:44:01,440 --> 00:44:01,680 C 1874 00:44:01,680 --> 00:44:02,000 sharp. 1875 00:44:03,040 --> 00:44:03,840 I 1876 00:44:03,840 --> 00:44:04,380 wrote 1877 00:44:04,380 --> 00:44:05,160 a very 1878 00:44:05,160 --> 00:44:05,680 short 1879 00:44:10,180 --> 00:44:10,300 of 1880 00:44:10,300 --> 00:44:10,940 an 1881 00:44:10,940 --> 00:44:12,180 error at 1882 00:44:12,180 --> 00:44:12,720 bottom. 1883 00:44:13,060 --> 00:44:13,740 No 1884 00:44:13,740 --> 00:44:14,680 reference 1885 00:44:14,680 --> 00:44:15,080 exception. 1886 00:44:16,100 --> 00:44:17,000 And I 1887 00:44:17,000 --> 00:44:17,480 try to 1888 00:44:17,480 --> 00:44:17,980 investigate 1889 00:44:17,980 --> 00:44:18,940 what 1890 00:44:18,940 --> 00:44:19,280 happened. 1891 00:44:22,300 --> 00:44:22,980 I 1892 00:44:22,980 --> 00:44:23,260 used 1893 00:44:23,260 --> 00:44:23,480 the 1894 00:44:23,480 --> 00:44:23,940 Windows 1895 00:44:23,940 --> 00:44:24,320 Management 1896 00:44:24,320 --> 00:44:25,260 Instrumentation 1897 00:44:25,260 --> 00:44:25,920 Tester to 1898 00:44:25,920 --> 00:44:26,360 do that 1899 00:44:27,160 --> 00:44:27,940 at the 1900 00:44:27,940 --> 00:44:28,200 bottom. 1901 00:44:28,320 --> 00:44:28,460 One, 1902 00:44:28,720 --> 00:44:29,140 two, 1903 00:44:29,340 --> 00:44:29,840 three, 1904 00:44:29,940 --> 00:44:30,480 and four. 1905 00:44:32,820 --> 00:44:33,680 And I 1906 00:44:33,680 --> 00:44:33,960 found 1907 00:44:33,960 --> 00:44:35,160 that in 1908 00:44:35,160 --> 00:44:35,620 a virtual 1909 00:44:35,620 --> 00:44:36,000 machine, 1910 00:44:36,760 --> 00:44:37,300 I don't 1911 00:44:37,300 --> 00:44:37,540 have 1912 00:44:37,540 --> 00:44:38,280 temperature 1913 00:44:38,280 --> 00:44:38,960 probes. 1914 00:44:39,760 --> 00:44:40,360 Windows 1915 00:44:41,180 --> 00:44:41,960 does not 1916 00:44:41,960 --> 00:44:42,420 offer me 1917 00:44:42,420 --> 00:44:43,320 any kind 1918 00:44:43,320 --> 00:44:43,640 of 1919 00:44:43,640 --> 00:44:44,420 temperature 1920 00:44:44,420 --> 00:44:44,980 probe. 1921 00:44:47,200 --> 00:44:47,800 I 1922 00:44:47,800 --> 00:44:48,420 highlighted 1923 00:44:48,420 --> 00:44:49,280 it at 1924 00:44:49,280 --> 00:44:49,560 the middle 1925 00:44:49,560 --> 00:44:49,920 of the 1926 00:44:49,920 --> 00:44:50,280 picture. 1927 00:44:51,120 --> 00:44:51,720 So, 1928 00:44:52,640 --> 00:44:53,420 it was 1929 00:44:53,420 --> 00:44:53,800 easy. 1930 00:44:54,520 --> 00:44:55,120 I 1931 00:44:55,120 --> 00:44:55,920 translated 1932 00:44:55,920 --> 00:44:56,160 this 1933 00:44:56,160 --> 00:44:56,500 fact 1934 00:44:56,500 --> 00:44:57,400 to 1935 00:44:57,400 --> 00:44:57,640 my 1936 00:44:57,640 --> 00:44:59,380 program. 1937 00:45:02,230 --> 00:45:03,200 And I 1938 00:45:03,200 --> 00:45:03,940 added 1939 00:45:03,940 --> 00:45:04,580 an 1940 00:45:06,410 --> 00:45:07,040 exception 1941 00:45:07,040 --> 00:45:07,560 handler 1942 00:45:07,560 --> 00:45:10,400 to handle 1943 00:45:10,400 --> 00:45:11,120 these 1944 00:45:11,120 --> 00:45:11,500 strange 1945 00:45:11,500 --> 00:45:12,060 situations. 1946 00:45:14,110 --> 00:45:14,740 Finally, 1947 00:45:16,630 --> 00:45:17,260 my 1948 00:45:17,260 --> 00:45:17,580 program 1949 00:45:17,580 --> 00:45:18,220 was able 1950 00:45:18,220 --> 00:45:19,220 to detect 1951 00:45:19,220 --> 00:45:20,020 using 1952 00:45:20,020 --> 00:45:21,320 temperature 1953 00:45:22,570 --> 00:45:23,200 to 1954 00:45:23,200 --> 00:45:23,520 detect 1955 00:45:23,520 --> 00:45:24,160 physical 1956 00:45:24,160 --> 00:45:24,480 holes 1957 00:45:24,480 --> 00:45:24,900 or 1958 00:45:25,180 --> 00:45:25,640 a 1959 00:45:25,640 --> 00:45:26,040 virtual 1960 00:45:26,040 --> 00:45:27,060 machine. 1961 00:45:28,180 --> 00:45:28,640 I've 1962 00:45:28,640 --> 00:45:29,160 been using 1963 00:45:30,320 --> 00:45:31,240 several 1964 00:45:31,240 --> 00:45:31,720 techniques 1965 00:45:31,720 --> 00:45:32,140 to 1966 00:45:32,140 --> 00:45:32,960 circumvent 1967 00:45:32,960 --> 00:45:33,680 this 1968 00:45:33,680 --> 00:45:34,160 trick. 1969 00:45:34,380 --> 00:45:35,440 But I 1970 00:45:35,440 --> 00:45:35,840 believe that 1971 00:45:35,840 --> 00:45:36,260 you'll 1972 00:45:36,260 --> 00:45:36,580 see 1973 00:45:36,580 --> 00:45:37,460 this 1974 00:45:37,460 --> 00:45:37,900 technique 1975 00:45:37,900 --> 00:45:39,420 more 1976 00:45:39,420 --> 00:45:39,760 often. 1977 00:45:42,580 --> 00:45:43,500 Finally, 1978 00:45:43,640 --> 00:45:44,080 my 1979 00:45:44,080 --> 00:45:44,480 conclusions. 1980 00:45:46,300 --> 00:45:47,220 People 1981 00:45:47,220 --> 00:45:47,680 have 1982 00:45:47,680 --> 00:45:48,720 asked 1983 00:45:48,720 --> 00:45:48,880 me 1984 00:45:48,880 --> 00:45:49,960 how 1985 00:45:49,960 --> 00:45:50,300 to 1986 00:45:50,300 --> 00:45:50,820 bypass 1987 00:45:51,880 --> 00:45:53,100 anti-reverse 1988 00:45:53,100 --> 00:45:53,480 techniques. 1989 00:45:53,980 --> 00:45:54,740 First, 1990 00:45:55,000 --> 00:45:56,060 you need 1991 00:45:56,060 --> 00:45:56,400 to know 1992 00:45:56,960 --> 00:45:57,340 all 1993 00:45:57,340 --> 00:45:57,540 the 1994 00:45:57,540 --> 00:45:58,020 techniques 1995 00:45:58,020 --> 00:45:58,680 being 1996 00:45:58,680 --> 00:45:58,940 used. 1997 00:46:00,160 --> 00:46:00,920 After, 1998 00:46:01,180 --> 00:46:01,800 you try 1999 00:46:01,800 --> 00:46:02,320 to use 2000 00:46:02,320 --> 00:46:02,900 different 2001 00:46:02,900 --> 00:46:03,480 frameworks 2002 00:46:03,480 --> 00:46:04,740 such as 2003 00:46:04,740 --> 00:46:06,060 miasma, 2004 00:46:06,060 --> 00:46:06,620 metasma, 2005 00:46:06,860 --> 00:46:07,240 triton 2006 00:46:07,240 --> 00:46:07,560 and so 2007 00:46:07,560 --> 00:46:07,680 on. 2008 00:46:09,100 --> 00:46:09,860 Emulation 2009 00:46:09,860 --> 00:46:10,380 is a 2010 00:46:10,380 --> 00:46:10,940 good 2011 00:46:10,940 --> 00:46:11,480 alternative, 2012 00:46:11,760 --> 00:46:12,480 of 2013 00:46:12,480 --> 00:46:12,820 course. 2014 00:46:12,820 --> 00:46:14,180 And 2015 00:46:14,180 --> 00:46:14,820 detrace 2016 00:46:15,440 --> 00:46:16,060 is 2017 00:46:16,060 --> 00:46:16,540 a 2018 00:46:19,220 --> 00:46:20,060 new 2019 00:46:20,060 --> 00:46:20,340 old 2020 00:46:20,340 --> 00:46:20,720 tool 2021 00:46:20,720 --> 00:46:21,140 that 2022 00:46:22,080 --> 00:46:22,920 recently 2023 00:46:22,920 --> 00:46:23,360 was 2024 00:46:23,360 --> 00:46:23,780 ported 2025 00:46:23,780 --> 00:46:23,820 to 2026 00:46:23,820 --> 00:46:24,300 Windows 2027 00:46:24,300 --> 00:46:25,400 and I 2028 00:46:25,400 --> 00:46:25,600 have 2029 00:46:25,600 --> 00:46:25,760 been 2030 00:46:25,760 --> 00:46:26,480 using 2031 00:46:26,480 --> 00:46:28,300 it to 2032 00:46:28,300 --> 00:46:28,700 solve 2033 00:46:28,700 --> 00:46:29,040 some 2034 00:46:29,040 --> 00:46:30,520 reversing 2035 00:46:30,520 --> 00:46:30,760 problems. 2036 00:46:32,980 --> 00:46:33,820 I 2037 00:46:33,820 --> 00:46:34,660 would 2038 00:46:34,660 --> 00:46:34,900 like 2039 00:46:34,900 --> 00:46:35,120 to 2040 00:46:35,120 --> 00:46:35,580 thank 2041 00:46:35,580 --> 00:46:35,880 you, 2042 00:46:35,880 --> 00:46:36,240 DEF CON 2043 00:46:36,240 --> 00:46:36,540 staff, 2044 00:46:42,820 --> 00:46:42,900 for 2045 00:46:42,900 --> 00:46:43,580 attending my 2046 00:46:43,580 --> 00:46:43,900 talk. 2047 00:46:44,100 --> 00:46:44,780 Have a 2048 00:46:44,780 --> 00:46:44,940 nice 2049 00:46:44,940 --> 00:46:45,160 day. 2050 00:46:48,980 --> 00:46:49,660 Any 2051 00:46:49,660 --> 00:46:50,140 questions? 2052 00:46:51,080 --> 00:46:51,760 Questions? 2053 00:46:52,960 --> 00:46:53,640 Please. 2054 00:46:55,060 --> 00:46:55,740 Sorry. 2055 00:47:02,780 --> 00:47:03,460 I'm 2056 00:47:03,460 --> 00:47:03,580 just 2057 00:47:03,580 --> 00:47:03,940 wondering 2058 00:47:03,940 --> 00:47:05,060 how 2059 00:47:05,060 --> 00:47:05,420 do 2060 00:47:05,420 --> 00:47:05,540 you 2061 00:47:05,540 --> 00:47:05,840 deal 2062 00:47:05,840 --> 00:47:06,020 with 2063 00:47:06,020 --> 00:47:06,260 those 2064 00:47:06,260 --> 00:47:07,280 programs 2065 00:47:07,280 --> 00:47:07,580 that 2066 00:47:07,580 --> 00:47:07,720 has 2067 00:47:07,720 --> 00:47:07,920 been 2068 00:47:07,920 --> 00:47:08,600 obfuscated 2069 00:47:08,600 --> 00:47:08,900 by 2070 00:47:08,900 --> 00:47:09,760 Timida? 2071 00:47:09,920 --> 00:47:10,500 Sorry? 2072 00:47:10,660 --> 00:47:11,320 By 2073 00:47:11,320 --> 00:47:11,800 Timida. 2074 00:47:11,860 --> 00:47:12,060 Like 2075 00:47:12,060 --> 00:47:12,680 being 2076 00:47:12,680 --> 00:47:13,280 protected. 2077 00:47:13,660 --> 00:47:13,980 I mean, 2078 00:47:13,980 --> 00:47:14,200 the 2079 00:47:14,200 --> 00:47:15,720 virtual 2080 00:47:15,720 --> 00:47:16,680 machine-based 2081 00:47:16,680 --> 00:47:17,380 malware. 2082 00:47:17,880 --> 00:47:18,660 It's 2083 00:47:18,660 --> 00:47:18,840 like 2084 00:47:18,840 --> 00:47:19,320 Timida. 2085 00:47:19,320 --> 00:47:19,840 There are 2086 00:47:19,840 --> 00:47:20,200 different 2087 00:47:20,200 --> 00:47:20,980 tricks to 2088 00:47:20,980 --> 00:47:22,440 prevent 2089 00:47:22,440 --> 00:47:23,420 my 2090 00:47:23,420 --> 00:47:23,680 virtual 2091 00:47:23,680 --> 00:47:24,120 machine 2092 00:47:24,120 --> 00:47:25,000 of 2093 00:47:25,000 --> 00:47:25,320 being 2094 00:47:25,320 --> 00:47:25,880 detected 2095 00:47:25,880 --> 00:47:26,400 by 2096 00:47:26,400 --> 00:47:26,600 a 2097 00:47:26,600 --> 00:47:27,340 malware 2098 00:47:27,340 --> 00:47:27,720 sample. 2099 00:47:28,020 --> 00:47:28,320 Different 2100 00:47:28,320 --> 00:47:28,740 tricks. 2101 00:47:29,000 --> 00:47:29,780 Usually 2102 00:47:29,780 --> 00:47:30,220 I 2103 00:47:30,780 --> 00:47:31,980 try to 2104 00:47:31,980 --> 00:47:32,720 set up 2105 00:47:32,720 --> 00:47:32,900 a 2106 00:47:33,650 --> 00:47:34,040 very 2107 00:47:34,650 --> 00:47:35,040 specific 2108 00:47:35,040 --> 00:47:35,580 virtual 2109 00:47:35,580 --> 00:47:36,080 machine. 2110 00:47:36,520 --> 00:47:37,300 And 2111 00:47:37,300 --> 00:47:37,660 I 2112 00:47:37,660 --> 00:47:38,840 modify 2113 00:47:38,840 --> 00:47:39,820 the 2114 00:47:41,460 --> 00:47:42,240 VMX 2115 00:47:42,550 --> 00:47:42,940 file 2116 00:47:43,490 --> 00:47:43,880 to 2117 00:47:43,880 --> 00:47:44,520 prevent 2118 00:47:44,520 --> 00:47:44,960 being 2119 00:47:44,960 --> 00:47:45,820 detected. 2120 00:47:46,500 --> 00:47:47,380 I mean, 2121 00:47:47,400 --> 00:47:47,980 my question 2122 00:47:47,980 --> 00:47:48,540 is what 2123 00:47:48,540 --> 00:47:48,840 if it 2124 00:47:48,840 --> 00:47:49,340 has been 2125 00:47:49,340 --> 00:47:49,720 protected 2126 00:47:49,720 --> 00:47:50,060 by 2127 00:47:50,060 --> 00:47:50,900 VM-based? 2128 00:47:51,420 --> 00:47:51,540 It's 2129 00:47:51,540 --> 00:47:51,740 like, 2130 00:47:51,760 --> 00:47:52,080 for 2131 00:47:52,080 --> 00:47:52,320 instance, 2132 00:47:52,580 --> 00:47:52,760 like 2133 00:47:52,760 --> 00:47:53,400 Timida. 2134 00:47:54,480 --> 00:47:55,000 Timida? 2135 00:47:55,180 --> 00:47:55,440 Yeah, 2136 00:47:55,460 --> 00:47:55,680 Timida. 2137 00:47:55,780 --> 00:47:55,900 It's 2138 00:47:55,900 --> 00:47:56,080 like, 2139 00:47:56,160 --> 00:47:56,880 it uses 2140 00:47:56,880 --> 00:47:57,660 VM itself. 2141 00:47:58,020 --> 00:47:58,300 Yes, 2142 00:47:58,340 --> 00:47:58,840 I use 2143 00:47:58,840 --> 00:47:59,160 VM, 2144 00:47:59,460 --> 00:47:59,820 yes. 2145 00:47:59,960 --> 00:48:00,960 It uses 2146 00:48:00,960 --> 00:48:01,320 VM. 2147 00:48:01,640 --> 00:48:01,840 I mean, 2148 00:48:01,860 --> 00:48:02,280 Timida, 2149 00:48:02,460 --> 00:48:02,880 the 2150 00:48:02,880 --> 00:48:03,240 malware 2151 00:48:03,240 --> 00:48:03,680 itself 2152 00:48:03,680 --> 00:48:04,320 uses 2153 00:48:04,320 --> 00:48:04,600 VM, 2154 00:48:04,740 --> 00:48:05,040 just like 2155 00:48:05,040 --> 00:48:05,220 a 2156 00:48:05,220 --> 00:48:05,720 Java program. 2157 00:48:05,980 --> 00:48:06,500 And you 2158 00:48:06,500 --> 00:48:06,840 use 2159 00:48:06,840 --> 00:48:07,100 just 2160 00:48:07,100 --> 00:48:07,560 in time 2161 00:48:07,560 --> 00:48:07,860 to, 2162 00:48:07,960 --> 00:48:08,740 just in 2163 00:48:08,740 --> 00:48:09,060 time 2164 00:48:09,060 --> 00:48:09,500 technique 2165 00:48:09,500 --> 00:48:09,880 to 2166 00:48:09,880 --> 00:48:10,280 compile 2167 00:48:10,280 --> 00:48:10,660 it 2168 00:48:10,660 --> 00:48:11,340 into 2169 00:48:11,340 --> 00:48:11,920 bytecode 2170 00:48:11,920 --> 00:48:12,700 and 2171 00:48:12,700 --> 00:48:13,120 execute 2172 00:48:13,120 --> 00:48:13,420 one 2173 00:48:13,420 --> 00:48:13,680 line 2174 00:48:13,680 --> 00:48:14,320 and 2175 00:48:14,320 --> 00:48:14,460 then 2176 00:48:14,460 --> 00:48:14,800 discard 2177 00:48:14,800 --> 00:48:15,780 that 2178 00:48:15,780 --> 00:48:16,300 bytecode 2179 00:48:16,300 --> 00:48:17,160 and 2180 00:48:17,160 --> 00:48:17,260 then 2181 00:48:17,260 --> 00:48:17,720 execute 2182 00:48:17,720 --> 00:48:18,000 the 2183 00:48:18,000 --> 00:48:18,240 next 2184 00:48:18,240 --> 00:48:18,480 line. 2185 00:48:18,720 --> 00:48:19,180 I mean, 2186 00:48:19,180 --> 00:48:19,380 just, 2187 00:48:19,460 --> 00:48:20,680 so it's 2188 00:48:20,680 --> 00:48:20,880 like, 2189 00:48:20,960 --> 00:48:21,380 basically, 2190 00:48:37,100 --> 00:48:37,280 this kind 2191 00:48:37,280 --> 00:48:37,420 of 2192 00:48:37,420 --> 00:48:37,800 technique 2193 00:48:37,800 --> 00:48:38,180 has been 2194 00:48:38,180 --> 00:48:38,360 used 2195 00:48:38,360 --> 00:48:38,560 in 2196 00:48:39,680 --> 00:48:40,100 Timida. 2197 00:48:40,400 --> 00:48:40,820 Myself, 2198 00:48:40,820 --> 00:48:41,040 I was 2199 00:48:41,040 --> 00:48:41,500 trying to 2200 00:48:42,100 --> 00:48:42,520 reverse 2201 00:48:42,520 --> 00:48:42,880 that, 2202 00:48:42,960 --> 00:48:43,240 but I, 2203 00:48:43,680 --> 00:48:44,380 but not 2204 00:48:44,380 --> 00:48:44,620 very 2205 00:48:44,620 --> 00:48:45,080 successful. 2206 00:48:45,280 --> 00:48:45,400 So, 2207 00:48:45,440 --> 00:48:45,640 I was 2208 00:48:46,060 --> 00:48:46,480 wondering 2209 00:48:47,000 --> 00:48:47,420 what's 2210 00:48:47,420 --> 00:48:47,520 your 2211 00:48:47,520 --> 00:48:47,800 take 2212 00:48:47,800 --> 00:48:47,980 on 2213 00:48:47,980 --> 00:48:48,180 that 2214 00:48:48,180 --> 00:48:48,960 thing? 2215 00:48:49,300 --> 00:48:49,740 I have 2216 00:48:49,740 --> 00:48:50,200 so many 2217 00:48:50,200 --> 00:48:50,500 tricks 2218 00:48:50,500 --> 00:48:51,420 to do 2219 00:48:51,420 --> 00:48:51,680 that. 2220 00:49:10,200 --> 00:49:11,400 I can't 2221 00:49:11,400 --> 00:49:11,860 talk about 2222 00:49:11,860 --> 00:49:12,120 that. 2223 00:49:12,520 --> 00:49:13,580 I can't 2224 00:49:13,580 --> 00:49:14,240 explain 2225 00:49:14,240 --> 00:49:14,660 every 2226 00:49:14,660 --> 00:49:14,960 single 2227 00:49:14,960 --> 00:49:15,280 point 2228 00:49:15,280 --> 00:49:15,580 because 2229 00:49:16,100 --> 00:49:16,700 it's 2230 00:49:16,700 --> 00:49:17,060 a very 2231 00:49:17,060 --> 00:49:17,420 long 2232 00:49:17,420 --> 00:49:18,200 topic. 2233 00:49:18,480 --> 00:49:18,820 Very, 2234 00:49:18,900 --> 00:49:19,580 very long 2235 00:49:19,580 --> 00:49:19,760 topic. 2236 00:49:19,760 --> 00:49:19,800 It's 2237 00:49:19,800 --> 00:49:20,340 very complicated 2238 00:49:20,340 --> 00:49:21,160 and I 2239 00:49:21,160 --> 00:49:21,720 don't know 2240 00:49:21,720 --> 00:49:22,680 if there 2241 00:49:22,680 --> 00:49:23,000 is any 2242 00:49:23,000 --> 00:49:23,320 known 2243 00:49:23,320 --> 00:49:23,920 approach. 2244 00:49:24,220 --> 00:49:24,340 So, 2245 00:49:24,380 --> 00:49:24,620 I was 2246 00:49:24,620 --> 00:49:24,760 just 2247 00:49:24,760 --> 00:49:25,040 wondering 2248 00:49:25,040 --> 00:49:25,720 if 2249 00:49:25,720 --> 00:49:25,820 the 2250 00:49:27,260 --> 00:49:27,900 emulation 2251 00:49:27,900 --> 00:49:28,200 approach 2252 00:49:28,200 --> 00:49:28,580 that is 2253 00:49:28,580 --> 00:49:28,800 suggested 2254 00:49:28,800 --> 00:49:29,300 by you 2255 00:49:29,300 --> 00:49:30,440 could work 2256 00:49:30,440 --> 00:49:31,100 for that? 2257 00:49:31,220 --> 00:49:31,360 Better, 2258 00:49:31,400 --> 00:49:31,740 better. 2259 00:49:31,960 --> 00:49:32,860 I think emulation 2260 00:49:32,860 --> 00:49:34,580 is a nice 2261 00:49:34,580 --> 00:49:35,680 approach. 2262 00:49:36,000 --> 00:49:36,480 And it's 2263 00:49:36,480 --> 00:49:37,180 metamorphized 2264 00:49:37,180 --> 00:49:38,040 and sometimes 2265 00:49:38,040 --> 00:49:38,940 you use 2266 00:49:38,940 --> 00:49:39,880 the high 2267 00:49:39,880 --> 00:49:40,200 level 2268 00:49:40,200 --> 00:49:40,540 semantic 2269 00:49:41,540 --> 00:49:42,180 approach 2270 00:49:42,180 --> 00:49:42,580 to, 2271 00:49:42,600 --> 00:49:43,180 I mean, 2272 00:49:43,180 --> 00:49:44,320 because it's 2273 00:49:44,320 --> 00:49:44,800 not neutral 2274 00:49:44,800 --> 00:49:45,560 matching 2275 00:49:45,560 --> 00:49:46,460 byte 2276 00:49:46,460 --> 00:49:46,780 by byte. 2277 00:49:48,000 --> 00:49:48,200 It's 2278 00:49:48,200 --> 00:49:49,120 a little bit 2279 00:49:49,120 --> 00:49:49,760 high level, 2280 00:49:49,800 --> 00:49:50,840 high level 2281 00:49:50,840 --> 00:49:51,460 semantics. 2282 00:49:54,260 --> 00:49:55,620 What I 2283 00:49:55,620 --> 00:49:56,040 mean is 2284 00:49:56,040 --> 00:49:56,580 it's 2285 00:49:56,580 --> 00:49:56,800 basically 2286 00:49:56,800 --> 00:49:57,000 just 2287 00:49:57,000 --> 00:49:57,600 metamorphism. 2288 00:49:57,760 --> 00:49:58,800 And it's 2289 00:49:58,800 --> 00:49:59,420 metamorphism. 2290 00:49:59,500 --> 00:49:59,620 It's 2291 00:49:59,620 --> 00:49:59,980 not just 2292 00:49:59,980 --> 00:50:00,340 simple 2293 00:50:01,140 --> 00:50:01,820 polymorphism. 2294 00:50:02,060 --> 00:50:02,640 It's 2295 00:50:02,640 --> 00:50:03,180 metamorphism. 2296 00:50:03,220 --> 00:50:03,540 The code 2297 00:50:03,540 --> 00:50:04,100 itself just 2298 00:50:04,100 --> 00:50:04,760 changes 2299 00:50:04,760 --> 00:50:05,240 it every 2300 00:50:05,240 --> 00:50:05,520 time. 2301 00:50:05,700 --> 00:50:07,280 And the 2302 00:50:07,280 --> 00:50:08,000 VN 2303 00:50:08,000 --> 00:50:08,580 itself has 2304 00:50:08,580 --> 00:50:08,740 been 2305 00:50:08,740 --> 00:50:09,140 changed. 2306 00:50:09,240 --> 00:50:09,780 Every 2307 00:50:09,780 --> 00:50:10,120 time 2308 00:50:18,200 --> 00:50:18,320 several 2309 00:50:18,320 --> 00:50:18,680 times 2310 00:50:18,680 --> 00:50:20,600 in a 2311 00:50:20,600 --> 00:50:21,500 virtual machine 2312 00:50:21,500 --> 00:50:21,980 for example. 2313 00:50:22,220 --> 00:50:22,780 And I 2314 00:50:22,780 --> 00:50:23,120 try to 2315 00:50:23,120 --> 00:50:23,500 find a 2316 00:50:23,500 --> 00:50:23,800 pattern. 2317 00:50:24,860 --> 00:50:25,680 And I 2318 00:50:25,680 --> 00:50:26,160 try to 2319 00:50:26,160 --> 00:50:27,480 make a 2320 00:50:27,480 --> 00:50:28,340 relation 2321 00:50:28,340 --> 00:50:29,100 between 2322 00:50:29,100 --> 00:50:29,660 this 2323 00:50:29,660 --> 00:50:30,300 pattern. 2324 00:50:30,420 --> 00:50:31,180 So I 2325 00:50:31,180 --> 00:50:31,700 try to 2326 00:50:31,700 --> 00:50:32,720 make a 2327 00:50:32,720 --> 00:50:33,140 table, 2328 00:50:33,280 --> 00:50:34,320 a kind 2329 00:50:34,320 --> 00:50:34,500 of 2330 00:50:34,500 --> 00:50:34,840 mapping 2331 00:50:34,840 --> 00:50:35,280 table 2332 00:50:35,280 --> 00:50:36,060 to 2333 00:50:36,060 --> 00:50:37,080 try 2334 00:50:37,080 --> 00:50:37,280 to 2335 00:50:37,280 --> 00:50:37,700 understand 2336 00:50:37,700 --> 00:50:37,920 better 2337 00:50:37,920 --> 00:50:38,260 how 2338 00:50:38,610 --> 00:50:39,020 the 2339 00:50:39,890 --> 00:50:40,300 virtual 2340 00:50:40,300 --> 00:50:40,660 machine 2341 00:50:40,660 --> 00:50:40,980 from 2342 00:50:40,980 --> 00:50:41,160 the 2343 00:50:41,160 --> 00:50:41,440 media 2344 00:50:41,440 --> 00:50:42,140 works. 2345 00:50:42,960 --> 00:50:43,780 I've 2346 00:50:43,780 --> 00:50:43,900 been 2347 00:50:43,900 --> 00:50:44,700 done 2348 00:50:44,700 --> 00:50:45,740 the same 2349 00:50:45,740 --> 00:50:46,140 approach 2350 00:50:46,140 --> 00:50:46,920 in 2351 00:50:46,920 --> 00:50:47,780 using 2352 00:50:47,780 --> 00:50:48,420 other 2353 00:50:48,420 --> 00:50:49,640 protectors 2354 00:50:49,640 --> 00:50:50,540 such as 2355 00:50:50,540 --> 00:50:51,120 VN 2356 00:50:51,120 --> 00:50:51,400 Protect, 2357 00:50:51,900 --> 00:50:52,860 Archon, 2358 00:50:53,020 --> 00:50:53,960 Agile, 2359 00:50:54,140 --> 00:50:54,480 and so 2360 00:50:54,480 --> 00:50:54,700 on. 2361 00:50:54,820 --> 00:50:55,860 So the 2362 00:50:55,860 --> 00:50:56,380 approach 2363 00:50:56,380 --> 00:50:56,760 is 2364 00:50:56,760 --> 00:50:57,180 almost 2365 00:50:57,180 --> 00:50:57,560 the 2366 00:50:57,560 --> 00:50:57,840 same. 2367 00:50:58,340 --> 00:50:59,220 I try to 2368 00:50:59,220 --> 00:50:59,900 find, 2369 00:51:00,160 --> 00:51:01,540 for example, 2370 00:51:01,540 --> 00:51:02,460 I try to 2371 00:51:05,480 --> 00:51:06,200 split 2372 00:51:06,200 --> 00:51:07,620 my 2373 00:51:07,620 --> 00:51:08,400 instructions 2374 00:51:08,400 --> 00:51:09,280 in classes, 2375 00:51:09,320 --> 00:51:09,940 in different 2376 00:51:09,940 --> 00:51:10,420 classes. 2377 00:51:10,580 --> 00:51:11,060 For example, 2378 00:51:11,080 --> 00:51:12,000 jump instructions, 2379 00:51:12,380 --> 00:51:12,780 conditional 2380 00:51:12,780 --> 00:51:13,480 instructions, 2381 00:51:13,640 --> 00:51:14,280 and so 2382 00:51:14,280 --> 00:51:14,420 on. 2383 00:51:14,900 --> 00:51:16,260 I try to 2384 00:51:16,260 --> 00:51:17,640 map 2385 00:51:18,500 --> 00:51:19,220 some 2386 00:51:20,240 --> 00:51:20,600 Intel 2387 00:51:20,600 --> 00:51:21,420 instructions 2388 00:51:21,420 --> 00:51:22,520 to a 2389 00:51:22,520 --> 00:51:23,400 virtualized 2390 00:51:23,400 --> 00:51:23,800 instruction. 2391 00:51:24,180 --> 00:51:25,060 And I 2392 00:51:25,060 --> 00:51:25,680 make a 2393 00:51:27,560 --> 00:51:28,560 try to 2394 00:51:28,560 --> 00:51:29,640 make a 2395 00:51:29,640 --> 00:51:30,600 relationship 2396 00:51:30,600 --> 00:51:31,300 between 2397 00:51:31,300 --> 00:51:32,340 the 2398 00:51:32,340 --> 00:51:32,800 Intel 2399 00:51:32,800 --> 00:51:33,080 instruction 2400 00:51:33,080 --> 00:51:34,260 to a 2401 00:51:34,260 --> 00:51:35,480 virtualized 2402 00:51:35,480 --> 00:51:35,760 instruction. 2403 00:51:36,100 --> 00:51:36,460 However, 2404 00:51:38,640 --> 00:51:39,440 most 2405 00:51:39,440 --> 00:51:39,840 people 2406 00:51:39,840 --> 00:51:40,140 believe 2407 00:51:40,140 --> 00:51:40,980 that all 2408 00:51:40,980 --> 00:51:41,560 Intel 2409 00:51:41,560 --> 00:51:42,040 instructions 2410 00:51:42,040 --> 00:51:42,440 are 2411 00:51:42,440 --> 00:51:43,300 virtualized. 2412 00:51:43,460 --> 00:51:44,120 It's not true. 2413 00:51:44,260 --> 00:51:44,900 Only a 2414 00:51:44,900 --> 00:51:45,340 few of 2415 00:51:45,340 --> 00:51:45,500 them. 2416 00:51:46,060 --> 00:51:47,140 So I 2417 00:51:47,140 --> 00:51:47,740 try to 2418 00:51:49,860 --> 00:51:50,660 understand 2419 00:51:50,660 --> 00:51:51,880 what 2420 00:51:51,880 --> 00:51:52,440 instructions 2421 00:51:52,440 --> 00:51:52,880 were 2422 00:51:52,880 --> 00:51:54,240 virtualized 2423 00:51:58,140 --> 00:51:58,660 . 2424 00:51:59,220 --> 00:52:00,000 I think 2425 00:52:00,000 --> 00:52:00,640 everything has 2426 00:52:00,640 --> 00:52:01,620 been virtualized 2427 00:52:01,620 --> 00:52:02,180 except for 2428 00:52:02,180 --> 00:52:02,680 virtual machine 2429 00:52:02,680 --> 00:52:02,920 itself. 2430 00:52:03,940 --> 00:52:04,120 I mean, 2431 00:52:04,140 --> 00:52:04,800 virtual machine 2432 00:52:04,800 --> 00:52:05,420 itself has 2433 00:52:05,420 --> 00:52:05,640 been, 2434 00:52:06,320 --> 00:52:07,080 they could 2435 00:52:07,080 --> 00:52:08,240 run several 2436 00:52:08,240 --> 00:52:08,780 levels of 2437 00:52:08,780 --> 00:52:10,120 virtual machine. 2438 00:52:10,260 --> 00:52:10,540 Yes, 2439 00:52:10,580 --> 00:52:10,720 yes. 2440 00:52:13,420 --> 00:52:14,460 I'm just 2441 00:52:14,460 --> 00:52:14,720 wondering, 2442 00:52:14,880 --> 00:52:15,020 I mean, 2443 00:52:15,020 --> 00:52:15,740 to make 2444 00:52:15,740 --> 00:52:16,220 it quick, 2445 00:52:16,760 --> 00:52:17,280 how, 2446 00:52:18,180 --> 00:52:18,700 what's 2447 00:52:18,700 --> 00:52:18,760 your 2448 00:52:18,760 --> 00:52:19,200 successful 2449 00:52:19,200 --> 00:52:19,580 rate? 2450 00:52:19,700 --> 00:52:19,840 I mean, 2451 00:52:19,880 --> 00:52:20,340 have you 2452 00:52:20,340 --> 00:52:20,620 been 2453 00:52:21,340 --> 00:52:21,800 successful 2454 00:52:21,800 --> 00:52:22,260 to 2455 00:52:23,210 --> 00:52:23,540 successfully 2456 00:52:23,540 --> 00:52:24,200 reverse 2457 00:52:24,200 --> 00:52:25,080 every 2458 00:52:25,080 --> 00:52:25,440 of them 2459 00:52:25,440 --> 00:52:25,820 or just 2460 00:52:25,820 --> 00:52:26,520 sometimes 2461 00:52:26,520 --> 00:52:27,000 you just 2462 00:52:27,000 --> 00:52:27,320 also 2463 00:52:27,320 --> 00:52:27,920 have 2464 00:52:27,920 --> 00:52:28,160 some 2465 00:52:28,160 --> 00:52:28,700 difficulties? 2466 00:52:30,740 --> 00:52:31,400 Most 2467 00:52:31,400 --> 00:52:31,700 time 2468 00:52:31,700 --> 00:52:32,020 I have 2469 00:52:32,020 --> 00:52:32,400 problems 2470 00:52:32,400 --> 00:52:32,700 to 2471 00:52:33,620 --> 00:52:34,280 handle. 2472 00:52:37,780 --> 00:52:38,340 I fail 2473 00:52:38,340 --> 00:52:38,700 most 2474 00:52:38,700 --> 00:52:38,860 of 2475 00:52:38,860 --> 00:52:38,920 the 2476 00:52:38,920 --> 00:52:39,160 time. 2477 00:52:39,420 --> 00:52:39,740 Yes, 2478 00:52:39,740 --> 00:52:40,080 but 2479 00:52:40,080 --> 00:52:41,180 most 2480 00:52:41,180 --> 00:52:41,540 time 2481 00:52:41,540 --> 00:52:42,800 I have 2482 00:52:50,440 --> 00:52:51,000 been 2483 00:52:51,000 --> 00:52:51,220 I've 2484 00:52:51,220 --> 00:52:51,360 been 2485 00:52:51,360 --> 00:52:51,500 had 2486 00:52:51,500 --> 00:52:51,780 some 2487 00:52:51,780 --> 00:52:52,200 success 2488 00:52:52,200 --> 00:52:53,060 about 2489 00:52:54,000 --> 00:52:54,560 50%. 2490 00:52:55,160 --> 00:52:55,720 Yes. 2491 00:52:57,760 --> 00:52:58,320 Honestly, 2492 00:52:59,020 --> 00:52:59,440 I would 2493 00:52:59,440 --> 00:52:59,680 like 2494 00:52:59,680 --> 00:52:59,980 to 2495 00:52:59,980 --> 00:53:00,500 have 2496 00:53:01,160 --> 00:53:01,720 100%. 2497 00:53:02,980 --> 00:53:04,100 I hope 2498 00:53:04,100 --> 00:53:04,340 so. 2499 00:53:04,720 --> 00:53:05,420 Thank you 2500 00:53:05,420 --> 00:53:05,540 very 2501 00:53:05,540 --> 00:53:05,760 much. 2502 00:53:06,900 --> 00:53:07,460 Any 2503 00:53:07,460 --> 00:53:07,680 further 2504 00:53:07,680 --> 00:53:08,040 questions? 2505 00:53:11,640 --> 00:53:12,200 No 2506 00:53:12,200 --> 00:53:12,360 more 2507 00:53:12,360 --> 00:53:12,700 questions? 2508 00:53:13,560 --> 00:53:14,120 Thank 2509 00:53:14,120 --> 00:53:14,300 you 2510 00:53:14,300 --> 00:53:14,440 so 2511 00:53:14,440 --> 00:53:14,680 much 2512 00:53:24,080 --> 00:53:25,480 for