I am sure you'll be very underwhelmed by my presentation, so please don't clap. Starting off, we're going to be talking about anomaly-based intrusion detection systems and why is a hack source best friend? First, before I start, let me ask a couple of questions. How many people here are familiar with anomaly-based intrusion detection systems? Wow. That's pretty cool. Normally, when you go out to other places, people have never heard of them. How many people have worked with them? That's still a pretty good number. If any time during this speech you have a question or concern, please get my attention. I'm kind of blind, so you have to shoot up flares or something. But if I get my attention, I'll be more than happy to mitigate your question. Yes? Do I have any connection with ISS? No. Even though I'm in Atlanta? You know, it's a popular misconception that everybody in Atlanta works for ISS. But it's actually not true. There's four people that don't work for ISS, and I'm one of them. We're going to start off with the history of the castle. What is anomaly-based intrusion detection, and how does it differ from signature-based systems? Well, basically, intrusion detection has had the signature-based system for quite a long time. Basically, it looks for a static thing in a packet. It's like a certain string or whatnot that will identify it as a certain type of attack. For instance, password file formats or whatnot. Anomaly-based intrusion detection systems rely mostly on creating a network baseline, something that it can compare against, and then checking how much a host or a network segment will vary from that. Meaning that over time, as things grow, the theory is that your network's not going to change much. And if it does change much, the anomaly-based intrusion detection system should be able to integrate with that. However, when attacks happen, something that's unusual, something like a new port being opened that people are communicating heavily with, a new web server that's running, a new application, it will be able to detect this quickly, and you can respond to it. Where do they come from? Well, anomaly-based intrusion detection systems have a birthplace in a gap in the signature-based system. Signature-based systems have a problem because they require a signature to work. They require that you know about the attack. And if your attack is zero-day, then there's generally not many signatures for it. So if you know an attack that no one else does, it can go on for quite some time until it's covered attacking and compromising hosts. With reckless abandon, basically. So until there's something developed to mitigate this, there was not much you can do. That's where anomaly-based intrusion detection systems came from. They're just looking for things out of the ordinary. What drives their development? That's that gap we talked about, I just mentioned. The gap between the creation of the exploit and the creation of the signature for the system. How anomaly-based intrusion detection systems work. A baseline is normally gathered during a tuning phase. This means that in order to create a baseline, the anomaly-based intrusion detection system has to run for a certain amount of time on your network to gather enough data to decide what is normal and what is not. The tuning phase ranges between products, but it goes from three days to a month. Say again? . It depends on how the... The particular system is implemented. . This is true, but then that's a protocol anomaly-based intrusion detection system. Not a general anomaly-based intrusion detection system. What he's asking is if you have an intrusion detection system that just looks for packet anomalies. For instance, your sequence number is out of the range of a RFC sequence number. Or if you have flags set that shouldn't be set in concert. That is also a type of anomaly-based intrusion detection that most vendors do implement, behavioral-based systems. However, unless you have a really dumb attacker, you don't have much use for that. Because most people who write attacks now don't really want to vary from the RFC. Because the signature-based systems can also detect these. If you have a tight enough system. Does that answer your question? All right. The theory behind them. Traffic that's not seen before is bad. This basically means that when you go through your auto-tuning phase, you're creating a baseline. And things that are not seen during your baseline are exceptions or generally bad. An example of this would be you have a network. You create your baseline for your network. A week later, you have somebody who installs Windows Media Player, for instance. And then when they run Windows Media Player to get streaming content, the anomaly-based system will pick it up and flag it. Which actually takes security admins a certain amount of time to mitigate. They've got to research this. Attacks can cause things that the system has not seen before. This is basically relying on the theory that if you're going to attack this system, there's got to be something about your attack. That is going to be strange or outside the norm of activity generally seen for this system. That's not true in all cases. Can science brood and research labs work in the wild? This is an interesting question because most of the behavioral based anomaly intrusion detection systems are based on theory and proofs. Meaning that if there's formulas to everything. They... It doesn't take well into account growing networks or changes in different environments. Basically, they think that everything is easily representable. AKS can build rockets, but can they build security products? My point in this statement is unless you've actually looked at network flows for a long time. And have spent a long time looking at and debugging network problems. You'll realize that you don't have the ability. To easily referenceable new attacks that you haven't seen before. I'll get to more of that later. Hardware based considerations. The anomaly based intrusion detection systems require slightly different hardware than signature based. They're generally going to be your standard x86 systems with high speed cards. But they need to be a little bit more scalable. Most anomaly based intrusion detections do look at things like protocol headers and leave payloads out. So generally they're a little bit faster. Than signature based systems that have to actually inspect the payload. However, there are some things that you need to keep in mind. One of these is the amount of data you're gathering. To make it an efficient anomaly based intrusion detection system. You have to gather enough data to do trending over time. You basically have to be able to take your baseline and augment it. That requires a lot of overhead. As far as speed goes. You need to make sure that your sniffer. Is fast. In addition to that. You need enough juice left in your processor to run your engine. Basically. And this isn't that big a deal on a class C. But when you get to a class B level or greater. This becomes a very big deal. The CASL is built on a shaky foundation. It's built on a foundation of science basically. Like I mentioned before. About the proofs and what not. You. You have basically. You're starting with a problem that has an unwieldy size. You have to gather all the data on your network. To make this work. Generally over a period of time. That's obviously a lot of data. So you have problems with this with data structures and memory. You have problems with hardware limitations. And you have problems with the integrating network changes into this. Meaning that if you suddenly decide you want to bring up a new network. Or a new set of hosts. That hasn't been seen by the system before. You're going to have to. You're going to have to. Go through a learning phase again. Basically to integrate this into your system. Which can be a problem. And offers an opportunity for attack. And there's some things that most anomaly based systems assume. Once again when I say anomaly. I mean all types of anomaly. Not just behavioral systems. What hasn't seen before is bad. Machines have normal patterns. It can be easily distinguished. And networks don't change. This is somewhat of a half truth. Basically I talked about this briefly before. But let me expand a little bit. An anomaly based intrusion detection works on the principle that. It's going to create a baseline. And over time it will work based on that baseline. And only evaluate changes to it. Unless you have a system that integrates changes to a network over time. You're going to have some problems. Because there's no network that doesn't grow. In my experience. Of nine years of consulting. I've never seen a network that doesn't grow over time. This will raise problems with administrators for anomaly based systems. Because they have to integrate these changes into the network. Machines have normal patterns. It's kind of a strange thing. Unless you understand your operating system thoroughly. You can't exactly understand everything your operating system does. An example is a random broadcast from a host. For a rendezvous for example. Things such as this. Networks that don't change is a fallacy. Networks are always changing. They very seldomly stay the same. Unless you work for the Department of Defense. Why is it hard to tell good traffic from bad traffic? An anomaly based systems rarely look at the payload. There are some that will inspect the payload. But many of them don't. They don't care about the payload. They're looking at your headers for things like protocol anomalies. Or they're looking for flow information. For things that are doing stuff that hasn't been seen before. For instance. Talking to new hosts. And talking to hosts that hasn't been seen before. Talking on services that hasn't been seen before. This is a serious problem. Because most attacks you need a payload. To understand what's going on. If a network runs in a non standard configuration. There are problems. This basically means if you have in house developed applications. Or things that aren't generally. That are developed in house. Most anomaly based intrusion detection systems have problems with these. Which is an easily exploitable avenue. Attacks against commonly used services on machines are ignored. An example of this are web server attacks against public web servers that go unnoticed. An example of this would be if I had a. If there was a machine on your network that was serving port 80 to the world. And I wanted to attack this. Based on the. The model the anomaly based intrusion detection system gives. I can easily attack and compromise this host. And the anomaly based intrusion detection system won't see much of a problem with this. Because all it will see. Is data flowing to and from the host. Which is normal. Like I said before. Most anomaly based intrusion detection systems rely on flows. Am I going too fast? Alright. Say again. Louder. Louder. Louder. Louder. Sorry about this. This is my first time really speaking in public. My parents kept me locked up for a long time. Don't laugh. I'm serious. I'm serious. Well this example it sends to many things. If you run most services that are open to the world. For instance if you're a public web server. If you do DNS for other companies. If you run a lot of services that are generally open to the world. That you're used to a lot of different hosts speaking to. Most anomaly based intrusion detection systems will have problems with these. Detecting attacks that is. Now unless they have a very glaringly obvious problem. Like a protocol header that doesn't match the RFC. Or something such as this. You're not going to see it. Which is a big problem. An example of this would be the Apache chunk exploit. On port 443. A lot of anomaly based intrusion detection systems will think the traffic to that is just fine. Because it's used to seeing people talking to and from HTTPS. When in reality you actually have a glaring payload that says hello I'm an attack. So keep this in mind when you're attacking networks that have this. Configuration problems is a serious example. Most, a lot of anomaly based intrusion detection systems. Specifically behavioral based systems. Rely on a concept of inside and outside. That being that the inside network is what you're protecting. As your specific range of hosts. The outside network is everything else. So if things aren't set up quite right. You're going to allow communication between hosts that shouldn't be talking. And that will go unnoticed. Configuration is a large problem because this is still a relatively new type of product. So most people who are implementing it have configuration problems. Such as they are not allowing changes to the network to be integrated into their baseline over time. This basically means that. When somebody does start that new Windows media player. Or they just download AOL instant messenger for the first time. They run it. That host will be a high risk. Basically a high risk host. Most behavioral based systems and most anomaly based systems in general have a different way of dealing with this. And this can give administrators varying degrees of headaches. Based on how those changes are being integrated over time. I'm sorry I'm really nervous. How to tear the castle down. Now I'm going to talk about how to attack it. And this is actually what I'm really good at. More noise less accuracy. Is basically the theory that. We talked about it briefly before. If anomaly based intrusion detection system has not seen this type of traffic before. It's bad. Now let me give you an example. Everybody here is familiar with Nessus I'm assuming. Now if you run a Nessus scan against a set of hosts that are being protected by an anomaly based intrusion detection system. You'll notice something very funny. Every one of those hosts is now a very bad host. The reason for this is the response to your scans is being logged by the state table in the anomaly based system. And it hasn't seen this type of traffic before. So generally it's all bad. So if you want to do a very simple attack on a machine that's used to not seeing much traffic. The best way to do it. Is to raise the alert level of every other machine around it. This is similar to doing an ARP attack. An ARP storm to hide a port scan. Properly crafted packets will cause inside machines to veer as attackers. That's what I was just basically talking about. You can. Based on the type of system being used. It's trivial to craft packets to make those attackers appear to be very very bad. An example is with the latest 5580. 85808 problem. Everybody's been reading about that. It was a month or so ago. The ISSX force named it Stumbler. Stumbler. Right. The anomaly based intrusion detection system I work with. Was set to look at that. Any packet with a payload size of 55808 as a bad packet. Which made making this machine very slow very easily. Because then all I had to do was use a tool like Libnet. To craft packets. Go into a firewall. With a send flag set with a window of 55808. When the packets were being reset and sent back. They strange enough had the same window size. And were being flagged as bad packets. Because the anomaly based intrusion detection system. Thought that the inside machines were generating these packets. This allowed all those machines to be very bad. And the administrator watching this machine. Missed that one very critical CRC32 exploit that went by. Covert channels. This is actually the best way of handling anomaly based intrusion detection systems. You're basically hiding your data in plain sight. Is everybody familiar with Loki? Yeah Loki's bad. It doesn't work that well with anomaly based intrusion detection systems. Because it violates that RFC stuff we were talking about before. That most of these systems love. Now what would work is something a little different. Like a low and slow attack. Meaning that your attack is going very slow and taking a large amount of time. This isn't a particularly fast thing. However it will most likely time out the state table and the system itself. Because what you're trying to do is you're trying to make your traffic appear as normal as possible. So an easy way of doing this is hiding information in something like a sequence number. As long as it's following RFC you're good. Now an example of this. Let's go back to the 58808 Trojan that was first found by Intrusec. It was a very simple model that relied on a window size. Now the versions that were found apparently opened a PCAP filter and sniffed for. Do you have a question? Oh I'm sorry. You stood up so suddenly I thought you were going to throw something at me. It appeared that it would just open the PCAP filter. And sniff for anything with that window size. When it would pull that window size out it would do a conversion on the sequence number. And based on the sequence number it would be able to extract a new IP address. That would allow communication to a new host. That something inside an added network or a firewall network would be able to communicate with. An example of something like this is something that an anomaly based intrusion detection system would fail at very greatly. Signature based systems generally have had a better chance of detecting things like this. Because you have something that's generally alike in the payload. Unless you're just reading your payload from a random data source. You can't really... You have a hard time writing a signature for it. If you're doing it completely random and relying on your anomaly based intrusion detection system. This covert channel would go into this. An example of this attack would be if I have compromised a machine over time on the inside of a network that's being firewalled. And I have a root kit that's running on this host. That generates... That's set to listen for packets with that window size. Now over time this would be a configurable option. And the inside host would have to know what it is. But that's pretty simple. So I send in a packet with a window size of... We'll go back to 55808. It pulls out the IP address. It starts communicating back to a new host. But it's doing it at such a slow rate. That the system thinks that it's either normal traffic or such a low anomaly. That it bothers not even know warranty is a high risk. This is generally the easiest way to defeat anomaly based intrusion detection system. Then we go to everybody's favorite. If you're a script kitty. Which is flooding. Which is you just really get a big pipe and you blast it. You generally time out the state table. You create such great events that in some systems you'll have overflows in the state table. This is a less desired method. As a very loud method. And normally the emitters that are doing this will be found. However it's very useful for a quick and dirty attack. Braking traffic analysis. Now we talked about... We talked briefly about the way a baseline is created. And what's done with it over time. Now a lot of these systems have a way that's implemented. To take changes. And integrate into the baseline over time. Now if you have a low and slow attack. Like I was describing earlier. Over time you can teach an anomaly based system. That your people soft server is indeed supposed to be doing IRC traffic. And everybody loves that. It's great for... The breaking traffic analysis. A lot of people assume that if you're recalling a target. Like general wide and map scans. Things like this. That very shortly thereafter. You're going to try to compromise host you're looking for. And this is because. This is the way a lot of worm behaviors work. Like for instance. The slammer worm will start looking for all the MSSQL host it can find. Once it finds it. It tries to attempt it by sending itself to it. And compromise the machine. If you time your recon. And your attack. Over a great period of time. You can actually fool this system. Which is pretty simple to do. Generally. If you look at the. You have to look at the site you're attacking. A good example would be a single individual class C. Let's say there's a company you wanted to attack. That had a small network. A class C that was running a system such as this. You would have to look at what they're doing in and out. You can find what kind of bandwidth they have pretty easily. Let's say they have a T1. So you know what their bandwidth constraints are. Over time. You at that time can. That won't work. You at that time can begin your recon of your target. By understanding the data flow in and out. And over time. You can understand how much the state table will grow. Based on the data it has. For instance. A smaller system. That uses a small network. I'm really tanking here. I'm sorry about this. A. Right. No. For instance. What we're basically talking about is state table size. When you have a smaller network. With a smaller amount of bandwidth over time. The state table is not that big a problem. For instance. A small company with a small class C. Over time. You'd have to wait weeks and weeks and weeks. To time out the state table. Now let's go to something a little bit bigger. Let's say you're attacking a company with a class B. And this class B is being protected by. Two anomaly based intrusion detection systems. And a failover configuration. Now you know that this class B is being fed by an OC12. Everybody knows what the speed of an OC12 is. And if you can do some estimations. Based on the system they're using. You know how much RAM. An SA6 system can implement. You know how much disk space is possible. You know over time. How much. How big their state table can get. So with pretty accurate guessing. You can understand how long it will take to time out a state table. So you can send in an attack. It will time out. You can send in your recon. Your recon will be noted by the anomaly based system. But it doesn't think it's that bad yet. Because it's just only recon. Port scanning and what not. And then over time. It will be timed out. Because there's no follow up activity from that host. After that. After you get estimation. You can pretty much do whatever you want. But you have to keep it low key. And my last philosophy for breaking traffic analysis. Is when in Rome. A good way to break a traffic analysis. Is to understand what the host you're compromising is doing. A good example of this would be a work station. If you compromise a work station. That does a lot of outbound SSH connections. Which is pretty easy to determine what a host does once it's compromised. If you were to mimic the activity of that host. It looks like normal traffic to it. So with the SSH example. If you were to compromise a host. And then write your root crit. Your root crit has to be portable enough to plug any port in. Or your root crit to send data over to destination port 22. The anomaly based system will think this is normal traffic once again. Flies in the system. Attacks against the system itself. This is a little bit iffier. Because in order to do this stuff. You have to know what the system is running is. For a lot of institutions. You can search in Google or what not. For PowerPoint presentations. They wrote to get funding for their systems. And by doing that. You can know what types of systems are running. And based on that. You can determine what's vulnerable to an attack. Buffer overflows. Sniffers and things like this. A simple method is attack of what's feeding the system. The router or the aggregation point itself for the system. Because although the system may function properly. If it's got no data. It's pretty useless. Is there any way to fix anomaly based systems? Yes and no. The best way to fix an anomaly based system. Is not to rely on it itself. It's got to be used in concert. With something else. Such as a signature based system. Like somebody asked earlier. ISS's or in terrorist's dragons. There's tons of signature based systems. My favorite happens to be snort. But if used in concert. You have something that's looking at the protocol header. And you have something that's also looking at the payload. As far as the problems being fixable. It would take greater time. To implement it. Basically what needs to happen is. More science needs to be developed. And they need to be tested greater in the wild. I'm sorry. I flew through this. Is it useful? Is anomaly based system useful? The answer is yes. Yes it's useful. But not by itself. Like I said earlier. It has to be used in concert. With something else. Who do they keep out? They do a really great job. At keeping out things like worms. Automated attacks. With the upcoming decom worm. I'm sure everybody's familiar with the recently found decom exploit. Destiny. It won't be long until ISS is releasing a. I love ISS. Because the guy in the front asked me if I worked for ISS earlier. I love using them now. Ask me if. It won't be long until there's a worm out for it. Since it's such a widely spread hole. This is going to be a big problem. An anomaly based system would do a very good job. In protecting you against something like this. But also do a good job against protecting you against spammers. Or things that generally create loud network footprints and are out of the ordinary. What they won't protect you against is a dedicated attacker. That wants to get whatever you have. If given enough time. Anybody can learn to mimic anything inside your network. Which will pretty much render the system useless. How can they be better? Correlation. Correlation is good. You got to have correlation systems. Did somebody boo? Oh. Boo. Yeah. Correlation systems. You got to have a correlation system. Correlation your data from an anomaly based system with a signature based system. As we described before. As well as a vulnerability detection or port scan. For instance. If you see a lot of packets going to a port that's not open. That should give you an indication of something wrong there. The problem with this is I can write root kits now that will work on. Closed ports. I can get packets sent to a port that's closed. And I can do something strange based on the information in that packet. Although it's not technically received. And things like a signature based system would have problems with that. This could be a little better. What does this all mean for your standard system cracker? I'm a penetration tester. I like breaking the things. What does this mean for me? This makes my life a little bit more difficult. This means I have to use greater recon in my target. Uh. That's basically about it. It won't change the methodology in which I break into machines. It just means I have to spend more time making sure I know what kind of machines I'm breaking into. And that is my presentation. That was. Wait, wait, wait. I'm not quite. Wait. Whoa. What's that? I'm not quite done. Uh. No. What this basically all means is. You know. I flew through this really quickly. Because I thought my slides were really lame. So. I'm going to tell you now. What my real opinion on these systems are. They're great. They really are. As long as you're using them with something else. Uh. If you're a determined attacker. I spend most of my time attacking systems as a pen tester. They're not going to keep that single determined attacker out. So if you're betting your infrastructure on this one type of technology. You're pretty screwed. And if you're. Uh. If you're an attacker. It's pretty good for you. Because if somebody's relying on this. This is a lot like people in 97, 98, 99 that relied only on firewalls for security. Without properly configuring them. You know. You can have a heyday with this. Uh. Are there any questions? You. . He's asking if I work primarily with network or host based systems. I work with both. And uh. Host based detection has a very good future. Especially with things like kernel level root kits. Because if you can detect anomalies in things like your system calls in the kernel. You can do a great job with that. The problem is this won't stop somebody from getting in initially. However once they're in it makes getting them out easier. Any other questions? You. . . . . . Are you asking if the anomaly based systems are in line? If they're intrusion prevention systems basically. Yes. No. . Right now anomaly based systems are pretty much a new toy. Not, not many people have started adopting them. This is going to change. They do have a place. And people will be using them. But at this time they're not reliable enough to use as a prevention system. because the, what they're basically, what they can basically tell you is this host is doing something strange. I don't know what it is, but it's strange. And based on that, you can't really prevent an action. Yes? No. His question was have I seen products that are very, very effective at detecting covert channels. The answer to that is no, because basically in order to do that, you have to gather all the data that's going on in your network forever and basically use that for a statistical analysis of what doesn't quite look right. And then you have to compare that with things like the sequence number count from your host and why this packet is being generated with this sequence number where everything else is going to fall in this predictable pattern. There's nothing right now that really does this. Yes? What anomaly-based systems have I worked with? That's a funny question. Based on non-disclosure agreements, I could tell you, but then I could be sued. Would you like to pay my legal bills? I'm looking for someone to, if anybody would like to volunteer. Yes? Which one's my favorite? TCP dump with a lot of Perl scripts. That seems to work well, because if you're a competent network administrator slash coder, you know what your network's supposed to be doing. TCP dump and a couple of Perl scripts will let you know what your network's doing that you don't think it's doing. Yes? Is there an open source anomaly-based IDS that you have any good experience with? An open source? An open source. My realm of knowledge is mostly in the commercial area. To my knowledge at this time, there's not, but I could be wrong. Say again? I'm sorry? Spade. Spade. I forgot about that. That would work, I suppose. But that's a different discussion. There's problems with that, in my experience. And I didn't really view that as an anomaly-based intrusion detection system. It's more of a...actually, I don't know how to describe that. It's a great tool, though. I mostly use it for statistical analysis of stuff. Any other questions? Yes? Do you know of any products that correlate data between anomaly-based and signature-based technologies? Uh... The SEMs I'm familiar with are mostly working on that technology now, which is GuardedNet, would be the biggest one. There's some open source projects that it worked with, but they still have some time until they're effective. In the answer to that, we're looking for security information management systems. Our site, where they're guarded back then, has a lot of data that's based typically in tech tools and all those kinds of stuff. That's an effort that we may want to get into. Other questions? Yes? Is there any way to find out what kind of brain death... There is fingerprinting techniques, but that's an entire other discussion. You know, just actually talking about that would take 20 minutes or so to begin with. But if you find me afterwards, we can discuss it. Any other questions? No other questions? Okie-dokie. Wait. Question? I'm going to ask one actually. I'm wondering, people talk a lot about the reactive system, and kind of my opinion on that is that you're not going to see a lot of reactive systems until somebody is comfortable with what they're doing. And I think that provides a lot of data systems that actually say flag an alert and block traffic based on it. Why do you think it's wrong? It's like a lot of the most curious thing is built that way. Well, the reactive or the prevention systems? His question is, what's my opinion on the implementation of these over time? And right now, there's not an IDS anomaly signature base that I know of that doesn't create false positives. Yes. And until this problem is cut down greatly, no one is going to trust an inline prevention system. Now, there's several companies that are doing research based on this. There's several companies that are very close, ISS being one of them with their prevention appliance. There's some other companies. But right now, the problem is, especially as a security administrator, when you wake up in the morning to 10 million alerts on your network because somebody is randomly port scanning it, you don't really want to trust whatever thought that that was a critical enough alert to wake you up at 3 in the morning to randomly block hosts. So until an administrator feels comfortable enough that whatever they're using isn't seeing a great amount of false positives, there's not going to be anything that can be done about the psychological part of implementing it. Yes, sir. Perhaps I should tell you some research I did for about a year that is consistent with yours. I was analyzing the rates of traffic to a lot of the systems that we had, not looking at absolutely everything, but trying to do an anomaly-based detection on database access traffic. You know, if you use Oracle databases, SQLNet is something that you can peek inside of. You can get rates. It turned out that establishing a baseline just didn't work for us. There are variations which I could readily see in patterns of use on a daily, on a weekly basis. And in order to establish a baseline, it took so long that by the time I could get a baseline, people were changing what they were doing. So the only things that were really useful in analysis that way were really huge variations. That would be consistent with my philosophy as well. Any other questions? We have one right over there. Am I your daddy? Yes. Yes, I am. Especially if you're running anomaly-based intrusion detection as your only method of security, I will be your daddy. And you will get an email tomorrow about that. Thank you very much.