We're going to get this talk started in just a minute. We ready? Alright. Alright, it is my pleasure to introduce a few guys from Sensepost who are going to give the talk today, When the Tables Turn, dealing with passive strike back attacker on networks. First is Raft Hemming, Haroon Mir, and Charo van der Vaal. Take it away. Okay, I can see how this is going to become a little bit of a problem. Alright, excellent, thanks. Welcome, I'm glad to see we have such a big turnout. Thank you. After last night, I thought that nobody would ever be here after a night like last night. Alright, we're doing a talk today, it's called When the Tables Turn. This is my beautiful assistant Haroon. Alright. Sorry? Can't hear me. Should I speak like this? Is this better? Gee whiz. Is there any chance that we might turn this up a bit? Because I don't know if I can sustain this for this long. Okay. Okay, let's go. So basically, this is the agenda, this is what we're going to go through. Think about the concept, a little bit of introduction. We gave this talk at Black Hat as well, and we kind of ran out of time at the last couple of slides. So I'm not going to spend a whole lot of time on the introduction. I'd rather get to the interesting bits, which is a demo. At Black Hat, we didn't actually do the demo because we had some interesting issues with hardware. This time around, I think we're going to be able to do that. I've got the screenshots on the presentation as a backup as well. So if it doesn't work, then we'll just revert back to the screenshots in the presentation. But I think everything is good. Okay. So I'm going to start off by saying, if you don't know this, we're from a small little country at the southern tip of Africa called South Africa. It is a country, it's not a region. And in South Africa, we have lots and lots and lots of robberies and crimes and hijacks and those kind of things. So I want to quickly tell you a story about a friend of mine. There's a road in Pretoria called Eteburi Road. There's a big sign up there. I must actually show you the picture that says hijacking hotspot. Okay. It's an official government sign. It's not a small little poster that someone put on there. So the government tells you, if you go there, you know, skip the robot. You don't talk about robot, right? You talk about traffic light. Okay. Skip the traffic light and just, you know, go on because otherwise you're going to get hijacked. That's for sure. Okay. It's not that bad. Okay. Anyhow, so a friend of mine actually got robbed over there. They smashed his window and they took something out of his car, his wallet and stuff. And they ran into the bushes. We also have a lot of bushes in there. It's not like, you know, America. No. Right. So anyhow, so my friend said to me he wished that he had this little C4, piece of C4, attached to his wallet with a remote detonator so that if someone steals his wallet, he can just go, you take it. There you go. And pull out his remote and go . Okay. You get the same kind of thing if you think about electric fencing. Okay. So electric fencing, everybody in South Africa has got electric fencing around their properties. And the idea there is really that if you don't want to climb over the wall to steal stuff from a house, that electric fencing is not going to bother you at all. Right. It's not very pretty. But. You know. That's the idea. The idea is that this talk is about attacking attackers. Right. But doing it in a clever way so that we don't attack the wrong people. And we attack them by basically throwing them poison out. You see the same thing in the natural world, in the insect world. You get these bugs that are very acidy. Is that what you call it? Yeah. They taste like shit. Okay. So. So basically what happens is when something eats this bug, they're like . That's not nice. Right. And you get the electric eel which got the same concept. You know. It's minding its own business, swimming through the water. And. Hello. Yeah. . His son. His son is sick. Okay. Never mind. You know. Private joke in here. All right. And. And the electric eel won't do anything to you unless you touch it. Okay. If you start prodding it and agitating it, it's going to shock you. Right. We see the same in the information world with disinformation. Right. One country feeding the other country shit. Right. Saying you should know this. Actually, you know, it's total bullshit. Okay. So. We're going to quickly go through this again. Like I said, there's a lot of stuff we want to show you. What we find at the moment is current trends in the assessment space. And I put assessment there in brackets because I don't want to say the hacking space. Right. We're finding that technology is really getting smarter and smarter and smarter. Everybody is building a better scanner these days. People are getting lazy. In the good old days, you had the concept that a hacker, a good hacker, was really someone that was technically clever. These days, you find the problem. You have the perception that someone is really clever if they have a big toolbox. Okay. And they've got lots of tools that sits in this toolbox. And we find scanners and tools for every possible level of attack. Also, the other perception that you have is that administrators are dumb and hackers are clever. So, you read about something in the paper or you see it on the news when a hacker broken into a site and everyone goes, wow, you know, that guy must be smart. Right. And the rest of the year, nobody breaks into the site and nobody goes, wow, that administrator must be good. Okay. So, it's a little bit unfair towards the administrators. And what we find is that in many cases, the attacker's network, the guy that's attacking you, his network is not secure. And his tools are not patched. And he's not running the latest service packs. So, in many cases, the mechanic's car is always broken. And in this talk, we're going to see how we can exploit that. We'll make it interesting or create a little bit of paranoia on the side of the attacker's side before he attacks a site. Okay. Okay. So, let's look at the type of defensive technologies that we have out there today. And I'm going to kind of map it back to the analogies that I've given you. So, with the robbery analogy, a firewall would be preventing the attack. Right. So, imagine you have this big tank that rolls up to the highway which takes you to your office. Someone is not going to smash the windows of this tank. Right. So, it's preventing it. You have the technology called IDS, intrusion detection systems, which is basically a little bit like the South African police. Right. They always arrive at the scene two hours late. And IDS tends to be like that. IDS tends to tell you, you've been hacked. Right. So, and then we move a little bit a step up, which is IPS. In IPS, what's basically happening is we're trying to avoid the attack. Right. So, when we detect there's something happening, we try to block that. Correct. And that can be seen as simply, you know, driving away. You see someone walking towards you, you just drive away. Then you have some people that think it's really clever that if they see something in the IDS logs that seems to be a threat. Right. And it seems a little bit strange. Or they see a machine attacking them. The next thing that they do is they attack that machine back. Right. And we know that that is very scary. That's a very scary thing because IPS can be spoofed and decoys can be put into NMAP and that kind of thing. So, that's a little bit like carrying a gun in your car. And if someone walks up to your car, you go, right? And you blast them straight away. And that's also not a clever idea. And the fence analogy have the same thing. The fence, the wall itself is the firewall. Again, the IDS is the police. The IPS is a kind of armed response. And a back hack would be my wife with a shotgun that sits there, you know, quite paranoid. And when you walk into the house at 3 o'clock in the morning all drunk, she goes, I don't know you. And there you go. Right. So, what you're trying to do with this is basically saying we want to reduce the amount We want to raise the cost, the cost of an assessment. And I have cost in brackets and I have assessment in, not brackets, inverted commas, quotes, whatever, curly brackets, you know, underscores, whatever. Raising the cost of assessment. When I mean cost, I mean a whole lot of different things. It could be the time that you spend on it, the level of certainty you have about your own network. It could be a whole lot of different things that we mean in cost. We don't mean cost in terms of, you know, real money. And in assessment, we mean all sorts of attacks, right? All different kind of attacks. It's not really an assessment. And in all of these cases, what we're trying to do is we're trying to attack the technology and not the person that sits behind the technology. So, one of the things that you will see that we're doing is attacking automation. In that case, we just make it so difficult to attack our site. That a would-be attacker goes, yes, this is going to take a long while. I can just as well move on to my next target, right? It used to be, today, it is a thing that says, are you sure when you attack a machine that you're not sitting on a honeypot, right? So, you kind of go, well, I'm not quite sure. But what we want it to be is a situation where you say, before I attack something, I've got to be sure that the tools that I am using is secure against attacks back into the tool. And we're going to show you how we're doing that. We have to worry, is our network safe when we attack something? Do we have all the service packs installed on our machines? And what we find is we go to clients and we do it ourselves. We go to clients and say, you guys should really look at this, this, this, this, and that. And we think that you didn't do quite a good job in securing your network. But do we measure ourselves as we measure our targets? And I find that just about nobody does that, right? Very quick of the mark to tell someone that he should patch his machines, but you don't do it yourself. Okay. So, I'm going to skip this slide. Okay. And so, what we're going to do here is we're going to look at different types of attacks that we'll be doing and look at different levels where we can do those attacks. So, the type of attacks, there's four categories. In the first instance, it's really avoiding or stopping the individual attack. The second thing would be to create a lot of noise. And confusion within the results coming back. In the third section, we're looking at actually stopping the tool or killing the tool itself that the person is using to attack you. And if you get really hectic, then you can see if you can attack the attacker through his own tools and through his own methods. And we're going to look at that on three levels. You're going to look at it on a network level, on a network application level, and finally on an application level. Now, consider this. If somebody attacks you, every single bit of information going back into the attacker's tool or into his network is really under your control. You control what the attacker is seeing. You control the data that's being sent back to the attacker. All right? So, let's just look at examples of that. You can look at the packets. The packets itself that's going back to the attacker plus all its features are under your control. You control the forward and reverse entries, DNS entries, that the attacker will be seeing. You control the banners that's spewed back to the attacker. You control the error codes and the messages within web pages. You actually control the whole web page itself if you're looking at a web application level, right? And this data that is under your control that you're sending back to the attacker could be used where the scanner or the tool actually reads the data. Right? Where the tool stores the data when it writes it into a database given into a file. And when the scanner or the tool renders the data to show it to you. Okay? And we're going to look at examples of what we can do with this. Am I doing it for time? Okay? Time? 15 minutes? Right. Now, before we start showing you the interesting parts, the demos and that kind of thing, there's two things that you really must consider over here. The first is the legal implications of what you are doing. Okay? So I'm not an expert in law, and I don't know really how it would work, but I could guess that, you know, someone would want to look into this and say, well, you know what, we know that this guy was really out there to get you and he was attacking your network, but you wiped out his whole, you know, corporate network where he was attacking you from, and that could lead to some legal ramifications. Okay? So before you implement this stuff, speak to someone that's in a suit and a tie and that knows the law and drives a big car. Okay? The second thing is the stuff that we build here, we're not going to give it away. I'll tell you why. It's a little bit sucky in terms of its implementation. Okay? We're not hardcore programmers, so the stuff that we build is only meant for a demo, and before you start deploying this or this kind of idea on your corporate network, look at it a little bit in more detail technically. Right? Because the stuff that we build is not made to be robust. That's why we don't want to give it out. Okay. So I'm going to quickly go through here. Let's look at examples. First of all, in the first part of our assessment, what we're going to do is we're going to try to do a footprint of this company. Right? And you all know that Sensepost is very passionate about footprinting, so we looked at ways that we can break our own footprinting tools. Avoiding, we can really go into DNS. Right? We can do some obfuscation to hide ourselves away, which can actually be done quite nicely. You can have MX records that's offsite with split DNS between you and that MX record. You can hide away your website to put it totally off your network so that nobody can actually get the IP numbers where your network is located. It's not that hard, especially when you don't offer services that need to interact with your internal network. If we want to create noise, one of the things that we do is we create a zone file, which we allow people to do a zone transfer from our network. And in this zone, we put a whole lot of IP numbers and names in there. At one stage, we had something like 25,000 entries within our zone file, pointing to all sorts of interesting places which you don't want to attack. Okay? So someone gets our zone file. They basically go through all the IPs. They say, well, yes, look at this network. It's rather large. Let's attack all of these machines automatically. Remember, we want to attack automation. And they'll be attacking very interesting machines around the world. Okay? You do not want to attack the FBI, for instance. In terms of stopping footprinting, what we can do is we can build a name server that basically sends back an endless loop. A loop of entries when you do a zone transfer. Right? It never stops. It always keeps on going. Now, manually, you would detect that it never stops. But if you have something that runs automatically, that will just run forever. And in terms of killing, we can control, like I said, the forward and reverse entries, DNS entries for our zone. Right? So with the forward entries, we are a little bit limited in terms of what our IP numbers should look like. Correct? But in the reverse entries, if we build our own DNS server, we can be very creative with the kind of entries that we give for our reverse DNS. I'm going to show you an example of that. Okay. That's a name server that's basically running... It's kind of an evil name server. And if you look at the reverse entries that we have there, if we start doing a host command and piping it through... Something like set or awk or grep, you can see that there's... To start off with some HTML in there for rendering, when we start rendering this stuff. Well, we can just do backtick and see if we... Not backtick. Single quotes. See if we can break the actual query. Not query. The actual command. Break out of that command and start executing stuff. So that LS, for instance, pipe LS, could be interesting when someone just runs it on a... From a command line. Do the host lookup from a command line. And we can get really creative. Like, you know, maybe rn minus rf slash, you know, those kind of things. Now, what we've done is we've implemented the very large zone files on our domain. And then just to see how the tools would react to it, we used a tool called the... It's actually the trial kind of free demo of the Qualys network discovery tool to see how Qualys works. And then just to show our network. Now, before I show you this picture, keep in mind that we have one class C network. And we've got about 25 machines in there. Okay. So it's not a big network. When you... When you let Qualys run on it, however, it looks like this. Okay. So it thinks we've got a hell of a big network. And eventually, it starts saying, your discovery has exceeded the time limit to view your entire map. And then it says, map, sign up for Qualys Guard. Okay. So you can see that just by looking at the reverse entries, this thing thinks we're everywhere around the world. Okay. So that's about what we can do on our footprinting side. So I'm going to go on to network level. What's the time? We're doing good for time. You want to go? You want to take? Okay. So on network level, what we can do is avoiding the stuff is obvious. Right? We put a firewall in there. It's as easy as that. When we want to create noise, we can play with interesting stuff. We can play with... We can play with the HoneyD kind of configurations. I've played with the transparent reverse proxy just because I found it to be a little bit easier at the time. And what we can do is we can take random IPs. We put random IPs up to be alive. We can have random ports open on those machines. This is not a big deal. We can have fake network broadcasts. Okay? And the nice thing that we can do is we can do a traceroute interception in this direction. And if you look at traceroute, what does it actually do? It sends a packet, right? And it accepts back ICMP TTL expired. Correct? Now, that IP address that's sending out the ICMP TTL expired can obviously be spoofed. And if we spoof that IP address, our traceroute engine at the other side is going to think that's the next hop, which means we can basically control the next hop or where we are going. We'll show you that. We're going to show you that live. Are we going to do it now? Okay, let's do it now. Okay, what we used here is just to visually show it, we brought up, again, a demo version of visual route. Okay, and visual route at this point tracing to some host behind a gateway that we control. We're not going to get name resolution here because we're not live on the net. But what we should see is once it tries to get its name resolution going, if the demo gods are kind to us, just give it a few seconds, we hope. Okay, at this point, there's no packets actually going out on the network. We should be seeing it come up on TCP dump. Okay, what you're seeing here is ICMP packets getting to our gateway, and here you've got our gateway picking random hosts, sending results back to the traceroute server. Okay, as it gets a packet, it just repackages it, sends it back, at the moment using a list of IPs that we picked from random three-letter agencies around the world. Okay. So at this point, it's gone. It's going to keep going. Unfortunately, we're not live on the internet, or you'd see interesting lines as this thing bounces around trying to figure out where in the world you are. We got that on a screenshot, so I'm going to show you that on this side. But that's pretty much what this does. Okay, the first hop, you see it hitting our gateway. Okay, and after that, it's literally taking the IPs from our list until it decides to stop trying. Okay, the IPs we can pick, you can make it as believable as you want so you don't have to go Russia or Mongolia. You could bounce it around in the UK, bounce it around a little more just to add to effect, and it should be pretty good. The interesting thing that we thought about there was actually, you know, showing the route going back into the attacker's network. So I'm going to show you what the slide looks like when we actually show we've done it at the other side. And it looks like this. Okay. So we got it going through the Russian information agency, the Bulgarian government network, and all sorts of interesting places where you wouldn't expect it to go, correct? Okay. Like I said, what we can do as well is basically intercepting all the basically putting random machines live on this network as we wish. We actually have it in a CronDrop. That will change this every time. It will change every five minutes. So it shuffles the whole network around a little bit. Okay. So for now we're just going to kick off a port — a ping scan against the subnet. Pretty straightforward. What we're looking for here as Rilof mentioned is also just how most tools will interpret broadcast addresses. Okay. There was recently a whole long thread on one of the security-focused mail lists on how to determine a subnet of a company. Okay, just about everyone uses broadcasts as a good indication of where networks are subnetted. In this case, the tool randomly picks subnets and decides to return multiple replies for that. So at this network, you've got, I think, about 15 different subnet broadcast addresses and random hosts that appear to be up at any given time. Yeah, and we can do this easily if you look on this screen. Sorry, we're going to take you from here to there to there. It's like tennis. You can see here's a simple postscript that does that. We say we want seven web servers, three FTP servers, and 20 generic ports spread across 12 IPs with five broadcasts. This results into a whole lot of IPFW rules to set up the transparent proxies. And then we have specialized listeners that gets those ports. We're going to show you some of those just now. Okay, that was for if the demo didn't work. Okay, so we move on to the next level, which is your network application level. Avoiding, you just need to install your patches. When you do noise in the system, that can get interesting. We do fake banners, which is also not that, you know, cool. But we can also start to play with combined banners. A combined banner is basically a thing that says, I'm a WFTP 4.2.2 server. And I'm a Microsoft FTP server. And, in fact, I've got a big identity crisis. I'm all of the servers in the world that I can be. Now, if you look at a Nessus plug-in and how they determine that banner, and some of the plug-ins look at it for the beginning of the stream, right? But a lot of the plug-ins actually looks at it anywhere within the stream. And those plug-ins, if they look at the banner, they're all going to fire up now and say, well, you're running a bad version. They can, in fact, go as far as saying, we want to build a nasal reversing technology. So, we've got an interpreter which says, if you see, normally how the nasal stuff works is we send this and we accept that. And we're waiting for this kind of output. If that output is there, we're going to trigger it. In this case, what we can do is we can do it the other way around. And so, when you see this kind of request respond in such a way so that all the plug-ins is going to trigger on that thing, right? If you haven't built it, it's a little bit difficult. In killing network application level scanners, we can look for buffer overflows within the scanner itself. See if there's a buffer overflow in there. We can look where it renders data. And a lot of the scanners actually render data in HTML. So, how cool is that? As soon as the scanner renders stuff in HTML, what do you think happens when I put a HTTP redirect to a porn site within my banner, right? Okay, the scanner's going to pick it up. It's going to display that banner at some stage. And if my application that's displaying that data, is not escaping the HTML, I can basically put anything into the report. Okay? We can look at where the scanner actually puts data into a database. So, we've all played with SQL injection, correct? And we love playing with SQL injection on our victims. Well, imagine if someone is now playing with SQL injection on... I don't want to say on your tool. That just sounds wrong. Where someone is actually... But actually using SQL injection on your scanner. Now, you've got to look at how you parse your input. Your input being the output of the banners, right? We're going to look at an example of that just now. And then, of course, scanners that use other scanners. Everybody's going to scatter these days. And basically, we only have a couple of real good scanners. But people build a scanner, and then they take... They use Nmap or Nessus within their scanner to actually do the work. So, you've got to be careful when you're getting the data. of your actual scanner, okay? We're going to go into examples of that. Let me just see what I have in here. Those are just some of the tools. Okay, what we've got here, quickly, just to set up a concept, is an example of a bad banner running on an FTP server. Okay, in this case, the FTP server is a generic listener. An FTP to it gives back a whole bunch of meta characters. Okay, but one of the things that's really interesting is a concept that we borrowed from a paper written by H.D. Moore on terminal security. Okay, in this case, the Xterm that we're running it allowed the banner that came back to inject characters into the title bar. Okay, so as soon as the guy connects, what he's got up here is, messing with sense posts you are, owned you will become. Okay, we're going to borrow that again in a few minutes. But also, what you see is, at this point, we're just playing and playing. Okay, we've got a pipe RM minus RF in there. We've got a HTTP redirect in there. So pretty much we're saying, let a scanner hit this and let's see what results come out of it. You want to go onto the... No, no, just hang on. Okay, so for the people that can't see over there, I've got a little bit enlarged over here. So you see the banner over there. You see we're trying A-scale injection just with a simple one equals one. We've got the RM minus RF on template. And it's just a nasty thing. When we run a Nessus against this particular um, FTP server, okay, um, oh no, no, I don't have that. Sorry. Sorry. Okay. Okay. Um, yep. Um, the second thing we want to go through, um, pretty much in the same term, or in the same issues, again, terminal server security, is actually a strike back at people running Metasploit on insecure terms. Okay, I'm not sure how many of you caught it, but Metasploit's absolutely killer. The guys gave a really good demonstration yesterday. In this case, we've got a fake, um, web server sitting up here. Okay, and what we've got up here at the moment is the web server running in invisible mode. Sorry, I'm just going to kill that, and instead run it invisible. Okay, screw it. Let's just go invisible. Okay, basically, um, I've got the MSF, um, CLI here. Okay, so I'm just running Metasploit, picking an IIS printer overflow, and asking for it to bind to port 80. Okay, as the connect goes through, okay, you should see it get a return connection, and then what it does, okay, if you're quick enough, you would have seen the title bar change briefly to LS minus AL. Okay, and then it goes and drops LS minus AL on the command line. Okay, this example, taken straight from HTML's terminal server security paper, okay, and basically the thinking here is, what do you do the moment you get a remote shell pop up once you run an exploit? Okay, just about everyone, the first thing they do is hit enter. Okay, so if we're feeling particularly evil, um, we could kill this, and instead, okay, I'm just going to drop the mic for a second, or if my assistant holds it for me. Okay, we're going to run the same, we're going to run the same command again. If you get that out of my face. Okay, we're going to run the same thing again, run it on port 80, this time we tell it to run in invisible mode, and this time we tell it RM minus, no, okay, let's just do LS minus AL again. Okay, so I'm going to run that, you got it listening in invisible mode, the exact same command that we just ran, okay, and this time, you see, get its reverse connection, okay, and drop you into what looks like a shell, except this time it also includes the escape meta characters to make your text invisible. Okay, so what you're sitting with at your command line now is the command that we decided to inject, okay, you hit your enter, and that's the results of the LS minus AL running on your invisible term. Okay, so the next time you get a remote shell pop up on your machine, you want to make sure that it's a shell, and not something like screw term coming back at you. Okay, again, um, it's not a problem with Metasploit. Okay, just to confirm again, it's not a problem with Metasploit. Um, what we are saying is, it's cool if you want to use tools, now secure your term before you decide to tell me my network's insecure. Okay, so start, um, this is genetic X term, um, nothing special done to it. Okay, so let's look at, this was if our demo didn't work, okay, which it did. Okay, now let's look at application level. Okay, so I'm going to look at application level, and generally at web, um, server, um, assessments. Well, if we want to avoid it, we need a application level firewall, which is beginning to become a reality nowadays, which is quite cool. Um, you're on the live, you're on there now. Okay, um, and what you can do there, I don't know if you've seen, um, Samuel Shah's talk on, um, PHP Guard. Did anyone see it at Black Hat? Um, if, if you haven't, then wait for the paper to come out. It's, it's really kick-ass. Um, okay, what we're going to do there, I'm going to briefly explain to you what we're going to do there. Basically, what we can do is, um, we can return, um, random 404s, 302s, 500s, 200s, um, on any of, of, of the listeners that we have on that firewall, correct? Now, we wanted to do it in two ways. We actually have two versions of these. The, the one version, um, just don't return enough results for, um, a tool like Netto to actually realize that it's getting too many, um, fake 404s coming back, right? So it basically shows you a report, um, and all of those things are, are just about, um, are just nonsense. They're not really there, right? Because we can control exactly the error code that we're sending back. Um, if you look at Nessus, they've got this plug-in that they call, you know, 404. Right? Um, what basically happens with no 404 plug-in is that we test for a couple of files that we know will never exist on the system. Okay? Um, and if we find that for those files that we, that does not exist on the system, um, if we find that there's a 200 coming back for those, then we say, well, these guys are actually doing something, um, they're not really returning a, a nice 200 or a 404, so we better be careful what we do. But in our case, we can know exactly, we know what the string is that Nessus tests for. It's called capital N, Nessus test, capital T. So when we see Nessus test coming through on the system, we send it a nice, gently formed 404, and for anything else, we just give it bogus information, which means that plug-in, the no 404 plug-in, never triggers. And now we can control all, all of the rest. I'm gonna show you what it looks like. Um, and within the application, in itself, we can go crazy, right? We can have bogus forms, bogus fields, as soon as we detect that someone is in there trying to, to, um, to scan us, and we can do that, and Samuel did it nicely, we didn't do it like that, but he says, let's put an invisible pixel on the screen, right? A user's never gonna click on that invisible pixel, because he can't see it. But a trolling tool, a kind of a spider tool, that kind of thing, is gonna click on it, correct? Because it's a link that's there, and as soon as you see that, um, tool clicking on that link, a troller clicking, clicking on the link, or mirroring site, mirroring tool, then we know that it's a machine on the other side that's trying to attack us. Okay? Um, if we wanna stop this, if we wanna stop, um, automated, uh, application level tools, uh, we can build what we call a spider trap. Um, and it also works for spiders, of course. Um, and, and a spider trap is basically a page that contains links. When you click on a link, you get another link. And if you click on that link, you get another link, and so forth and so on. I'm gonna show you a screenshot of that. Um, what we can also do is we can build in there what I call, um, human detectors, or browser detectors, which we're gonna go into just in a bit. Um, and what we can do in, in, in the killing bit, this is the stopping bit. If we, if we wanna go in to kill, actually, the application, or attack that application, um, I don't know how many of you have seen that page that says, you are an idiot, ha, ha, ha, ha, ha, ha. Right? You've seen that. It's a, it's a small little, um, flash that runs within a browser, um, and we can't ever stop that. If we try to kill that window, it spawns off another seven windows that starts bouncing around on the screen. You've seen it, right? Now, what we can do is we can take code like that, or any other kind of malicious HTML code that we would wish to want, and we can put that into our listener that's basically listening on random IPs. Okay? Um, the other thing that we can do, um, is we can simply, um, take a file that's a very nasty virus, or, uh, let's say a very nasty denial of service attack tool, create a directory in our, on our website called slash admin, or slash secret, or something like this, right? Take that exe, call it admin tool dot exe, and copy it in there. Now, a normal user will never see that, right? But someone that's scanning your net with, with, with something like, uh, Nicto or Nasus, gonna say, there's an interesting directory called secret. And we make that slash secret indexable so that the guy can search to it, see there's a tool that says admin tool, or don't run this, or secret dot exe. What do you think they're gonna do? They're gonna pull it down, run it on the local machine, and take out the whole network. Okay? Again, remember the legal implication, okay? All right. So, so this is a, this is a screenshot of what Nasus looks like, the output of Nasus WX, um, when you run it against, um, one of these, um, when you run it against one of these, uh, sites, and you'd find out that it's basically triggering on just about any plugin that you can find. Um, the idea would be that if someone sees there's a thing called, what is this, VS set cookie dot exe, if they actually go to that page and search to that page, um, we know that there's no such web server in there. It's one of our listeners. Um, and that's gonna result in, in a page like that on the right-hand side. Okay? Um, we wanted to show you this live here, but there were some issues with the internet connectivity. Okay? Um, and on the left-hand side, what you see is, you see, um, what a spider trap typically looks like. Okay? So you've got lots of, lots of links, random links, basically just points into other links. And if you have automated web assessment tool that basically crawls the site, it's gonna run into this, and it's never ever gonna stop. Okay, so the very last section we want to tell you about is a thing that we call armpits. Um, it was like we thought about tar pits, and then we thought about, you know, something that's smelly and nasty, so we thought about armpits. Um, okay, and, and armpits we use against, uh, automation, really worms and that kind of thing. So let me tell you how we got about that. The, um, on our website, we had this, the marketing people decided we need to have this flash intro to our website. Okay? And it had a little thing in there that says skip intro, which everybody clicks on always, right? Um, so what I've done is I looked at that flash intro, and I basically took away the link that says skip intro. Um, and then if you try to mirror the site, you find that you can't mirror it because your mirroring tool can't understand flash, and it can never get to the end of the movie that redirects the spider into the actual site. So I thought, hey, that's, that's interesting. I spoke to the developer. I said, can you make me a movie that's one pixel big, and that's zero seconds long? He was like, eh? You know? He said, well, just do it, and give me the, uh, the redirect into the site. So we started playing, we started to playing with flash stuff. Okay? And basically what we build is a small little thing that runs on a network level. It runs on a session level. Um, and it acts as a proxy. Okay? And it sits between you and your website. And basically what happens is it uses flash to create a session ID. Dynamically it builds up a flash that creates a session ID, um, in terms of, uh, as a request to the site. Okay? Um, when we see that request, a valid request, with a valid checksum coming through, we generate a cookie. We send that cookie back to the browser. The browser now makes a new connection with that cookie, and if the cookie is there, and the cookie's checksum is good, we say that's right. You can relay through the site. I'm going to show you, I'm going to show you what that looks like. It looks a little bit like this. So we've got incoming connection. Um, is it a valid cookie? If it's not a valid cookie, the first request will never be a valid cookie. We say, is it a valid request string? Is the checksum correct? If the checksum is correct, we build the flash page. We send it back to the client. Now it says, do we have a valid cookie? Now we don't. Is it a valid request string? Yes. Okay? We send it back to the client. We send a cookie to the user with the checksum in. Now the user's got the cookie, makes a connection again. Does he have a valid cookie? Yes, he's got a valid cookie. And now we can relay this. So what Arun's going to do, no, no, no, no, no. What Arun's going to do is he's going to simply tell it, um, to, um, a site that's running that. Um, if we, if we tell it to that IP address that we're running that site on, one, one, two, one, six, eight, one, two, two, ten, eh? Let's go. Okay. Um, we're going to, can you just do a control L? Okay. Basically what you're going to see is before he even starts to send stuff in there, okay, we immediately get back a flash page, right? That's a flash page that we dynamically build. Okay? So it doesn't matter what it puts in there on the network. We're always sending him back this flash page. And in order to actually go to the site, he needs to interpret the flash. So you don't get a lot of guys coding an exploit going, well, you know, this exploit, we need to make this exploit flash-aware. Okay? Um, and that's, and this is the whole idea. The idea is that we can identify our browser. Uh, we can identify that the user is using a browser. We can, we can combine that, okay, that's just what it looks like. We can combine that, um, with a firewall that only the user can access. And then it allows this stuff into our relay, um, in different ways. We can do it either with, uh, um, human-detective air. We can have it running on port 80, and our real site running on port 81, which is exactly what we're doing over here. And, and lastly, what we can do, is we can start combining that, see, this slide doesn't come up nice. We can combine this with the, with the IPS, okay? Which is, we basically now have a bad cookie jar over there. And if we see someone doing something wrong, we just send the guy, um, a, we close the connection, we mark the cookie as bad, and we basically now track, bad cookies and not good cookies, right? So, what we're gonna do on this side, is I'm always gonna show you, when he goes through the site, what's gonna happen. Now, we're running two VMware images in here, so it's gonna be a little bit slow. Um, but what, what you will see is a quick flash there, in the right-hand corner, which is the flash that's actually executing. And then, there you saw it. And then you see it coming back to the, to the actual page. Now, remember, this, at this stage, he's got the cookie. So, he can basically surf into the site, as he wished for now, and the cookie never expires. And he doesn't have to go through the whole flash exercise again. It's only the very first time that it connects there. Okay, so, that's an interesting thing on a, on a network, on a, on a web application level. Um, when he puts in something bad in there, okay, we can detect it. So, if he puts in a single quote, um, let's just do, xp command, so, um, signatures in there, we basically, we don't want to build the IPS, right? Um, not right now. When it says, you are naughty, I will blacklist your cookie. Right? Now, that cookie is destroyed. If the cookie is destroyed, he's got to go through the flash exercise again. Okay? So, a scanner, is going to trigger that every time. Okay, lastly, what we're going to do is, we're going to look at, is on content level, I'm just going to spend a minute on this. This is basically when you think, someone is sniffing your traffic, and reading your email. And you can do a whole lot of interesting things with them then. You can throw them bait, right? I can send a mail to Arun saying, dude, you know what? There's lots of secret stuff on this website. Okay? There's no such, there is a website, nobody ever looks at it. We basically just look at the logs, and, and we put some very nasty malicious HTML code in there, and we see if something is wrong. So, if someone hits that site, ever. Now, if anyone hits that site, hit that site, we know it's someone reading our email. Correct? We can do the same thing with, with basically creating traffic that bites back. Like, we know there's, there's some issues in some of the sniffing technologies, which means if I send a particular string through there, it's going to break the sniffer. Right? It's going to cause a buffer overflow in the sniffer itself. And we can start looking at, at, at, putting our offensive kind of technologies into, well, we can put our offensive technologies there, where our sniffer is actually going to read our stuff. Right? So we send you data all the time, that's basically causing the sniffer to, to break. And in that case, in some cases we might even attack the guy that's sniffing our traffic. So that on a content level, and I think they want to throw me off the stage by now. So, if there's any questions, we're going to answer them. We're going to be outside, basically, at the pool area. But I think we need to get off here. Thanks for, for your attention. And I hope you enjoyed it.