I worked there for four years and lots of times I've used IP spoofing because customers put us on a network that is not allowed to go anywhere so we have to spoof our IP addresses to get connections. First I have some free stuff if anyone is interested. There you are. These slides, I mailed them to DT. I hope he will put them up on some web page somewhere. I will not. But DT, I will mail him that he has to. I'm trying to see on my computer at the same time. What we will talk to you about today. I will say some first. Then we'll have some definition of spoofing. It's very short. One slide. And Linux configuration how to set up Linux. It's three lines. And its sniffing. It will be some things about passive network mapping. because it's a cool way to find out which host is up and what service is running that you can't access from your normal IP address. Then we'll talk about how to set up IP spoofing with a source routing, so we will have some slides about source routing first. And then it's vanilla IP spoofing, how easily it is set up, and then an ending. And there will be time to get to the Cult of Death cow show, but it will be a hard time to get in there. We'll discuss spoofing. There are so many people that think that IP spoofing is something very hard to do, and it's very difficult to set up, but I will show you how easily it is done with full connections. And I will not take up examples of session hijacking. It's you making your own connections, full own connections, with spoofing. Yeah, I'll give you one minute. No. It says that IP spoofing is used to go through filtering routers. It's used to go through filtering routers. Or firewalls. Yes. So it's a rule-based router, firewall, that says, like, A is not allowed to go to B, but C is. Okay, I changed my iPad S to C. It's okay. And it's really okay. It sounds easy, and it is easy. That's the point I'm going to give here. Because, yeah, I'm going to give it a try. I will come to the point later. If you have any questions, we'll have some questions at the end. But it's so simple, so if you ask a question, maybe people will start looking at you. It's a way to get rid of questions. So, how do you configure your Linux box? So, how do you configure your Linux box? Well, we use Slackware. We like it because it's simple, and you have to do everything on it to, you have to download all the libraries by yourself and so on, but when you've got it running, it's perfect. In the kernel, you have to enable IP forwarding. If it's not done already, all hackers uses it. It's one way to, if you are redirects or something, it's the easiest way. In the kernel, you have to enable IP forwarding. If it's not done already, all hackers uses it. It's one way to, if you are redirects or something, it's the easiest way. And the next one is, the default, the default of IP drop source routed frames is enamel. So it drops all routed frames, the Linux box. You have to disable that option. You have to disable that option. So your computer is able to source routed frames. and IPA-lessing, it's like you have lots of IP addresses on your network card, ETH0, for example. That's it. Now we're sitting on an untrusted network. We are C.3, and with CFO, it's a very good passive network mapper. It's by Subterranean Security Group. Are they here today? No, they're drunk. You can see traffic with Ciphon. It's just a passive network mapper. You have to start it, and it will show up that E.2 have port 80 open, because someone is surfing to that box. In this example, we have port 80 open. This example is B.2, okay? Now we know it's port 80 is open on that one. When we try to connect it from C.3, we don't get any answers. Why? Yeah, probably C.2, the router C.2 is filtering that traffic out. It just allows computers on B network to reach this port on that computer. That's why we use passive network mapping. It's a very good key to IP spoofing. I have to just write dsniff also, because I love that tool, and it also shows if B.2 makes login to E.2, it shows up, and when I try to login, I don't get any connection. But it always, it's down to tcpdump, of course. Anyone use it here? And it's for looking for what IP addresses that sends the package, and the MAC addresses of the packages. It will become important later. So, an arrow from B.2 to B.2, nice. Good. So, five minutes and half the speech is over. Because this is so easy, as I said, some people think it's very hard to do, but after the show, you know how to do it. Why source route? What is source routing used for, anyway? Why is it enable default? fault on the routers. Yeah, you maybe have two different ways to a network. You are A.3, I want to talk to B.3. You can go through a router A.1 on a slow, cheap line, or A.2 on a fast, expensive line. You may choose with source routing. I choose A.2 or something. I will show how it is done. Now, and maybe you're connected to network with the same network number. It can be done, but the router A.1 don't know which network who will choose, but I may choose in my network packages. But not many uses. Source routed frames today. Hackers do, and it's, I'll show you now. If you are A.2 here, and the rule in the router A.1 says A is not allowed to go to network B. You just pick B.3 here, one IP address on the inside, and you send, you craft a package. And it go through, it's simple like that. But, the problem is, if it just craft the package and send it, it will go back to B.3. You don't want that, you want a full connection. You don't want to do blind spoofing here or something. It's, or guessing something. It's, I want the packages back. So. Yeah. So, here's the example. There's a router called C.1. And it's a rule that says E are not allowed to go to B. So, I'm B.2 on this network. I just pick another address, A.2. And it's done. So, I'm B.2 on this network. This way. Yeah, you already have an illegal IP address, E.2. You just make another IP address in the network card with this command, and you have A.2. This is, this network is a typical network on companies that's using filtering routers to protect like a production network or something. And it's... This is way how to get through it. You add a route, of course, that says, like, net A is on my network card, thank you. And then you use almighty hobbits, netcat, and have some switches on it, just network numbers, verbose, and I have the source of A.2, my spoofed IP address, and I choose the gateway to my legal IP address, so it's on the real network, and the destination, it's at the end here, there, the destination is A.2, port 23. So I connect from my spoofed type address, to my real IP address, to myself, on port 23. If we get an open here, it's working, okay, your computer is fine, it's handled source focused frames in a correct way, and a good start. What you do next is that you have, of course, at always, A.2 as a spoofed address, source address, go to your real interface as a jump, network jump, and then to the routers, the first downstream routers IP address, E.1 port 23, if it's open of course, and if you get this open there, it is vulnerable to source routing, and it mostly are. And when you then fingers the router E.1, it will show up in the, who's logged in, you're not, you don't have to log into the router, you just have to connect to it and finger it, and it says like, A.2 has a connection to it. Good, this router is fooled right now. So we go on, and from spoofed A.2 to my real network interface, to the first fooled downstream router, to the next downstream router. Same thing, if it's open, it believes what I'm sending, so this line will do it. That easy. You have a full connection, you can talk to POP, everything, FTP, something. This is said in the readme file of Netcat, that it can be used, but it's not described how easily it is done. So people don't really, I don't really understand how it's important to disable source routing in routers. And one more thing, it's important to understand, that all these hosts, or routers, had to accept source routed frames, of course. What, excuse me? That is the first thing you turn off. Yes, that is the first thing you turn off. But you may, people don't. What do you do if it's not turned off? You disable. If it's turned off, what do you do if it's turned off? I will come to that. Okay. Well, it's very hard. It depends on the rules, how the rules are set up. The question is, what do you do if it's turned off? It's very hard. It's hard. And it depends on the rules, that if it's like, only this network allow, or your network just deny, or something, it depends. But this is working fine in Europe, and I think it will work fine here. Here's one more thing I will show today. And we have lots of time to go to culture.com then. I will be there, sharing. And here's a router called U.2. The small letters, what's called, lowercase letters, they represent the MAC address, of the hosts. So I'm having MAC address B, and my IP address, legal IP address, it's U.3. I'm sitting on an untrusted network. Nobody trust me there. The customers put me there when I'm going for penetration tests. They don't want me to find anything. And the rule in the router says, like, if you come from A, a trusted network, but UBER untrusted, you're allowed to go to B. And everyone else is denied. It is this rule we find too many times on filtering routers and firewalls. Because, I will show you how it could be bypassed, easily. Because, if you just spoof, the IP address, you craft a network package, and send it to the destination, it will get through, because I'm A.2, it says in the network package. It will pass the firewall filtering router. But, when the answer comes back, the first router, B.1, will say, like, A, this package is for network A. A, this package is for network A. It will find the router, U.1. It put the MAC address of A on that packet, to, and the destination, IP address, A.2. Got it? It will, if you, you can easily just send packages, and sniff the responses, but it will go to the router. But, this is, I will, this is not fun. You want full connection, you want to run Nmap, NETCAT, Nessus, and everything, and you don't want to just sniff the responses. So, and then, the network package will be transferred to the right host. So, what? I don't. I really don't. Yeah. Yeah. Or, pick an IP address that knots up. It depends on the rules. If you can, first shoot it down, or pick an IP address that's not there. It's working most of the times, really. Otherwise, you know. I don't do it. I just pick a number. And, here's how full connection, vanilla IP spoofing, it's done. And, don't be alarmed, because it's too easy. You are in Uber Hacks, I know, but people don't understand how easily it is done. Here's the same network. And, what I do, it's take my interface down, and put the new MAC address on it. I pick the same MAC address as the upstream router. You see it? And, then, you set my spoofed IP address as ETH0. Of course, A is on my network card. Network A is on my network card. Then, I take my real IP address as the next IP address on my network card, U.3, it's my legal one. I add a route. My legal network is on my network card. And, of course, I don't need, but in this example, I need a default gateway, U.2. And, what more do you think? Well, you have full connections now to B.2. You can run Nmap, you can run Nessus, you can run everything you want from your Linux box. And you have full connections, and you can talk to the services as you're used to. So, if you're allowing people into your network, your untrusted network, I think you will have to change that now. You know it, you're here. Well, that's the easy way to do it. As I said, I hope Dork Tanya will put these slides up, because you have these, oh sorry, these cool effects now. If the last man is, have finished, you can, okay, sorry. Didn't work. People are taking, we have so much time, you know, I'm really finished with this talk. I have some quirks to it, some other fun stuff. Okay, three, two, yes? Switched. No problem. Yeah, yeah, it's a hard thing to do. There's lots of problems to it, because then two, two network cards on the same, on the same network have the same MAC address, and the package don't know when it passes the switch, what way it will take. Yes, it's a real big problem, but you can just give a shit about the default gateway and take every package back. You know, you can just like, okay, I'm A, forget the default gateway here. You know, so you have full connections. So, this is a very, very, very easy way to establish full connections over, if you're sitting on an untrusted network and some people are allowing other people through that network. The same attack can be done on your local network. Some people on your network can just take the default gateways of your network, the network's MAC address, he pick a random IP address on his network card and set it up as he's done the last slide. He can attack here, A.3, and if someone sniffs the network, it will come from X.1, and it looks like, exactly looks the same way. It comes from the default gateway from the internet. So many security officers will like checking, why X is in our network? network, someone is hacking here. And who should they attack? I ran this on the capture flag yesterday and there were lots of machines there that make automatic attacks to the hosts attacking them. So their machines were attacking X.1 there. And that one was on the internet, excuse me. So it will send a package, it will come back, and it will come back to me because my network interface, my TCP IP stack will pick it up because it's addressed to A.X.1, but the default gateway will also pick it up and send it to the right host on the normal hubbed network, but there are no security in switches, believe me. So the solution is, of course, disable source routing as a part of IP options. I don't know how it's done. You have to figure it out yourself. It's default on firewalls, but it's disabled, and Linux boxes, but not default on routers. You have to implement spoofing protection. It's like saying, this is my inside network interface. These are, the IP address is there. If someone sends an IP address from the outside, I should warn, drop everything. Don't use filter rules over an untrusted network. You have understand that now, I hope? And you have to use some kind of VP6 something, encryption, VPN something, okay? Promise me that, okay? Questions? What? He says, like, it is disabled on Cisco. Yes, I heard of it. Yeah, the 12, the 12 iOS as well. Some more questions? Thank you.