Good morning. Am I speaking too loud for some of you? Louder? Louder? Hi everybody. Thanks for coming to our talk. We appreciate it. We're going to have to think of something to say for the next 50 minutes to keep you all busy. We may get unstuck after 10 or 20 if we do. We're going to, I don't know, we'll find something. My name is Saul. Actually, I'm not Rulof Teming or Haroon Mir. Haroon wasn't able to give this talk this morning for some obscure reason. And Haroon, and Rulof is, there he comes. Rulof is supposed to be here. So we're going to be presenting a paper which we've titled Satiri Advances in Trojan Technology. Now Satiri is from a, oh, I should say this. We're from South Africa. We're from the 11 officially recognized ethnic groupings. So if you go to court, for example, and you have to stand trial, you can ask to stand trial in one of 11 different languages. And the government has to accommodate you. And one of those languages is called Swahili. And Satiri is the Swahili word for hidden, which is where the name of the Trojan comes from, which is what we're going to be talking about. And before I do that, I'm supposed to make an announcement. Everybody see that? Good. What I'm supposed to say is that this conference is being recorded on video and audio CD-ROM, and that you can get copies of the recordings downstairs at the aptly named recording sales desk. So if you want to buy a video of any of the talks that we've given in this conference, or if you want to buy a CD-ROM, then you can get it downstairs in the Parthenon Fair. Parthenon Fair. Yeah, and there's some more. Speaker, please announce the following at the start of the talk and end of your talk. The next session in this room is session name from below. The speaker is down there at the back. I know what it is. I know what it is. It's on. Where's Mike? Where's Mike? Speaking next. Let's go. No, not Mike Myers. All right. So, this is what we want to talk about. We're going to be speaking about Trojans. I think what I should say right up front is that our paper and the talk that we're going to be giving focuses on what we call establishing a communications channel in a hostile environment. So it's not so much about the functionality of a Trojan. It's also not about the delivery mechanism. It's not about how we put a Trojan on somebody else's machine. It's about how, having put a Trojan on somebody's machine, and assuming that the Trojan has the functionality that you want to pop the guy's CD-ROM drive or look at him through his own webcam or anything like that, assuming that you've got all that, how do we actually communicate with that Trojan in an environment that's designed to keep us out, like most environments these days are? are. This work is based really on a lot of research that Rulof here did, assisted by his beautiful assistant Harun, who's hiding in the corner. And I'm just talking because I'm the best looking. So yeah, those are the things that we want to cover. We're going to talk a little bit about why we have Trojans, although I think that's pretty obvious. Give you a brief history of Trojans and the concept of covert channels. And we're going to introduce a model that we've adapted for this communications path, which we call a hybrid model. I don't know what anyone else would call it, but we call that a hybrid model. Then we're going to introduce Satiri. And unfortunately, what we're not going to be able to do today is to give you a demonstration, because we have no network connectivity, which is really sad. Yeah, the wireless is down. We can't reach it from here. Maybe we'll get it up before we have to get the demo. They're working on it. The good people of DEF CON are working on it at the moment. So maybe if we can get the wireless up in time, we'll show you how it works. These guys only came for the demonstration. They're leaving. That's not nice. I think what we can do is we do have some screenshots, luckily, which we took so we can sort of walk you through the screenshots and show you how it would work. This is an existing technology. We've built it. It works. We use it. So it's out there. But we're not going to be giving it to you. And then when we're done showing off, then maybe if we have some more time, we'll talk about how we would take this technology further if somebody threw... like, tons of money at us to do it. All right, a little bit about us. Rulof and myself. Hi, I'm Shaul. This is Rulof, and we're alcoholics. This is a different convention, eh? That's not this convention. I'm sorry. We're from SensePost. SensePost, like I said, is a South African company. So we traveled just about 26 hours to get here, although we plan to go home a lot faster. And it's about a 10-man company. There's myself, Rulof, and Arun. We make up about half of what there is. And what we do is essentially security assessments, penetration testing, a little bit of consulting work. We're not an R&D shop, per se, and we're also not a development shop, per se. I object to this presentation. Why do you put that in the slide for? I don't think. All right, so why do you have Trojans? Essentially, you have Trojans when you're going to hack into shit. You have Trojans because you don't have another way to get into places. The development and thinking about Trojan technology was a bit of a new thing for us, because essentially what we do is, or what we do best, I guess, is Internet security assessments, looking at people's security infrastructure from the outside. And so typically, in the work that we do, we would actually steer away from using Trojans. Basically, you don't have to demonstrate the use of a Trojan to someone in order to convince them that Trojans are a real problem. But if you were a real criminal, if you really wanted to hack into a place, then a Trojan is certainly something that you might consider using. And we talk in our business about the path of least resistance, or the 80-20 rule, which essentially says that for the least amount of effort, I want to get the most or the highest possible level of return. And that's something that a Trojan can get you. Without having to write custom buffer overflows or reverse engineer some proprietary protocol or figure out how something works at Layer 2, all I need to do is get someone to run an executable on their machine. And if I then have a way to talk with that agent, which is running on the computer, I essentially own the machine. And from there, taking the rest of the network becomes trivial. The weirdness in the industry that we see, and I guess it's not really that weird, is that the security systems are all outward facing. So people put tons and tons of time and money and effort and energy into protecting their networks against attacks from the outside. So you can manipulate your IP flag headers. You can reverse engineer the protocols. You can throw just about anything that you want at them from the outside. My mouth is dry, excuse me. Speaker 2 Ws Thwack Speaker 5 I wonder why. Speaker 2 Ws Thwack Speaker 3 Ws Thwack thinking so much and I'm still thirsty, I don't get it. That was funny. That was funny. Where was I? You can throw stuff and you can throw it at the firewall and you can give it as much as you want and most times, most times you're going to struggle because output facing defenses on your sort of standard corporate, advanced corporate network today are pretty sophisticated. But if I can get an agent operating on my behalf on the inside of the network and if I have some way of talking with that agent so I can tell it to do stuff for me and then I can get the responses of what it does back to me, then I'm pretty set because once you're inside the network, we talk about clubbing baby seals. We wouldn't really club baby seals. Arulof might, but I wouldn't. Unless I was very, very hungry, I would not club a baby seal. But it's an analogy. So we speak about clubbing baby seals just because things happen. So the things on the inside of the network are typically, they're pretty soft and easy. Right, so a brief history of Trojans and covert. I really can't remember any of this stuff. You had the whole thing with the city of Troy. It was being invaded, Aaron. Yeah, that's right. It was the Greeks. It was those skanky Greeks. Those skanky Greeks were trying to invade the city of, I'm sorry if anyone's Greek. I didn't mean to be offensive. These Greeks were trying to invade the city of Troy and that's exactly what they were doing. They'd been hammering and hammering and hammering at the front door of this fortified city and as hard as they tried, they couldn't get in. So they devised this cunning plan. They had a plan so cunning, you could stick a tail in it and call it a weasel. And so what they did was they built this beautiful big wooden horse, huge big wooden horse, and they gave it to the leaders of the city as a gift. And what the people of the city didn't know was that hiding away inside this horse were a whole lot of really bad dudes. And as soon as the horse had been pulled into the city and the doors had been closed for the night, the guys all jumped out and they massacred everyone and everyone lived happily ever after. And Trojans have been around just about as long as computers have been around. So the concept of Trojan-ing a machine from a security point of view is not new. It's something we've all been, talking about for forever basically. And that's why what you said at the beginning of this talk is what we've been looking at is not really developing the concept of Trojans or even developing the methodology or the methods and techniques of Trojans, but concentrating on how I speak with that Trojan once it's on the inside. So let's maybe take a quick walk through the development of Trojans in different kinds of environments. And as security systems became more and more advanced, we see Trojans having to adapt themselves to be effective in those increasingly hostile environments. So in the simplest case, you have a PC, a user's machine that's connected to the internet. Maybe he's dialed up or maybe it's in the early days when the internet was still a beautiful place. And you could just hook your machine up there and you'd get an IP address and you could talk out on the network. In an environment like that, if I can get my Trojan to execute on someone's machine, communicating with that Trojan is trivial. Now I can establish a TCP connection to it. I can have it establish a TCP connection back to me. I can send it ICMP packets. I can send it UDP packets. I can do just about anything I want. And there's nothing that's going to stop me. So that's hardly worth talking about. Then we saw the introduction of the network. The firewall. The firewall is essentially designed to screen internal hosts from malicious traffic originating from the internet. If this place is going to blow away, will somebody just tell me? Because I'd hate to be the last guy standing here talking to nobody while you all rush out to save your lives. So with the introduction of the firewall, it's no longer trivial for us to send packets to the Trojan. It's no longer trivial for us to establish a TCP connection. And so the Trojan basically has to become a whole lot smarter. So what are the kinds of things that Trojans would do in this kind of slightly more hostile environment? Well, the first thing we can do is we can get the Trojan to do a dial home, which is pretty smart. So instead of us trying to establish a TCP connection to the Trojan, which we can't do because the firewall stops us, in your earlier naive kind of firewall configurations, we get the Trojan to establish a connection outwards to us. Which is cunning, because the firewall trusts the users on the inside, so it allows the outgoing connection. Other things we can do is we can play around with the source and destination ports, in the hope of taking advantage of some LAN configuration on the firewall. For example, checkpoints firewall 1, up until recently, by default allowed TCP port 53 in. So if I have a firewall that's listening that allows port 53 in, I only have to configure my Trojan to listen on port 53, and wham, there I send a packet through. Another example is FTP. All the implementations of firewalls to allow the FTP reverse connection would allow any TCP connection from source port 20 to a port higher than 1024, to a high port. I mean, we did that for years also, because we just didn't know of another better way to do it. So if you could get your Trojan to listen on a high port, and you could establish your controlling connection from source port 20, then you could just shoot way through the firewall. The assumption behind that rule was, from system and firewall administrators, was that there's nothing listening on high ports. But of course we can make our Trojan listen on any port that it wants to. And then we can do slightly more sophisticated things. I don't know how to pronounce Wittström, I can't say it now with my mouth being so dry. We introduced a concept called ACK tunnelling, where instead of trying to establish a TCP connection, a full TCP connection between an ACK and an ACK, what we do is we just tunnel our entire communication session inside packets with the ACK flag set. On the other side, TCP type socket calls, it simply pulls the data that it needs out of the ACK packet, without expecting it to have a SYN flag. And the reason why we get past the firewall there, is because the firewall assumes that a flag with only the ACK flag set, is part of an already established connection. Now this is with your earlier, more naive firewall implementations. But you still see this today, you'll see this kind of behaviour, perhaps with your basic screening routers. So basically, even after we have a firewall installed, especially on our earlier, more naive firewall implementations, we still have ways of talking to our Trojan, by essentially exploiting naive assumptions that system and firewall administrators make. And if that fails, we can maybe get our Trojan to talk out to us. Right, so then the defences get a little bit more advanced, and you see the introduction of what we call stateful firewalls. Incidentally, my word processor was moaning about the spelling of stateful, put like a little line in it, and when I asked it how it thinks it should be spelt, it said tasteful. So I speak under correction here, we're talking about tasteful filters. And what tasteful filters do, is they start to take into account the context of a TCP connection. So they're no longer relying solely, on the set of IP and TCP flags that are in the packet, they're basically looking at the packet history, and they're saying, if this is an ACK packet, coming back as part of an already established connection, then surely there must have previously been a SIM packet, that was used to establish this connection, and I don't have a history of that SIM packet, I don't have it in my state table, so I'm not going to buy that this packet is part of an established connection, and the packet gets dropped. And that starts to cut out, a lot of the tricks that we used previously. So we can no longer do ACK flag tunnelling, for example. We can no longer do the whole source port 20 thing, because now firewalls are handling FTP reverse connections better. And so a lot of those options that we had previously, where we basically stuff around, with the way an IP packet or a TCP packet is put together, those things start to fall apart. And one has to give credit to the firewall vendors, for getting this right. So what would a Trojan do in this case? There's still those things we can do. For example, we saw Trojans, we saw what we call, that were essentially plug-ins, for Trojans like back office, that would allow us to establish control connections, by posting to IOC channels. So if the firewall administrator is allowing IOC out, through his firewall, then we can basically log on to IOC, as the Trojan, and send and receive information, communicate with the controller, via IOC. And I'm going to give you some examples of that sort of thing, in the next slide, where we start to talk about tunnels. The idea behind tunneling, is essentially, that we hide, or that we, transport the data that we want to communicate, within an existing channel, that the firewall and the network supports. So typical existing channels that immediately come to mind, are things like email. So email typically is allowed in and out of a network. That would be useful for a tunnel. Or DNS, is something that's allowed in and out of the network. And the one that's really, received the most attention, is HTTP. We can tunnel stuff, inside of HTTP. So what we do is we take our entire control session, the entire dynamics of the communications, between us and the Trojan, and we bundle it inside, what essentially looks like a standard HTTP request. And you can understand why that's a neat thing to do, is because, HTTP is going in and out of the network, like there's no tomorrow. And the system administrator has no reason to think, that HTTP traffic is malicious in any way. The concept of tunnels, in this sense, goes back, all the way back to 1985. In 1996, Fract Magazine, did a, in fact released a tool called Locky, where they tunneled stuff inside of ICMP. So basically you can send ping packets, and get ping replies, and although those are really genuine, you gotta say genuine here. Genuine. We say genuine back home. If somebody says something, if you say something amazing, and the guy says really, you go, genuine. So if you wanna, don't you? It's true. Right, ICMP. Oh yes, thank you very much. Jeez. We got a secret. At least now I don't have to do that. Yeah, that was genuine, yeah. Then our speakers note, they said, they said, please note there will be a streaker. And I was a bit worried it was gonna be me. But luckily I see someone else, someone else did that. Cause you don't see me streak. I'll just be ugly. Right, so, so you can send, you can ping something, essentially, and in those ping requests, and ping replies, we're embedding control data, that allows us to manipulate our Trojan, and get data back. Fract Magazine did that, all the way back in 1996. And, did I say something funny now? Yeah. Cute. In 1998, we saw the release of something called RWWW shell. Don't try and say that with a full mouth. And that was really the first of the tools that did, that effectively did HTTP tunneling. Where we took control data, any kind of data that you wanted, and you put it in, what was essentially, a conventional HTTP request. So if you look at that using, etacap, or, etacap, not etacap, what do you, what do you call it? Ethereal. Ethereal, or, or your, your, whatever your favorite sniffer is, what you would see is just normal, web traffic. Would look like someone surfing, the internet. If you look at the content of those packets, you'd see it's actually, um, control information. The concept developed further, with HTTP tunnel, and today you get commercial offerings, things like fire through, where I can load a little Java client, on my PC, and I make use of a, of a tunnel, tunnel termination server, that this company offers commercially, and I can pretty much, put anything that I want, through this encapsulation client, put it into HTTP, I can even send it via my proxy, I can even send it via, by configuring a proxy, and I send it out, and when it gets to the, tunnel termination server, on the other side, they strip off the HTTP, and they send out, what the original, uh, traffic was. We do that, we do that all the time, um, for example, to read your email using SSH, when SSH is not allowed at the network, I fire up this client, I configure it to tunnel SSH, over HTTP, and, and then I SSH to my machine, to local host on port 22, that gets wrapped up inside of HTTP, off it goes, and on the other side gets taken out. So this is also not a new concept. The reason why, why Trojans, having all this technology at their disposal, the reasons why Trojans, still fail, um, is partly due to, to, to stateful firewalls and IDS. We saw already how the, the whole direct model starts to fall apart, with, with advances in, in firewalling technology. Um, we see, um, guys increasingly blocking stuff off, so you're just not seeing IOC go out of networks anymore, you're just not seeing administrators allowing SSH out anymore, you, you're seeing guys using, and this is a clever trick, you're seeing guys using authentication proxies. And what does that mean? It means, that in order for me to surf out of the network, I have to go via a proxy, on the internal net, right? But before I can use a proxy, that proxy uses basic authentication, and it prompts me, for a username and a password. And, and that pretty much, um, that pretty much flummoxes, the Trojan. Because the Trojan doesn't know what your username and password is. So, if you have authentication proxies, that's gonna start, um, that's gonna start canceling out, these kinds of tunneling approaches. And then we see other things like, um, personal firewalls. Personal firewalls see, that the Trojan is attempting to establish a connection, and it'll notify the user and say, there's a new process, there's a new application on your machine, that's attempting to open a socket and make a socket call, is that allowed? And the user can then, can then block that up in traffic. Alright. So if you look at a typical network, these are the kinds of things that you, these are the kinds of things that you see. You're gonna see, at the gateway of your network, you're typically gonna see some kind of net-based firewall. Right? Something that understands the concept of a TCP session. Uh, inside you're gonna have, IDS's and virus scanners, you're gonna have, maybe a content checking firewall, that's actually gonna look, uh, not just at what kind of traffic it is, but, but the content of those packets, and see, what is it that's going up and down here? Is this really a legitimate HTTP request, that's being made on port 80? Uh, on, on the, on the PC itself, on the end user's workstation, we're seeing increasingly the, the use of personal firewalls. And personal firewalls, are maybe not so useful to protect, the machine from connections from the outside in, but they can be incredibly useful, in preventing something like, um, HTTP tunnels, because you're just not able to make a connection out. We see the authentication proxy, which I already touched on, and a whole bunch of, of stuff, which is really designed, these days, not only to stop us from making connections in, but also to stop us, from making connections out. And in, in a well configured network, what you should see, is you should see the user being allowed, to send email, via his pre-configured SMTP gateway, or, via his pre-configured exchange server. He should be allowed to surf out, via his authentication proxy, and pretty much that should be it. He makes his DNS requests, via an internal DNS server, and there should really be no reason, for the user to make a connection, out onto the internet, at all. Clearly in, in a network like this, you can see how something like, um, back RFS, or sub-7, or netbus, is not going to work. How am I doing for time? I have half an hour? No. Oh, cool. I'm going to sing this presentation. Right. So at, uh, Black Hat, New Orleans, uh, which was earlier this year, we, we introduced a technology, which, which we have developed, which we call, . . And what we're going to do, is we have some new t-shirts, here. . Actually, they're not so neat. We just had them left over, and we don't know what else to do with them. And we're going to give a t-shirt, to anyone who can correctly pronounce the word, . . Oh, you guys rock. Well done. . You guys also rock. Well done. . Ah, so what I'm going to, this one, this one, I'm going to give to anyone who can tell me, what means. . No, not you. You don't, you don't count. What does mean? Anyone? . Slap on the butt. . Slap on the butt. Yeah, it's pretty, it's pretty close. It's pretty close. . Yeah, if you were to translate it, if you were to, if you were to translate it, literally, directly, it's, it's two words, and they translate it, blowhole. But, but, yeah. . But that's not what it means. All right, so, so what the guys did with, with , is, is they took, they took the concept of a, of, of a tunnel, and the concept of a Trojan, and they put them together. But in order to defeat, these, these control mechanisms, that I've been speaking about, what we did, was instead of trying to make the HTTP connection, ourselves, we said, well let us use, the existing Microsoft Internet Explorer browser, that's on a computer, to make the connection, for us. And for that we use, something called object linking and embedding, OLE. And OLE allows communication, control communications, between different Microsoft applications, on the same platform. So, This is, this is really the core of, of what you need to know here, is that, is we don't make the connection ourselves, we, we actually use OLE to communicate with a, a browser, and let the browser make the connection. And that's got a lot of advantages, that I'm sure, I'm sure we'll point out to you. I'm sure you will. So, so, so, what we're doing now, is instead of trying to establish, a TCP connection, on port 80, and do HTTP, we're just using OLE, to call the browser, and we're having the browser, do the HTTP, for us. So essentially, how that works, is that, we fire up a browser, on your PC, using OLE, and that's not, that's not, I know this term gets used a lot, but that's not rocket science. Right, you use OLE, you fire up the browser, and we surf out, to a web page, on the internet, which we define. And in this web page, in the title, of that web page, we embed, the commands, that we want the Trojan, to execute. So you have, in this model, you have, I'll get to it now, you have three, you have three components, you have, the engine, the execution engine, which is actually gonna do, the commands for you, and in our particular Trojan, that execution engine is, is relatively simplistic, but you could have something, really sophisticated, like, like, like Orifice, doing the same thing. That's the first component. The second component, is the browser, which we control, and the third component, is the web server, sitting somewhere, on the internet, which is gonna control, which is gonna contain, the commands, that we want the Trojan, to execute. And it sends those commands, down to the Trojan, in the, in the title, of the web page. And with the Hatzlach model, we actually didn't use, a web server, we developed, a pseudo web server, in Perl, which emulated, the behavior, of a web server, with, with obviously, much more, limited functionality. And what you would get, is you would get, a little prompt, with the commands, that you wanted, and it would create, the web page, the pseudo web page, and, and put the command, that you wanted executed, in the, in the title. If we wanted to get data, down, to the Trojan, why would we want to get data, down? For example, if I want to put a key logger, instead of me having to build, the key logger functionality, into the Trojan itself, I download, I take something, like Klogger, and I simply send it, to the Trojan, and I have the Trojan, executed on my behalf. So I want a way, of sending data, down to the Trojan, to do that, we build a web page, and we encode, the binary, in, in a, in a form of encoding, that, that Rudolph developed, and we send it down, like it was a web page. It really sucked. Yeah, the form of encoding, wasn't particularly sophisticated, but it, but it worked. So you could then, you could then theoretically, actually surf that page, and if you did, you would see, the encoded binary, on the page. And then we would then, we would then, you can then, using OLE, you can then read, that encoded binary, out of the web content, out of the, out of the browser, essentially, and, decoded, and then, write the executable, as a file. So using standard, get requests, we can not only get commands, we can actually get, data, down to the browser, also. If we want to get data up, well HTTP allows us, to do that also, using the standard, HTTP post method. So using HTTP post, I can, encode something, and I just post it up, just the same way, that you would upload, the, an attachment, using, on your webmail client. Except that there's not really, a web server, there's not really a web page, that you surf to, there's this thing, that's pretending to be, a web server. And for that, we use the browser, also. I'm so running out of water. I'm never going to drink, so much, ever again. Why did it work? Why is it, why was Katzlach better, than what we saw before? Apart from the fact, that it was, generally, pretty charming, pretty good looking. It did some of the, following things. We could, we could use, a proxy, that did, that did, authentication, because the browser, already has, authenticated itself, to, to the proxy. And there's two models, for that. The one model, is NTLM, which is, Microsoft's, proprietary authentication, protocol. So what you do, in a Microsoft network, to make things go, seamlessly, or make things go, smoother for the user, is you allow the user, to log in, once, once he's logged in, all the Microsoft applications, that require domain authentication, can make use of that, that existing authenticate, authenticated session. So essentially, what that means is, when you're surfing, through your proxy, you're actually logging in, you just don't know it, because your PC is logging in, for you, in the background, automatically. And because we're using, the browser, and because the browser's, a registered application, on the machine, which can make use of NTLM, we bypass the authentication proxy. The second thing we can do, which is really, really sweet, is we can use SSL. And that's again, it's built into the browser, we don't have to do anything clever, instead of making our request, to HTTP something, we now make our request, to HTTPS something. And automatically, that session gets encrypted. And again, it looks like, standard web traffic, your IDS is not going to see it, your IDS can't look at the packet, and we really don't have to go, to any other, any additional effort. We can also, bypass, personal firewalls. Because what the personal firewall, is going to see, is it's going to see your browser, making a connection, on port 80. Which is what browsers do. Right? So your personal firewall, is not going to complain about it. And it's, it's, it's not quite platform independent, but within the Microsoft environment, it's platform independent. Why? Because everybody's running IE. Well, most people are running IE. What we also did, in the hope of establishing, some amount of redundancy, and, and flexibility, was we used the, the concept, of, of a master, and a controller. And essentially, what that meant was, the controller was the host, to which you would connect, to get your instructions. And the, the master was a, was a pre-connection host, which would tell us, where the controller sat. So, the, the Trojan, when it fires up, it first goes to the master, and from the master, it gets the IP address, of the controller. So we can move the controller, around, on the internet, with relative ease, simply by changing, the IP address, of, the master. So, for example, if my controller, gets compromised, because someone's been, monitoring the web traffic, then we can simply, move the, the controller, by changing the IP address, of the master. Alright. So, they say, a picture speaks, a thousand words. That's, that sort of depicts, how Hatzlach worked. On the bottom, right hand corner, you see the victim, and that's running, the Hatzlach executable, which you have to get, on his machine, somehow. But, that, that's a story, for another day. Then, Hatzlach is, using the browser, is connecting, out via the proxy. It's authenticating, over NTLM, because the user's, already logged in. That, encapsulated, web traffic, is going out, to the, through the firewall, first to the master, and from the master, we get the IP address, of the controller. Once it's got, the IP address, of the controller, we make a second connection, again, encapsulated, over HTTP, using the browser, and send it to the, to the controller, where the operator sits. And in the, in the Hatzlach model, the operator's sitting there, in real time, and the program, has to be running. So, you have to be sitting, in that machine, you have to wait, for your, for your, for your Trojan, to log in, register itself, and while it's registered, you can send it commands. But you need to be there, at that time. Harun, can you give me, some more information? Yeah. Okay, so, so we've done, that whole thing. But there were, there were some, pretty big problems, it was, it was cool and all, but it, you know, it didn't work that well. I think the biggest, the biggest problem was, that the IP address, of the controller, could be obtained. So, that's not something, you want to have. Let's say, you Trojan someone, then, you know, if someone monitors, with a sniffer, the, the network traffic, coming out of that machine, then you can obviously see, your IP address. And this is not something, you would want to have, which is one of the major problems, with, with them, with Hatzlaw. The second thing was, you know, you could Trojan one person, there's one instance running, if you had multiple instances, of this Trojan running, you, you know, you had big, big problems. There was no GUI support. This was, you know, essentially, a command line, Trojan kind of thing. And, and, we know that people, kind of, like GUIs. The, like Sha said, the controller needed to be online, all the time. You couldn't, for instance, attach commands, together. So, you'd write one command, and then you have to wait for the output of that, and then write the next command, and then wait for the output of that. You couldn't have more than one controller, controlling the same, Trojan. And, like I said, the, the upload facility, was really inefficient, because the encoding, that we used for files, was, was really awful, and it really sucked, big time. We, we now have something, that is, that is more platform-based, it can run on, on, anything, 95, 98, NT, ME, XP. So, it runs on a lot of platforms. It's much more stable, and it, and it works, generally, it just works better. The, the one thing that we also wanted to do, was session-level tunneling. This would mean that you have a, a Trojan over here, a controller over there, and, a session to a secondary machine, can be made, through the Trojan. By, Charles. Okay, Charles, you want to take it from here, or? Yeah. Just, just to comment again, on what, what Roelof said, that the session-level tunneling, is a, is a powerful concept. What, what we would like to, what we would like to have done, with Hatzlach, is to give us, give ourselves the opportunity, to establish, a fully functional TCP connection, via the, via the Trojan, to another host, to an additional host. And, that's one of the things that we, that we didn't get right with, with Hatzlach. We also didn't get it right with Satiri, so, don't hold your breath. So, with, with Satiri, the things that we did, was we moved the, we moved the, the commands, that we want the Trojan to execute, away from the title of the web page, into the web page itself. So, you now have a, it's full, in your HTML body, there's a, there's now, the, the commands that we want to execute. And, the reason we did that, is to, is to overcome the question of, of, the issue of batch, of batching. So, now because we have a, a much bigger body, that we can put our commands into, we can send, more than one command, to the Trojan at, at the same time. And, and later when we show you the screenshots, we'll show you how that looks, and how we use that to, to, track state, between the commands that were sent, and the commands that were executed. We use, instead of now using a, a, a custom pseudo web server, that we wrote ourselves, we, and, and, this was really a very, very cunning plan, is we moved it to a standard web server. So, we now use standard, Apache based web server, and we just wrote a whole lot of CGI's, on the web server, to do the stuff, that we want, to do. And, that's where, Rudolph's point about, platform independence comes in. Because, now instead of you having to sit, at the machine, and enter the con, control connections over the, over the console, in the same way that the Trojan, the, browsers to the server, to get the commands that you want executed, you can browse to the server, in order to control the Trojan. Which separates you from the, from, from the machine, where the, where the controller software is running. The things that the, the Trojan can do, is, is essentially what we call an exec, which is a DOS command. So anything that you could type, on your DOS prompt, we can do with our Trojan, and in addition to that, we can send stuff down, and we can get stuff back up again. I, I think the, the idea there was, um, we didn't want to build, you know, Trojans. The idea was really more to, to explain the concept, and to see that, you know, bi-directional communications is possible. So, so we, essentially given a, a very reduced kind of instruction set, and that would be upload, download, and DOS execute. You know, if you want to do something funny, um, like log, you know, log keystrokes, or something like this, you can, you know, write your own keyboard logger, and upload it there, and run it on the machine itself. Essentially, anything that you want to run on that machine, you can upload and run it there. Um, you can have the output pipe to a file, and then you can just download the output file. Yeah, so if you, if you want to do a, a port scan from your Trojan, you download something like CBPS, execute it, pipe the output to a file, grab the file. You want to do, uh, you want to sniff, you download something like butt sniff, they're all tiny, uh, DOS-based applications. You download something like butt sniff, you can sniff, pipe the output to a file, and upload the file. So there's pretty much not a lot of stuff, um, that we can't do. And then, um, also now, because we have this fully fledged, uh, web server structure that we can use, we can now make provision for multiple instances of the Trojan. And, and all that we've done is, we've just given each Trojan a special sub-directory within the directory structure of the, of the web server, where its stuff lies. So, the, the command set for Trojan 1 is going to sit in directory, sub-directory 1, and the command set for Trojan 2 is going to sit in sub-directory 2. And in the same way, when the Trojan fetches files to download, or, or, or pushes files back up to us, it uses that, uh, that sub-part of the, of the directory structure, and so we can easily, very easily keep track between different instances of the Trojan. So that's just to, um, oh, hang on, I've jumped the gun a little. That's okay. So that's just to, to, to show you how that works. You see, now we have Satiri running on the, on the victim's machine, and we now have support for multiple victims. So we can handle any number of instances of the Trojan on different machines. You don't have to have three computers on your desk. They can all be in different places also. I just put them all together so you can see them on one slide. Um, sorry, just a sec. Okay, so we've, we've, we've skipped ahead. Let me just handle this slide, and I'll go back to the picture. Um, you'll, you'll remember that, that Rulo spoke about the fact that, that with, uh, , one of the big problems we had was that our, the IP address of the controller was traceable. Okay, with, with whatever else we did, if you got on the network and you looked what was happening on the wire, you would see our HTTP or HTTPS requests going from the victim machine out to the controller. Um, and, the one possible option would have been to try and use some, some proxy server on the internet, some, some open proxy. The problem with that is we're relying on the proxy on the internet, the internal network, to get our stuff out in the first place. So, we're not able to configure, I'll get to questions later, we're not able to configure, um, an additional proxy. So, the concept of using some, um, uh, a proxy on the net to, to hide our traffic was unfortunately not available to us. So, what we, so what we did was we used Anonymizer. And what's neat about Anonymizer is Anonymizer is not configured as your actual proxy server. It uses application-based proxying, which means that you, you surf to Anonymizer, and, um, you embed the actual URL of the website that you want to go to in your get request. It's really quite simple. You say, those of you who use it will know, you say http, uh, s, www, anonymizer.com, slash, and then the URL that you want to go to. So, your traffic is going via the internal proxy, out to the net, and it's going fully encrypted to Anonymizer, and Anonymizer is going to forward it on and tunnel between you and the actual destination. And we don't have, we don't have to configure a second, um, proxy. So now what we have is we have SSL from us to Anonymizer. We have, uh, SSL from Anonymizer to whatever, wherever the master sits. And everything, including the IP address of the master is hidden. It's completely out of sight. And the only way that you could get it out is by, um, legally forcing Anonymizer to give it via some form of law enforcement agency. Aaron, give me some more water, please. Thanks. Okay. So on this picture here, you can see what actually happens. The connection is made, you know, via the, um, via the proxy server out. It didn't go through a proxy server, of course. It can just go directly as well. And the picture that we have here, we just, um, show the proxy server in there as well. So it can go through the firewall. It, it hits Anonymizer. Um, So if you look at the destination IP address of the packets going out of your network, you'll see that it's going to Anonymizer and it's not going to the controller itself. You won't be able to see where it's going. From Anonymizer it goes to the controller. The controller can be totally hidden away anyway. And the operator then has a CGI interface to the controller to basically put files in there, to upload files, download files, and to execute commands. And we'll have a look and see what the actual web page looks like in a while. Charlotte's just sorting out all these water problems. I just want to point out two additional things from this picture that I think are really important. The first is you'll notice that the operator is no longer physically associated with the host. He sits somewhere on the internet and essentially browses to the controller to control the Trojan. The other thing you'll see is we now have the facility to handle multiple operators. So via a single server we can have control by a number of operators over a number of different Trojans. Is it also a custom in your country to drink gin at 11? Or is it a custom in your country to drink gin at 11? Or is it just where we come from? Okay, we've done that. Alright, there's the interface. I think, Rulof, you can... Okay, now this is the controller's interface to the Trojan. On the left-hand side, on the left frame, you'll see that there's a couple of commands that we have entered there. We can enter as many as we want. It gets executed in batch mode, which means you can always go back to the previous command to see what's going on. What the output of that would be. On the top, the frame on the right-hand side, on the top, is for entering the commands. That is for actually browsing your own file system to actually upload files there. There's a drop-down box list there with some various different commands. It's in the paper that's on the CD as well. And there's parameters. For instance, one of the commands would be... And the parameters would be a DOS command, DIR, IP config, SET, TIME-T, SLASH-T, anything that you want. The middle frame there is the output of such a command. It is linked with the frame on the left-hand side. So, if you click on any of the commands on the left-hand side, you'll see the output in the middle frame. The frame at the bottom is basically just a... You know, direct review of the specific instance. That would give you the capability, if we can go to the next slide. That gives you the capability to view the files that you actually downloaded from your victim directly in that frame. Be that a doc file or an XLS file or something like this. It means I can click on it right there and it displays it in that frame. I don't need to save it to disk and, you know, go along with it. Next. Okay, this is... On the left-hand side, I'm sure the people at the back there can't see a thing. I've been in the back there as well and basically you have to look on your CD for this. What happens on the left-hand side there, you'll see a page that is actually the real web page that the controller is pulling down. It contains the commands separated by a sequence number. Well, it's a sequence number, then it's the command, then it's the parameters, additional parameters and the time that the command was actually input, given to the system, separated by hashes. It's just easier for me when the Trojan actually gets the page to extract the commands and the time and that from the fields because it's separated with a hash. I'm just a lazy programmer. At the other side, you'll see there's a capture there from Ethereal. And on that slide, you can see that there's, you know, the machine is actually only going out to anonymizer. You can't see the IP number of the real controller. Okay, so let's just, to recap. Why do fences fail? We allow our users to surf the internet, right? In networks, you're allowed to surf the internet, most of you. If you can surf the internet, then this Trojan will work against you. If you look at content level stuff, IDS, what I'm sending out is a perfectly, perfectly, 100% stable HTTP request and reply coming in and out. I'm basically configuring a browser to browse. It's a site and do actions when it gets to certain parts of that website. So if you can surf the internet, if you can browse that site, then obviously the Trojan will work against you. Your content level filters and protocol filters can't find anything wrong with normal HTTP. Because we slap HTTPS, because we use SSL, your IDS basically just, you know, won't work. Your IDS can't lock onto any ports because we're using normal ports. We're not using funny ports like 131337, anything like that. We have SSL on there. Personal firewalls is also just a little bit of a waste with this because, you know, IE, you probably configured your personal firewall to allow IE to go out as well. So it's not a foreign application that's making a request. So it's not a foreign application that's making a request somewhere. Bottom line, if the user can surf the web, this thing is going to work against you. Okay, the solution to the problem, the big thing that we didn't talk about was delivery, okay? Delivery is up to you. At the end of the day, if you can keep nasties out of your network, then, you know, you're going to be safe against something like this. We talk about a concept of whitelisting. You know, in packaging. In packet filters, you basically, in packet filters, you don't say, deny this, deny this, deny this, and allow the rest, do you? No, you don't. You say, deny all and allow these few ports to go out, correct? Okay, so do the same thing with your websites. Tell the people at the company how they can surf to cnn.com and to abc or whatever.com and the rest are blocked. That's called whitelisting, but this is a solution to this problem. User education, the old kind of thing, as your coach uses, you know, if they get an attachment, that's basically the whole raw kind of, you know. I think one of the, we're finishing off here because we're running a little bit late. I think one of the things that we really wanted to show here was that, you know, we don't have a big budget. We don't have budget for this, okay? We don't have motivation for this other than speaking at Black Hat and speaking at DevCon. That's our motivation for creating. We don't have motivation for this other than speaking at DevCon. So, I think if you have a team of programmers that's more motivated with a bigger budget and, you know, more time, they could probably build something that is crazy. I mean, it's probably going to work on the same concept, but it might work a lot better. It might be embedded in some of the tools and systems that you know, Word, Excel, you know, that kind of thing. So, our motivation really today was just to make you aware that it's possible to write something like this. It's out there. It's alive and it's kicking. Thank you very much. Thank you. The next speaker is going to be Michael Schrenk. He's speaking on WebSpiders. He's here somewhere. And we were told that we can give some of these goodies away. So, if somebody wants something that's here, you can have one thing. It's right up front. There's a keyboard and I think this is a tape drive. Yeah, and a Zyplex something. Nice talk. You got parts? Am I supposed to give them all away? No, you can get it. Just one thing. They also asked us if there's any questions. We'll be around the pool area. The first pool. So, if you want to ask any questions, you can meet us there and we'll answer some of your questions. Thanks, guys. Thanks, everybody. Bye. Bye, guys. It was such a great day. Thank you. Bye. Bye-bye. Bye-bye. Bye-bye. Bye-bye. Bye-bye. Bye-bye. Bye-bye. .