It's called Tunneling and Firewalls, and it's being presented by me. Is that better? Okay. Again, my talk is Tunneling and Firewalls. Closer? Hey! Let me try something first. Hey! Thank you. You've got plenty of cable. That's always good to know. Start at the beginning. What is Tunneling? Tunneling is essentially creating a virtual data path between two computers, potentially using their protocol. The example given is you can use the HTTP protocol between two machines to do Telnet. Is it on or not? Oh, no, it is on. Ah! Sorry. Let's listen to this. Oh, well, try it next time. All right. There's a bunch of available tunneling software, but the most popular one right now is GNU HTTP Tunnel. It's really generic, and it's really quite nice. It's been developed by some guys at NoCrew. There's also a variety of homegrown solutions that do roughly the same thing that HTTP Tunnel does. The username is well-designed. It don't handle proxies near as well. This is an example network. We've just got the firewall only allowing outgoing connections on port 80 for regular HTTP. All their access is blocked, an example being 23 for Telnet is blocked, 21 all the standard ports. That's the only way you can get out. And let me flip over this. Type telnet space home. And unable to connect to remote host, connection refused. This machine is work. This machine is work. This machine is home, by the way, for this. The Mac is the other one. All right. So let me start the HTTPS Tunnel server on home. Now we've established half of a connection. Well, actually, a third of it, the way it's set up right now. Now we run the client side on the other machine. Sorry. . . . . . . . . . . . . . . . . . to this machine work on port 23 23 because that's why I've set it up with a minus F option and it's connected to the other remote machine now so you can get by pretty much any standard blocking procedure because a lot of people with their firewalls will allow anything out on port 80 because that's what you use for HTTP access for just regular web browsing stuff like that you use this is run anything you want to pretty much you can run X over it SSH anything I mean I would never run telnet over in a real-world situation because that's just stupid so let me go back to the thing now that's actually probably rock and tends to does three to one every time you type a character but it makes a little more impressive at least so so how does HTTP technically work well we started both HTS and HTC on the respective machines we said the command and what it does is it encapsulates that into an HTTP packet sends it via HTC over to the other machine and the HTS receives that decry tears apart the issue to be packet and then sends the command locally and then it also passed the data back of course the basic principle The protocol is formatted in a really simple, it's a very simple protocol they've laid out. This protocol allows it to pass through a variety of proxies along the lines of squid, pretty much anything. If you can get access out any way, you can use this to do port forwarding and other types of options. The protocol has seven different requests. Five requests send additional data and two just send a command to it, to their side. The two types of requests are, the request with the 0x40 bit consists of one byte with just a command along the lines of open, close, disconnect, and the request with the 0x40 byte clear have a two-bit length field along the variable data field. I'll show you in a second. There are seven different requests, tunnel open, tunnel data, tunnel padding, tunnel error, tunnel pad one, and tunnel close and tunnel disconnect. Tunnel open. Tunnel open. Tunnel open. It's just the first request. You send that from the client to the server and it creates a virtual data path. Data is just whatever command you want to encapsulate into an HTTP request. Example being when it's conversed into, like the command, it puts that into an HTTP cell header that's compliant with the standard. The padding is used if you're going through a proxy like squid, because squid usually you send it to 32K. And it will fill it the rest of the way. So it's just that data, so it will actually send that command now, so it's just holding in the proxy. And it will also use that on the way back, so you can get the command right away. Tunnel error is in case you have a rare example where you have an error in the connection. Right now this is not a real robust protocol, because you're running another protocol on top of HTTP and taking advantage of get and put. And that can occasionally have problems if you're going between incompatible versions of stuff. Tunnel pad one just exists. If you have a buffer size set greater than 32K. I mean, very rarely do you do it with a proxy, but if you have a really low link connection you will. It also beats the crap out of the system because it sends a bunch of one byte packets and every one of those just has to be encoded. Tunnel close, closes the tunnel, pretty much straight forward. Tunnel disconnect is used to temporarily disconnect the connection. So very simple protocol. That's one of the reasons why it works so well. Because they've designed it pretty robustly and it works on a variety of systems. We've used it a few times and I'll say where you use it in a little bit here. Actually right now. Why tunnel? One of the reasons why you do it is you have a static link program without source. Some of them expect a certain port and you cannot give them that port. Example being if you have a web server that only will work on port 80 and you have to move to 8080 for some various reason, you can use this to do a shift of it. Another reason is you have limited access to the outside of the network. A lot of times like if you're using a connection like Alta Vista, it won't give you port 25 for SMTP. It will give you port 80. You can use this to send stuff remotely. And of course the third reason is evil system administrators trying to hold you back. The question is how do you combat tunneling? The first thing is sniffers work great. Because nothing tends to deter people more than seeing a dump of all their passwords and account names on their desk in the morning. If they're stupid enough to use a tunnel program and you told them to do it, they're probably stupid enough to use some of this stuff in clear text. Another thing is look for signatures of the tunneling software. If you use the source for HTTP tunnel, there are certain signatures you can find in it right now. As the saying goes, use the source, Luke. Another way to do it is policy. Explain the security problem someone could be opening up. Obviously an example being here that it's great going out, but we can also do this somehow getting in. I could open a port that's a very high number and no one would even, like above 1024 and would allow that stuff in. I could shift that to some other part of the machine. And the other way to really combat tunneling is education. Ask why people are using tunneling software. Can you help them remove the need for it? Like by installing a SOX proxy or something. There's an old story about Patton when he was at West Point. He was a part of the faculty, he wasn't part of the faculty, he was a student, part of the student government. And he was asked what they could do about people walking on the grass all the time. And his response was, well, put sidewalks where the people can walk. This is the same idea. If they're using the tunneling software, usually they have a reason for it besides just to be dicks. And the answer is to help find out what that problem is and to help them find a solution for it. What's the future HTTP tunnel? They've got a bunch of things on their to-do list. These are the ones I thought were most important. They're going to add SSL encryption someday. They're waiting, obviously, until after September 20th when the RSA patent expires. And they also have to deal with the export restrictions, which not a lot of people are thrilled with. Data compression. There's a version of it out there. They use a Zlib. But it has some issues. You're always padding the entries out with HTTP headers, which can be quite wasteful. They're also trying to extend it so it can work with other protocols like FTP. Their goal, eventually, is to be able to call it XTP tunnel and be able to use any transport, use Telnet, anything to do it. There's work on that. It's still very early. But it's going to really change the way it works because it's going to make it very hard to detect and stop. And it's going to take a while. And the other way they're trying to do is they're trying to add this now, simple encoding of red trivial sniffing. Not RAD13, but a little bit more advanced than that. They're trying to add some random type signatures to it. Tunneling is a very valuable tool. We've used it a little bit here and there because it's helped us in certain situations where we need to use it. Tunneling can also bypass security measures. That's probably the biggest single problem with tunneling. It can bypass any firewall you have if you set it up correctly. Because you're creating a virtual path and whatever you're adding on top of that is up to the user. What you're doing is you're hiding the data inside a more acceptable protocol. And education and training are pretty much the best defense. The main links for it are the GNU HTTP tunnels website and the firewall piercing mini how-to. You can find either one of these just by doing a search in Google without any problems. The first question anyone always asks me is, is there a Windows version? And the answer is yes, there is. It runs under the Cygnus SIGWIN toolkit. The other question I'm usually asked is, is there a Macintosh version of it? And no, there's not. It will run on Mac OS X server edition, but it hasn't been officially ported yet. There's also, it works on pretty much any standard version of Unix like FreeBSD or Solaris or any of the standard ones. The third question usually I'm going to get asked is, hang on a sec. Will it run on a web server? Since I overloaded port 80 on this, will this work consistent concurrently with a web server? Right now, not. But they are working on that as well. But we're not sure how that's going to work because they're going to have to override the way the behavior happens a bit right now. Because it has one session on both sides. Meanwhile, the web server will fork off multiple copies to handle that. But they're working on that piece. Any other questions? Sure. Does it work through what, sir? It works through network address translation. It will work through all that if you can get a direct path back to it. If you're doing real masquerading, no, because it doesn't have a path back. It will work outgoing, of course. But coming back, it won't work into it. So that's one of the first steps in defense of it. Yes? . It's actually, that's what it's designed for. . There are some options that will go through like any standard proxy. Sometimes you have to figure out the real port the proxy exists at. And the FAQ has the instructions for doing that. I don't have a proxy set up on this one, but it does work with Squid and all the standard ones I've seen. . Yes, it is. If you send it in clear text, you're asking for it. What you do is you run a more secure protocol on top of it, like SSH, if you want to protect your stuff. It might show up with a simple, some basic encoding on it. Like if you've got spaces in your password, which I do and most people should, it will escape those. But the password is pretty trivial to figure out. So this is just a great tool to use, but make sure to use something secure on top of it, like SCFDP or SSH and stuff like that to give you an additional level of stuff. Yes? If you run through a proxy, does anything end up in the cache? Yes, it does. They've added a fix in 303 that has a random ID to the end of it, so it does not have the same entry. So you can have, like, my first command has got certain trailing information on it. By second, I'll have another random number and so on and so forth. So you'll add a lot of random entries to the cache, but each one will be unique. So, yeah. You won't have a replay problem. It'd be really tough to play back the session. The question is, could you run across an entire Telnet session in the cache? Yeah. I mean, if you've got your proxy turned on or you've got your proxy caching logging everything, it's going to do a straight dump with this session. So do not use this with Telnet. That's rule number one. Yes, it does. It actually does encapsulate it in real HTTP. It does comply with 3L standard. Could you repeat the last part? It will be seen as ordinary web traffic for the most part, but there will be certain signs that you can see if you know what to look for. Because it does use certain identifiers in a different way than regular, like, Netscape tends to do things. But it's kind of hard to find. But you can go through a log if you know what to look for. They're working on adding that as well. That's the simple encoding they're trying to do to make it look more like a Netscape session or something else. . You can't. That's the problem. The answer to the question is can you prevent it from getting through a firewall. If you open up any port, you can use software like this to get through the firewall. You can do add some things like network access translation to make it tougher to get so they can't open something inside your local net. But to get out, you can't stop it. You can also use this to go out, hit other sites. Actually, like, you can use your home machine, set up a Netscape session on that, send the X window stuff through, and browse all the porn you want to while you're at work. Regardless of how they block stuff. I'm not saying you would, but some people do. Here's the question about the performance. The performance can suck. . . . . . . . . . . . . . . . . . . . . . . . if I tried to use delegate SSL proxies, I'd just use them right here, HTTP proxies. The answer to that is no, I haven't yet. They probably have done it at this site. They do have a mailing list, so that's pretty good. A lot of questions like that. Okay. Oh, actually, you can, yeah, if you use something that would do compression, that's where there's a little kind of add Zlib to it to help improve the performance on it quite a bit. Way back there. Okay. The question is, well, to make it much shorter, is can you use this with something like a Java app to move stuff around in terms of ports? Yes, you can, but the question is, with the performance issues of it, I don't think it would really be that useful. You can obviously take a look at the source. It is open source, so they can do license. And some of the pieces there are very good. There's also more generic port forwarding tools like LeapFrog, which you might want to take a look at because that will do some of that work. And that, you can hit www.coste. com slash LeapFrog or do what I do and hit Google and do LeapFrog search. Any more questions? Yes, sir. That's a very good question. What happens if you have open port 80 on your home computer? It's very, you open up a port to, you can bind what port that can connect to. So if you do something like SSH, you can only bind it so it can hit that SSH port. You can bind it to a port that can connect to it. You can, there's basically port forwarding on this end. So, your host.allow will launch. No, actually, just tell me to use that. SSH doesn't, SSH has its own configuration utilities. You can say it. Yeah, okay. Then yes, you can use that situation. Yes, sir. The question is, can you use this as a proxy to send requests out to your home machine and have that do the surfing for you? I haven't done that. It may be possible. What I've done is I've run X across it and then just brought up a Netscape from my home machine. It was quite slow, but it did work. Yeah. Probably not because of the overhead of sending back all the stuff. I mean, it worked better than doing it the way I was doing it running X where it sends every pixel back to you. But I'm not exactly sure on how the performance of that would work and using it that way. It's a great question to ask on the mailing list. They're a pretty active group. They're up to version 303 now and they're getting ready. They released 304 and they'd love some help getting it up to spec where they want it to go in a couple areas. Yes. Okay. Any other questions? Okay. The main purpose of this is to help educate people to a firewall will not stop all your problems. It's a great first step, but you also have to understand what the firewall does and doesn't allow. And that's just a part of the process of learning what it does do, keeping in touch with your users. Because if you do put walls high enough against your user, they will find ways around them. They always have and they always will. Thank you very much. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you.