1 00:00:00,000 --> 00:00:04,400 All right, my name is Luis. I'm going to be talking about bridging the gap between static 2 00:00:04,400 --> 00:00:11,000 and dynamic reversing. Right here you'll have, this is the URL to my blog and my email address 3 00:00:11,000 --> 00:00:17,480 and all that good stuff. I guess I should say something about how I'm so cool and I could talk 4 00:00:17,480 --> 00:00:29,980 about this shit, but whatever. I'm just going to show the stuff I've been working on. You guys 5 00:00:29,980 --> 00:00:35,740 know a bunch of different things. Mostly right now we have these different sets of tools that we use 6 00:00:35,740 --> 00:00:43,460 for reversing and they don't really work that well together. We have things that are band-aids 7 00:00:43,460 --> 00:00:48,620 that make them work better, but they're still not what we need. What I'm presenting here is still 8 00:00:48,620 --> 00:00:53,460 a band-aid. It's a better band-aid, but I'm going to talk about what we should do in the future and 9 00:00:53,460 --> 00:00:58,100 other avenues that we can take to try to make a more cohesive reverse engineering framework. 10 00:00:59,440 --> 00:01:07,080 First, I'm going to cover some of the current tools we're going to be using. Here's some of the 11 00:01:07,080 --> 00:01:12,560 definitions, at least my definitions. Yours might be different, but static reversing is using a 12 00:01:12,560 --> 00:01:17,420 disassembler, looking at a dead code listing. You can do all kinds of analysis just by looking at 13 00:01:17,420 --> 00:01:23,740 the code that you disassemble. Dynamic reversing is when you use a debugger. You open up something 14 00:01:23,740 --> 00:01:28,080 in OLLI debug, in Win debug, you're able to look at memory. That's dynamic reversing. You can 15 00:01:28,080 --> 00:01:34,160 do dynamic. These two techniques are rarely used together. A lot of times, there's this gap between 16 00:01:34,160 --> 00:01:39,220 information you have in your disassembler and information you have at runtime. Rarely does it get 17 00:01:39,220 --> 00:01:47,600 put together. There are tool additions, enhancements, plug-ins, what have you, that will help the 18 00:01:47,600 --> 00:01:55,600 problem, but it's not a complete solution. Here's some of the current tools that everyone's using. 19 00:01:56,640 --> 00:01:58,060 IDAPRO is pretty much the same thing. IDAPRO is pretty much the same thing. IDAPRO is pretty much 20 00:01:58,060 --> 00:02:04,640 the disassembler. If you want to do reversing, you use IDAPRO. There's other stuff. PVDASM is a small 21 00:02:05,140 --> 00:02:12,780 project. It's a Win32 disassembler. It has a plug-in architecture. It's made by this kid in Indonesia, 22 00:02:13,000 --> 00:02:20,040 I believe. It's free. You should check it out. WDASM used to be the preferred disassembler for cracking 23 00:02:20,040 --> 00:02:24,280 software protection, but it hasn't been maintained in a very long time. 24 00:02:26,820 --> 00:02:28,040 For debuggers, our choice is WDASM. If you want to do reversing, you use IDAPRO. If you want to do 25 00:02:28,040 --> 00:02:28,900 reversing, you use IDAPRO. If you want to do reversing, you use IDAPRO. If you want to do reversing, you use IDAPRO. 26 00:02:28,900 --> 00:02:36,820 Most of us are doing reversing for Win32 because we have no source. Most of this talk is going to be geared 27 00:02:36,820 --> 00:02:42,680 towards that. You can reverse things for Unix-type platforms, but generally, because of open source and 28 00:02:42,680 --> 00:02:50,640 whatnot, we have the source available. WinDebug has gotten way better. It used to suck balls, but now it's 29 00:02:50,640 --> 00:02:57,660 actually usable. It has great support for... Yeah, thank you, Mr. Microsoft man in the front, for making it 30 00:02:57,660 --> 00:03:04,600 better. But it has great support for symbols. You can dump... There's the DT command, so you can dump 31 00:03:05,180 --> 00:03:09,760 complete structures. If you're working in a kernel, you're doing kernel-mode stuff, it's great. 32 00:03:11,100 --> 00:03:18,040 OliDebug is probably the best user-mode debugger available for Win32. It has great plugin architecture. 33 00:03:18,580 --> 00:03:27,420 Lots of plugins are written for it. There's scripting available. For Unix platforms, it's pretty 34 00:03:27,420 --> 00:03:36,200 much GDB. That's it. There's not really that much competition. Yeah, whoo, GDB! There's a couple other 35 00:03:36,200 --> 00:03:40,600 tools. I think there's a TotalView debugger, but those cost a lot of money, and I've never used them. 36 00:03:41,140 --> 00:03:51,400 And Softice is dead now. It got end-of-life. CompuWare killed it, and it's gone. Driver Studio 3.2 was 37 00:03:51,400 --> 00:03:54,740 the last version they're making, and they're not going to provide any more support. 38 00:03:57,420 --> 00:04:02,240 What tool enhancements do we have? First, we have mapfiles. Mapfiles is a text file that 39 00:04:02,240 --> 00:04:08,100 shows the function name, or the public, or the global, and then an offset into the file. 40 00:04:08,420 --> 00:04:14,080 So when you load up a mapfile that got generated from a disassembler into your favorite debugger, 41 00:04:14,180 --> 00:04:18,180 you're going to have symbolic information, which is very important when you're debugging. 42 00:04:18,800 --> 00:04:27,400 I don't want to be using X4032F3. I want to see read stream. I want to see the name 43 00:04:27,420 --> 00:04:31,300 of my functions. I don't want to waste my time trying to write little notes on a piece 44 00:04:31,300 --> 00:04:36,880 of paper and trying to remember all these numbers in my head. Another thing along these 45 00:04:36,880 --> 00:04:42,420 lines is IDA-S, and it's a really cool plug-in for IDA. It takes your IDA database and dumps 46 00:04:42,420 --> 00:04:49,500 it to NMS format files, which is what Softice uses for its symbols. And you run that, then 47 00:04:49,500 --> 00:04:54,780 you load the resulting NMS into Softice, and you have all your symbols. 48 00:04:56,480 --> 00:05:02,100 Another tool enhancement are emulators. Emulators allow you to somewhat simulate the runtime 49 00:05:02,100 --> 00:05:08,320 environment. So you can see how the static disassembly is working within this simulated 50 00:05:08,320 --> 00:05:11,460 environment. It allows you to see a lot of stuff, but still not a complete solution. 51 00:05:13,100 --> 00:05:17,860 So how do we bridge this gap? How do we make these tools work better together as a cohesive 52 00:05:17,860 --> 00:05:23,720 unit? The first step is symbolic information. You want everything, all your annotations 53 00:05:23,720 --> 00:05:24,760 that you do in IDA, you want to have a lot of information. You want to have a lot of 54 00:05:24,760 --> 00:05:30,140 data, you want those in your debugger, and vice versa. But that right there is only one 55 00:05:30,140 --> 00:05:33,800 way of communication. You're taking data from the disassembler and you're bringing 56 00:05:33,800 --> 00:05:34,680 it to the debugger. 57 00:05:35,400 --> 00:05:41,540 Step two is two-way communication. You want to take information from the disassembler 58 00:05:41,540 --> 00:05:46,680 to the debugger and back again. We want to create this loop where we feed information 59 00:05:47,060 --> 00:05:52,100 from runtime that we don't have access to during static analysis. And this is basically 60 00:05:52,100 --> 00:05:54,740 taking the best of both worlds and creating the best of both worlds. And this is basically 61 00:05:54,740 --> 00:06:02,160 integrating the more ideal solution. But still, up to now, these are still Band-Aids. 62 00:06:02,940 --> 00:06:12,340 The third possibility is a common API or interface. How nice would it be if we have one standard 63 00:06:13,100 --> 00:06:20,720 reversing API or interface? This reversing API hooks up to WinDebug, to AaliDebug, to 64 00:06:20,720 --> 00:06:24,720 IDA, to WDASM, whatever you want to use. Let's say I have a database that I want to use, 65 00:06:24,720 --> 00:06:27,320 I don't like IDA, let's say there's another viewer 66 00:06:27,320 --> 00:06:29,080 that I want to use, I use this viewer, 67 00:06:29,260 --> 00:06:31,780 I write a plugin against this standard interface, 68 00:06:32,440 --> 00:06:34,660 and then I could use WinDebug, I could use GDB, 69 00:06:34,880 --> 00:06:37,200 I could use even different processors. 70 00:06:38,160 --> 00:06:40,440 I'm gonna be going over this towards the end of the talk, 71 00:06:40,640 --> 00:06:43,860 and it's what I commonly refer to now 72 00:06:43,860 --> 00:06:45,360 as like a software JTAG. 73 00:06:46,300 --> 00:06:48,380 A JTAG interface and hardware allows, 74 00:06:48,540 --> 00:06:50,240 provides a standard interface for debugging, 75 00:06:50,540 --> 00:06:52,740 and this is what we also need on the software front. 76 00:06:55,240 --> 00:06:59,780 So symbols, elf symbols are easy. 77 00:07:00,500 --> 00:07:05,720 Elf is completely documented, the symbols go into the, 78 00:07:06,560 --> 00:07:08,460 let me get a little drink of water. 79 00:07:08,980 --> 00:07:10,140 It's dry out here, huh? 80 00:07:12,420 --> 00:07:14,000 Yeah, I gotta stay hydrated. 81 00:07:17,980 --> 00:07:18,260 Yeah. 82 00:07:21,360 --> 00:07:22,880 Someone slip some vodka in here? 83 00:07:24,720 --> 00:07:25,340 Yeah, GHB? 84 00:07:29,500 --> 00:07:31,560 This is gonna become a really interesting talk I think. 85 00:07:32,880 --> 00:07:34,940 So okay, elf is not that exciting 86 00:07:34,940 --> 00:07:36,360 because it's all documented, we don't, 87 00:07:37,420 --> 00:07:38,660 we can just look up the spec. 88 00:07:39,520 --> 00:07:43,540 A couple tools have inserted symbols back into elf. 89 00:07:43,820 --> 00:07:47,060 There was Fenris by Michael Zalewski, 90 00:07:47,260 --> 00:07:49,220 I'm sorry to him if I mispronounced his last name. 91 00:07:49,820 --> 00:07:53,500 He had this tool called DRESS, which is the opposite of strip. 92 00:07:53,500 --> 00:07:57,640 strip. When you strip a binary, you take out all the symbol information. What he did is 93 00:07:57,640 --> 00:08:02,720 he created something similar to flirt in IDA which automatically detects library functions 94 00:08:03,270 --> 00:08:09,860 and he would reinsert all library functions for different libc's, glibc's back into else. 95 00:08:11,580 --> 00:08:16,840 But Microsoft uses PDB files. So it's a separate file from the binary that you're trying to 96 00:08:16,840 --> 00:08:24,180 reverse, debug, what have you. And the file format is not documented at all. So how does 97 00:08:24,180 --> 00:08:30,620 Microsoft create these files? There's a DLL that comes with your visual studio, whatever 98 00:08:30,620 --> 00:08:37,520 version you have dating back as far as like I think five. Five is when I think PDB started 99 00:08:37,520 --> 00:08:43,340 coming into play. So there's this file called MSPDB and here it says XX to represent the 100 00:08:43,340 --> 00:08:46,420 version. It could be 60, 70, 71, 80. 101 00:08:46,420 --> 00:08:54,820 So this file generates PDBs. That's how the compiler generates them. And they're read 102 00:08:54,820 --> 00:09:04,620 through the DIA SDK or more commonly the debug help.dll. This is what let's say the determina 103 00:09:04,620 --> 00:09:11,080 PDB plug-in that reads in PDBs for IDA. That's what that uses. That's what PDB plus uses. 104 00:09:11,580 --> 00:09:16,400 That's what WinDebug uses. And debug help.dll is what it uses for IDA. That's what PDB plus uses. That's what WinDebug uses. And debug help.dll is what 105 00:09:16,420 --> 00:09:21,580 you need to get it. It comes with the debugging tools. Microsoft provides the free debugging 106 00:09:21,580 --> 00:09:24,220 tools that come with WinDebug and then it'll be in there. 107 00:09:26,700 --> 00:09:32,620 So there have been a couple of different versions of PDB files. Visual Studio 6.0 came with 108 00:09:32,620 --> 00:09:39,140 PDB 2.0. And then when visualstudio.net came out, they needed to add support for .net and 109 00:09:39,140 --> 00:09:43,760 for all different kinds of types that weren't around before that. So at that point, they 110 00:09:43,760 --> 00:09:48,940 decided to create a new standard which was PDB 7.0 so it would match the DLL version. 111 00:09:49,540 --> 00:10:00,240 So everything from visualstudio.net to visualstudio.net 2003 and 2005 all use this PDB 7.0 file format. 112 00:10:00,820 --> 00:10:05,200 As far as documentation, we've already said that there's no documentation provided by 113 00:10:05,200 --> 00:10:10,520 Microsoft. Some people have done some reversing on the format. There's some information in 114 00:10:10,520 --> 00:10:13,580 the Shriver book. Undocumented Windows 115 00:10:13,760 --> 00:10:20,420 2000 secrets. That covers some of the PDB 2.0 file format, how it's laid out, some of 116 00:10:20,420 --> 00:10:25,260 the stream, how it's split up into different blocks. We're going to look into how the 117 00:10:25,260 --> 00:10:31,820 PDB file is actually like a mini file system. It uses non-contiguous blocks and links them 118 00:10:31,820 --> 00:10:32,260 all together. 119 00:10:35,120 --> 00:10:42,160 So this is why I'm here. I wrote a plugin called PDBgen. This is a plugin for IDA. 120 00:10:43,760 --> 00:10:49,700 What you do is you run this plugin and it's going to take all the function names and 121 00:10:49,700 --> 00:10:53,820 what have you that you've commented in IDA and it's going to make a custom PDB. Then 122 00:10:53,820 --> 00:10:58,280 you take this PDB and you load it into your debugger and you have all your symbol information. 123 00:10:59,720 --> 00:11:04,480 This is like I'm saying is a first step that we need to move some of the reversing forward. 124 00:11:05,060 --> 00:11:12,740 So in order to create this PDBs, I had two choices. One was to reverse the API for the 125 00:11:12,740 --> 00:11:13,740 MSPDB.json. 126 00:11:13,740 --> 00:11:21,180 This is the same way the compiler uses it. So all you have to do is maybe hook this DLL, 127 00:11:21,380 --> 00:11:25,500 see how the compiler is using it, write small programs, run it through, see what's going 128 00:11:25,500 --> 00:11:25,800 on. 129 00:11:26,120 --> 00:11:31,560 The second possibility is to reverse the reader file. If we reverse debug help.dll, 130 00:11:31,800 --> 00:11:36,260 then we're going to know the internals of the file format. The first one only provides 131 00:11:36,260 --> 00:11:43,160 us an API. The second one provides us a complete format. So there's some pros and cons as I 132 00:11:43,160 --> 00:11:43,520 was saying. 133 00:11:43,740 --> 00:11:49,620 The pro for the MSPDB DLL is that it's the same way the compiler does it. If the compiler 134 00:11:49,620 --> 00:11:56,600 changes and we know the API, our PDBs will be the same. This is faster time to product 135 00:11:56,600 --> 00:12:05,800 or to the plugin. Some of the cons is licensing redistribution issues. I can't redistribute 136 00:12:05,800 --> 00:12:10,680 this MSPDB file since part of Visual Studio. So everyone would have to have a copy of Visual 137 00:12:10,680 --> 00:12:13,720 Studio and yeah, there's a lot of restructuring that needs to be done. I'll just give you 138 00:12:13,720 --> 00:12:15,320 Now there's the free version of Express, 139 00:12:15,900 --> 00:12:17,440 so people could get it that way. 140 00:12:19,060 --> 00:12:22,020 But this still isn't really reversing PDBs itself, 141 00:12:22,320 --> 00:12:25,200 it's only reversing the API. 142 00:12:27,960 --> 00:12:31,160 So the reader, debug help.dll. 143 00:12:32,040 --> 00:12:32,920 What are the pros? 144 00:12:33,040 --> 00:12:35,080 The pros is that we're gonna have a complete information 145 00:12:35,080 --> 00:12:35,980 of the file structure. 146 00:12:38,080 --> 00:12:39,680 And if we have this information, 147 00:12:39,880 --> 00:12:41,640 we can make a platform independent reader. 148 00:12:42,160 --> 00:12:47,640 So let's say you want to do analysis on Microsoft binaries, 149 00:12:47,700 --> 00:12:48,440 you're looking for vulnerabilities 150 00:12:48,440 --> 00:12:50,360 and you want to use symbolic information, 151 00:12:50,600 --> 00:12:52,340 you want V tables, you want all this stuff, 152 00:12:52,540 --> 00:12:53,960 but you want to do it in Linux. 153 00:12:54,720 --> 00:12:57,260 Right now there's no way to read PDBs in Linux. 154 00:12:58,480 --> 00:13:02,620 So if I reverse this file, 155 00:13:02,840 --> 00:13:04,820 we could have the entire file format 156 00:13:04,820 --> 00:13:09,180 and it would allow us to not be limited just to Win32, 157 00:13:09,420 --> 00:13:11,520 we could use it in other OSes 158 00:13:11,520 --> 00:13:12,360 and in other platforms. 159 00:13:12,520 --> 00:13:15,600 There could be a Python interface to it, 160 00:13:15,600 --> 00:13:17,620 Ruby interface, whatever the language, 161 00:13:18,000 --> 00:13:20,920 the juror of the day, whatever you want to use. 162 00:13:21,260 --> 00:13:21,980 So what are the cons? 163 00:13:22,240 --> 00:13:23,600 This takes a lot longer. 164 00:13:23,920 --> 00:13:25,960 You're debugging a pretty big DLL, 165 00:13:26,200 --> 00:13:27,280 it's pretty complex, 166 00:13:27,960 --> 00:13:30,840 and one downside is internals might change. 167 00:13:31,080 --> 00:13:32,780 This file comes out every time 168 00:13:32,780 --> 00:13:34,100 there's a new Win debug released. 169 00:13:34,620 --> 00:13:39,100 So far I've been tracking the releases for about two years 170 00:13:39,100 --> 00:13:41,160 and the only thing that's changed are, 171 00:13:41,160 --> 00:13:43,960 they add new APIs, but the file format stays the same. 172 00:13:44,100 --> 00:13:44,920 It's still backwards compatible. 173 00:13:45,400 --> 00:13:48,140 So I don't think that even if we go this route, 174 00:13:48,340 --> 00:13:50,720 that it's going to be a problem. 175 00:13:54,700 --> 00:13:57,400 So I said that PDBs are like file systems, 176 00:13:57,740 --> 00:14:00,560 non-contiguous data, there's different streams, 177 00:14:00,820 --> 00:14:03,340 and I'm not going to bore you with trying to read 178 00:14:03,940 --> 00:14:08,460 hex dumps on some projector from way in the back 179 00:14:08,460 --> 00:14:09,660 and it's not going to make any sense. 180 00:14:09,900 --> 00:14:11,080 So all the internals, 181 00:14:11,160 --> 00:14:12,100 with pictures and whatnot, 182 00:14:12,340 --> 00:14:13,220 is going to be on my blog. 183 00:14:13,860 --> 00:14:15,580 That's going to be posted during this week, 184 00:14:15,720 --> 00:14:16,780 so check that out. 185 00:14:16,880 --> 00:14:20,240 It's dword.blogspot.com 186 00:14:20,240 --> 00:14:22,320 and you can peruse that 187 00:14:23,700 --> 00:14:25,560 and look at all the details there. 188 00:14:27,500 --> 00:14:30,920 So okay, so what is the plugin doing? 189 00:14:31,200 --> 00:14:34,660 Right now it's only doing global functions. 190 00:14:35,020 --> 00:14:37,020 Right now it's not gaining anything more 191 00:14:37,020 --> 00:14:38,820 than what we have in a map file, 192 00:14:38,940 --> 00:14:40,940 but this format is extensible. 193 00:14:41,160 --> 00:14:44,200 Soon I'll be able to do all local names, 194 00:14:44,380 --> 00:14:49,040 more types, we'll be able to read Vtable structures, 195 00:14:49,360 --> 00:14:51,540 classes, there's tons of information there. 196 00:14:52,260 --> 00:14:56,220 The second part of it is I want to release a library, 197 00:14:56,520 --> 00:14:57,520 LGPL library. 198 00:14:58,340 --> 00:15:01,120 Something interesting about the PDB file format 199 00:15:01,120 --> 00:15:04,420 is I don't know if any of you guys do driver development 200 00:15:04,420 --> 00:15:06,620 or read OSR online. 201 00:15:08,160 --> 00:15:10,980 It's kind of like a driver-centric community there. 202 00:15:11,160 --> 00:15:15,820 A few months ago it was reported that the WDK, 203 00:15:16,040 --> 00:15:18,360 which is the new DDK is what they're calling it for Vista, 204 00:15:19,130 --> 00:15:22,940 released I think greater than 5270, 205 00:15:23,120 --> 00:15:27,120 accidentally included private PDBs for the kernel. 206 00:15:28,460 --> 00:15:31,160 Holy shit, so there's all the internal structures 207 00:15:31,160 --> 00:15:31,780 to the kernel. 208 00:15:32,020 --> 00:15:34,640 That got yanked I think within a week, 209 00:15:34,700 --> 00:15:37,160 but it got distributed, it's everywhere. 210 00:15:37,440 --> 00:15:40,700 So if someone wants to know the internal structures 211 00:15:40,700 --> 00:15:42,360 to the new Vista kernel, it's all there. 212 00:15:42,620 --> 00:15:46,680 With a PDB reader library, you don't have to use WinDebug 213 00:15:46,680 --> 00:15:49,300 to dump each structure one by one. 214 00:15:49,600 --> 00:15:53,320 You can grab a PDB and we'll be able to dump entire 215 00:15:53,320 --> 00:15:56,960 structures, all kinds of information for each PDB file. 216 00:15:57,480 --> 00:16:00,860 So I believe it's the kernel and some other stuff, 217 00:16:01,080 --> 00:16:03,960 both for Win32 and for x64. 218 00:16:04,440 --> 00:16:10,480 So if you have that WDK and you wanna let me take a look at it, 219 00:16:11,080 --> 00:16:12,380 I'll be around all weekend. 220 00:16:13,800 --> 00:16:15,760 So yeah, the last thing is a symbol browser. 221 00:16:16,320 --> 00:16:18,840 We wanna be able to look at all information in a PDB 222 00:16:18,840 --> 00:16:22,100 without having to go through a debugger. 223 00:16:22,280 --> 00:16:24,740 Because all we want is the data at this point. 224 00:16:26,520 --> 00:16:30,320 Okay, so that's it about the tools. 225 00:16:30,700 --> 00:16:34,220 Now I wanna talk about where do we go from here? 226 00:16:35,820 --> 00:16:39,380 A lot of this stuff is just like ideas I've been 227 00:16:39,380 --> 00:16:40,380 kicking around in my head. 228 00:16:40,700 --> 00:16:43,400 But it's where I think we could get the most benefit. 229 00:16:43,920 --> 00:16:45,740 First of all, we need two-way communication. 230 00:16:46,220 --> 00:16:48,580 Even like the symbol transfer, like I said, 231 00:16:48,640 --> 00:16:50,600 it's only going from the disassembler to the debugger. 232 00:16:50,880 --> 00:16:52,840 We need to take that, make that a loop. 233 00:16:53,680 --> 00:16:56,520 I wanna see what type of objects are in memory. 234 00:16:56,920 --> 00:17:00,720 I wanna see how things are working and feed that back in. 235 00:17:01,080 --> 00:17:05,620 We could potentially run something in a debugger for a while, 236 00:17:05,700 --> 00:17:08,500 feed different types of input and have that annotate 237 00:17:08,500 --> 00:17:09,220 our disassembly. 238 00:17:10,700 --> 00:17:13,660 And like I said, the step past that is the standard API 239 00:17:13,660 --> 00:17:14,760 and a standard interface. 240 00:17:16,580 --> 00:17:20,300 So one example where this would be useful is C++ reversing. 241 00:17:21,160 --> 00:17:23,640 C++ is a fucking pain in the ass. 242 00:17:23,900 --> 00:17:25,940 You have V tables, you have indirect calls, 243 00:17:26,100 --> 00:17:26,780 you have all this stuff. 244 00:17:27,140 --> 00:17:30,900 So if we use both the static and the runtime and feed it 245 00:17:30,900 --> 00:17:34,280 back and create this constant loop, we can know where 246 00:17:34,280 --> 00:17:36,080 these indirect calls are going. 247 00:17:37,040 --> 00:17:40,680 You just trace it back and we create cross-references of the 248 00:17:40,700 --> 00:17:41,060 methods we'll see. 249 00:17:41,260 --> 00:17:42,280 How do we do this? 250 00:17:43,080 --> 00:17:46,360 So like I said, most of us probably reversing Microsoft stuff. 251 00:17:47,060 --> 00:17:49,220 V tables are listed in the PDB. 252 00:17:49,600 --> 00:17:53,040 So we find a V table for whatever class we're looking for. 253 00:17:53,340 --> 00:17:55,160 Set a breakpoint on every method. 254 00:17:55,800 --> 00:17:56,920 Run it for a while. 255 00:17:57,200 --> 00:17:58,800 You're gonna start hitting these breakpoints. 256 00:17:59,280 --> 00:18:04,240 See where it was called from and backfill the function name, 257 00:18:04,300 --> 00:18:06,560 the method name that is coming from an add across reference. 258 00:18:07,540 --> 00:18:09,820 After you run it for a while, you're gonna have all this 259 00:18:09,820 --> 00:18:10,680 information stored in there. 260 00:18:10,700 --> 00:18:12,300 You're gonna start up about who's calling who. 261 00:18:12,540 --> 00:18:13,680 You're gonna see patterns. 262 00:18:14,260 --> 00:18:15,460 You're gonna see locality. 263 00:18:15,700 --> 00:18:18,340 What functions only call within the same class? 264 00:18:18,560 --> 00:18:19,920 What functions are called outside? 265 00:18:20,240 --> 00:18:22,220 This is how you determine if something's public or if it's 266 00:18:22,220 --> 00:18:22,540 private. 267 00:18:22,900 --> 00:18:25,440 Now we also have protection. 268 00:18:25,900 --> 00:18:29,020 We know how the object is being used. 269 00:18:29,480 --> 00:18:31,860 There's other things that can be done as well. 270 00:18:32,100 --> 00:18:33,680 So here's an example of indirect call. 271 00:18:34,140 --> 00:18:39,280 On the top part, we see EDI has a pointer to a V table. 272 00:18:39,440 --> 00:18:40,600 That's loaded into EAS. 273 00:18:40,600 --> 00:18:40,700 It's called EAS. 274 00:18:40,940 --> 00:18:45,180 The next line where you see EDI be copying into ECX, 275 00:18:45,300 --> 00:18:46,880 ECX is the this pointer. 276 00:18:47,060 --> 00:18:49,180 So if you've done OOP, you know about the this pointer. 277 00:18:49,860 --> 00:18:53,980 The next line, it says call D pointer EAX plus 14 hex. 278 00:18:54,180 --> 00:18:55,820 I have no idea what that is. 279 00:18:56,160 --> 00:18:58,060 I'm looking at dead listing. 280 00:18:58,240 --> 00:18:58,860 I have no idea. 281 00:18:59,440 --> 00:19:02,560 But if we find a V table and we set these breakpoints, 282 00:19:02,640 --> 00:19:03,680 this is what it's gonna look like. 283 00:19:03,860 --> 00:19:07,060 It's gonna be calling object dot method and that's what we want. 284 00:19:07,420 --> 00:19:10,580 And then we don't have unrelated, unrelated, unrelated, 285 00:19:11,440 --> 00:19:12,740 methods being called. 286 00:19:12,940 --> 00:19:15,960 You see, you find a method that you think has a vuln. 287 00:19:16,080 --> 00:19:20,680 You right click on it now or hit X and boom, you have the path. 288 00:19:20,820 --> 00:19:22,000 Everyone else that's calling it. 289 00:19:22,180 --> 00:19:24,760 And you can backtrace to see where user input is coming from. 290 00:19:28,480 --> 00:19:29,800 Here's something else that we need. 291 00:19:29,880 --> 00:19:31,140 We need debugger type info. 292 00:19:31,560 --> 00:19:32,620 OLLI debug is great. 293 00:19:32,800 --> 00:19:36,280 If you have a register, let's say EAX with some value in it and 294 00:19:36,280 --> 00:19:39,400 it happens to contain a string, it dereference it for you. 295 00:19:39,940 --> 00:19:40,560 So you can do that. 296 00:19:40,580 --> 00:19:42,320 You'll see hello world in OLLI debug. 297 00:19:42,620 --> 00:19:43,600 That's really helpful. 298 00:19:43,800 --> 00:19:46,820 That's like, it's a simple thing but it makes great sense. 299 00:19:47,000 --> 00:19:50,720 So why don't we extend this to other more complicated types of objects? 300 00:19:51,200 --> 00:19:55,140 If I see this in EAX, I wanna know that that's my object type. 301 00:19:55,420 --> 00:19:58,740 I wanna know that that's, let's say a stream object or 302 00:19:58,740 --> 00:19:59,600 some other kind of object. 303 00:19:59,700 --> 00:20:01,800 It just makes the, the reversing that much easier. 304 00:20:02,940 --> 00:20:04,340 So how do we go about this? 305 00:20:04,560 --> 00:20:07,140 We can look for constructors and destructors. 306 00:20:07,340 --> 00:20:09,920 We set breakpoints at the exit of constructors. 307 00:20:09,920 --> 00:20:13,380 At the exit of a constructor, you're gonna return the address 308 00:20:13,880 --> 00:20:15,740 of the object in EAX. 309 00:20:16,100 --> 00:20:17,680 So we set these breakpoints and boom. 310 00:20:17,840 --> 00:20:21,200 We know, we know where, we have this memory map 311 00:20:21,200 --> 00:20:22,740 where all the objects are. 312 00:20:23,380 --> 00:20:24,520 So we hold this table. 313 00:20:24,640 --> 00:20:27,780 Then we set a breakpoint in all the destructors at the entry 314 00:20:27,780 --> 00:20:29,840 so we can remove these from our list. 315 00:20:30,540 --> 00:20:33,520 So now we have this big list that tells us 316 00:20:33,520 --> 00:20:35,800 what memory locations are what type of objects. 317 00:20:36,620 --> 00:20:38,880 Now this is the first one I thought of. 318 00:20:38,880 --> 00:20:40,360 And there's, there's some problems with this. 319 00:20:40,460 --> 00:20:42,180 Cause there's constructor chaining. 320 00:20:42,360 --> 00:20:43,780 If you have inheritance, right? 321 00:20:43,900 --> 00:20:46,440 You have a base class and you have another class 322 00:20:46,440 --> 00:20:47,300 inheriting from it. 323 00:20:47,420 --> 00:20:49,500 This constructor's gonna call another constructor. 324 00:20:49,820 --> 00:20:51,920 You also have constructor overloading. 325 00:20:51,960 --> 00:20:55,180 Where you have multiple, multiple constructors per object. 326 00:20:55,440 --> 00:20:57,380 So this, this could get a little confusing. 327 00:20:58,040 --> 00:20:59,600 So there has to be another way. 328 00:21:01,640 --> 00:21:02,400 And there is. 329 00:21:02,520 --> 00:21:03,680 It goes back to the V table. 330 00:21:04,300 --> 00:21:05,760 This, this is what we saw earlier. 331 00:21:05,900 --> 00:21:07,400 This is how we got the V table, right? 332 00:21:07,400 --> 00:21:12,000 The first D word of any object points to the V table. 333 00:21:13,480 --> 00:21:14,920 If it's pointing to the V table, 334 00:21:15,080 --> 00:21:16,560 we know what type of object it is. 335 00:21:16,760 --> 00:21:18,080 So just like a string. 336 00:21:18,220 --> 00:21:22,340 A string, you see the address in the register 337 00:21:22,340 --> 00:21:24,400 and it references it to a string. 338 00:21:24,940 --> 00:21:27,560 So now we'll see an address of an object 339 00:21:27,560 --> 00:21:30,320 and we'll also check if it has a V table. 340 00:21:30,460 --> 00:21:33,060 If it does, we pull that symbol information 341 00:21:33,060 --> 00:21:35,340 and display it right next to the register. 342 00:21:41,040 --> 00:21:42,480 So, inheritance. 343 00:21:44,240 --> 00:21:47,840 Inheritance is where you have some kind of a base class 344 00:21:49,400 --> 00:21:54,840 and then you have other classes that are children 345 00:21:54,840 --> 00:21:56,640 of that parent object. 346 00:21:57,540 --> 00:22:01,260 And what can we do to look at inheritance? 347 00:22:02,400 --> 00:22:04,800 We can look at the constructors. 348 00:22:04,800 --> 00:22:06,760 We can look at constructor chaining, right? 349 00:22:06,760 --> 00:22:10,240 So you have a constructor for a certain type of object 350 00:22:10,240 --> 00:22:13,180 and it's gonna call the constructor for a base class. 351 00:22:13,480 --> 00:22:14,660 We're gonna see these patterns 352 00:22:14,660 --> 00:22:16,580 and we're gonna be able to tell that 353 00:22:16,580 --> 00:22:17,400 there's some kind of relation. 354 00:22:17,560 --> 00:22:19,460 We might not know exactly what's going on 355 00:22:19,460 --> 00:22:21,780 but there's something different 356 00:22:21,780 --> 00:22:23,320 about these types of objects. 357 00:22:24,700 --> 00:22:28,240 Another thing that we can look at is scope. 358 00:22:31,320 --> 00:22:33,280 Certain objects, I mean certain methods 359 00:22:33,280 --> 00:22:36,000 can only be called from certain methods. 360 00:22:36,760 --> 00:22:37,800 For example, privates. 361 00:22:38,460 --> 00:22:42,020 Privates can only be called from within methods 362 00:22:42,020 --> 00:22:44,960 of the same class, whether they be public, protected, 363 00:22:45,340 --> 00:22:48,360 private, they could be from a class below it. 364 00:22:48,780 --> 00:22:51,640 If your method's protected and you're inheriting 365 00:22:51,640 --> 00:22:54,680 from that base class, you can call it from the base 366 00:22:54,680 --> 00:22:56,540 but it can't be called from the outside. 367 00:22:57,020 --> 00:23:00,000 So we have all these cross references already. 368 00:23:00,380 --> 00:23:02,140 Why don't we just start looking at that, 369 00:23:02,280 --> 00:23:05,540 create some kind of graph where we see who's calling what. 370 00:23:07,100 --> 00:23:08,800 From there, we'll be able to determine 371 00:23:09,720 --> 00:23:11,460 whether something's public or it's private. 372 00:23:14,080 --> 00:23:17,960 Not only that, we'll be able to look at some of the other 373 00:23:17,960 --> 00:23:19,300 parts, not just methods. 374 00:23:19,400 --> 00:23:23,940 How about some of the other things inside of the object? 375 00:23:25,120 --> 00:23:27,360 Public, private variables, accessor methods, 376 00:23:27,600 --> 00:23:28,500 all this type of stuff. 377 00:23:28,700 --> 00:23:30,260 We'll be able to see if something's public 378 00:23:30,260 --> 00:23:32,760 and then it's accessing something internally, 379 00:23:33,000 --> 00:23:35,560 we'll be able to see more about how the object is working. 380 00:23:42,160 --> 00:23:44,520 The next thing is pure virtual methods. 381 00:23:44,660 --> 00:23:45,880 You can see these in VTables. 382 00:23:46,640 --> 00:23:51,020 When you look at a VTable for any type of Microsoft DLL, 383 00:23:51,140 --> 00:23:52,440 you'll see something like pure virtual, 384 00:23:52,640 --> 00:23:54,240 I forget the exact name of it, 385 00:23:54,340 --> 00:23:56,120 but I'm sure you've seen it before. 386 00:23:56,540 --> 00:24:00,280 This means that, this is probably like a base class 387 00:24:00,280 --> 00:24:01,720 or something, you cannot call that, 388 00:24:01,960 --> 00:24:04,480 but you'll probably see other objects 389 00:24:04,480 --> 00:24:05,660 that are inheriting from it. 390 00:24:06,300 --> 00:24:06,740 So if you look at a VTable for any type of Microsoft DLL, 391 00:24:07,400 --> 00:24:07,880 you'll see something like this. 392 00:24:07,880 --> 00:24:10,880 Same thing with, this is all going back to VTables. 393 00:24:11,260 --> 00:24:13,820 Basically what we're doing is we're looking at 394 00:24:15,560 --> 00:24:16,980 how C++ works. 395 00:24:17,220 --> 00:24:18,900 We're taking the behavior of it, 396 00:24:19,400 --> 00:24:21,780 creating some kind of a metaphor for it, 397 00:24:21,900 --> 00:24:23,980 and this is how it works. 398 00:24:24,680 --> 00:24:27,620 So we use these metaphors to gather more and more information. 399 00:24:27,820 --> 00:24:28,260 It's all there. 400 00:24:28,540 --> 00:24:30,840 It's just we have to look at it a little bit differently. 401 00:24:31,340 --> 00:24:34,600 So you have different VTables, right? 402 00:24:34,920 --> 00:24:36,080 So let's say, 403 00:24:36,740 --> 00:24:38,200 something inherits from something else, 404 00:24:38,240 --> 00:24:41,220 and it's not a virtual method, 405 00:24:41,500 --> 00:24:43,080 they're gonna call the same method. 406 00:24:43,280 --> 00:24:45,120 All these different objects are gonna call the same method. 407 00:24:45,460 --> 00:24:49,040 They're probably gonna be at the same offset in the VTable, 408 00:24:49,540 --> 00:24:51,360 and it's gonna be pointing to the same method. 409 00:24:53,400 --> 00:24:54,360 So generally, 410 00:24:55,980 --> 00:24:58,940 you're not gonna have a method calling something, 411 00:24:59,640 --> 00:25:01,760 an object's not gonna have the same method 412 00:25:01,760 --> 00:25:03,620 as some other object unless it's related. 413 00:25:03,940 --> 00:25:05,480 It's not gonna be pointing to the same thing. 414 00:25:05,480 --> 00:25:07,220 So that's another way to determine 415 00:25:07,220 --> 00:25:09,240 that there's some kind of relationship created there. 416 00:25:09,820 --> 00:25:12,020 A lot of this stuff can probably be graphed out. 417 00:25:12,920 --> 00:25:14,640 Some kind of analysis can be run. 418 00:25:15,000 --> 00:25:17,420 We might be able to even have this all automated. 419 00:25:19,020 --> 00:25:20,160 So as far as implementation, 420 00:25:20,680 --> 00:25:21,700 I started looking at 421 00:25:24,520 --> 00:25:25,720 Python for IDA, 422 00:25:25,740 --> 00:25:27,000 IDA Python, whatever it's called, 423 00:25:27,180 --> 00:25:29,340 and there's some limitations 424 00:25:29,340 --> 00:25:31,500 that don't allow me to do all of this. 425 00:25:31,700 --> 00:25:34,680 First of all, there's no debugger callbacks in IDA Python. 426 00:25:36,100 --> 00:25:38,360 I can't set breakpoints and have things 427 00:25:38,360 --> 00:25:41,020 work off those breakpoints using IDA Python. 428 00:25:41,340 --> 00:25:42,580 So there's two choices. 429 00:25:42,840 --> 00:25:45,260 We either have to write a plugin, which is fine, 430 00:25:45,440 --> 00:25:47,180 or I'd rather do it in Python, 431 00:25:47,380 --> 00:25:50,300 so IDA Python has to support callbacks. 432 00:25:51,900 --> 00:25:53,900 And most of this stuff can be done automated. 433 00:25:54,220 --> 00:25:55,940 You could load up something, 434 00:25:56,500 --> 00:25:58,040 disassemble in IDA, 435 00:25:58,040 --> 00:26:01,480 have it exercise the binary 436 00:26:01,480 --> 00:26:03,280 using whatever input you choose 437 00:26:03,280 --> 00:26:04,880 within the debugger in IDA. 438 00:26:04,960 --> 00:26:06,000 It's all there, right? 439 00:26:06,760 --> 00:26:09,580 And it starts annotating your disassembly automatically. 440 00:26:10,300 --> 00:26:12,360 You come back, I don't know, half an hour later, 441 00:26:12,560 --> 00:26:14,460 and all this work has been done for you. 442 00:26:19,400 --> 00:26:21,720 So the standard API interface. 443 00:26:23,640 --> 00:26:26,080 I think lots of people have been wanting this. 444 00:26:26,240 --> 00:26:30,140 I know I've heard Matt, my friend up here out front, 445 00:26:30,300 --> 00:26:32,760 he's going to be doing another talk with me tonight at 8. 446 00:26:33,280 --> 00:26:35,000 And he's been wanting this, 447 00:26:35,140 --> 00:26:36,180 a lot of people have been wanting this. 448 00:26:36,780 --> 00:26:41,540 A standard interface would allow us 449 00:26:44,880 --> 00:26:47,420 not to have vendor monopolies. 450 00:26:48,200 --> 00:26:49,680 If there's a standard interface, 451 00:26:50,000 --> 00:26:53,280 we can use any disassembler with any debugger. 452 00:26:53,400 --> 00:26:55,420 We're not locked into a certain tool 453 00:26:55,420 --> 00:26:56,940 or a certain vendor. 454 00:26:59,840 --> 00:27:02,540 And a lot of things can be abstracted out, 455 00:27:02,540 --> 00:27:05,340 where we could be using one tool, 456 00:27:05,560 --> 00:27:08,420 and our debugger could be over the network, 457 00:27:08,640 --> 00:27:10,900 some embedded device down somewhere else. 458 00:27:11,140 --> 00:27:15,640 All you need is to write the plug-in for the debugger. 459 00:27:15,840 --> 00:27:18,800 You could be using a remote console 460 00:27:18,800 --> 00:27:20,780 and debugging, let's say, 461 00:27:20,880 --> 00:27:22,900 a Cisco router running GDB. 462 00:27:25,560 --> 00:27:28,700 Have full access to that from your console. 463 00:27:29,420 --> 00:27:31,640 So this is kind of like a software JTAG. 464 00:27:31,640 --> 00:27:34,920 JTAG was developed by hardware people 465 00:27:34,920 --> 00:27:36,500 because they needed a standard interface. 466 00:27:36,860 --> 00:27:38,660 You want to have one interface 467 00:27:38,660 --> 00:27:40,360 that everyone can comply to, 468 00:27:40,560 --> 00:27:43,020 and your debugger will work in all these different platforms. 469 00:27:44,600 --> 00:27:46,940 So this is what I'd really like to see, 470 00:27:47,080 --> 00:27:48,820 some way that viewers, disassemblers, 471 00:27:48,920 --> 00:27:49,980 debuggers, what have you, 472 00:27:50,020 --> 00:27:51,600 could be swapped out, they're interchangeable. 473 00:27:54,560 --> 00:27:55,920 So what has to happen? 474 00:27:56,060 --> 00:27:57,680 A plug-in has to be written for every tool 475 00:27:57,680 --> 00:27:59,200 that complies to this interface. 476 00:28:00,260 --> 00:28:02,340 Register and machine-specific information 477 00:28:02,340 --> 00:28:03,920 can be abstracted out. 478 00:28:04,020 --> 00:28:04,900 It doesn't matter if it's ARM, 479 00:28:05,060 --> 00:28:07,180 if it's x86, Spark, what have you. 480 00:28:07,320 --> 00:28:08,660 That would be all contained. 481 00:28:09,840 --> 00:28:13,260 So there are some problems with doing something like this. 482 00:28:13,460 --> 00:28:15,700 It would not be very effective to use this 483 00:28:15,700 --> 00:28:16,780 for, let's say, reversing malware, 484 00:28:17,680 --> 00:28:18,760 reversing software protection. 485 00:28:19,340 --> 00:28:22,440 Any time you have some kind of set interface like this, 486 00:28:23,300 --> 00:28:25,660 anti-debugging code is going to catch it just like that. 487 00:28:27,120 --> 00:28:29,060 So this is more for, 488 00:28:29,060 --> 00:28:31,240 reversing functionality, 489 00:28:31,720 --> 00:28:33,720 looking for vulnerabilities 490 00:28:33,720 --> 00:28:36,520 in different types of products and stuff like that. 491 00:28:40,460 --> 00:28:42,360 So I'm running a little fast, 492 00:28:42,500 --> 00:28:45,860 but here's the conclusion, 493 00:28:46,060 --> 00:28:48,020 is that we can combine these tools together 494 00:28:48,020 --> 00:28:50,220 and it's going to yield us better results. 495 00:28:50,840 --> 00:28:52,500 And this is going to evolve 496 00:28:53,060 --> 00:28:55,420 into a more coupled framework 497 00:28:55,850 --> 00:28:57,540 that you can use different tools together. 498 00:28:57,540 --> 00:28:59,900 And one tool I didn't mention in my slides, 499 00:29:00,020 --> 00:29:01,880 because I haven't had time really to look at it, 500 00:29:01,940 --> 00:29:02,840 is PyMate. 501 00:29:02,980 --> 00:29:05,220 I'm really excited to check out PyMate 502 00:29:05,220 --> 00:29:07,300 and see how this can be integrated 503 00:29:07,300 --> 00:29:08,740 into this sort of thing. 504 00:29:09,020 --> 00:29:10,600 I know Pedram took off already, 505 00:29:10,740 --> 00:29:11,860 but I've been wanting to talk to him 506 00:29:11,860 --> 00:29:13,300 about something like this. 507 00:29:13,520 --> 00:29:16,460 And a lot of this stuff is going to be in my blog. 508 00:29:17,360 --> 00:29:19,540 My blog is also mirrored on OpenRCE, 509 00:29:19,720 --> 00:29:21,220 so if you're on there, you'll see it as well. 510 00:29:23,460 --> 00:29:25,740 And I'll be taking any questions, 511 00:29:26,460 --> 00:29:27,520 if there's any questions. 512 00:29:27,520 --> 00:29:29,180 Just walk up to the mic or raise your hand 513 00:29:29,180 --> 00:29:29,880 or what have you. 514 00:29:34,420 --> 00:29:35,760 All right, since... 515 00:29:37,220 --> 00:29:38,220 Someone's coming up right now. 516 00:29:50,520 --> 00:29:51,400 Not on. 517 00:29:52,140 --> 00:29:52,820 Thank you. 518 00:29:52,980 --> 00:29:55,040 My question is about reverse execution 519 00:29:55,040 --> 00:29:57,440 where you actually can go into a debugger 520 00:29:57,520 --> 00:29:58,880 and backstep. 521 00:29:59,420 --> 00:30:01,060 Do you have any experience with that, 522 00:30:01,080 --> 00:30:03,260 a recommendation for tools that can do that? 523 00:30:04,480 --> 00:30:06,280 I haven't used any of them. 524 00:30:06,400 --> 00:30:10,800 I know that Simix makes... 525 00:30:11,440 --> 00:30:13,320 Or Virtual Tech, I think is the name of the company, 526 00:30:13,400 --> 00:30:13,980 makes Simix. 527 00:30:14,320 --> 00:30:15,980 Simix is this simulator, 528 00:30:16,260 --> 00:30:18,580 and they have a product called Hindsight. 529 00:30:18,700 --> 00:30:19,500 I've never used it, 530 00:30:19,640 --> 00:30:21,560 but I know that does that type of thing. 531 00:30:22,660 --> 00:30:23,920 And I have a second question. 532 00:30:25,040 --> 00:30:26,840 Do you have any experience with debugging, 533 00:30:26,840 --> 00:30:28,800 with multi-threaded applications, 534 00:30:29,040 --> 00:30:30,620 and do you have any strategies 535 00:30:31,220 --> 00:30:33,420 to debug those type of applications? 536 00:30:34,040 --> 00:30:36,220 I don't have too much experience with that. 537 00:30:36,460 --> 00:30:41,200 I mostly do reversing for looking for vulnerabilities 538 00:30:41,200 --> 00:30:46,560 and for, yeah, just reversing other people's products 539 00:30:46,560 --> 00:30:47,460 that I want to take a look at. 540 00:30:47,720 --> 00:30:48,420 Thank you. 541 00:30:50,400 --> 00:30:53,320 So if there's anyone else has a question, go ahead. 542 00:30:53,500 --> 00:30:54,140 Oh, do I have a question? 543 00:30:55,040 --> 00:30:56,680 Couldn't you use this to figure out 544 00:30:56,680 --> 00:30:58,800 what inputs it would take to get to a certain point, 545 00:30:58,900 --> 00:31:00,320 like in the program? 546 00:31:01,580 --> 00:31:02,620 Why, yes, you could. 547 00:31:02,760 --> 00:31:03,540 That's a very good point. 548 00:31:03,640 --> 00:31:03,980 What's your name? 549 00:31:05,160 --> 00:31:05,860 My name's Jeff. 550 00:31:06,040 --> 00:31:07,120 I was just thinking about this 551 00:31:07,120 --> 00:31:08,140 when you were talking about it. 552 00:31:08,660 --> 00:31:09,020 Yeah. 553 00:31:10,040 --> 00:31:10,860 What a coincidence. 554 00:31:11,100 --> 00:31:13,140 We'll actually be talking about something like this 555 00:31:13,140 --> 00:31:13,940 at 8 p.m. today. 556 00:31:17,780 --> 00:31:18,720 Go ahead, Ryan. 557 00:31:19,800 --> 00:31:21,040 In one of your example slides, 558 00:31:21,240 --> 00:31:22,960 you've got a pointer to a V table, 559 00:31:23,060 --> 00:31:24,020 and you end up calling, you know, 560 00:31:24,060 --> 00:31:25,220 EAX plus 14H, 561 00:31:25,220 --> 00:31:27,400 and you use a debugger example 562 00:31:27,400 --> 00:31:30,060 to pick up the member function name. 563 00:31:30,200 --> 00:31:31,700 Is that via the PDB symbols, 564 00:31:31,900 --> 00:31:33,740 or where are you getting the name from in that case? 565 00:31:34,200 --> 00:31:36,940 Oh, I'm getting the name from a, 566 00:31:37,060 --> 00:31:39,020 well, it's a Microsoft PDB. 567 00:31:39,080 --> 00:31:40,280 It's going to have the V table in there. 568 00:31:40,540 --> 00:31:42,740 So I set breakpoints on all the methods. 569 00:31:42,960 --> 00:31:45,820 I hit a breakpoint, and I look up on the stack 570 00:31:45,820 --> 00:31:46,740 to see who called it, 571 00:31:46,860 --> 00:31:49,600 and then I backtraced and refilled that information. 572 00:31:50,280 --> 00:31:51,740 Why do you need a debugger to do that 573 00:31:51,740 --> 00:31:53,640 rather than being able to do it straight from the dead listing? 574 00:31:54,280 --> 00:31:55,080 You could. 575 00:31:55,380 --> 00:31:57,720 It's just, for me, it's faster to do it this way, 576 00:31:57,840 --> 00:32:00,380 and I generate the cross references like that. 577 00:32:00,540 --> 00:32:01,580 It's the way I'm doing it. 578 00:32:01,700 --> 00:32:03,040 There's other ways to do it as well. 579 00:32:03,460 --> 00:32:03,860 Okay. 580 00:32:04,980 --> 00:32:07,960 And while people are thinking of questions 581 00:32:07,960 --> 00:32:08,740 or what have you, 582 00:32:09,300 --> 00:32:11,140 I'll take a little side note here 583 00:32:11,140 --> 00:32:12,400 to talk a little philosophy. 584 00:32:15,020 --> 00:32:18,060 So last night, I was talking to Katie. 585 00:32:18,240 --> 00:32:19,500 Katie is right here up front. 586 00:32:20,260 --> 00:32:23,500 Katie used to do a lot of DNA stuff. 587 00:32:23,640 --> 00:32:25,240 She worked on the genome project and what have you. 588 00:32:25,320 --> 00:32:27,840 Always been interested in this bioinformatics, 589 00:32:27,960 --> 00:32:28,700 you know, bio stuff. 590 00:32:29,040 --> 00:32:31,540 And I was like, never really looked at it, 591 00:32:31,560 --> 00:32:33,220 and I was like, so what's the deal with this DNA stuff? 592 00:32:33,300 --> 00:32:33,800 How does it work? 593 00:32:34,360 --> 00:32:37,440 And she's saying that there's these four different letters, right? 594 00:32:37,600 --> 00:32:38,880 And these letters make combinations. 595 00:32:39,280 --> 00:32:40,800 And these combinations make streams, 596 00:32:40,960 --> 00:32:42,840 and these double helixes, and they all come out. 597 00:32:42,960 --> 00:32:45,160 And that's what represents you or me 598 00:32:45,160 --> 00:32:46,480 and the differences between us. 599 00:32:47,020 --> 00:32:48,720 And then I thought, and I was like, hmm. 600 00:32:49,920 --> 00:32:51,960 So this sequence, this DNA sequence, 601 00:32:51,960 --> 00:32:56,360 is basically, basically means that me, you, 602 00:32:56,860 --> 00:32:58,580 possibly, I'm not saying it is, 603 00:32:58,660 --> 00:33:01,660 but possibly, it's a fuzzing iteration. 604 00:33:03,880 --> 00:33:06,820 Me, you, and everyone here is just a single iteration 605 00:33:06,820 --> 00:33:09,720 in this fucking huge fuzzer of life. 606 00:33:14,100 --> 00:33:15,400 So that's it. 607 00:33:15,560 --> 00:33:16,320 I'm a fuzzer. 608 00:33:16,380 --> 00:33:18,680 I'm number one, three, five, seven, two, four, whatever. 609 00:33:19,220 --> 00:33:20,080 And that's it. 610 00:33:20,080 --> 00:33:23,820 We're just malicious input into the machine of life. 611 00:33:28,060 --> 00:33:28,860 Thank you. 612 00:33:34,680 --> 00:33:38,000 So later this week, I'll be posting everything to my blog, 613 00:33:38,240 --> 00:33:39,940 and it'll be mirrored on OpenRCE. 614 00:33:40,200 --> 00:33:42,500 If you have any questions, feel free to email me. 615 00:33:42,620 --> 00:33:45,600 Feel free to come up to me and ask me any questions or what have you. 616 00:33:45,740 --> 00:33:48,760 I am more likely to answer questions if you put a drink in my hand. 617 00:33:49,020 --> 00:33:50,000 And I'll see you later. 618 00:33:50,080 --> 00:33:50,920 Thank you. 619 00:33:50,940 --> 00:33:52,400 Thank you.