...working on random other projects, and we do this on our side. Neither of us do this for work. He does use it at work. I don't really. We both work in the security industry. I'm also a student. And this is about exploit frameworks in general and about new exploit technology that we and other people have been working on along the road of Metasploit. Thank you. Thank you. ...touch the disk at all, but it gets us a remote interactive desktop of the system we're attacking. Things like that. Yeah, we'll start with an injection, and then we know this is two hours. A lot of people have other things that they may want to do, so we sort of split it into two different sections. So we'll go through the first thing and do some demos, and then go more in-depth and do some more demos. So we'll start with some background information on exploit frameworks, not necessarily specific to Metasploit, but just what's out there now and what the current state of things are. So, what is an exploit framework? It's an interface for launching exploits. There's a lot of reasons to use one. It allows you to have standardized exploit modules. It allows you to have a suite of allowable shellcode. At least in our framework, you can specify a different shellcode. That's not necessarily the same for all other frameworks. You have a library of common routines. That includes a lot of pro features. A lot of this is really good from the exploit developer's point of view. A lot of code reuse. A lot of things that you don't have to do that you would have to do in a stand-alone C program. And also a lot of it shows in using it. Having a standardized interface to use all the different things. And having a lot of advanced features that you wouldn't have in a normal stand-alone exploit. So why are exploit frameworks needed? Well, as anyone's aware who's been going to PacketStorm or other public security websites to get exploits for the last few years, just about everything you download is a piece of crap. I mean, honestly, the things that you're able to find, publicly, as far as exploit code, 90% of the stuff just sucks. Even worse, if you start looking at this code, half the code is boilerplate. It's copy and pasted to someplace else. How many times have you seen the same T-cell shell handler being copied from the same DCOM exploit to DCOM exploit to serve you after all in a row? I mean, it's kind of gross out there. No one can really code. The people who are running exploits aren't really programmers. So people who know just enough about security and programming to get the code done and working. And that's kind of what we're running against. If you're doing a pen test and you need to reliably exploit a system, and say that's what you're using as hard code to a bind shell or a reverse shell, and you need to use the opposite type of payload, well, you're going to have to go through and hack through someone else's ugly ass C trying to get it all working. So the goal of the framework is to be able to provide you a consistent interface for exploiting a system in a way that you don't really have to worry about what the payloads are, who wrote it, or whether you need to convert Win32 socket calls to Linux socket calls or remove WCA startup sequences. One thing that's important about this is, for the last point, nobody posts code full of bugs. This is one thing a lot of pen testers will admit to, that it's very important. There's a lot of bugs that may be three years old, but there's still a lot of exploitable machines running it. And the thing is that people aren't now going and revising old exploits with new techniques and new technologies. They're not retrofitting old code. So something we've done is we've gone through and we've written a lot of important exploits. And also just the fact that it's in the framework itself, when we come up with new technologies, we can use that then in older exploits. Right now there's two public exploit projects. Excuse me. There's a few public exploit projects. There's two commercial projects. These projects are Core's Impact product and Immunity's Canvas product. For those who are not aware, in about 2001, 2002, a company called Core ST released the automated pen test toolkit. Essentially it was a giant GUI interface that had tons of exploits in it where you can just drag and drop root shells. Now that's great and all. I mean, it's nice. It worked pretty well. We've got some really sharp guys working on it. But it charged $15,000 a license. And I don't know about you guys, but I can't afford $15,000 for an exploit. The other product is Canvas by Immunity. And we keep mispronouncing Immunity's capabilities today by telling these in the audience. But this company is called Immunity. This product is kind of a cut-down version of Impact. It has a different focus in that it provides lots of exploits and a lot of actually undisclosed or unpublished exploits. And it actually runs on Linux and Windows 32 at once. Finally, you have the Metasploit framework, which is, you know, our project, open source. And it's not really meant to be directly competitive with either of these commercial projects, but it has different goals. And we're going to kind of talk about some of the goals in the next section. Yeah, we're going to cover both Core Impact and Immunity's Canvas in a little bit of detail in the next couple of slides. So, first, Core Impact. It was the first real exploit framework. I think it came around 2000 or maybe a little bit later. And they were the first to do a lot of things. They were the first to have a functioning syscall proxy and a lot of the...kind of set the standard for a lot of the technologies. They're pricier than other solutions, but they're extremely complete. The tool is written in Python as C++, and the tool itself only runs on Win32, but you can obviously own and pivot through non-Windows boxes. You can pivot through your own boxes. Basically, the way that works is that after you compromise a machine, you can launch your attacks through impact through that machine. So if you own a box on the perimeter, you can then use that box and start owning things on the internal network, et cetera. And they also have a syscall proxy and payload system, which is how they implement pivoting, a lot of other things like upload, download file, a lot of other advanced payload techniques or payload features. Unity Canvas. This is written by Dave Idle, and I think he started running it in early 2002. It might have been before that and just wasn't aware of it. It was the second commercial framework out there when everyone saw his product and were like, wow, look, he's competing against Core Impact and kind of curious how that's going to happen and how it's going to work out. And it ends up that they run pretty well. Like, no one tends to steal each other's exploits, so you often find exploits that are in Canvas that aren't in anything else. And that's kind of what Dave and the rest of the Unity team kind of rides themselves on. It supports limited syscall proxying. It uses, it kind of, it has one payload. Instead of having a reverse shell or a bind shell, it uses all reverse shells as far as I know, or it can use bindstock and some other things as well. And the actual payload is kind of a multi-connect payload. You can upload files, download files, manage the system, you know, create new connections, do all kinds of things. You can do all kinds of other things through that one payload. It may actually be able to pivot in the near future, where you can actually compromise one host and export another host, you know, directly afterwards, like Spoon was talking about a second ago. It's less extensive than Impact. I think it has somewhere between 70 and 80 modules as opposed to Core Impact's, like, you know, around 300 or so. And it runs for about $1,000 a pop instead of $15,000. So if you're a small shop and you need a commercial exploit framework, it's not a bad thing to use. So the current capability is we actually did this talk at Black Hat, too, and I've been quoted a lot in news articles for saying point, click, root. So we're going to repeat it. So the current capability is we've really gotten down exploitation to point, click, and root. You can pivot it through the boxes after you own them. Launching attacks is from the box you just compromised. Automatic payload encoding, loading things like VAB characters. That's something more in the background that you don't see, but it's definitely important. And we also have dynamic shellcode creation systems. Canvas has more stuff, which is David Tell's Python-based compilation for compiler and assembler. And Impact has inline egg, which is, I guess, they have a greater system called Egg. But that's what they do. Similar dynamic shellcode creation. Cool. Actually, excuse me. The next section is the Metasploit framework. Kind of give you an idea what the project's about, where it's going, kind of what it can do right now. We feel the project is stable enough right now. Of course, people will be using it in their organizations to, you know, verify vulnerability assessments, to do pen test work, things like that. We've been actually been using it professionally for about a year or so now, so it's definitely ready. Okay, so just a brief introduction. It's an open source exploit framework. I believe it's the, pretty much the only one out there. There's some other projects that sort of concentrate on subsets of things Metasploit do, like, you know, payload systems, etc. But this is the only open source total exploit framework. We also think of it more as a exploit development environment. All of us are security researchers, and we do a lot of development work. So we're really using it more for that than actually for going out and using it for pen tests. So it really, I would consider it more of an exploit development platform than Core Impact or Canvas, which are sold as products, not really sold as environments for you to be writing things in. Although you can, but that's not really the main goal. Okay. So it's written in Perl, which is a choice we've made and have gotten flack for. But we stand behind it strongly, and it's been working out really well for us. It runs on most modern platforms. Right now we can run it on HPOX and Solaris straight out of the box. It runs on Windows 32 under the SIGINT environment. It runs on Linux and BSD and pretty much everything else. HD has it running on its source. So, I mean, it's really pretty portable if you look at it. It's nice to be able to, you know, walk into an office building with a device about the size of your hand and have a list of about 30 or 40 Xboxes you can start owning boxes with, a nice little Wi-Fi card. So it really reduces the amount of time it takes to, you know, go into an unknown environment and really start rolling with it. And even though we don't really support pivoting with the project right now, you can literally just copy the framework over to another host and start running it because we do have 132 installers and it does run on about every modern Unix platform. And we're mostly focused on improving technology, not so much things that may be as important from the user's perspective, but a lot of the back end things. Like shell coding, coders, and just really trying to improve some of the things that are more important to us as developers than maybe someone as a user. But that doesn't mean that it's not good for you using, too. For project history, about a year ago, I started working on a network game with a friend of mine. It was this cheesy little end courses client that looked kind of like the BDS game Overkill. I don't know who else has played that, but it's kind of a fun little game. You have a little text screen, you kind of use arrow keys and we'll go around, go north, go west, that kind of stuff. We coupled that with a vulnerability scanner with a tiny little exploit framework, and as you pop boxes, it would install a little demon that would then report your score and who won the box. So when I scanned that, you could determine what the score of the system was. We decided, well, we started running this game and we want to start running exploit modules for it, but the problem is all the exploit modules had to work the same way. They had the same inputs, same outputs, be able to take the same payload, be able to handle firewalls, things like that. As we started working on the game, we were like, wait a minute, this is actually useful for a whole lot of this stuff and we can actually use the same concept to develop an exploit framework. We started rewriting the project in about, I think, August 2003. We dropped 1.0 out just kind of as a, you know, testing the water, see if anyone was actually interested in it, and oddly enough, everyone started, like, actually using it, and it could have been because we included three or four exploits that didn't really work well anywhere else. So it kind of evolved into an open source project and Spoon started helping out, I think in November, December of last year, and Spoon just threw all my code out and said, eh, that sucks, I'm going to write it better, and I was like, okay, go for it, and he did. We have four primary developers right now, me and HD, work pretty much on the framework code and we also have Matt Miller, who's probably here somewhere, who's done a lot of really great work. He did a lot of the DLL injection stuff, you'll see later, and also working on actually some of the code going to Metasploit. And we also have Optics, who's doing a lot of the backend shellcode and exploits on Solaris and stuff like that. So that's basically the Metasploit team. We also have a handful of other contributors, people sending in Metasploits exploits and different payloads. So a quick overview of the development status, we have about 35 exploits and 40 payloads right now as of release 2.2. We have a stable exploit and payload API. That was one thing that 2.2 set out to do was to sort of freeze the API so we can safely tell other people to start writing things from Metasploit and not have them not work in future releases. It's widely used as we're slowly finding out by a lot of security firms and a lot of other groups, and we've been working on it and it's increasingly used by system admins and other people for verifying network scans. HD can talk more about this stuff because he does a lot more of it at work than I do. I'm actually starting to see a lot of large software companies using the product to test out their products. They'll have a vulnerability reporting their product the way that, you know, test exploit 4 that demonstrates it and they actually use either the Metasploit client interface or the actual API itself to automatically test for that during the regression testing process. There's another large company that provides security products and specifically host protection products that cover those and they actually use Metasploit along with different types of payloads to verify that their protection system actually works correctly. And what you'll notice with a lot of the host protection systems on the Windows environment, instead of doing memory type protection where they actually look for the permissions of the page, they just try to prevent you from doing certain types of things in your shellcode. So they'll look for people calling load library A from a memory segment that is writable or things like that or from a stack address and we're starting to hear more reports of people actually using this to do that type of testing. Version 2.2 was the first development and we're starting to pick up 2.2 once we release it next week or from the secret blackout URL that you'll find at the back end of the slides. You can actually use it to develop Metasploit so that it should work in all future versions of 2.2 for any modifications. And one important thing quick about the increasing use by security firms and people after phone scans, it's one thing for a security tester to come in and say, network, and say, you know, we scanned your host and we have one unpatched box and a lot of people are realizing that it's if you have good notes on an exploit you know it won't crash the box and stuff. Actually go in and own it and so then you can say, you know what I mean, not only was this box unpatched but you also had, you know, your payroll sitting in an Excel spreadsheet on the desktop. So I think a lot of people are realizing this and that's why I think Metasploit is really useful for people in that sort of area because it's a nice tool to follow up after a wrong assessment. There's a, the Metasploit framework is actually made up of a ton of little components if you look at the list of files there's something like, you know, 200 odd Perl modules, scripts, source code, things like that in there. It's a combination of like, you know, Perl, C, Assembler, there's some Python stuff for supporting inline egg. It's really kind of a hodge podge of stuff where you pick the best language for whatever the job happened to be. There's actually, this set of interfaces, there's three different user interfaces in the project right now which we'll cover in the next section a little bit. You have your exploits, you've got your payload encoders that are responsible for taking the raw shell code and actually translating it into something that doesn't have you know, if you're attacking a web server and you have to put the exploit string or you have to put the shell code into the URL itself to avoid certain characters to make it a valid request still. You've got the actual payloads themselves. Those things have the actual shell code what actually runs in the box and the exploit works correctly. We've got stuff ranging from bind shells, connect shells, execv to just all kinds of random weird things like things that'll actually reset the signal handle but it'd be something else and we've got a lot of special case payloads that we use to get around certain tasks. And because of the design of the system and have it run with any of the exploits already there, you don't have to go through and actually have to patch all your silly, you know, .c exploits so that they all use your new payload and then have to adjust the size of them all and whatnot. It happens automatically. Finally, for the payloads themselves, each payload has a handler. People don't really think about this too much because it tends to be automatic but say your exploit will create a bind shell, well you have to write a bunch of code to connect to the bind shell and give them a shell or tell the user to write, you know, use an external program to connect to the shell. There's no reason to have the same boilerplate code written, you know, repeatedly in each and every exploit. So we've got a handler system where for every single payload it defines how it handles that payload itself. If it's a reverse connection, for instance, the own box connects back to you, it'll create a listener then bind that to a console and that console could be the actual standard input output. It could be a telnet server that actually runs a different port and if you've actually seen the MSF web console, it actually creates a proxy telnet server that puts a command shell on that and then redirects your browser to a telnet slash those links to the proxy server. And finally, you have the, sorry, the NOP system and as you know, NOPs used to pad the payload space because the way that we're able to do interchangeable payloads is we tend to hard code the amount of space that's actually used by the payloads on a per exploit basis. So you can have, you know, one exploit has room for about 512 bytes of payload, you just have to be in the space for that payload to be 512. If your payload you're using is only 200 bytes, it would then pad the payload space and you can actually set environment variables to randomize the NOPs slides in the cells. You can actually specify a minimum NOP slide so if you're doing a brute force attack and you require a certain amount of NOPs to be there, it'll always make sure that that amount of NOPs are there. Additionally, each exploit can define which registers have to be preserved during the NOP slide itself. So you're using a randomized NOP slide and you would need to make sure that EBX registers never touch because you'd use that to get back to the other part because it's actually really important and one of the reasons we've been able to do a lot of the cool stuff like the VNC eject and some of our staged payloads. Just the way it's designed it's really easy to back on a lot of the handlers already written. For example, if you were going to write a reverse connection shell that does a simple one byte XOR, it would be a matter of writing a payload and adding two sub-functions to filter the outbound and inbound traffic to do the XOR. So it's really a matter of an extra six lines or something in the payload and you can already and MSF grab and any other consoles that we have already written. And this actually comes into play a lot when we do, we'll show the VNC stuff and all of it was really, really simple to implement just because of our payload system and the way the handlers all work. So a lot of it's hidden from you but there's a lot of times there's some pretty complicated stuff going on in the back end. But as a user if you didn't have a handler system to do it would be really annoying. You know, dubbing that cat, sitting there trying to figure out which one's read which one's write what's going on is a lot because of this. So this is a brief layout of sort of the design of Metasploit. You have the interfaces which is extracted from the framework code and it's really trivial to run a new interface. We just have three simple ones. We have the console interface which is the supported client in what we do all of our development work on. We have a command line interface which is good for scripting and parsing and then we have the web interface which is sort of the flashy proof of concept demo interface. We also, I don't know if you want to touch on some of this stuff, we have, we explained some of the modules before. We have four types of modules. The handlers that we were talking about before are considered part of the payloads. We have some libraries for example, we have a lot of code in packs for example. We have an SMB stack. We have a lot of stuff in MSF. We have a lot of core classes, UE utils and stuff like that. So, the nice thing is that all those modules all inherit from those bottom classes. So, we have some, probably the strangest you've ever seen before in your life. When you start looking at the way some of this stuff, you actually have payloads that import from one class and then tell the imported class who its parent is. So, it gets pretty tweaked as far as what payload inherits whatever the class but the endpoint is you can actually have a payload which handles a, you know, command shell with input output and be able to find and where to have you. But because of the way it's designed, you can actually replace the parent handles, excuse me, the handler's parents on the fly. And why that's important is because, for example, we have a stage, a staging system for the Windows stuff and if you're not familiar with what a stage payload is, basically, if you want to say get a reverse connection and then get a command shell it may be 300 bytes but if you just get a reverse connection and then have code or read in more code and execute it, that may be 200 bytes. So, for a lot of reasons then you can have really big payloads and stuff like that and we have a lot of staging going on. So, because of how that works you can just write a stage which is really independent of the stager and then you can build stagers by just saying I want a stage and a reverse stager I want a stage and a bind stager I want a stage and a find sock stager. And you can sort of like, you know, build your payloads together and with a lot of code reuse and a lot of backing on stuff like that. So, a quick intro to MSF CLI. This is actually the same sort of interface that's been around since version 1.0. MSF CLI give it the, you know, some string that will match the type of, the name of the payload, excuse me, that's what you want to use. So, you want to explore with the LSASS you just do LSASS would match. You don't have to do the full module name. You can do, you know, dump a summary which dumps all kinds of information about the exploit. One of the biggest problems with public exploits is you don't really know what reference is actually the vulnerability that it affects. But, we put all the information directly in the exploit module itself. If you look at most of the exploit module, at least half the code is just meta information. It's, I mean, these things are only like four or five hundred lines long at the most with some being, you know, is only like 200 lines and about half of that is just like, you know, what the exploit is, what it affects, some references to it, some URLs, things like that and kind of give you some information about what the exploit is capable of. if there's an advanced, excuse me, if there's an option for, you know, the host you're going to attack or the port you want to attack or they enable SSL for a given attack, things like that. It's all done through the environment and you can look at those options through that. There's an advanced section, et cetera, et cetera. So, we'll probably cover these in more detail, but, if you have an idea, you can just put them all on the command line, you run up the console with a client interface and you can script this real easy. Yeah, an important thing to think when you take code in front of it, for example, the console interface, the majority of the code is handling nice stuff like tab completion, a lot of other stuff. All of the session logging and the environments are handled actually on the backend and are really user interface independent. So, brief overview of the console interface. HD worked a lot on getting really rad tab completion. So, there's pretty much tab completion on everything. They'll store a cache of IP addresses that you've used and you can tab complete IP addresses, commands, logging, which is really important for people doing pen testing. You can, you know, if you want to remember what you set your backdoor password to a couple weeks later, you can go through and look through the logs and it keeps a full time stamped record of not only the exploit attempts and whether those are successful or not, but also it will log all of the data sent through our handler system. So, if you get a shell, it will log all of the shell activity. This is off by default by the way, it's optional. And, well, along with time stamps and then we have a tool MSF log dump that can go through and, you know, gives you red and blue output so you can go through and after you can see all the logs and if you wanted to, it's all time stamped so you can go through and replay it. And this is really good if you're pen testing or something and you have, you know, a customer that comes back and says, you know, our system crashed at five o'clock, blah, blah, blah, blah, you can come back and be like, well, we owned it at four we were out by 4.15 so it wasn't us. So, I mean, this is something that's definitely very valuable. It has history, it's read line so it's very familiar if anybody's like used to bash it uses the same, the same library so you can know you can do up and down for history, you can do tab completion, all sort of that. Metasploit back end, or the Metasploit interface is very invent driven, environment driven so we have access to the complete environment and, you know, from Metaseth and it's very much like you'd use to solve something, stack commands, you can see the environment, unset environmental variables, stuff like that. The class interface was kind of written as a joke but we thought it was funny enough to keep it in there. Essentially, it starts a little built in web server on the system and you can just browse to this web interface and it gives you a list of all these open exploits. You just kind of click along, you click the exploit and it gives you a list, okay, here's what the exploit does, you can click the select payload, pick whatever payload you feel like using, go to the next section where it fills in all the form values for all the options that are set and finally you just hit exploit and what actually happens is it does everything that the console, the CLI would possibly do in terms of actually, you know, breaking into the box, connecting to whatever the payload itself was. There's a bind shell, the web server then connecting to the server, to the port that the shell's on, connecting to it, there's a burst connect over and listen for the connection, et cetera, bind sock, you know, all that same thing and when it actually has a connection, it then starts a separate server on the web server itself and then redirects the user's browser, actually I think right now it just gives you a link to it, to a telnet URL to the port itself. So pretty much you just click through the web interface until it says got shell and then you click that and it pops up a little X term with your shell and it all goes through the web server itself. So you can have a single system on whatever network you're running on that's running MSF web interface and export every system through that box. So it's kind of nice, it's kind of broke, it could be written better, it's probably a better way to put it but it's functional right now and we don't recommend people use it in production environments but it's a fun thing to play with and do demos for management and what not. And this is another something you can attest to the handler system. I think writing MSF web was the matter of changing one backend method to be able to do the connection proxying instead of actually dropping into a shell. So that's another cool thing that the design. The slide on the screen right now is actually showing an XO encrypted shell but the telnet connection to the proxy server itself is completely clear text. So in other words the MSF web server handles the connection between the web server and whatever way it needs to including actually encoding the data as it goes back and forth across the network and the connection back to the telnet server itself is just like being a remote console on the system. So this is more of a development tool. I mean it's not more of a development tool it is a development tool. So it's something that just a user of Metasploit probably isn't familiar with and it's sort of the one tool that isn't really part I mean it is part of the framework but it isn't really part of a normal user's use of Metasploit. What this is is if anybody's ever written exploits in Windows you know it's very important to be able to find code in DLLs to return to and then to return into your code. So this will scan PE images offline either DLL or executable and it will find arbitrary matches you can do regular expressions you can then take those regular expressions and pump them through a disassembler with one command line option and then you can go through and you know build things looking for certain instructions that you want in the DLL space. We use this a lot and we find some very good universal returns in the DLL space like return addresses it's very easy to script the output is pretty much universal it's very easy to parse and one example of using it this is for example the server you exploit there was something like six different installers from version like three through five something so we just took all the installers you can use cab extract because the installers are really just cab files pull all the DLLs out of them ran an FPE scan over all of them got output for each one then did correlation and we had a universal return address in the DLL in a matter of a few minutes and that actually ends up working for every version of server you from NT through to 2003 so you can see that a tool like this is very useful. The nice thing about this is that we never had to boot Windows at all in this process to do it so something you'll notice when you start using the framework is that none of the tools that are included with it really have to run Windows in the first place so we really don't really want to have to run Windows desktop to do exploit dev for Windows box and that's really why we've gone through and written our own SMB class but got it. So okay and you know things like our decom exploit where it's actually one request that exploits three different systems at once are kind of nice and we did that with the help of MSPEScan. There's actually a couple other helpful utilities that are included besides just the user interfaces and MSPEScan we included a couple other nifty things that we found useful at one point there's MSF DL debug which is a tool for downloading debugging symbols for any given file from a system you're trying to break into and you're able to obtain you know the DLL from a similar system or one running whatever the service pack or operating system or version of that is you can take that DLL or an MSDL debug on it and it'll actually download the PDB files directly from Microsoft symbol server and then you can just do your own disassembly and move the PDB files themselves. So it's a nice way to be able to obtain the symbol files for any given executable without having to load a window bug or anything like that this is all done in pure Perl with a PD class parser and whatnot. You can actually extract out of it through MSF payload so if you want to go back to running an exploit in C for whatever odd reason or you're running something in Python or you just don't like the framework at all and you think it's crap you can actually use MSF payload to generate payloads from it anyways. So if you want to use our Linux reverse connect shell if you want to use our 132 bind shell you can just run MSF payload with the right options it'll dump out a nice pretty you know C formatted or Perl formatted buffer for you. If you want to do this through the web if you need to encode the payload to remove certain character sets like you can't have a null in your payload or you need to avoid a certain you know a slash character to web exploit or whatnot you can run through the MSF encoder system which actually uses all the different encoders in the framework to encode it in whatever way it'll possibly do. You can specify a specific encoder if you want to or it'll automatically figure it out based on the bad characters and architecture and OS you specify. For instance if you say I want to avoid in some way to avoid that character and as each one fails it'll then fall through to the next one so it'll probably land on alpha numeric before it's finished at which point you'll have a payload which is you know twice the size but it's all uppercase letters. And the MSF payload and MSF encode actually like MSF payload won't actually do encoding but msfpayload.cgi is sort of a combination of both MSF payload and MSF encode in a web version so you can go in and you can just pick any payload that we have in Metasploit it actually just works like Linux find SOC code or Linux bind on port 4444 and it will build it optionally encode it you just put your bad characters right there in the web interface you get a nice little blob ready to put in C code a car shell code so for some reason you do have to be writing exploits not in Metasploit for whatever reason you can go through here and still have advantage of using some of the payload work that we have unique to Metasploit. Do you want to talk about MSF updates? Oh sure as of version 2.2 you can actually automatically update your way to actually getting the latest exploits and what not too so if you go through you're welcome to go through and look at the code and verify things before you install it etc etc but essentially it will do it you know md5 summon all the files to play against your remote version download any new files that you want and then it does it all through you know our own custom CA cert we actually define the OpenSL search directory and do just about everything we possibly can and pull the verify it's really the right system through SSL but you know use it at your own risk as always so that the Metasploit project would be a stable exploit development platform we've been working on it for a year and a lot of other people in the end of our work have been coming in and we've been sort of dragging people in and being like hey you know try to write your exploit in Metasploit and they'll come back and be like yeah it was great you know what I mean so we've had a lot of work and it's now a very stable exploit development platform it's designed to use with pen tests admins can use it to verify scan results and another thing is we're focused on technology we don't have customers per se so we're not worried about you know getting the latest and greatest exploit we're not worried about you know this and that we're not worried about you know making a great GUI that's not our main goal right now we're working on just building a really good foundation a lot of really good back end technology and you know if it means working on something that we think is more important than working on the newest greatest exploit you know that was just advised there was just an advisory for then we'll probably do that and as of right now we have 17 dollars of donations we're already happy with it so you know that's it we have two dollars of donations left so there's been a lot of people working on this for about a year so if you if you use it or if your company uses it feel free to donate we have a link on our website now it goes straight into you know buying another spark station do solaris dev or your platform of choice if you specify it in the email so alright so the next section is exploit technology and we have a giant ninja on it so what's up what's up yeah it's kind of squished but it's supposed to be ninja monkey ninja monkey ninja got it so mostly the interesting part of the framework that I'm sure everyone's probably heard something about is the remote DLL injection this is nice and evil because it drops the DLL into the exploited process as a new thread it never touches the hard drive and if you look at the process list you're not going to see anything at all antivirus people hate us for this because they can't do any scanning of it because it's they scan on access and since there is no no access to the file itself, they don't see anything at all. And my phone is really annoying, sorry. Oh. Okay. I guess that doesn't like FossilDisk, it was actually written by Jarko and Matt Miller, and Matt Miller is probably similar to this crowd, so if you see him at the Anomaly table, you know, say, you know, hey, your code rocks, because it really does. There he is! There he is! Got him, okay. The nice thing about running DLL payloads, you've got full access to the Windows API inside the exploited process. One of the big things that Dave Itell and some of the Core ST guys were talking about with the Cisco Foxing Code is that when you exploit a process in the Windows, if you just work a command shell, you're throwing away half your privileges. A lot of times if you exploit something like a web server or an FTP server for another process, that process actually has access to a lot more resources than you would have if you just executed a command shell itself. In other words, it probably has access to another, an impersonation thread, excuse me, an impersonation token in one of its threads inside the primary token itself, inside the primary token of the process itself. And with that token, you could probably gain system access or access to one of the network users in the system. And if you just execute a command shell like everyone's doing in the exploits like DCOM and whatnot, you're losing whatever privileges you have there. So by running a DLL which takes advantage of those privileges by scanning all processes, by iterating through all processes, trying to open them up and grab the primary tokens, and then taking over those tokens, you can actually do a lot more evil things on the Windows platform by using DLL injection instead. And you can easily convert any code that's written in C or C++ to a payload. We've actually done DLL development. We've done DLL development from X-Ming W on a Linux box and then used those payloads directly on a Windows server as the RDRL payloads. And you can definitely read as existing code like the next slide's going to show you. And one important thing about the full access to the Windows API is instead of having to re-implement a lot of stuff in shellcode or just in shellcode generally when you're trying to access the Windows API, it isn't necessarily the most nice thing to do. It's sort of a pain to write. So we have access to the full Windows API. So for example, Crypto, we can just open one of the Windows Crypto libraries, download a file from the web. There's a library for that. SSL. I mean, Windows has libraries for a lot of things. So by writing your code as a visual... Writing your code as a DLL, you can literally write your code right in Visual Studio, compile it down to a DLL and shove it across the network. So you have access to anything you would as if you were writing applications on the Windows platform just as an executable. So one of the coolest things we've actually done using this DLL injection technology is the Windows VNC server inject. It injects... The VNC server is a new thread. It uses the existing payload connection. It doesn't require a new connection. It doesn't listen on a port. It's based on the real VNC source code. This was actually a really fast process. They went out, grabbed the real VNC source code, hacked on it a little bit. I mean, it was compiling down to a DLL very quickly. It's a little slow right now because of the way the hooking has to be done since the DLL isn't on disk. But it's very functional, as you'll see in a few minutes. And it was a pretty quick process. They did some hacks. For example, they hijacked locked workstations and hijacked workstations that weren't on disk that aren't logged in. This was adapted by Scape and HD. As I said, it breaks locked desktops. And I mean, it's pretty cool that you can just go out and grab an open source project and, you know, back on all of this work and make a totally rad payload. And we're not installing VNC. You know what I mean? We're not. We're actually... It's completely never touching disk. It's never leaving memory. And it's just in the process that we're exploiting. Not creating any new process or anything. Any questions? Sorry. . . . . . . . . . Well, the thing that... Say one development. The thing is, we actually had some concerns when the people who wrote it originally wanted to release it, especially because, from an antiviracy perspective, it's very hard without actually being inside of the process which antiviruses aren't. So because it's not doing a lot of the normal things and loading a library, it can actually circumvent a lot antivirus techniques. But the thing is, right now, it's integrated in MetaSplit and it's actually a 3 stage process. We have a stager, we have the VNC Loader, and we have the VNC DLL. The VNC DOL is like, you know, 400K. There's a lot of kludgy architecture that comes along with it. And it's all written in Perl, and it's not really something that you're going to be able to take and stick in a worm, really, at all. We're not too worried about that. We've thought a lot about it before we released the technology. And, yeah, I mean, you could, I guess, in theory, but I don't expect to see it anytime soon. And there's not really any point you don't need that much technology for a worm. It's really just overhead. I mean, they have usually a small, specific task that they can just write and do anyway. If you look at things like the slammer worm and whatnot, I mean, it was like 400 bytes or so that was just in memory, never charged to disk, and had the same issue, which is a lot smaller. If someone who's a really, really bad virus writer wanted to write a worm and they couldn't fit it into, you know, a couple thousand bytes, they might do something like DOL injection to do it. But it's really just a statement that they can't write the code small enough. I'm sorry, did you have a question as well? Okay, sorry. Yeah. I pretty much repeated the question by answering it. He asked if we thought about using the DOL injection for worm development. So, we'll go ahead and show a VNC demo. Right now, on the screen, you see the Mac. We're actually going to own Windows Box through the LSASS bug from the Mac. It's going to own it, create a reverse connection. On that connection, we're going to set up a worm. We're going to send the VNC injection code, and then the DOL. And then we're going to set up a local proxy on our side. So, then we're just going to connect a local host for a VNC client, and we'll have VNC access remotely to the machine that we just owned. So, we'll go ahead and demo that now. And watch the desktop that the VNC server gets installed on. Notice no one's logged into it. And it's really funny to see what happens to this desktop after you hit it with the VNC server. Anyone walking up the console might be a little bit confused, but just wait. So, we're just going to go ahead and start MSF console here, and set up, on there, navigate, well, or narrow it down. Right, well, HD navigates. So, you can just go ahead and restart MSF console, which is, again, what I was saying, the preferred interface. You can see this is the Metasport running on this side, and that's the machine that's about to get owned on the left side. So, we're spreading the console interface. Then we'll just go ahead and use export when we use LSASS, for example. So, enable Python's as well, but we have Python support enabled right now. It's enabled by default, so it's a little bit slower. So, I'm going to just do, like, a show options. Show options will show the options. Right now, everything is saved, and we had options already set up. And because of the environment, you can save the environment to disk, and it'll automatically fill the options back in. You can save from show options. You'll see all the options that are available, both of the exploit, and then when you set a payload, the payload has its own set of options. So, for example, on the top, you have the exploit options. And on the bottom, you have the options, which are specific to the VNC. And on the bottom, you have the injection code. There's a bit of debugging set, so we're turning it off, so it's a little nicer output. So, then you can see these are the options set up, ready to go. We have remote host set up, remote port that we're attacking. Those are the top options. And then the bottom options we have. The payload information, the IP address that they're going to connect back to, the port we're going to set up the VNC listener on our side on, the reload port they're going to connect back on to the VNC connection, and then the location of the VNC DLL. So, we're also going to show targets, and you can see that the target list, zero is automatic. It will automatically detect the OS OSS and exploit based on the response from the SMB transaction. Otherwise, you can manually go in and set Ether 2000 XP. So, it should hopefully work automatically. Thank you. I will. Yep. Yep. Okay. So, we owned, we got the connection back, we sent the DLL, and we sent the DLL later. We sent the DLL, everything worked. New session here. So, just local host. Ta-da! So, move the command around so we can see the log box behind it. So, another cool thing is, it will actually hijack whoever's network. So, if you have a non-privileged user log in, for example, Bob, but you own the box in system, you don't want to lose your system privileges. So, we open a command window at the top that runs in system. So, even if you're hijacking Bob's desktop, you still have access to the system because we pop up a system command box. We just go ahead, open the Explorer. We can configure the server if we want, but I think we'll skip that for demonstration purposes. Of course, he's doing this from the Mac, as you can see here, and you can see the actual VM over there. So, that's it. This is a demo of the VNC stuff. This is all in memory. Nothing got wrote to this. The DLL is nowhere except inside of LSASS right now. If you do a task list or anything, there's no new processes. It's just LSASS. And then, if you apply some other techniques with DLL stuff, like anti-debugging or anti-paging, this is really a forensics nightmare. Anyone walking to the console in the system is going to see a desktop on the box that's not logged in. In the case that they actually do hit Control-Alt-Delete, it still works. They can actually log into the box, if they want to, and get their own desktop. And then, when they switch back and log back off, they end up back on the desktop of the system again. So, the thing is, if you actually log off from this desktop, Windows doesn't like it very much. It doesn't really know what to do. You've got a mouse and all kinds of random weird flickering windows, but it doesn't really know what to do with them. So, if you're ever bored, it's a fun thing to play with. In the sense that we're doing DLL stuff, we have a lot of access to the Windows API. We were thinking about some other techniques, for example, like disabling the video driver when we're actually on the hardware. So, you know, your screen sort of goes into power saving mode while we're out there VNC-ing in, and then we can enable it as we leave. Something that I found while I was talking about it is, if you take a screenshot of the desktop before we install the shell on it, by using the VNC's display capture, then forcing that to be the display of the system that we're attacking, while we're actually doing our own thing. So, they never notice the desktop's doing anything whatsoever, but we're still in the process of trying to figure out what we need to actually implement that, and, you know, it's Windows API, it's ugly, so. And besides just flashy demos and stuff like that. This is actually useful on a lot of different levels. For example, hijacking the desktop can be very, very valuable. For example, I mean, getting system isn't always what you want. For example, if someone's logged in with domain credentials, owning system isn't going to give you those domain credentials. It could lead to that by, you know, doing some stuff and hijacking a login session or something. But with this, you can just actually get the user that was logged in. For example, you know, a banking scenario where you have a client who may be logged in to a domain, and they're sitting there with a thick app, you know, a custom written app that they use for transactions. You can just own it and get there, and now you have the software, you have everything, and you can just VNC to re-own the mode and watch it for a couple days, you know, and then see what they do, collect information, and you can come back and have access to a lot of those things that getting a system prop just doesn't do. So, I mean, besides just flashy demos, this has a ton of very, very practical, cool uses for pen tests and, you know, that sort of purposes. Anybody have any questions on this sort of stuff? Yep? . . Oh, yeah, what happens is that we get the initial connection back, which is a stager like I was talking about before, and we send the stage, which is the VNC loader written by Matt Miller, and what that does is it expects a DLL coming over the wire, so that same connection, we then actually just send, read, and send the physical DLL 100% complete to, we send a size first and then send the DLL to the VNC inject code that then is running on the server. And, or on the machine. And then it actually goes through and will take that raw DLL and map it into memory and everything like that. So that's what the VNC loader does. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . a new thread. So right now, you know, LSASS may normally have, like, five threads and now it has six. So we're just starting a new thread inside of LSASS. We're completely inside of LSASS right now, which is used for a lot of other techniques. Say, if you had some DLL code that could maybe, you know, get secrets out of LSASS, because that's what LSA does. So, you know, maybe you have VNC that actually could use whatever you're exploiting for some reason. So we're actually staying completely in the original process. We're not destroying it. It's intact for the most part, depending on the exploit, and it's still running. It's still LSASS. One of the other DLLs we're using for testing right now, we'll actually list all available processes, tell you the primary token owner of that process, like the user that each process is associated with, and give you the ability to launch a process as that user. So if we inject a thread inside LSASS, since LSASS has access to everything, including the LSASS secrets itself and memory, we can actually whip those memory secrets out and dump them out to the remote attacker, or we can just hijack any other process that that process can access. So none of that? Oh, Toby? The question was whether by exploiting LSASS we can actually hijack and listen to all the logon requests in the system. And actually, yeah, because LSASS uses the GINA DLL to actually do the password authentication, we can just bypass that by patching LSASS directly in memory or hijacking the actual NT port it uses on the underlying system to actually sniff LSASS requests or sniff logon requests. And also, because this is a real DLL and it's being loaded correctly, you have access to a lot of things. You can import other DLLs. You can access a lot of the things that are set up correctly inside of the process. For you, as a DLL, you will do a lot of things inside the process. This, of course, would be custom things. We don't have anything. I mean, every expert's going to be running a different process, and everything's going to be different based on the process. But you have the ability to do a lot of really cool stuff, and you're running your stuff in a DLL, and that's pretty much it. Well, yeah, of course, but you can just own it again, so. Yeah, of course, it's not, you know, we're not setting it in startup scripts. We're not auto-starting or anything like that. You could, of course, do it if your goal was to have some sort of long-term rootkit, but that isn't what this is. This is, you know, a temporary, you know, shell. One of the things about pentesting is if you're installing a VNC server under a client, system during a pentest, it's really annoying to have to go through and remove those files after you're done with it. A lot of times, because if you start the VNC server, so you can't delete the files, so you stop the service again, the files are in use, and there's like a billion different things that really annoy you when you're trying to install remote administration services in a compromised system. With using it in shell code like this, after you're done, after you've exited your shell, that's it. There's no memory trace. There's nothing left in the box to show that you've ever been there. The nice thing about the VNC DLL payload itself is that if you don't have system access, and it tries pretty hard to get system access. Like, we're adding some more. For the installation techniques into the near future, it'll actually revert to read-only mode. So if you're exploiting an IIS bug, an IIS as well as an iUser account, which has been impersonated from an iWAM account, it'll revert itself to get iWAM user, and then from there it can actually have read access to the desktop. You can't actually read the keys of the desktop if you're not system yet, but we're working on different ways to manipulate the API to get further into the system, even if we're not in a system. So we'll see how things go. Hopefully in the next few months we can have some really nice ways to either immediately get system access, or we can get system access. We're working on another system called Vinterpreter, which we'll talk about a little bit later, but that's more of a complete payload solution. This is just our flashy demo of VNC stuff. It was actually put together very quickly, which goes to attest the very cool technology that it is. Is there any way to do this on Vintec? We're going to go to a... The user could not pop up a show. Well, we actually, the first thing we wanted to look at was actually creating a hidden background desktop in the system, and then actually providing VNC to the user. What we ran into, though, and what actually Matt found out when he started investigating this stuff, was that there's a limitation of the Windows system itself. You cannot read the screen of the non-interactive desktop. So the only desktop you can actually read the display of is the interactive desktop, and there's only one of those in the system, and that's what the physical mouse and keyboard are hooked into. The exception to that is terminal services. But the thing is, Microsoft designed the API on purpose that way, so you can't write your own custom terminal services services and compete against someone licensing. So it was a direct... I mean, the capabilities are there to have multiple desktops and a desktop, and most services create their own Windows station and desktop, but you can't interact with that desktop if it's not the current input desktop. So it drove us freaking nuts for like three days trying to figure out why we couldn't have access to this backend desktop, and Matt actually wrote his own custom VNC implementation on the backend, where he put bitmaps into different desktops, tried to bring them back out, and we tried pretty hard, and we couldn't find a way to create our own custom hidden desktop and still interact with it. And owning the actual real desktop is very useful, and something like the interpreter stuff we talked about, you could, for example, have a module that, you know, you can see if there's any mouse movement or keystrokes or something, you know, and say 20 minutes, right? So you can say it's probably clear it owns with mouse. You can go in and wait and then launch VNC. So you don't need to do it as the first stage, and that's what the more involved systems that we'll show later are kind of designed to address. The next one we're going to talk about is interchangeable payloads. We mentioned this earlier, but essentially any exploit inside the framework, you can put any payload you feel like putting into it. In other words, if for some reason you've got a custom payload that works around the Aquino system, the Cisco security agent, or whatever it happens to be, or you've got a payload that does something, you know, predefined, you really need to just do this one thing, like delete this file from the system, and you don't want to do anything else. You don't want to try to execute a command shell, you don't want to do anything nifty, you just want to do one specific task, you can drop in a payload that does just that. Additionally, if you have a payload which bypasses the IDS, or, you know, whatever it happens to be, or you're just, you know, writing a new shellcode and you want to make sure it works correctly, you can take your shellcode, drop it into Ngo. This approach has given us an advantage over commercial products, which is more impact and Unity Canvas, because they really only support their own payload. What we really try to do is provide a way to do research and do testing of third-party payloads and help with the development process in a way that you can actually, you know, verify that what you're writing works. Because of that, we actually have a lot of redundant payloads, and those are actually on purpose. We've got payloads that do a reverse connect one way, we've got payloads that do a reverse connect in a stage system, we've got ones that are actually the same payloads as written different ways. I was just going to say, we have an hour left, so I know some people are leaving, but just to make sure that people are listening. We do a lot of other stuff. We showed some of the flashy stuff first, but we'll go in depth, and we have some other demos. For example, owning LSX, which we're the first public exploits for, and some other things. So, we're going to go ahead and... They didn't work right, so we'll go into that in a little bit. Additionally, we've got, you know, we include the reverse bind, find exec, you know, exec payloads, the encrypted XOR command gels. We actually took the inline egg sample provided by Core C for the inline egg Python system, and took it out, dropped it straight into Metasport, and it works. You have to do minimal modifications to get an inline egg, payload, written in Python, working at the Metasport framework in Perl, because of our support for external payloads. You can take any program that generates shellcode output and integrate it in as a payload into the Metasport framework. So, if you've got a really nifty tool that you're working on, and you don't want to write it in Perl, that's cool. You can still use it. So, for example, we get back on inline egg. It's very similar to David Tell's most def. For example, if you had some sort of most def payload that you wanted to write, or, you know, your own payload system, or for some reason you want to do some sort of other complication dynamic generation of shellcode, and it isn't written in Perl, you can do Perl, and you can't or don't want to integrate it directly into Metasport. You can just have it as an external program, and we actually have a class called external payload that makes it very easy to do exactly the sort of stuff that we do with inline egg. Oh, sorry. One thing that we've actually come up with with Unique is, you know, sort of unique and somewhat interesting. There's a lot of exports out there that allow you to execute a command shell. And, you know, okay, great, you can run a command, whatever it happens to be. A lot of times you can't see the output, and people are a little bit bored of doing things like, you know, an extern dash. Extern dash display to get their shell back, or doing a, you know, a telnet pipe to bin shell, pipe to telnet again. And those are all great, but they require a lot of work in the user's part to set up, and, you know, it's just, it's really annoying to do in the first part. What we've ended up doing is all the command exec payloads that we've included with the, excuse me, all the command execution payloads, where you're actually just injecting a command and not a shellcode. We've actually created a set of command underscore payloads, and that's just the name of them, so we're using the terminology for it, that do things like a reverse connect, or a bind shell, or an exec V, or a lot of other little things. And they actually implement, like, telnet pipe, shell, pipe, telnet, to be able to do a reverse, you know, a reverse connect style console, but all with a single unified console. For instance, use the Solaris SADMD export, including the framework. It'll actually cause Solaris, you know, with the Unix reverse generic payload, what it'll do is it does tel, it executes telnet to the system exploiting it on the IP address in the port, pipe, and then it kind of calls, you know, bin shell again, then pipe, telnet back to the host on the same port again. And when the MSF console sees that, it then, you know, it'll then says, okay, I've got two connections coming in, I'm going to write some data to one of them, see which end it comes out. And it sees that data coming out, one of them says, okay, I know where my inputs and outputs are, and it glues those two handles together into a single unified console in front of you. So in other words, if you're exploiting a system that's an IIS server, and you pop over the reverse shell, and you've got a nice console, then you do an SADMD exploit, you won't notice a difference at all in the console, they'll work exactly the same, because of the way the console's been abstracted and used. So if you've got a nice way to get any command shell back to yourself, or you want to do, like, you know, instead of telnet pipe, shell, telnet, you want to do a telnet pipe, shell, you know, you know, run it through the TR command, a lot 13 year output of it, you can do that, you know, trivially, just by adding a filter to the handler side of the payload. So it's really easy to add, you know, custom command payloads, do things like PHP exploits, SQL injection exploits, things like that, in a way that actually gives the user the ability to pick different types of payloads, and still integrate them with weird command injection exploits. Okay, so, yeah, this is for those bugs, we're not actually executing arbitrary code, but you can somehow inject a command, for example, a lot of web bugs and stuff like this. And it, not just the coolness of the integration in Metasport, but it's actually just a good resource. There wasn't a lot of public, you know, I sat down and figured out that these are, like, you know, the great commands to run and stuff. So I actually sat down and thought a lot about how to do, you know, a good generic Unix reverse shell, you know, with pipes and common program, or with, you know, telnet and pipes, and other common utilities. It's just a good collection. A lot of times, you know, when people have an arbitrary, you know, command execution, they just need, like, you know, wget semicolon gcc or something. And we don't have that. So even if you found a bug, you know, in, say you found a bug in an ASP page or something where you could execute a command, you can just drop it into Metasport very easily. And then the command, you can just, you know, instead of, the command payload just returns the actual command as a payload. So then when you're putting in your payload, you actually just have this command. So it's really, really cool, actually, to be able to just take any sort of arbitrary bug and get shells back with really no work at all. One of the other annoying things you might find with command injection payloads is limited characters. For instance, you can't have a space inside your command. You can't have your command injection payload. And, you know, not having a space in your wget command kind of limits what you can wget. In other words, it'll just be one long command. You can use tricks like the IFS sequence part, the IFS separator dash command environment option to actually represent a space. There's a lot of tricks you can use to actually encode your command in a way that it still is actually a valid shell command but bypasses where the restrictions are. And this does it all for you, too. We've actually got a payload designed explicitly for getting around spaces and slash requirements when you're exploiting bugs like the n-disclosed one in a big old Unix OS we're going to release in about a month. Sorry. But, you know, it's a low-end advisory process. You didn't hear it here. Okay, so I guess we can just go ahead and do some payloads demos. We'll do some XOR shells. Go ahead and, like, throw up ethereal or something so you guys can actually see that it is indeed XORed. We'll do some inline egg stuff, some reverse and fine sock, and just go ahead and show you some of what that actually looks like on the wire and, you know, why that's good. Okay. Can everybody see the output of this okay? I'm not sure. Yeah. I'm trying to find a font that will actually work so you can see it that's big enough and also still allow us to be able to type and manage all things scrolling off all funny, so one second. Okay, so is that pretty decent? I'm not sure how good the protectors are and stuff. So we're going to, for example, use the Samba Trends 2 open bug and you can see in the prompt we have in parentheses the payload that's currently selected, you can change the payload and that prompt will change. So then there's top options with the options specific for the exploit, for example, the remote host in this case 192.168.50.12, the remote port, the port we're connecting back to, the XOR key in this case because we're going to do an XOR reverse which is actually an inline egg payload, and then the port to connect back to. All right, so we'll go ahead and exploit this. So you can see now it's brute forcing and hopefully we will be successful in a minute. Okay, so hit it a couple times. Yeah, so we got the shell back. We usually, in an inline egg payload, we do an interactive bash. We actually have a nice bash prompt as root. So that is all done for you. You actually see on the network wire this is what the data is looking like. I don't know if you're going to have a follow TCP session or something. So we'll do, you know, PSA UX output. You see it's obviously fine for us. And, yeah. So this is what the TCP stream actually looks like. You can see that, you know, it's obviously isn't great security. But just for you to see. So we're going to show you some of our SNORC evasion stuff later. A lot of things, for example, ID output and stuff like that, they will not be triggered by this. The XOR is done specific to the payload. So we're using an XOR payload. So, yeah, if we wanted to use a non-XOR payload, it wouldn't be doing XORing. And then we also, the key was one of the options if you looked in the payload options. So you could set a different XOR payload. You could set it to zero if you wanted to avoid XORing. Okay, so does anybody have any sort of questions about that? You talked before about injecting, you know, when the incident was out. And instead of having the expansion come back to you, were you injecting open SH servers so that you send back an encrypted? Right. Well, we are working on some library injection technology for Linux. Obviously, the DLR injection is specific to Windows. And we'll be working on things like Linux that will come in the future. So, really, that's something you can do. You can do a lot of things. We're actually working on more complicated payload systems. You can do stuff like Diffie-Hellman and then do some sort of, you know, asymmetric and non-symmetric crypto. The tricky part about it is finding an API that we can use on the client side and the server side that's, you know, easy to use in Perl. Like, we don't want to have to, you know, install some random C library on the Perl side to be able to handle the encryption. And most of the Microsoft C API stuff doesn't work quite the same as open SSLs. So, we're still trying to find a better way to do it. Yeah. You had a question? Transports is in the payloads? Transports is in the payloads? No, they're not actually using Talmud throughout. No, no, no. They're not passing Talmud options. These are all just raw connections. For example, using Netcat or just raw TCP socket options. Or, you know. So. But you could use Talmud as a client. But no, these aren't like Talmud supported payloads. Not a Talmud server. Okay. So, we'll move on and do an example of a Finesock over Samba. Since we already have Thera open. And you can see that the node right now, you can see that this connection was on port 4321. So, it actually opened a new connection for that payload. So, now let's do it over the original connection. So, now we'll see that our shell will be over port 139. Yeah. So, when we hit import, it's the Finesock that's going to be saved. Next. Okay. So, here it is. Okay. It'll show up. So, we're going to unbox it. And we're going to. So, we're going to see if it's something that we can do over a Filesock. Yeah? Okay. So, if we can. So, if we can command this Filesock to open. We're going to have them open. Oh. So this exploits the sound-blast trans-to-open bug and affects everything like 228A, or excuse me, 228 and below, and is patched by 228. And usually it goes a lot faster, but because we have, we've enabled the Python payloads on the Mac OS, it doesn't really cache right and it kind of takes forever to load up all the payloads and stuff. Usually we're just able to do that default so it goes a lot quicker when you're using it for real. And as you can see, now in the payload options we don't actually have a connect back IP address because we're not actually connecting back. We're reusing the existing connection, and another thing that would be important to explain