So, I'm not sure if this has ever happened at DEF CON before, but our speaker has ‑‑ hasn't completely lost his voice, but it's a little rough today, so keep that in mind. But our next speaker here is Raphael Mudd. Thank you. I'm not that worried about losing my voice. I look at this room and I see a lot of my close friends, and I just feel like I'm amongst family, so I'm really looking forward to sharing something I've been working on for a while with you, and thank you for being here. What I'd like to start out with is how many of you have used IRC before? Excellent. How many of you have written IRC scripts before? All my kind of people. Now, I'd like to ask how many of you have written or used, like, the IRC war scripts back in the 90s? Yeah. I'm 32 years old now, and I feel like I've regressed to 14. I'm making hacking tools, and I'm making hacking tools that feel like the IRC stuff I did in the 90s, and I'm trying to make my hacking tools more like the IRC tools I had in the 90s. So we're going to talk about that today, and we're going to talk about something called Cortana. What Cortana is, well, first off, how many of you know Armitage? Okay. Great. Cortana is a scripting language for Armitage. I'm actually trying to make Armitage scriptable so you can actually add features to it, write bots. Here are the things we're going to talk about. Really important. I'm really honored by this. This work was made possible through DARPA's cyber fast track program. So thank you, Mudge. I really greatly believe in your vision and what you're doing with that, and thank you for letting me be a beneficiary of that, and I hope you guys like what I've put together. Here's what this talk is not. Cortana is a programming language, does a lot of stuff, so this is not a tutorial. And some of the features. I'm just not going to cover. But what I want to do today is I want to demonstrate what it can do. Okay? We're going to have a lot of fun. I'm going to cover some of the major high notes and why they're there. And my goal is I just hope you after this are encouraged to go out and try it. I look forward to seeing what you do. A little bit about me. I started out IRC in the 90s. I wrote an IRC client called JIRC2. Okay. I know Dan is in the audience. He's a JIRC2 fan. I'm also the developer of a programming language called Sleep. I wrote it in 2002 and was very active on it until 2009. I'm also a developer of Armitage. And because the work I've done the past year has kind of taken over my professional life, I started a company, actually my personal and professional life, I won't lie, I started a company this year, Strategic Cyber. And I make software for red teams, occasionally do research. You can learn about that at advancedpentest.com. This is from my IRC clients, an Easter egg. But it's from an MIRC add-on that was published in the 90s to make fun of me. Just to kind of give you an idea of the world I came from, we're sitting at a channel called Floods and my nickname is Butane and I'm sitting there talking about how to write these scripts to revolutionize MIRC. And that's not what I really see. That's probably what I sounded like, so I deserved it. But this is kind of the world I came from and what I want to bring back into our community a little bit. I mentioned my IRC client, JRC2. I have experience making something that's scriptable. JRC2 never became very popular. There's a lot of really good IRC clients out there. But it did attract a really healthy little scripting community. There's ‑‑ I think it's over 70. Maybe 80 scripts on its website. And some of them, tens of lines of code, others, thousands, written by people who have actually never even programmed before. And I noticed in the security community, there's a lot of people afraid to take the plunge into writing code. And so I wanted to create something where people who haven't programmed before have a friendly path to develop something useful, share it with others, and hopefully get hooked on the bug. So that's part of my motivation here. Let's talk a little bit about sleep. As I mentioned, I started working on sleep 2002. I didn't know I was actually going to continue working on it. It was a weekend‑long hack. It looks a little bit like Pearl. It is built on top of Java. It doesn't have any external dependencies. I like that. It's very small. It's one file. It's 150 kilobytes. The nice thing about sleep and my original purpose behind it was to make a base language, okay, that I could extend with new constructs to make the language really friendly to whatever purpose I wanted. Of course, my first round of that was a chat program. And I thought it worked really well there. With all things, I document everything. So sleep has a nice 200‑page manual. But the same thing is available online. For free. It always has been. Probably always will be. So this was a labor of love, if anything. So you're going to see some sleep code today. Don't worry. It's not too bad. You can learn more about sleep at sleep.9.org. Now let's talk about ARMTAGE. You know, some really nice things. folks at Starbucks let us cut in line and when they heard what was happening, they actually bought the tea and the honey. That was really nice of them. So let me continue on with Armtage. Armtage, for those of you who don't know it, seems like most of the room does. It's graphically user interface for Metasploit. And it's gone pretty far in the past year and a half it's been out. And I've been really pleased with it. Most people know it as a GUI. I think of it as a red team collaboration tool. And what's possible with Armtage is I can set up a team server that wraps Metasploit and makes it safe for multiple people to use at the same time. And using that central team server, a whole team can actually break into a network, work through one foothold, pivot through it and share the same accesses and the same data. It's really cool. I've taken it to a lot of exercises and I speak about it pretty regularly. So there's a lot of material online about that. Now let's talk about Cortana because we've got this ability for humans to interact with each other, right? Well, the question with Cortana was what happens when I add bots into the mix? And so created the scripting language based on sleep to automate the Metasploit framework and to extend to Armtage with new features. Just like the IRC clients, the active scripting communities did in the 90s. Why do we want to do this? Well, one, if you've got bots, you can delegate work to them and you can scale your red team activities. We'll talk about that. The reason for scripting Armtage, I feel like as a community, we have a wealth of great stand-alone capabilities. I mean, we are very, very, very wealthy community in terms of capability. But there's not a lot of glue out there. And I like the Metasploit framework. It's made a lot of inroads, but there's nothing there for adding a user interface on top of it and extending that. So that's why I want to make Armtage scriptable. Here's kind of how it works. It's possible to load Cortana scripts into Armtage. I had to come up with an extension, something that said cyber, something that said Cortana. So I went ahead and went with CNA. It's a good acronym. But it's possible to load multiple scripts into Armtage, stand-alone or with a team server, you can do that. And Cortana itself exists as a stand-alone interpreter, okay? And I can load as many scripts as I want into this headless, stand-alone container for bots. And one of the things the language enforces is isolation between each of the bots. So you don't have to worry about, you know, you don't have to worry about, you know, the other script that's loaded and de-conflicting with it. This is all built into the language. Lessons learned from my past experience doing this. Now, I've described Cortana so far in context of, like, IRC bots and scriptable IRC clients. When I first started working with Cortana, I had a lot of material that was, like, intelligent. And I was really impressed by Cortana. And I think Cortana is a great example of that. Really, the academic way of describing it is I see the combination of Armtage and its team server, the Metasplay framework, and now Cortana as pieces in a multiagent system for red team operations. So Cortana's the domain specific language to write agents that do whatever we want them to do, respond to things that happen. The team server provides the the communication layer and the de-confliction of the agents. Metasploit offers an agreed-upon vocabulary for our data. And if anybody here has ever built a multi-agent system in a committee, you'll know that that is something that will never get done and the project will stall for years. The other nice thing about the Metasploit framework is all of its modules are great verbs, actions for the simulated humans to do. Quartana gives us the ability to take any of those verbs, do something with them, Quartana gives us the ability to, when something happens, react to it just like in writing an IRC bot, when there's a new message in the chat room do this. In Quartana it's hey, when I see a new host, do this or when a compromised agent goes host, a session opens up, do this. And one of the challenges though in this kind of system is positive control. And so it's not so much the topic of this talk, but a lot of the reason this was a DARPA effort was to actually research those issues and come up with a few simple ideas and try them out for assuring positive control to debug, understand and rein in these agents, keep them from taking over the world. If you've ever read the book Damon, my goal is kind of make a system that would enable somebody crazy to do that. Okay. Well, Cortana is not the only way to automate the mess framework. First, you do have the option of extending it and Cortana is not a replacement for that at all. You should still write your modules if you've got a new exploit. You should still write auxiliary modules. Plugins are a great way to extend the framework with new commands and resource files are still a great batch capability. The Medisploit RPC server, probably one of like two or three people in the world who work with it the most, and it's really low level. So you can build something on it, but you're going to be reinventing a lot of what I've already done. But I do like it because it's well thought out and I want just really basic primitives so I can build what I've done. And, of course, there's MSL CLI which is a command line interface to the Medisploit framework and that's good for maybe embedding to a script. But this is different in the sense that we're writing these bots that are long running and we can extend Armitage. Now let's go into some uses. First I want to give you some background. I'm going to give you some background. I've mentioned that Cortana can respond to events as they happen. Okay? And here's how that works and what it looks like. In Cortana, the syntax to say I want to respond to an event is this. On some event, whatever it is, I get back a bunch of arguments and I can respond. That's it. I can declare as many of these as I want. And that's how you respond to an event listener. So you can see that I'm just saying I want to respond to an event listener. By the way, what I'm going to show throughout this talk, though, is what I call the declarative syntax, meaning I'm just telling the program what I want. But there's actually a syntax where you can hook an arbitrary event and give it an arbitrary function. So there's kind of a power user equivalent, but this is the easier to read one. Here's the way a lot of events are driven. For example, Cortana is constantly pulling the Metasploit framework, the database it uses. And it's pulling back all the tables. And there's actually a really efficient protocol where when Cortana says, hey, I want new data. I want to know what you've got. Here's a hash of what I've got. It'll send that when it requests an update and if the server says, hey, the data hasn't changed, it'll say, oh, okay. And nothing's transmitted. So it's very efficient. And the way it works is, it's very efficient. And the way it works is I have the old data and I have the new data. And I compare the two and I say, hey, in the case of host, I say, okay, hey, from the old data to the new data, some of this stuff is missing. Well, I fire a host remove event that scripts can respond to. Or I say, hey, I see a new host. I'm going to fire a host add event. And what that gives me the ability to do is take anything that is part of the script and I'm going to say, hey, I see a new host. I'm going to have this working set of data available in the medisplate framework and it gives me the ability to respond to it in a very easy, intuitive way. And I'm already doing all this data synchronization anyway, so this is kind of a free on top of what we already have. Here are the data events that Cortana fires events for. The medisplate credentials table, host, the routes, what pivots you set up, which services are seen. You can actually declare an event, for example, on service add 22 and see when the medisplate framework becomes aware of a new system with SSH open. And it doesn't matter how it figured that out. Maybe somebody launched a module and found it. Maybe somebody imported it. And, of course, I can fire events surrounding sessions as well. Now a little story. Okay. So I was at the northeast collegiate cyber defense competition this year. I've done it every year since 2008. I really love the event. And what it is, it's an exercise where college students come with their team, they're dropped in the middle, they have a network to manage and run while a red team is stomping on them the whole time. This year we had a problem. There was a new organizers and they decided to give the students all patched systems. And I guess they said the XP image that was vulnerable, something went wrong with it so they swapped it out for a new Ubuntu image. Thanks. You mean expect me to come to these events and hack? So anyways, the students have all patched systems, right? And they on top of that, the organizers decided to firewall the red team off from the competition for the first hour. Okay? So not only did we not have a possible exploit vector, we couldn't use default creds either. Although funny enough, even after the hour, two teams, we still got them with PS exec and default credentials. So if you ever play in these events, change those passwords quickly. But as you can tell, you've got ten people and you're like, well, what do we do? And a friend of mine, Jolly, he asked, hey, is there a way to, I don't know, when Chris does an NMAP scan, is there a way we can see what changed and just get that out to the room? And I said, yeah, I think that's possible. I think I can write a bot for you. He's like, oh, okay, cool. And Chris, he's a guy who's doing NMAP and changing his IP constantly and just scanning the student systems, Chris, he's like, Raph, I'm like, yeah, Chris. He's like, your little bot is kind of cool, but I don't want to import an NMAP scan every minute. And I'm like, oh, I understand. Can you automate it? Sure. So I wrote a bot for Chris running from his system to automatically import his NMAP scans every time they finished. Okay? The ones he was doing on his system. And then my friend Silas says, hey, Raph, I've got a script. I give it a bunch of IPs and it will start launching just a bunch of normal, you know, run of the mill exploits. Your bots, can you give me a bot that feeds that? Sure. So we ended up by accident with a system where I'm running a bot that announces changes to the database, new host, new services. Chris is running a bot that imports stuff and Silas is running a bot that responds to that data to new hosts and things become available and launches a bunch of attacks from his system. So I didn't expect that. I was like, okay, I'm going to do this. I'm going to do this. I'm going to do this. I'm going to do this. It was kind of cool. It was like this distributed system of hacking going on, being fed by this central red team collaboration architecture. And what you can see in this picture, much better than I can see on my laptop, is the Rafi Cortana bot actually announcing hosts. If there's a camera man, I'm sorry. I like to move around. . . And I just have to show this. This is, I guess I thought it was a momentous occasion. This is Chris editing his end map importer bot. And I'm like, oh, Chris, you're the first Cortana programmer besides me. . By the way, you want to know who the second one is? There's a student from Land O'Lakes University found the Cortana code and package on my hidden directory on my web server like a month ago and he's been playing with it since and emailing me. By the way, I just laughed. I thought it was great. So I forgot his name, but just props to him. I thought that was pretty cool. So I guess he would be the second one. So let's go ahead and do a demo. There's a lot of demos in this talk, by the way. Okay. Here I am. I've got a pivot set up and I've got an exploited host, okay? And earlier, I've got to admit, that T really helps. My voice is much better than I thought it would be. Okay. Earlier, I started the red team server. And my Armitage client is connected to it. So let's first start up Cortana with this differ bot. And I'll show you what it looks like. This is the entire differ bot. On service add, say, hey, I see this host, this port, and the banner information for that particular service if we have it. That's not too hard, is it? It's a nice thing for people who are novice programmers, they like to copy and paste stuff. So there's no object oriented hierarchy in this. It's pretty much everything you use, you can copy and paste and it will work elsewhere. So very novice friendly in that sense. So yeah, this is that whole bot. I'll just change it to convince you I'm not faking my demo. There we go. Now let's run Cortana headless. Here's how I do that. First, I need a property file. And what I want to point out is that there is documentation on Cortana, enough to nearly be a book, about 55 pages. So afterwards, you won't have any problem digging into it. And there's pictures. But what you have to do is first create a property file and say, hey, here's how I want my bot to connect. And then to run it, all you do is Java-jar, Cortana.jar, Defcon.prop. And give it the path to your bots. Okay. So let me go ahead and run that. By the way, I can specify as many bots as I want and they'll just all load up. And once I do that, you will see it in Armitage as well. But Cortana has a console for actually interacting with scripts and working with them and playing with that positive control stuff. Both the Armitage and the Chaindrop runer were factory and standalone version have the same commands in the console. Thank you, I just caught that. I heard you can't see the whole screen. I did not come here to cheat you guys out of screen space, I promise. Some people are happy to have me talk less, so. Let's do something I didn't practice, because I love doing that. Remember I mentioned that we have all these tools to understand our agents? Well, kind of, one of the tools is, it's a tracer. So I'm going to type tron, differ.cna. Got other great commands like prof and pron. I love turning something into DARPA and being like, hey guys, check out the pron command in my hacker tool. So let's go ahead and import something. And we can see, by the way, here we are in the event log for our team server. And we can see our bot joined. Go to hosts, import hosts. Hopefully that's the right file I just imported. And we'll see. Unless I scan that box already. All right, I'm going to just make sure there's no services here. I'll just scan this guy. Because I imported with this one already. So there we go. And come back and start announcing stuff to our chat room. There we go. It's saying, hey, I see this, I see that. And that was the differ script and how it worked. By the way, there's more to this story. So let me take you there. As soon as I fix my, there we go, it's better. So what was the game? Remember, I told you at Northeast CCDC, we ended up in a hard situation, right? Because we had this, we started seeing stuff. A couple hours later, we see a system pop up in a banner. And it said Zimbra. What's Zimbra? So Google it, get the default creds and log into it. And we were able to jump on the system that students had just put up before they had a chance to change the passwords. And that's because we had a bot helping us. Another example, we saw Apache Tomcat come up. And my friend Will, who works at Rapid7, he's a pen tester there. He was like, ooh, Tomcat. So he managed to get into that system before the students had a chance to lock it down. And so just having this situational awareness aided by bots was really, really valuable to us. Another story is, who here has used Windows Credential Editor before? A few of you. It's a really awesome tool. You should Google it. Probably while I'm talking right now, it's really that cool. What it does is it pulls plain text credentials. Out of memory. Okay? For the user, it's logged in. And I wrote a bot for some other events that would, every 10 minutes, sweep through all the hosts we had access to, run this tool, parse its output, and make the passwords and usernames available to our whole team. So another example of bots just helping with the tedious work. Oops. Yeah, good. So let's talk a little bit about post-exploitation. Basically, I want to control sessions with multiple people using them. And the Armtage team server makes it possible for humans, so it's pretty trivial to extend to bots as well. Here's what it looks like. I queue a command using a function like M underscore command with the ID of the session. And, um... When that command completes, an event fires in my local instance. So if somebody else queues a command, that won't fire an event. But I get this event on Meterpreter underscore that command. And I can parse it and do whatever I need to with it. Also, more generic, on Meterpreter fires, too, so I can hook kind of anything in my local script that fired. And one other thing to say to this, for larger scripts, there is the ability... There's the ability to create kind of like isolated agents from inside of one script that all just do their own thing. And that's a really great way to decompose a larger program. Interacting with a process through Meterpreter. Again, same thing, M exec, session ID, command. I get back an event on exec underscore command. So I can do M exec, session one, DIR slash S, star, colon, dot, PDF, or something like that. And when that finishes, I'll get all that information back and I can parse through it. There's also M exec local, which takes a local executable, gives it over to Meterpreter to inject directly into memory without touching disk, and work in the same way. So it's pretty cool. Shell sessions. When I was first building this technology, I got this one. All wrong. I couldn't interact with a dumb command shell in the same way I'd interact with Meterpreter, but then I came up with something that just didn't work, was really confusing to work with. So I then said, no matter what I do, I've got to make this look like Meterpreter. So now it does. Shell command, some session ID, whatever command you want, and you get back on shell underscore command, same kind of thing. So this pattern applies to whatever you're trying to interact with. Now let's have another demo. We'll load this into our bot. Oh, by the way, remember I mentioned the tracing? This is the output of all the stuff our one bot was doing behind the scenes. We'll turn that off. We don't need that. Okay. But you can see all the functions that were called, what they returned, and what file and what line number. Nice debugging tool. So let's go ahead and load another bot. It's Defcon. Autokill, I think it was. Autokill.CNA. There we go. Good. And I can actually load and unload bots, too, from Cortana Instance. So let's have a look at these. This is the Autokill bot. Here's what Autokill does. In this case, every five seconds, it looks at all of our sessions and makes sure that they're Windows Meterpreter and that they're ready for interaction, and it sends a command PS. We get back an event on Meterpreter PS and we use a built-in Cortana function to parse that into a dictionary it can work with. And for each process entry, I extract the name process ID, I check if Internet Explorer is that process, and if it is, I queue the kill command. So let's take a look at that. First thing I'm going to do, we're going to use another Cortana debugging function, which is the logging one. So we're going to do logon Autokill.CNA. And now we can see everything Cortana is doing on our behalf. And remember, a great tool for understanding a script without tracing every function. So let's go over here to my XP victim I've got. And I don't know, I'm kind of in the mood to browse the web, see what's on the Internet, see what's on MSN.com today. Thanks. Could you imagine, like, a cyber defense exercise doing this with, like, star setup star, star wireshark star, star CMD star. Same thing, though. Here you go. There's our kill commands that are being issued by our bot on our behalf. Like, turn that off. Tell our bot bye-bye now. Simple kind of post exploitation. There are bot left. Bye, bot. I miss you. And this is just a screenshot of, I mentioned the Windows Credential Editor stuff. This is from the Rochester Institute of Technology Information Security Talent Search. An offense and defense competition. And really great. If you can go out there, I recommend it. But here, this is running Windows Credential Editor and announcing it to the chat room. So you can see some passwords up there. Not much. Not my password, thankfully. Okay. Let's see here. Now, let's talk about scripting Armitage a little bit. Through Cortana, it's possible to take the default behaviors in Armitage and change them. So, here's the problem. Armitage is an opinionated tool. The developer is an opinionated tool, too. And I want to be able to alter how it does things. I, as a scripter. For example, Armitage picks my payload. Wouldn't it be nice if I could change how that works? Or here's a really good one. When I'm doing a pen test, if I try to PS exec to a system doing a pass to hash attack, and I rely on the default binary generated by the open source medisplate framework, I'm going to get flagged by antivirus. So, what if I want to hook the workflow in Armitage for passing the hash and use a different executable? How could I do that? And just, how can I modify Armitage? So, let's take a look at that. The mechanism to do this kind of, these kinds of things are filters. Filters hook an action that a script wants to take and it changes the parameters on the fly. You can inspect it and change it and then it goes through like nothing ever happened. So, let's have a look at that. Here I am. Back in all this nifty stuff. And let's take a look at a script called payload.CNA. I'm kind of messy in my folders, so don't mind me. Here's a script to what it does is when the on ready events fired me, hey, I'm synced with the medisplate framework, the framework database, it starts a handler for reverse HTTP. And whenever a user launches a module through like the Armitage GUI, it looks at the options, it looks at the payload, it says, hey, is this Windows reverse TCP? If it is, let's modify that, change it to HTTP, put in the information it needs and let it continue going. So, let's take a quick look at that. So we're going to go to there's two ways to load a script in Armitage. If you wanted to always be there, go to Armitage scripts and load and unload stuff and go to town. If you're a developer, go to view, script console, and you get that same console we saw in the command line. A little nicer, though, because it has tab completion. So I'm going to load Armitage, Defcon, payload, and there you go. Started the multi handler for us. See that? So let's go ahead and launch an exploit against the system. You know, really exciting. Do the classic MSO867. I'm feeling lazy. And we'll tell it to use a reverse connection. Press launch. And what you see is here's our payload, Windows interpreter reverse HTTP, right? I'll see if my pivot wants to behave or if the system wants to behave and it actually triggers. The main thing I wanted you to see, though, is the actual whatchamacallit the actual payload change. Somehow my 2003 box doesn't want to be exploited right now. It's okay. I know a way around that. . If this doesn't work, then I'm going to just press. I didn't make it reverse. But for my next demo, I actually need to be on that box. So we'll let that go. But that's a pretty simple example, right? Swapping a payload preference. What about what about the PS exec example I mentioned? Here's a little bit more complex script that I'm working on. And like I said, I'm still working on it. I'm converting it from something else I used to have. But what it does, filter user launch. If the module's PS exec, if the payload's a bind payload, it generates the raw shellcode for a payload that matches that. And it uses a sleep function I wrote to embed that shellcode and obfuscate it inside of an executable I have that beats most antivirus. So this is an example of how I can take and use Cortana to merge my secret sauce for a pen test into the workflow in Armitage without really changing anything from the user's perspective. And it's a really, really powerful thing. Because if you've got other things you want to integrate, other kinds of callback agents, other kinds of possibly even sessions besides Meterpreter, I'm exploring a lot of this stuff right now. It's a lot of fun. So a lot of potential here. Now let's talk about user interface here as we start to wind down the presentation. This is all about how do we add features to Armitage, integrating third party tools, exposing capabilities in the framework that aren't normally used, or even just controlling something built in Cortana. Well here's the things Cortana scripts can do to extend Armitage. They can define keyboard shortcuts. They can define menus. They can create console interfaces, pop up a tab and you have full control over it. They can create tables of information. And that's kind of what Armitage does for everything. Actually, how I evaluated this technology is I delivered to DARPA Armitage written in Cortana. I ripped everything out and rewrote all of it with just this stuff to show it could be done. And I thought it was going to be easier than it was. It was doable but it was actually kind of hard and I was like it was a busy time when I did that. But it was a good test. So let's have a demo. How many of you know that Meterpreter can sniff packets? Just a few hands went up. Great. Meterpreter has a sniffer module built in. It's a little cumbersome to use but it is there. It's a pretty cool capability. So let's go ahead and load a Cortana script that lets us use it. First, if I right click on this host, I've got a Meterpreter menu, right? And you can see all the things I can do right now. Now let's go ahead and load sniffer.CNA. Great. I now have a sniffer. If I right click on this host, go to Meterpreter, I now have a sniffer menu. Everybody loves sniffers. I'm going to press start and what it's going to do is go to that host, query all the different network interfaces on it and it will pop up a dialogue asking me which interface I want to sniff on. I'm like, oh, okay. I'll sniff on this one. I guess I don't really have a choice, do I? So let me press sniff. Start sniffer. And anybody notice what the script did? Added a little nose to indicate that we're sniffing. Scripts have a lot of power. Now, let's go do something on my victim system. Let's FTP 162, 1648, 128. And I'll do, I don't know. Login is easier. Got my password. Fine. By the way, I can still do that logging stuff I told you about. See what it's doing on my behalf. Because periodically the sniffer is pulling back packets for me and saving them somewhere I can get to them. So let's go over here. Part of the power of the Menace Play framework is not individual features but the fact that they work well together when combined. It's like Magic the Gathering. . So a great module in MetaSplit is called PSnuffle. And what PSnuffle does, it can take an arbitrary PCAP capture, extract plain text creds out of it just like DSniff used to do and put those in the MetaSplit credentials database. So let me go sniffer, PSnuffle. And here, it's running the module for me. And you can see my FTP login I just tried. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . to display an icon and it's like a pancake or sandwich is a better way to describe it. And what it does is it's a bunch of images that just gets layered together and resized. So what this filter does is gives me a chance to interact with that layer or that sandwich of images and change them. So I loop through all the sessions, relate that host, check if any of them are sniffing and if they are, I push an image onto that sandwich, on that array of sniff, dot ping and that's it. The loci add my little nose. So that's the sniffer script. So to kind of take this and wrap it up a little bit, what is Cortana? It's a scripting language for writes a bots for Armitage collaboration. It's a scripting language scripting language to extend armitage. One more thing. This is kind of evil. This function up here, something sleep can do. It's an inline function meaning when it executes it runs in the context of its parent. And what it does is it pauses the current function, the parent, and sends it to another function, the current function, the parent as an object, as a parameter. And it connects to some server elsewhere, writes this pause function out to the socket and closes everything down. This is a way that your Cortana agents can migrate to other attack servers to build a very scary distributed bot net. If you want to check more about this twist, I've got two articles I've written about this technique, shell scripting with a distributed twist and agent based traffic generation. So just to wrap this up, I introduced Cortana to you. We talked about how to build distributed bots, talked about post exploitation, how to modify how armitage does things and how to extend the user interface with new features. Again, I would especially just foot stomp like to say thank you to DARPA and the wonderful things going on with the system. I'm going to stop there. I'm going to stop there. I'm going to go to the cyber fast track program, just fantastic opportunity. That's what made this work possible. And here's where to go next. I'm armitage hacker on Twitter. There's my email. You can learn more about sleep. If you go to fast and easy hacking.com, if you go to that website and click the download link, Cortana, the documentation, some of these examples are there. And I'm going to clean all of it up and merge it probably this weekend into what's in Metasploit. So thank you very much and I'll turn it over to questions. Thank you very much.