1 00:00:00,000 --> 00:00:03,540 Today I'm going to talk about, like, botnets, the present-day botnets. 2 00:00:04,000 --> 00:00:12,500 And this is a research that has been, we are, like, my team and my university, like, my department has been doing for the last couple of months. 3 00:00:12,880 --> 00:00:18,960 And we came across some of the interesting facts and how the botnets are actually exploiting the integrity of the system nowadays. 4 00:00:20,340 --> 00:00:25,960 And so we came across with some interesting concepts and techniques that I'm just going to present today. 5 00:00:25,960 --> 00:00:33,260 So this has been a collaborative research with one of my team known as, like, Secondary Security Labs and with my advisor. 6 00:00:33,560 --> 00:00:36,640 And so just a little background of mine. 7 00:00:36,780 --> 00:00:39,500 I'm a third-year Ph.D. candidate at Michigan State University. 8 00:00:40,260 --> 00:00:42,360 Presently I'm working for, like, ISIC partners. 9 00:00:42,780 --> 00:00:47,600 And I previously worked for some other companies, and this is some of the previous file data that I have. 10 00:00:48,800 --> 00:00:50,960 And Rohit is one of my great friends. 11 00:00:51,020 --> 00:00:55,760 He has done a lot of work over this and collaborated with my advisor. 12 00:00:57,660 --> 00:00:59,740 So today I just want to put a little disclaimer. 13 00:01:00,060 --> 00:01:07,320 The point is that, like, whatever the things and concepts I'm going to discuss today is solely upon my research, and it does not relate to any of my employer. 14 00:01:07,580 --> 00:01:13,740 So it's an independent research that some of my group members are doing, and I'm also doing it as a part of my Ph.D. 15 00:01:15,100 --> 00:01:18,580 So today, agenda, we are going to talk about, like, bot spreading mechanisms. 16 00:01:19,240 --> 00:01:24,700 Some of the things you might be, like, spear phishing and kind of things, like, being existing for a long period of time. 17 00:01:25,160 --> 00:01:25,940 But at this point, we are going to talk about, like, bot-spreading mechanisms. 18 00:01:25,960 --> 00:01:29,720 So in this present part of time, what are the changes that have been coming in the field of malware? 19 00:01:30,220 --> 00:01:36,520 We're going to talk about exploit packs, try-by-download frameworks, spreaders, and with some live videos. 20 00:01:37,060 --> 00:01:39,140 Then we're going to talk about the post-exploitation. 21 00:01:39,420 --> 00:01:46,320 One, once your system is infected, what kind of things that a bot actually manipulates in your system, and to subvert the integrity. 22 00:01:47,040 --> 00:01:52,900 And then we're going to talk about, like, data exfiltration strategies and the concept of third-generation partners. 23 00:01:53,100 --> 00:01:55,560 How the various bots are actually exploiting. 24 00:01:55,960 --> 00:01:59,980 The HTTP communication channel to exfiltrate the data out of the system. 25 00:02:01,260 --> 00:02:06,240 So it started with, like, with the presentation, like, last couple of years for, like, one or two years. 26 00:02:06,420 --> 00:02:09,860 It's been started with Zeus, like, one of the great partners that came to exist. 27 00:02:10,480 --> 00:02:13,880 And that actually gave a birth to, like, third-generation partners. 28 00:02:14,420 --> 00:02:21,260 Why I'm mentioning here third-generation is, like, the first generation is a typical set of partners which actually uses the IRC protocol. 29 00:02:21,760 --> 00:02:25,920 So if we want to characterize these partners, why these are third-generation? 30 00:02:25,920 --> 00:02:27,600 Second generation and the first generation. 31 00:02:27,940 --> 00:02:30,000 So typically we look at two kind of things. 32 00:02:30,120 --> 00:02:31,660 Like, what kind of motivation they have. 33 00:02:31,920 --> 00:02:40,040 And then what kind of perspective they have in exploiting the systems. 34 00:02:40,540 --> 00:02:41,640 So it started with Zeus. 35 00:02:41,740 --> 00:02:43,160 Then it came to be SpyEye. 36 00:02:43,260 --> 00:02:46,040 Then at present time we are looking into Andromeda. 37 00:02:46,400 --> 00:02:47,320 Smoke is there. 38 00:02:47,800 --> 00:02:48,680 NGR existed. 39 00:02:49,360 --> 00:02:50,980 It existed, like, six months ago. 40 00:02:51,160 --> 00:02:53,480 Still going fine, but not that much. 41 00:02:53,940 --> 00:02:55,820 The place has been taken by Andromeda. 42 00:02:55,920 --> 00:03:00,900 Smoke and the upcoming, which is actually building nowadays, call us in a new passport. 43 00:03:02,380 --> 00:03:04,280 So most of, like, why hybrid? 44 00:03:04,420 --> 00:03:09,540 Because some of the botnets are actually, you know, getting properties or characteristics of other botnets. 45 00:03:09,940 --> 00:03:15,200 Typically, for example, like, SpyEye actually harnesses the power of Zeus in getting the web-injects concept. 46 00:03:15,580 --> 00:03:19,820 And then there's, like, an NGR which is also using a similar kind of thing. 47 00:03:20,640 --> 00:03:25,120 And then it's, like, a very good statistic produced by the Microsoft. 48 00:03:25,920 --> 00:03:28,180 The third generation botnets infections all around the world. 49 00:03:28,380 --> 00:03:34,040 So if you look specifically, it gives you an idea how the Zeus spot has started impacting the North America. 50 00:03:34,600 --> 00:03:38,140 And that actually gives you an idea, like, this is just only one part of the world. 51 00:03:38,300 --> 00:03:43,820 And you can expect the infections that occur on the global level. 52 00:03:44,240 --> 00:03:45,740 But this works pretty fine. 53 00:03:45,880 --> 00:03:53,400 It gives, like, things have changed in the world of botnets with the advent of third generation, which typically exploits HTTP protocol. 54 00:03:53,400 --> 00:04:00,720 And the motivation is all about exploiting the online banking to get the money or, like, a shortcut to success, whatever we say. 55 00:04:01,500 --> 00:04:05,600 So the artifact which I want to lay stress is, like, the devil is present in the details. 56 00:04:05,900 --> 00:04:06,720 And we know that. 57 00:04:07,000 --> 00:04:12,960 And if you don't know the details, we don't know the crux of the concept, it's not pretty worthwhile to, you know, spend time. 58 00:04:13,160 --> 00:04:14,900 And we will not be able to build the defenses. 59 00:04:15,700 --> 00:04:20,300 And so we had to do a little offense to get the defense, to build the defense according to that. 60 00:04:20,420 --> 00:04:22,080 But we need to get to the details. 61 00:04:22,080 --> 00:04:23,520 The crux of the concepts. 62 00:04:25,140 --> 00:04:29,040 And let's talk about the bot spreading mechanism that are widely deployed nowadays. 63 00:04:30,300 --> 00:04:32,680 Some of these concepts have been known for a while. 64 00:04:32,840 --> 00:04:38,460 But with the change of a lot of technologies, with the passage of time, things have changed. 65 00:04:38,640 --> 00:04:44,040 The design, the architecture, the framework, how the botnets are exploiting, it has changed a bit. 66 00:04:44,520 --> 00:04:45,240 Let's take a look. 67 00:04:45,620 --> 00:04:47,840 I want to start with, like, browser exploit packs. 68 00:04:48,520 --> 00:04:52,060 Last year we presented, like, complete details of, like, black hole and stuff like that. 69 00:04:52,080 --> 00:04:56,340 And how it infects and a lot of details in, like, virus bulletin conference. 70 00:04:57,240 --> 00:05:08,620 But still, if you remember, within the last year, if you were going through a lot of media articles and things like that, even at this present point of time, black hole exploit pack is really running fast. 71 00:05:09,200 --> 00:05:12,460 And it's still exploiting the things at a very large scale. 72 00:05:13,140 --> 00:05:14,440 So what it actually means. 73 00:05:15,820 --> 00:05:21,500 Typically, I mean, if you remember, I say a metasploit browser is built on the same design. 74 00:05:22,080 --> 00:05:24,440 So you have to collect and bundle a lot of exploits together. 75 00:05:25,000 --> 00:05:29,800 And then what it works like, host it as a web application somewhere on the malicious domain. 76 00:05:30,780 --> 00:05:33,520 So what it works like, your browser sends up a request. 77 00:05:33,740 --> 00:05:39,800 It fingerprints it and then gets what kind of vulnerable versions you are running of plugins and other components. 78 00:05:40,500 --> 00:05:42,300 And then it exploits according to that. 79 00:05:42,440 --> 00:05:45,600 It fingerprinted, okay, you've got, like, a vulnerable version of PDF. 80 00:05:45,760 --> 00:05:49,800 You've got a vulnerable version of Adobe Flash, Silverlight and things like that. 81 00:05:49,960 --> 00:05:50,260 Okay. 82 00:05:50,260 --> 00:05:51,980 So that exploit which has been known. 83 00:05:52,520 --> 00:05:58,180 And if you see in the present time, Java is the most plugin. 84 00:05:58,380 --> 00:06:02,320 Java is, like, mostly exploited nowadays because it gives you an easy access. 85 00:06:02,460 --> 00:06:05,620 It's, like, platform independent stuff. 86 00:06:05,700 --> 00:06:08,040 And so it gives you a lot of heavy access to that. 87 00:06:09,020 --> 00:06:10,040 So what works? 88 00:06:10,260 --> 00:06:11,300 It's an automated framework. 89 00:06:11,480 --> 00:06:12,880 The browser exploit packs. 90 00:06:13,840 --> 00:06:16,840 And as I stated, like, exploits are bundled together. 91 00:06:16,840 --> 00:06:22,540 So mostly if you see, they're, like, it's, like, mostly written in PHP and MySQL. 92 00:06:23,100 --> 00:06:25,080 Yeah, it's an open independent code structure. 93 00:06:25,280 --> 00:06:27,740 You can construct whatever you want and then build the codes. 94 00:06:28,060 --> 00:06:32,160 I remember correctly, like, last year we were, like, analyzing, like, Phoenix exploit packs. 95 00:06:32,280 --> 00:06:36,460 So it was actually using a direct exploit from the Metasploit which was written in Ruby. 96 00:06:36,800 --> 00:06:41,920 So it's, like, being a cross-platform independent, they can plug into each other and then can serve the exploit. 97 00:06:42,740 --> 00:06:43,780 And things like that. 98 00:06:43,780 --> 00:06:54,100 And they implement some sort of techniques, like, if a particular machine is sending a request to a command and control server that is hosting a browser exploit pack on the same domain. 99 00:06:54,660 --> 00:07:01,580 And it typically fingerprints your browser and fingerprints your IP address and sees, okay, we got a one request from this IP address. 100 00:07:01,720 --> 00:07:04,720 We don't want to serve malware to them. 101 00:07:04,860 --> 00:07:08,680 So you get, like, a one IP per system. 102 00:07:08,800 --> 00:07:11,760 So malware is served per IP basis. 103 00:07:11,760 --> 00:07:17,720 And then talk about, like, custom JavaScripts are there which are used explicitly for fingerprinting. 104 00:07:17,860 --> 00:07:21,840 Like, it gives me the browser version, gives me the, like, user environment information. 105 00:07:22,260 --> 00:07:25,180 And this is very much required for the browser exploit packs. 106 00:07:26,420 --> 00:07:32,120 And so whatever the example that I'm going to discuss in this talk is totally on the real-time case studies that we have analyzed. 107 00:07:32,420 --> 00:07:41,740 And all these frame, iframes and obfuscated scripts and this kind of pattern that I put on the slides here is being used heavily in this talk. 108 00:07:41,740 --> 00:07:47,720 I mean, it's a similar set of pattern that browser exploit packs like black hole, nuclear pack are using. 109 00:07:48,240 --> 00:07:57,900 And if you go and find some of the things on, like, malware domain list and then you find some malicious domains and then you try to find, hey, where is a malicious iframe is there? 110 00:07:58,240 --> 00:08:03,080 So if you look at the construct, like, the kind of it is being constructed, you will get these kind of patterns. 111 00:08:03,600 --> 00:08:04,840 And it's really easy. 112 00:08:04,920 --> 00:08:07,720 You can do some, like, dirty code tricks. 113 00:08:07,860 --> 00:08:11,720 You can, you know, manipulate things like alert to document dot write. 114 00:08:11,740 --> 00:08:13,760 And then you can put alert instead of evil. 115 00:08:13,980 --> 00:08:16,520 And things like that to actually render the script. 116 00:08:16,980 --> 00:08:22,920 But you can also do one more thing, like, you can do it, like, tactically step by step and try to understand how the code actually manipulates. 117 00:08:23,480 --> 00:08:25,060 And this actually gives you an idea. 118 00:08:25,200 --> 00:08:29,460 And that actually obfuscated code, when we deobfuscate it, it gets into this iframe. 119 00:08:29,760 --> 00:08:32,980 And it is, like, this iframe is actually rendered dynamically in the code. 120 00:08:33,920 --> 00:08:41,260 That gives you an idea, like, how the browser exploit packs are, you know, getting used with, like, obfuscated iframes. 121 00:08:42,020 --> 00:08:49,920 And that is how the browser exploit packs actually fingerprint your browser version and the kind of plug-ins you are using. 122 00:08:50,240 --> 00:08:52,600 And these are also kind of, like, a typical script. 123 00:08:52,700 --> 00:08:53,520 They're rendered dynamically. 124 00:08:53,900 --> 00:08:57,740 So what happens, like, when you visit a malicious URL, you click it. 125 00:08:57,860 --> 00:08:59,460 Then you've been redirected to some part. 126 00:08:59,580 --> 00:09:02,920 And then this code comes up, which finds that, okay, this is a plug-in. 127 00:09:03,200 --> 00:09:03,820 It's vulnerable. 128 00:09:04,300 --> 00:09:11,720 And then later on you find that the vulnerable plug-in having an exploit that is being embedded in the browser. 129 00:09:11,740 --> 00:09:14,820 So you can see that the browser exploit pack and it solves that exploit in that case. 130 00:09:15,600 --> 00:09:19,380 And so before going further, I will just want to lay stress here. 131 00:09:19,600 --> 00:09:20,600 So we were testing something. 132 00:09:20,780 --> 00:09:24,480 We came across this domain which is actually hosting the nuclear exploit pack. 133 00:09:25,040 --> 00:09:27,160 And this is just a statistic space. 134 00:09:27,360 --> 00:09:34,640 And you can see that when an attacker actually exploits the heavy traffic volume website and injects a malicious iframe, 135 00:09:35,360 --> 00:09:40,620 which is being pointed to the browser exploit pack, and you will see how fast the infection occurs. 136 00:09:40,900 --> 00:09:41,720 Let's take a look at that. 137 00:09:41,740 --> 00:09:41,820 Let's take a look here. 138 00:09:47,400 --> 00:09:54,120 The idea behind showing this is the concept, like, once the high traffic volume website is exploited and we put a malicious iframe, 139 00:09:54,260 --> 00:09:55,920 then how the stat varies. 140 00:09:56,320 --> 00:10:01,080 And that's the thing is, like, so this particular malicious domain is hosting a nuclear exploit pack. 141 00:10:01,400 --> 00:10:04,780 So when we were testing, we get an access to, like, the stats page. 142 00:10:05,400 --> 00:10:08,540 And then we typically want to look at how it is working. 143 00:10:08,680 --> 00:10:09,920 So a simple refresh. 144 00:10:09,920 --> 00:10:11,920 And loading the web page again. 145 00:10:12,000 --> 00:10:19,940 And again, keep on changing the ideas like the total and how many loads are occurring at one specific point of time. 146 00:10:23,520 --> 00:10:24,020 Yeah? 147 00:10:30,860 --> 00:10:31,920 Oh, wow, it's a video. 148 00:10:32,980 --> 00:10:35,040 It's like 800 by 600, actually. 149 00:10:39,440 --> 00:10:42,260 So this actually gives you an idea. 150 00:10:42,380 --> 00:10:47,240 So we keep on refreshing and seeing, like, how many loads are happening within seconds. 151 00:10:47,420 --> 00:10:51,340 And every time we try to refresh, we get, like, it's really going fast. 152 00:10:51,540 --> 00:10:53,300 So the infections are really going fast. 153 00:10:54,180 --> 00:11:00,440 And that actually gives us an idea how fast this thing is when you do it in an automated manner. 154 00:11:01,180 --> 00:11:04,600 And the exploited domain was, like, allmyvideos.net. 155 00:11:04,600 --> 00:11:08,040 And the all respective domains which were actually got infected. 156 00:11:08,440 --> 00:11:15,360 And every user that, you know, went to that domain, accessed some videos and things like that keep on getting infected and getting the bots. 157 00:11:16,520 --> 00:11:20,900 But that was an actual case study of, like, how the nuclear exploit pack is triggering up the things. 158 00:11:21,340 --> 00:11:26,460 So still black hole exists, but nuclear packs are still raging high. 159 00:11:27,740 --> 00:11:28,260 . 160 00:11:32,000 --> 00:11:34,780 We're going to talk a little bit about, like, drive-by-download attacks. 161 00:11:35,060 --> 00:11:38,040 It's a technique that has been existing for a long period of time. 162 00:11:38,400 --> 00:11:40,040 But it's still going pretty fine. 163 00:11:40,160 --> 00:11:43,580 And it's still very robust in understanding and exploiting the browsers. 164 00:11:44,280 --> 00:11:46,360 Typically it's just a redirection scenario. 165 00:11:46,780 --> 00:11:49,300 The user browser is redirected to the malicious domain. 166 00:11:49,460 --> 00:11:50,320 It fingerprints it. 167 00:11:50,820 --> 00:11:54,140 And the idea is, like, it's really hard for a user to notice this attack. 168 00:11:54,480 --> 00:11:57,940 It's not that easy for the user to, you know, there's a drive-by-download. 169 00:11:57,940 --> 00:11:59,520 You know, happening in the system. 170 00:11:59,640 --> 00:12:00,620 And the user can notice that. 171 00:12:00,740 --> 00:12:01,840 It's really different. 172 00:12:03,020 --> 00:12:05,140 Difficult, I would say, for the user to do that. 173 00:12:07,800 --> 00:12:09,380 And that's how it actually works. 174 00:12:10,060 --> 00:12:16,260 So whenever the user visits a malicious domain, a typical, like, browser is, like, fingerprinted. 175 00:12:16,400 --> 00:12:23,500 And then actually the browser exploit pack actually serves the exploit, which is actually using, like, JavaScript heapspring concept. 176 00:12:23,660 --> 00:12:26,480 And then, you know, exploit the browser pretty easily. 177 00:12:26,480 --> 00:12:29,560 And it all works in a stealth manner. 178 00:12:30,160 --> 00:12:33,360 So this is in our last, like, three or four months back. 179 00:12:33,540 --> 00:12:36,040 This drive-by-download framework came to exist. 180 00:12:36,200 --> 00:12:41,480 It's an automated exploit framework that is being used to serve Java-based exploits. 181 00:12:41,820 --> 00:12:43,420 It's known as, like, Anand JDB. 182 00:12:43,780 --> 00:12:45,220 And it works pretty fine. 183 00:12:45,360 --> 00:12:47,100 I mean, you've got a vulnerable version of Java. 184 00:12:47,200 --> 00:12:49,040 And there's an all exploit lined up. 185 00:12:49,140 --> 00:12:50,380 It gets, like, obfuscated. 186 00:12:50,400 --> 00:12:53,120 And that's being served to the users on that path. 187 00:12:54,600 --> 00:12:56,460 So you can see, like, automated exploit. 188 00:12:56,480 --> 00:13:00,320 Automated drive-by-download frameworks are still existing at a large scale. 189 00:13:00,660 --> 00:13:02,780 And that works pretty fine. 190 00:13:04,320 --> 00:13:07,020 Let's take a look at the black hole exploit pack in action. 191 00:13:07,120 --> 00:13:11,860 It's, like, a complete attack scenario that gives you an idea that how the things work. 192 00:13:13,100 --> 00:13:22,440 The only thing that I cannot show here in this particular video is, like, we cannot show explicitly where the drive-by-download is happening. 193 00:13:22,640 --> 00:13:25,720 But you will get an idea when it happens. 194 00:13:25,720 --> 00:13:27,040 And how the things work. 195 00:13:27,360 --> 00:13:30,520 For example, a very simple scenario of, like, spear phishing here. 196 00:13:31,120 --> 00:13:32,060 So you get a... 197 00:13:32,700 --> 00:13:34,680 So you try to log in into our e-mail account. 198 00:13:34,900 --> 00:13:37,240 And then we'll see we get some, like, phishing e-mail. 199 00:13:47,040 --> 00:13:48,600 So let's say we get this e-mail. 200 00:13:49,360 --> 00:13:51,300 And there is a compressed URL. 201 00:13:55,720 --> 00:13:56,820 We're trying to find out what happened. 202 00:13:56,880 --> 00:13:57,840 Let's put that in the chat. 203 00:13:59,640 --> 00:14:05,620 So what happened in this particular case. 204 00:14:06,120 --> 00:14:06,980 I think I could use... 205 00:14:20,020 --> 00:14:20,980 One second. 206 00:14:22,420 --> 00:14:22,900 Hello? 207 00:14:22,900 --> 00:14:23,320 It has a search engine. 208 00:14:23,400 --> 00:14:23,860 It has a search engine. 209 00:14:37,680 --> 00:14:42,960 Okay, so if you realize here, like, this particular web page has this compressed obfuscated iframe 210 00:14:42,960 --> 00:14:45,780 in it, which is just really hard to obfuscate in that sense. 211 00:14:46,080 --> 00:14:49,360 But another way we can do is, like, we can perform the behavioral analysis. 212 00:14:49,360 --> 00:14:54,780 So what we did, actually, we actually used a simple HTTP fox plug-in here. 213 00:14:55,420 --> 00:15:00,860 And that actually gives you an idea, like, how many hops the requests are going through. 214 00:15:04,160 --> 00:15:09,280 So well, actually, I designed, like, it's by 800 and 600, but I think it's, like, not. 215 00:15:11,940 --> 00:15:17,300 Anyways, so if you get an idea here, so what is happening here, so when the user clicks 216 00:15:17,300 --> 00:15:19,340 on that particular request, it keeps on hopping. 217 00:15:19,340 --> 00:15:21,440 It keeps on hopping different IPs. 218 00:15:21,440 --> 00:15:24,620 And it's not, like, a one single IP, like, you click it, you get an exploit. 219 00:15:24,800 --> 00:15:24,900 No. 220 00:15:25,000 --> 00:15:29,760 It keeps on going from, like, content delivery network to another IP and then to the malicious 221 00:15:29,760 --> 00:15:33,320 domain, where it is actually hosting them, browser exploit back. 222 00:15:38,540 --> 00:15:44,660 That actually shows you that the browser actually started connecting to the third-party domain 223 00:15:44,660 --> 00:15:45,480 with different hops. 224 00:15:46,500 --> 00:15:49,200 So when you visited it, like, so this was a clean system. 225 00:15:49,340 --> 00:15:51,900 Actually, so we performed a little scan on it. 226 00:15:52,000 --> 00:15:53,620 That's the only way we can show that. 227 00:15:59,100 --> 00:16:03,600 And that's the hops that actually the browser connected previously when it accesses that 228 00:16:03,600 --> 00:16:03,880 link. 229 00:16:07,580 --> 00:16:08,720 And that's the URL. 230 00:16:09,560 --> 00:16:11,680 That's just got located to this IP address. 231 00:16:14,820 --> 00:16:16,560 And the second hop is this one. 232 00:16:18,080 --> 00:16:18,600 Okay. 233 00:16:22,000 --> 00:16:25,800 And this was actually a stat speech that was, like, being accessed on the malicious 234 00:16:25,800 --> 00:16:27,980 domain, which was running, like, black hole exploit back. 235 00:16:42,000 --> 00:16:46,060 So when we completed the scan of the system, it gives, like, there is one infection in 236 00:16:46,060 --> 00:16:46,520 the system. 237 00:16:46,700 --> 00:16:46,880 Okay. 238 00:16:47,520 --> 00:16:49,160 And then we tried to look at the results. 239 00:16:49,280 --> 00:16:53,660 We find that it's, like, it's got a signature of zbot, which is called as an azure spot. 240 00:16:54,440 --> 00:16:58,380 So this actually gives us an idea, like, the black hole, like, automated exploit back 241 00:16:58,380 --> 00:17:02,080 are really worked in collaboration with the botnets in spreading bots. 242 00:17:02,340 --> 00:17:04,300 And that's how they work for. 243 00:17:04,620 --> 00:17:08,160 And that's what the idea is all about. 244 00:17:08,240 --> 00:17:11,980 And this is the obfuscated script, which is actually really compressed. 245 00:17:12,680 --> 00:17:16,220 And so it's really hard to deobfuscate it easily. 246 00:17:17,060 --> 00:17:20,360 And we had to do the behavioral analysis and get the things done. 247 00:17:22,520 --> 00:17:26,580 So actually that actually gives you an idea of the whole complete life cycle of how you 248 00:17:26,580 --> 00:17:31,720 got a spear phishing mail, it's, like, compressed, using, like, URL shortening service, things 249 00:17:31,720 --> 00:17:32,140 like that. 250 00:17:32,200 --> 00:17:35,580 And there are multiple hops that the user has to go through. 251 00:17:35,840 --> 00:17:37,360 And then it serves with the exploit. 252 00:17:37,800 --> 00:17:38,680 That's pretty fine. 253 00:17:39,440 --> 00:17:41,660 Now let's talk about spreaders. 254 00:17:41,880 --> 00:17:46,860 And so we were analyzing, like, ubus bot, which is the network. 255 00:17:46,860 --> 00:17:48,480 It's a new upcoming breed of botnet. 256 00:17:48,820 --> 00:17:50,660 And it's pretty sophisticated. 257 00:17:51,020 --> 00:17:54,540 And they have implemented a pretty good spreader called a USB spreader. 258 00:17:54,960 --> 00:17:56,540 This technique worked previously. 259 00:17:56,820 --> 00:17:58,760 But it's still working pretty fine. 260 00:17:58,980 --> 00:18:00,380 And they have implemented it really good. 261 00:18:00,580 --> 00:18:04,300 And we'll show you by going through this case study how we can build signature very easily. 262 00:18:05,340 --> 00:18:10,300 And so on your in-factor system, when the bot is there, it actually acts as, like, 263 00:18:10,920 --> 00:18:12,340 a monitoring service. 264 00:18:12,660 --> 00:18:16,040 It actually, you know, creates a monitoring service, which actually looks for what kind 265 00:18:16,040 --> 00:18:18,180 of USB you are going to insert in your system. 266 00:18:19,140 --> 00:18:24,400 And whenever there's any plug and play devices actually gets inserted in the system, it actually 267 00:18:24,400 --> 00:18:29,100 release, like, register device notification W function, which is in a Windows inbuilt API. 268 00:18:29,680 --> 00:18:31,060 And that works pretty fine. 269 00:18:31,160 --> 00:18:35,920 So if you look at the screenshot of the disassembly I have put up there, it actually gives you 270 00:18:35,920 --> 00:18:36,340 an idea. 271 00:18:36,480 --> 00:18:41,720 It is the bot is actually taking up a CLSID parameter, which actually points to the USB 272 00:18:41,720 --> 00:18:42,140 device. 273 00:18:42,640 --> 00:18:46,020 And then if you go down, like, it's, like, a registry device notification function. 274 00:18:46,020 --> 00:18:51,480 So which will notify there's some device that's already been inserted into the system. 275 00:18:51,780 --> 00:18:52,800 Is somebody there? 276 00:18:52,960 --> 00:18:57,180 And try to give, like, a window message to the system so that it gives us this active 277 00:18:57,180 --> 00:18:57,540 scenario. 278 00:18:58,640 --> 00:19:05,500 So what happened in this particular case is in the USB spreading mechanism, so our bot 279 00:19:05,500 --> 00:19:09,600 is usually ‑‑ which has to write in a USB monitoring module, which actually creates 280 00:19:09,600 --> 00:19:15,140 a Windows proc, which is in a Windows inbuilt API call, and then it actually ‑‑ it actually 281 00:19:15,140 --> 00:19:20,260 looks for the Windows message device change notification, which is being done by the 282 00:19:20,260 --> 00:19:21,320 device broadcast header. 283 00:19:21,880 --> 00:19:25,860 And again, it looks for, like, different kind of interfaces, which has ‑‑ so if you 284 00:19:25,860 --> 00:19:31,120 look on the downwards, so there is a USB device, and it has, like, a W param divide, 285 00:19:31,340 --> 00:19:33,340 you know, specified for the Windows procedure. 286 00:19:34,060 --> 00:19:39,060 And it actually gives you an idea, like, there's a DBT device arrival, and, okay, the 287 00:19:39,060 --> 00:19:40,800 device has actually arrived in the system. 288 00:19:41,000 --> 00:19:42,140 So what is it going to do? 289 00:19:42,200 --> 00:19:44,780 So it's actually going to fetch another call in that. 290 00:19:44,920 --> 00:19:45,120 Okay. 291 00:19:45,140 --> 00:19:49,840 Which is called a unit mask, which actually is going to be a broadcast volume. 292 00:19:50,100 --> 00:19:56,360 So what happened in that case, once your system actually gets notification from the USB device, 293 00:19:56,540 --> 00:20:01,720 like it is in there, and the bot is actually going to monitor all these things, and it 294 00:20:01,720 --> 00:20:05,940 will check, like, the plug‑and‑play device, like, for example, USB, is going to get us 295 00:20:05,940 --> 00:20:14,360 some hardest notification, like it can be XYZ or something like that, the volume notification 296 00:20:14,360 --> 00:20:15,420 or the volume number. 297 00:20:16,120 --> 00:20:21,580 And after getting this, it actually gets an idea, okay, now the bot actually gets an 298 00:20:21,580 --> 00:20:24,400 idea, like the USB is actually inserted into the system. 299 00:20:24,600 --> 00:20:28,640 So what it does, actually, it actually calls another Windows inbuilt API called a copy 300 00:20:28,640 --> 00:20:32,780 file W, and actually creates an auto‑run file in the USB. 301 00:20:33,120 --> 00:20:36,980 And how it actually does that, the disassembly actually gives you an idea. 302 00:20:37,560 --> 00:20:41,920 So it actually generates ‑‑ this is an example of the U pass code, which actually 303 00:20:41,920 --> 00:20:43,560 gives you the point. 304 00:20:43,720 --> 00:20:43,880 Okay. 305 00:20:44,360 --> 00:20:49,640 So it created a WS underscore WS, some sort of a random executable name, which is going 306 00:20:49,640 --> 00:20:50,540 to place in the USB. 307 00:20:51,040 --> 00:20:54,900 And it is also going to create an auto‑run dot end file, which is going to put up some 308 00:20:54,900 --> 00:20:55,780 parameters in it. 309 00:20:56,560 --> 00:21:01,820 So it will give you the EXE to the USB device, as well as an auto‑run file to the USB 310 00:21:01,820 --> 00:21:02,200 device. 311 00:21:03,860 --> 00:21:06,080 And it actually sets an attributes to that. 312 00:21:06,700 --> 00:21:12,240 Another way of doing it, like, except for auto‑linking, we call this technique is 313 00:21:12,240 --> 00:21:13,000 a malicious file. 314 00:21:13,000 --> 00:21:13,780 Dollink file infections. 315 00:21:14,360 --> 00:21:18,500 Typically like a one‑year‑back Microsoft Dollink vulnerability is exploited the most 316 00:21:19,200 --> 00:21:21,560 for doing some exploitation at the system level. 317 00:21:21,940 --> 00:21:22,480 So simple. 318 00:21:22,780 --> 00:21:24,500 It's like a sort of shortcuts. 319 00:21:25,100 --> 00:21:27,700 The bot can also create a shortcut in that sense. 320 00:21:28,060 --> 00:21:32,040 And creating that one, the disassembly gives you an idea how it is doing that. 321 00:21:32,460 --> 00:21:37,400 And it simply places the link in that, and even if it's a bot into it, so whenever the 322 00:21:37,400 --> 00:21:41,860 USB is inserted into another system, it checks for the auto‑run file, as well as the malicious 323 00:21:41,860 --> 00:21:42,520 link file. 324 00:21:43,000 --> 00:21:48,060 And then it triggers the EXE file into the system, which is like spreading a bot from 325 00:21:48,060 --> 00:21:49,160 system to system level. 326 00:21:49,860 --> 00:21:55,320 And this technique works pretty fine, and it's been one of the core techniques of the 327 00:21:55,320 --> 00:21:55,880 UPAS bot. 328 00:21:57,600 --> 00:22:01,900 So when we connect it back to the command and control server, it gives you an idea of 329 00:22:01,900 --> 00:22:02,780 the USB spreading. 330 00:22:03,860 --> 00:22:08,960 And that actually shows you how many USBs have been infected by the bot. 331 00:22:09,380 --> 00:22:12,040 And it also picks up what kind of drive letters. 332 00:22:12,040 --> 00:22:14,500 It picks in the system and things like that. 333 00:22:14,720 --> 00:22:16,880 So it's like a system‑to‑system level infection. 334 00:22:17,360 --> 00:22:21,900 I mean, the bot has to actually enlarge and it has to make the botnet really bigger in 335 00:22:21,900 --> 00:22:22,360 that sense. 336 00:22:22,520 --> 00:22:25,720 So it has to keep on spreading things in that way. 337 00:22:26,160 --> 00:22:27,460 This is one spreader. 338 00:22:27,500 --> 00:22:32,360 There are many other spreaders, like instant messenger spreaders, like, for example, exploiting 339 00:22:33,020 --> 00:22:37,560 instant messaging functionality in Google Talk, MSN Messenger, and a wide variety of messengers. 340 00:22:38,060 --> 00:22:41,420 Another one is like the latest technique that has been developed. 341 00:22:41,420 --> 00:22:46,580 Recently in the NGR bot, which actually exploits the Facebook chat panel from the system, 342 00:22:46,740 --> 00:22:52,380 so it hooks messages that our browser actually sends and then injects malicious messages 343 00:22:52,380 --> 00:22:55,260 containing URL to the malicious domain. 344 00:22:56,660 --> 00:23:00,860 And so getting all that information, when we get our detailed information, we get an 345 00:23:00,860 --> 00:23:06,120 idea, like, I want to build an alert signature for, like, the intrusion prevention system, 346 00:23:06,260 --> 00:23:09,460 and that's how we can easily get the information. 347 00:23:10,640 --> 00:23:11,160 Okay. 348 00:23:11,160 --> 00:23:17,380 And so using these parameters, we can build up the signature, and that's by doing the 349 00:23:17,380 --> 00:23:17,960 reverse engineering. 350 00:23:18,120 --> 00:23:21,940 And if you use that signature, you can get all the infections that UPAS bot is doing. 351 00:23:22,960 --> 00:23:24,900 So that actually works really well. 352 00:23:25,080 --> 00:23:30,320 I mean, if you go to the crux of the problem and you get the ideas and you get the information 353 00:23:30,320 --> 00:23:34,780 you want, and if you get that information and then you can build these signatures very 354 00:23:34,780 --> 00:23:36,100 easily, it's not a big task. 355 00:23:37,760 --> 00:23:40,920 And again, another spreading mechanism is like a social network. 356 00:23:41,720 --> 00:23:47,520 So, I think it's been one of the best exploiting platforms that has become, and the malware 357 00:23:47,520 --> 00:23:49,720 authors and the attackers are really exploiting it. 358 00:23:50,140 --> 00:23:54,900 And it's not that hard to actually trick users to click at some sort of links and things 359 00:23:54,900 --> 00:23:55,300 like that. 360 00:23:55,560 --> 00:24:01,500 So, sometime back we were analyzing a one case, and we came to us like, it was a case 361 00:24:01,500 --> 00:24:03,140 of like-jacking and a click-jacking. 362 00:24:03,380 --> 00:24:07,780 So, there was a malicious website which was actually doing the like-jacking in social 363 00:24:07,780 --> 00:24:08,600 network website. 364 00:24:09,120 --> 00:24:09,640 Okay. 365 00:24:09,640 --> 00:24:11,140 And we came across this. 366 00:24:11,140 --> 00:24:15,960 that and it was pretty interesting technique. It was there for like four or five months ago, I 367 00:24:15,960 --> 00:24:26,540 suppose. But it has been seen in the wild. So how it works, let's take a look at it. For 368 00:24:26,540 --> 00:24:30,440 example, in a browser you have opened your Facebook session and I think many users do that 369 00:24:30,440 --> 00:24:36,140 and then try to do a lot of work side by side. For example, if an attacker can force a user to 370 00:24:36,140 --> 00:24:42,520 visit a malicious domain or some tricky domain which has some sort of malicious code in it. So 371 00:24:42,520 --> 00:24:47,440 in this case the user is actually logged into his Facebook account and that is sort of another 372 00:24:47,440 --> 00:24:55,360 malicious webpage. So if you see exactly you can get a light button. The impression of the light 373 00:24:55,360 --> 00:25:00,180 button is going along with the mouse here. Because I didn't make it like transparent, I just 374 00:25:00,180 --> 00:25:05,400 changed the code to show it explicitly how it is actually working. What happened in that case, 375 00:25:05,460 --> 00:25:06,120 it gives you an idea. It gives you a lot of information. It gives you a lot of information. 376 00:25:06,120 --> 00:25:13,280 It gives you an idea. Now, so this is a script that malicious webpage is using. It is 377 00:25:13,280 --> 00:25:18,060 actually collaborative with the click checking attack. And with that click checking you can 378 00:25:18,060 --> 00:25:22,620 hide up the buttons, you can hide up the other things on the webpage and then you can still 379 00:25:22,620 --> 00:25:29,200 issue the request. Let's see how it works. So when the user clicked on this malicious 380 00:25:29,200 --> 00:25:36,100 page, a request is being sent in the form of post parameter and it goes to Facebook and 381 00:25:36,100 --> 00:25:45,420 Facebook.com actually. So what happened in this case when I logged back into the account and 382 00:25:45,420 --> 00:25:52,100 refreshed it, and you'll see there is a light link appears, call us Robin lights this link. And 383 00:25:52,100 --> 00:25:56,700 when the user clicked that link, it is redirected to the malicious domain here, which is actually 384 00:25:56,700 --> 00:26:05,220 serving a back door, like a VM player file. And which is actually downloading a malware onto the 385 00:26:05,220 --> 00:26:11,380 user system. In order to show it like in a clear manner, I have removed some of the 386 00:26:11,380 --> 00:26:21,360 stealthy code out of it that actually gives you an idea how the light checking works. So even if 387 00:26:21,360 --> 00:26:25,140 you go to that malicious domain and you try to look into the source code on the client side, you 388 00:26:25,140 --> 00:26:32,020 won't find anything. Because the VM file, the VM file actually is back door. And in it, there is a 389 00:26:32,020 --> 00:26:35,200 malicious code, it is just entering a new frame. And then it calls back to Facebook. And that's a 390 00:26:35,200 --> 00:26:40,120 downloading a malware onto the user system. So this actually gives us an idea how the 391 00:26:40,120 --> 00:26:43,640 social networks are getting exploited. It's very simple. I mean, the user doesn't have 392 00:26:43,640 --> 00:26:50,740 to do, the attacker actually does not have to do anything seriously in the Facebook context. 393 00:26:51,000 --> 00:26:55,960 But just it has to force the users to visit some other domain which open on the same context 394 00:26:55,960 --> 00:27:00,280 of the browser you are using and then from the other tab you can simply send up the request 395 00:27:00,280 --> 00:27:03,960 to the Facebook that actually inserts malicious links in it. 396 00:27:05,780 --> 00:27:10,960 Now let's take a look at the post exploitation strategy like how the bots actually support 397 00:27:10,960 --> 00:27:16,840 the system integrity once it gets into your system. The very interesting technique that 398 00:27:16,840 --> 00:27:21,980 we monitor is like the Rust skill. It's like it came from, it came to exist from a group 399 00:27:21,980 --> 00:27:29,980 of warriors in Russia and typically used in the Diablo game players to actually show up 400 00:27:29,980 --> 00:27:34,720 the, you know, the power they have while they're playing something and things like that. So 401 00:27:34,720 --> 00:27:37,840 the Rust skill is in a pretty interesting module that is being used by bots nowadays. 402 00:27:38,340 --> 00:27:43,300 So what it does actually is it actually monitors wherever the new file is downloaded into the 403 00:27:43,300 --> 00:27:49,100 infected machine. Like being an attacker, I actually give a command to the bot, okay, 404 00:27:49,120 --> 00:27:53,580 download a one particular file that is a malicious executable file from the third party domain. 405 00:27:53,860 --> 00:27:59,360 It downloads it and it executes it. But after that, what Rust skill does is that it removes 406 00:27:59,360 --> 00:28:05,000 once it executes that malicious file, it removes all the fingerprints of that particular file 407 00:28:05,000 --> 00:28:11,420 from the system to avoid detection. And it's a very, it's some sort of showing up a power 408 00:28:11,420 --> 00:28:15,980 of a particular bot, right? It has that kind of functionality to download a third party 409 00:28:16,600 --> 00:28:21,220 executable onto the infected machine, then executing it, and then completely removing 410 00:28:21,220 --> 00:28:25,560 all the instances that actually shows that this file has been executed on the system. 411 00:28:26,500 --> 00:28:32,220 So, we saw that when we were analyzing NGR bot, which is like a dog pod, existed earlier, 412 00:28:32,480 --> 00:28:37,960 and it actually uses this technique, and it worked pretty fine. And that's what Ruskill 413 00:28:37,960 --> 00:28:44,580 actually did. And it's still going pretty fine in that sense. But the whole concept 414 00:28:44,580 --> 00:28:49,320 of showing the Ruskill is here is that how sophisticated the bots have become. I mean, 415 00:28:49,340 --> 00:28:54,940 previously, if you look at the design of IRC-based bots, and now the Ruskill kind of 416 00:28:54,940 --> 00:28:55,360 functionality. 417 00:28:55,560 --> 00:29:03,040 And they are getting more developed with the passage of time. So, let's see. So, when 418 00:29:03,040 --> 00:29:07,960 we do some disassembly of the Ruskill module, it will give you an idea that the Ruskill 419 00:29:07,960 --> 00:29:12,660 is going to detect a particular file, if it has made modification in it, going to detect 420 00:29:12,660 --> 00:29:18,240 if there is some sort of DNS, like settings have been modified in the system. And there 421 00:29:18,240 --> 00:29:23,960 will be like detecting some sort of registry manipulation in the system. So, this is a 422 00:29:23,960 --> 00:29:25,160 very interesting thing. 423 00:29:25,160 --> 00:29:30,780 And it's in a sort of like really stealth technique. And let's take a look with an example 424 00:29:30,780 --> 00:29:38,020 of hybrid bot. And what we did in that, we get a sample of NGR bot. We just did some 425 00:29:38,020 --> 00:29:43,120 reverse engineering. We made it work in a controlled manner. And we set up our own 426 00:29:43,900 --> 00:29:50,320 IRC channel so that it connects back to it. Because NGR bot is in a hybrid bot, and it 427 00:29:50,320 --> 00:29:55,140 has some sort of functionality which third generation bot has possessed. So, this is 428 00:29:55,160 --> 00:29:57,120 a really interesting technology. This actually gives you an idea, I connected back to the 429 00:29:58,260 --> 00:30:03,960 IRC channel. I just found the NGR. And in our virtual machine, there is a NGR bot here. 430 00:30:09,700 --> 00:30:14,400 What are we going to do? We are going to execute this bot in our control virtual machine 431 00:30:14,400 --> 00:30:25,140 here. So, it melts itself. So, this functionality of bot system is melting. It's like a side 432 00:30:25,160 --> 00:30:29,660 destructive code. Like try to remove like the dropper protection it has and so that it can 433 00:30:29,660 --> 00:30:35,860 install randomly somewhere in the application data using Windows inbuilt crypto API. So if you 434 00:30:35,860 --> 00:30:41,760 see now, the victim machine is actually get connected back to the IRC channel. So this is like 435 00:30:41,760 --> 00:30:48,380 NUS forward slash XP and Windows XP machine and there is a CAUGFVF which is a random name of 436 00:30:48,380 --> 00:30:56,120 the bot. So in order to produce this demo, what I did actually previously, I actually get a 437 00:30:56,120 --> 00:31:03,180 link to the like the putty file somewhere on the Internet. And I execute a command that NGR 438 00:31:03,180 --> 00:31:11,240 uses called as an impaja and when we paste up and I started the module with a hyphen R 439 00:31:11,240 --> 00:31:18,280 option. And you see what's happened. So this file is actually get executed on the 440 00:31:18,380 --> 00:31:23,840 victim machine. And that actually gives you an idea. The bot actually fetched that file, 441 00:31:25,620 --> 00:31:34,640 executed, and things like that. So you can execute as many times as you can. And since it's just 442 00:31:34,640 --> 00:31:39,060 like for this particular demo, what happens once the file is executed, after that the rascal 443 00:31:39,060 --> 00:31:44,000 will remove all the instances of that particular file, even the file itself from the system. 444 00:31:48,380 --> 00:31:54,560 And after that you get a rappelle. So you got it again. So it works pretty fine every case 445 00:31:54,560 --> 00:32:01,140 and every time you want to execute a third party executable on the affected machine. And that 446 00:32:01,140 --> 00:32:07,940 actually gives you an idea what the rascal actually did in this particular demo. And I think 447 00:32:07,940 --> 00:32:13,760 like the big problem nowadays is like a DNS changer. I mean, so DNS changer can be an 448 00:32:13,760 --> 00:32:18,360 individual malware, it can be a part of some malware or it can be a human database or it can be a 449 00:32:18,360 --> 00:32:24,640 a different classification of malware we can do. But according to us, what we have analyzed 450 00:32:24,640 --> 00:32:29,540 is just a kind of functionality of malware, how it's going to exploit the DNS settings 451 00:32:29,540 --> 00:32:36,020 in the system. So it works and it has been a great problem because using this technique 452 00:32:36,020 --> 00:32:42,300 is pretty easy to actually redirect users to any place and things like that. Let's take 453 00:32:42,300 --> 00:32:48,300 a look. DNS changer, I mean, with this technique you can try several different ways to actually 454 00:32:48,940 --> 00:32:53,020 manipulate the infected system. The very first one is to just put up an entry somewhere 455 00:32:53,020 --> 00:32:58,860 in the host file. Or you can simply change second, you can do like you can simply change 456 00:32:58,860 --> 00:33:06,760 the DNS server entry with a malicious IP address. This is a very simple one. I mean, once you 457 00:33:06,760 --> 00:33:12,500 do that, what happened in the context of system is that the changing the DNS settings won't 458 00:33:12,500 --> 00:33:18,100 allow the system to connect back to some of the various security websites such as Microsoft 459 00:33:18,100 --> 00:33:22,900 to download the updates and things like that. You can do much more with that. And that's 460 00:33:22,900 --> 00:33:28,980 what attackers are doing nowadays. So there are different ways one can do that. 461 00:33:29,220 --> 00:33:33,560 We can produce like DNS amplification attack in a small local area network where you can 462 00:33:33,560 --> 00:33:39,280 exploit the DNS servers directly by just manipulating the cache and things like that. Or maybe you 463 00:33:39,280 --> 00:33:46,400 can simply host in a rocked DHCP server which actually gets your connections at first rather 464 00:33:46,400 --> 00:33:47,340 than the legitimate. 465 00:33:48,100 --> 00:33:52,460 I'm sorry. The DNS server do. And then it goes for like DNS querying and things like 466 00:33:52,460 --> 00:33:57,260 that. But that's fine. That's a very normal way of doing things, the changing and manipulation 467 00:33:57,260 --> 00:34:02,580 of the DNS entries. So how the bots are doing it. So bots are actually implementing the 468 00:34:02,580 --> 00:34:10,140 concept of hooking. And hooking DNS libraries gives them the power and gives them the really 469 00:34:10,140 --> 00:34:15,500 way to execute these things in a stealthy manner. What happened in that case, it works 470 00:34:15,500 --> 00:34:24,020 works dynamically. So the bot actually hooks the DNS API provided by the Microsoft. That's very 471 00:34:24,020 --> 00:34:28,480 good. So there is a function, if we know correctly, like DNS query, which is being a part 472 00:34:28,480 --> 00:34:34,380 like imported and some sort of exported by some other DLS, called DNS API. So we understand 473 00:34:34,380 --> 00:34:38,640 the concept of hooking. And there is a different way you can perform hooking. There is an 474 00:34:38,640 --> 00:34:43,920 import address table hooking. Then you can do inline hooking. Then you can do a DLL injection, 475 00:34:43,920 --> 00:34:48,680 creating remote thread. Then you can do like set Windows hook. And there's other ways you can 476 00:34:48,680 --> 00:34:54,140 create remote thread function and different way of performing hooking. But what is the stilt 477 00:34:54,140 --> 00:34:59,700 ways like inline hooking where the actually bot, the malware authors, when they design, when 478 00:34:59,700 --> 00:35:04,880 they write a bot, and they actually implement a concept of deter and trample in functions. And 479 00:35:04,880 --> 00:35:11,600 that actually redirects the flow of these functions like DNS query and then it redirects you 480 00:35:11,600 --> 00:35:12,800 to the hook module. 481 00:35:13,920 --> 00:35:19,640 And it all happens dynamically. And that's what the real crux of this DNS 482 00:35:19,640 --> 00:35:25,000 danger is like. Things like that. Another way of doing the hooking is you can exploit the DNS 483 00:35:25,000 --> 00:35:30,280 cache resolver service and try to check whether the send to function has been hooked or not. And 484 00:35:30,280 --> 00:35:35,640 these two things, even implemented by the conflictor virus, too, but it's still going fine. 485 00:35:35,960 --> 00:35:41,840 Latest breed of botnets are also using it. And how they are doing it, let's take a look. And 486 00:35:41,840 --> 00:35:43,900 when we disassemble the bot and we have a botnet, we have a botnet. If we have a botnet, we can 487 00:35:43,920 --> 00:35:50,440 get an idea how they are doing it. And this is a functionality being provided by NGR bot. So it 488 00:35:50,440 --> 00:35:57,220 can block the request. It can redirect the DNS request and do certain things like that. And how 489 00:35:57,220 --> 00:36:04,880 it does that, let's take a look. So in this particular demo, we are still going to connect to 490 00:36:04,880 --> 00:36:10,880 the IRC channel. And then we are going to throw away some of the commands like change DNS 491 00:36:10,880 --> 00:36:13,620 commands. And then we'll see how it dynamically. 492 00:36:19,520 --> 00:36:29,400 It's still connecting back to the NGR. And if you see clearly here, the bot is still there. It 493 00:36:29,400 --> 00:36:39,360 means the system is alive and it's activated. In order to show that, let's just open some 494 00:36:39,360 --> 00:36:43,900 websites like Microsoft and Facebook.com to see whether the connection is still there. And 495 00:36:43,920 --> 00:36:47,080 whether the connection is alive and the websites are opening pretty fine or not. 496 00:36:53,300 --> 00:36:58,420 At this point of time, we are able to open Microsoft.com and then we are able to open 497 00:36:58,420 --> 00:37:05,300 Facebook.com. That's fine. So we close the browser. And then I get back to the IRC channel. 498 00:37:05,620 --> 00:37:12,860 And I issued a command that is being written in NGR bot doing the change DNS. And then I did for 499 00:37:12,860 --> 00:37:13,900 the Microsoft.com. 500 00:37:13,900 --> 00:37:26,860 It blocked it. And I again did it for, like, Facebook.com. So now the user, like, for example, 501 00:37:26,940 --> 00:37:31,240 user gets back onto the system, try to open some website, for example, Microsoft. So it gets 502 00:37:31,240 --> 00:37:40,940 blocked. Again, the Facebook actually gets blocked. So it happens because of the NGR bot 503 00:37:40,940 --> 00:37:43,300 actually implemented the concept of DNS hooking. 504 00:37:43,900 --> 00:37:48,240 It's not exactly like it is manipulating the host file or doing some sort of other things like that. 505 00:37:48,420 --> 00:37:53,620 But it actually implemented hooking. And that actually gives you a dynamically binding at the 506 00:37:53,620 --> 00:38:00,140 runtime environment. So we did another different test. Sometimes DNS manipulation really go 507 00:38:00,140 --> 00:38:06,120 awry in some sense. And that is the example here. So when we redirect Google to some malware 508 00:38:06,120 --> 00:38:12,780 domain and the system is giving up, like, no found. And then you still look at the URL. It just 509 00:38:13,880 --> 00:38:20,280 mismanaged DNS query. But this actually gives you an idea, like, DNS manipulation still works 510 00:38:20,280 --> 00:38:28,280 pretty fine in the in-factor system. Like, these kind of designs really hamper the security 511 00:38:28,280 --> 00:38:34,880 context of a system. Now we have gone through, like, a lot of things. We took a look at, like, 512 00:38:34,880 --> 00:38:39,340 how the nuclear exploit pack is working. We had a look at, like, how the black hole exploit pack is 513 00:38:39,340 --> 00:38:42,760 working. Then we look at some of the techniques, like, Rust skill. And then we look at some of the 514 00:38:42,760 --> 00:38:50,240 things. And then we looked at DNS. DNS exploitation in the in-factor systems. Now here it comes is, 515 00:38:50,340 --> 00:38:55,460 like, how to exploit browsers. Like, once your system is in-factor, okay, that's fine. I got an 516 00:38:55,460 --> 00:39:00,140 access to your system. But I'm not any more interested in it. Like, the bots are actually 517 00:39:00,140 --> 00:39:05,420 designed to exfiltrate data out of the system. And with the third generation botnets, HTTP is the 518 00:39:05,420 --> 00:39:12,040 protocol, what they are actually doing it. And in order to do that, just a very simple thing. 519 00:39:12,760 --> 00:39:17,220 Most of the malware actually implement these things, like try to manipulate the zone entries in 520 00:39:17,220 --> 00:39:23,860 the Internet Explorer. And then manipulating Firefox entries by configuring some parameters in 521 00:39:23,860 --> 00:39:30,180 the user.js file. The only idea is, like, they are doing it just to try to remove all the HTTP 522 00:39:30,180 --> 00:39:35,280 level notifications. I mean, for example, with the SSL, they want to remove all those kind of 523 00:39:35,280 --> 00:39:41,480 notifications. And they want or they force the browser to send data over HTTP channel, rather 524 00:39:41,480 --> 00:39:42,740 HTTPS. And they want to force the browser to send data over HTTP channel, rather HTTPS. And they 525 00:39:42,760 --> 00:39:46,840 want to do that. Because sometimes browser gear gives you a warning, okay, the channel is being 526 00:39:46,840 --> 00:39:52,320 changed from HTTP to HTTPS. So in order to remove all those sort of notifications, bot actually 527 00:39:52,320 --> 00:40:01,140 manipulates the user.js file. And this is one of the interesting technique that has been 528 00:40:01,140 --> 00:40:07,880 existing for a couple of months now. And this is actually another replica of, like, man in the 529 00:40:07,880 --> 00:40:12,680 middle. The only problem, or the only differentiation is that it actually works inside us, 530 00:40:12,760 --> 00:40:17,860 system, and man in the middle works between two end points in the network. So the bot, which is 531 00:40:17,860 --> 00:40:25,020 actually getting installed, is a user land root kit, actually. Because the browser process is 532 00:40:25,020 --> 00:40:31,300 running a user land system. And the bot has to work on the user land level to actually hook some 533 00:40:31,300 --> 00:40:37,160 kind of functions inside it. So this diagram actually gives you an idea when a user actually 534 00:40:37,160 --> 00:40:42,740 accesses a legitimate web page. And when the web page is sent back to the user, the user is going to 535 00:40:42,740 --> 00:40:49,180 use a machine in the form of HTTP response, the bot actually hooks that response and try to inject 536 00:40:49,180 --> 00:40:56,120 something into it. And then it actually sends up the manipulated web page back to the user. The user 537 00:40:56,120 --> 00:41:01,060 feels that, like, this is a legitimate page, there's nothing like that because the content works 538 00:41:01,060 --> 00:41:07,260 in line. And the user provides all sorts of information, sensitive information and things like 539 00:41:07,260 --> 00:41:12,660 that. And then it is being sent back to the server. But, again, going back to the server, the 540 00:41:12,740 --> 00:41:17,460 request is again hooked by the bot. And the bot actually redirects back into the command 541 00:41:17,460 --> 00:41:22,560 and control server, picking up all the information in the post request. And that is actually 542 00:41:22,560 --> 00:41:28,840 a conceptual man in the browser. The MITB agent actually sits inside a system and whatever 543 00:41:28,840 --> 00:41:33,760 the communication the browser has with the endpoint, it actually monitors it and try 544 00:41:33,760 --> 00:41:41,560 to manipulate it accordingly. Let's take a look at this example. I'm not sure, but if 545 00:41:41,560 --> 00:41:46,960 you go to the Chase.com bank website nowadays and you try to look at, like, types of online 546 00:41:46,960 --> 00:41:52,120 fraud, and you will get this explicit image out there and they put that in, like, virus and 547 00:41:52,120 --> 00:41:57,580 malware sample kind of thing. And they have a lot of details written for it, like, it's just 548 00:41:57,580 --> 00:42:03,080 because your system is infected, we can't do anything. But actually this is an example of 549 00:42:03,080 --> 00:42:08,500 web injects. This is an example of MITB attack. And how it works, let's take a look at it. 550 00:42:09,680 --> 00:42:11,420 As I stated earlier, it's a 551 00:42:11,420 --> 00:42:16,680 technique known as web injects. Since the bot is inside your system, it can do many 552 00:42:16,680 --> 00:42:22,720 things accordingly. And whenever a user sends a request, gets a response, and before the 553 00:42:22,720 --> 00:42:28,100 response actually gets rendered in the browser, the bot actually injects some malicious scripts 554 00:42:28,100 --> 00:42:32,540 into it. We'll take a look at some of the attacks that have been conducted against Citibank 555 00:42:32,540 --> 00:42:39,760 and how they wrote that particular web inject construct. But this actually gives a lot of 556 00:42:40,180 --> 00:42:41,080 power to the bot. 557 00:42:41,420 --> 00:42:42,520 I'm going to take a look at some of the features that people have used to manipulate the online 558 00:42:42,520 --> 00:42:49,960 banking and to manipulate a lot of functionality on the web pages in the client side. This 559 00:42:50,340 --> 00:42:54,660 is a really interesting technique. And we haven't found any good defense, since our 560 00:42:54,660 --> 00:42:59,240 team is working over it. And let's see if we can come up with some defense for web injects 561 00:42:59,240 --> 00:43:06,500 or not. And that gives you an idea of what the example looks like. So that is a set URL 562 00:43:06,500 --> 00:43:11,400 data before. Data inject and data end is like parameters in the web injects file. So the 563 00:43:11,400 --> 00:43:17,860 actually used to construct the one rule. So if you look at the set URI parameter there, it is 564 00:43:17,860 --> 00:43:24,340 being defined. So the attacker has to define a URL there. So any bank of America.com and then 565 00:43:24,340 --> 00:43:30,580 there are flags like GP and H which actually gives like for this particular URL, if a machine 566 00:43:30,580 --> 00:43:35,980 or a browser sends a request, whether it's a get request, whether it's a post request or 567 00:43:35,980 --> 00:43:41,960 whether it's an any H request. So there's a lot of there is an explanation out there for L and 568 00:43:41,960 --> 00:43:48,260 H. But typically it is against get and post request. And then you will tell that in a 569 00:43:48,260 --> 00:43:54,280 particular web page, I want to inject this kind of data before this tag. And what kind of data I 570 00:43:54,280 --> 00:44:01,160 want to inject and what kind of content has to be gone after that. So this is in a real time 571 00:44:01,160 --> 00:44:05,960 web injects. And this attack was conducted against Citibank. And this attack was 572 00:44:05,980 --> 00:44:13,500 like a forceful cookie injection. And so the bot actually injects all that code in the web 573 00:44:13,500 --> 00:44:20,880 page. And if you see on the data before, it is being data before tag. So there isn't a 574 00:44:20,880 --> 00:44:26,160 branding.js file. So that code will remain there. And the bot will actually inject the code 575 00:44:26,160 --> 00:44:33,540 after that. And then put up a script tag at the end. So this payload actually looks in line to 576 00:44:33,540 --> 00:44:35,960 the user. I mean, the user is not going to look at the JavaScript. It's going to look at the 577 00:44:35,980 --> 00:44:40,960 JavaScript code. But this will get executed in the end line when a user accesses a Citibank 578 00:44:40,960 --> 00:44:47,360 website. Let's take another example. This one is for like a bank of America.com. Again, for all 579 00:44:47,360 --> 00:44:53,220 get and post requests. So in this particular web inject, the bot actually injects an ATM input 580 00:44:53,220 --> 00:45:00,580 tag to actually extract the ATM numbers. And again, it works in line. And if you look at the 581 00:45:00,580 --> 00:45:05,960 sample, example downwards, it again was like against Wells Fargo. So this is an example of a 582 00:45:05,960 --> 00:45:09,260 web inject. So we got this like web inject sample somewhere when we're testing something and 583 00:45:09,260 --> 00:45:15,900 that infected machine has all these samples. And so any user on that particular infected 584 00:45:15,900 --> 00:45:21,320 machine, if it's going to open these websites like Bank of America, Wells Fargo, the bot is 585 00:45:21,320 --> 00:45:29,600 going to inject this kind of code in the web pages. And how it looks like, it's a very stealthy 586 00:45:29,600 --> 00:45:35,440 and in line. So in this case, like web injects is a very interesting technique on that part. 587 00:45:37,340 --> 00:45:43,720 Let's take a look at the form grabbing. It's an advanced level technique, but it works very 588 00:45:43,720 --> 00:45:49,700 well with the present day botnets. How it works, like some of the bots are not very much 589 00:45:49,700 --> 00:45:54,340 interested in getting a key log, like a logging information, because it produces a lot of 590 00:45:54,940 --> 00:46:00,060 like garbage data and things like that. They have become more sophisticated. So what they are 591 00:46:00,060 --> 00:46:05,820 doing, like they are hooking the browser inbuilt DLLs and then try to hook certain functions and 592 00:46:07,180 --> 00:46:11,660 once they hook the functions, they extract all the information out of it. And the form grabbing 593 00:46:11,660 --> 00:46:16,640 is one of that technique. So in form grabbing, whenever you submit anything, like you put your 594 00:46:16,640 --> 00:46:21,580 credentials, you put anything like social security number, account number, credit card 595 00:46:21,580 --> 00:46:28,180 numbers, and you try to submit the information back to the server, the bot actually hooks that 596 00:46:28,180 --> 00:46:35,260 information. That's why it is the technique is known as form grabbing. And when it does that, so 597 00:46:36,340 --> 00:46:41,580 I have taken it from the internet, but it was like a pretty good explanation of the form 598 00:46:41,580 --> 00:46:48,020 grabbing as well as like web injects. So with the web injects, you can inject like an 599 00:46:48,020 --> 00:46:53,520 illegitimate input box somewhere, which actually asks you some sort of your pin number, your ATM 600 00:46:53,520 --> 00:46:57,980 number and things like that. And when you submit that information, the bot inside the infected 601 00:46:57,980 --> 00:47:05,240 system hooks that thing and sends it back to the command and control server. And how the 602 00:47:05,240 --> 00:47:09,820 harvested data looks like, it gives you an idea right here. And this is the whole set of 603 00:47:09,820 --> 00:47:15,660 information you actually get from the infected machine using form grabbing. And this was an 604 00:47:15,660 --> 00:47:19,820 example that we were testing and we get an idea like from the infected machine, there was a 605 00:47:19,820 --> 00:47:26,140 Kaspersky anti-virus license key entered by the user and it was retrieved on the command and 606 00:47:26,140 --> 00:47:34,840 control server. And in order to show that how it works, this is the last demo that I have. And we 607 00:47:34,840 --> 00:47:40,860 constructed this using iSpot, which is actually considered as a descendant of Zeus because it's 608 00:47:40,860 --> 00:47:48,480 using a lot of source code from the Zeus in order to work. So, again, we are going to execute 609 00:47:49,040 --> 00:47:50,200 this malicious bot. 610 00:48:05,480 --> 00:48:12,920 So, when we do that, it again implements the concept of melting. And we try to refresh it, the 611 00:48:12,920 --> 00:48:19,880 bot actually goes away. Because it has to destruct the dropper. And so, considering this 612 00:48:19,880 --> 00:48:25,540 thing, you'll get an IP address of the infected machine is. And we are logging back into the 613 00:48:25,540 --> 00:48:34,820 command and control server, a controlled one that we use for testing. So, this is the 614 00:48:34,840 --> 00:48:39,700 just like a very simple interface of the iSpot. And what I'm doing, I'm just trying to get all 615 00:48:39,700 --> 00:48:45,260 the list of bots that are connected back to the command and control server here. And if you go 616 00:48:45,260 --> 00:48:55,160 down, this is the system that we have. And if you map up the IP address, this IP address maps to 617 00:48:55,740 --> 00:48:59,780 this one. So, it means like the infected machine is connected back to the command and control 618 00:48:59,780 --> 00:49:04,820 server. And the bot has really taken control of that system. 619 00:49:04,840 --> 00:49:10,660 So, that's fine. So, what we are going to do, let's say the user is going to open a chase.com 620 00:49:10,660 --> 00:49:20,200 website. It opens here. I'm not using the real time credentials or things like that. I'm just 621 00:49:20,200 --> 00:49:29,460 using the wrong credentials here. But just try to show that how this technique works. And we 622 00:49:29,460 --> 00:49:33,920 also open like a Facebook.com. Just try to show that this technique not only works on the banking 623 00:49:34,860 --> 00:49:43,840 websites, but a lot on the other social network websites, too. So, I just put any password. And I 624 00:49:43,840 --> 00:49:53,200 submitted it. So, both requests go through the infected system. The system is so when we get back 625 00:49:53,200 --> 00:49:57,600 to the command and control panel and look at the reports. So, if you go down, then you get like 626 00:49:57,600 --> 00:50:04,820 there's a request that has been logged from the chase.com. And let's see what we have. So, this is 627 00:50:08,340 --> 00:50:13,800 actually gives you all the information about the bot. But if you go down, you actually get the whole 628 00:50:13,800 --> 00:50:19,640 of the post request here. So, you have a user ID. You have a password. And you have a lot of other 629 00:50:19,640 --> 00:50:25,700 information. So, if you are providing an account information, doing a transaction, and then you're 630 00:50:25,700 --> 00:50:34,800 all gone. So, the similar thing works with the Facebook. So, if you go down, you actually get the 631 00:50:40,460 --> 00:50:44,280 text on the bottom of the bot. So, actually, the bot implements a bit of delay in actually 632 00:50:44,280 --> 00:50:49,240 picking up in actually grabbing the request from the client site. And so, when we submit it out 633 00:50:49,240 --> 00:50:54,820 again and we get back to the command and control panel and search for the things, and you get a 634 00:50:54,820 --> 00:50:59,800 like request from the Facebook, too. And that actually picks up all the credentials from the 635 00:50:59,800 --> 00:51:04,800 client site on the infected machine. So, it's a pretty good technique, and it's worth checking out. 636 00:51:04,820 --> 00:51:14,120 working pretty fine. So you get all the information in the post 637 00:51:14,120 --> 00:51:18,600 request in the command and control panel. And what you look like, this data is not yours. 638 00:51:19,140 --> 00:51:23,660 Once it is being extracted from the system, it's not yours and it has been sold into the 639 00:51:23,660 --> 00:51:29,320 underground market and a lot of things like that. So the conclusion is that, like, looking 640 00:51:29,320 --> 00:51:34,380 at this kind of scenario, the kind of techniques that we have discussed here, botnets have 641 00:51:34,380 --> 00:51:39,200 become more robust and sophisticated. There is a significant increase in the exploitation of 642 00:51:39,200 --> 00:51:43,760 browsers. Browsers provide a window to the Internet, so it's always good to exploit them. 643 00:51:44,440 --> 00:51:50,620 HTTP has been used as a preferable protocol for data exfiltration. And at the end, I would 644 00:51:50,620 --> 00:51:54,800 like to say, like, botnets die hard. And they are still existing and they're going to exist. 645 00:51:55,160 --> 00:52:00,780 But just the thing that we had to do, we had to come up with a new production mechanism 646 00:52:01,500 --> 00:52:03,240 that uses the concept of asymmetry. 647 00:52:03,660 --> 00:52:04,340 If we can 648 00:52:04,380 --> 00:52:09,260 If we can support or if we can stop these botnets for some period of time, then we can 649 00:52:09,260 --> 00:52:13,520 still be done with a lot of things. So any questions? 650 00:52:15,040 --> 00:52:15,440 Yep. 651 00:52:34,380 --> 00:52:34,960 How do you control them? 652 00:52:34,960 --> 00:52:37,180 Does one company actually destroy the botnets using your app? 653 00:52:40,760 --> 00:52:41,200 PUA DUNBAR 654 00:52:41,200 --> 00:52:43,320 Actually, yeah. 655 00:52:44,180 --> 00:52:49,420 So, he actually, if I got it correctly, so he actually asked, like, so we are using, 656 00:52:49,480 --> 00:52:54,380 like, command and control panels and things we are doing research purposes, but when it's 657 00:52:54,380 --> 00:53:00,120 going to be, like, companies like ours or the research labs, the some of the small groups 658 00:53:00,120 --> 00:53:00,800 that we are doing? 659 00:53:01,100 --> 00:53:04,360 So, when they are going to, you know, burst these command control panels and two for us, 660 00:53:04,360 --> 00:53:11,100 panels and to remove these botnets out of the system. Again, I mean, actually, if you ask me 661 00:53:11,680 --> 00:53:18,020 on this part, like, these botnets are actually the default design of technology, basically. 662 00:53:18,500 --> 00:53:24,060 So when we analyze something, we try to implement a concept of infiltration. Because if we don't 663 00:53:24,060 --> 00:53:27,980 know what a technique like Ruskill does, we are not able to build a defense mechanism. 664 00:53:28,880 --> 00:53:33,020 Getting on to your part, previously we found some bugs in, like, spy command and control 665 00:53:33,020 --> 00:53:38,420 panel where you can use that bug to actually gain access to the CNC. Because these guys 666 00:53:38,420 --> 00:53:42,260 are not very much interested in building a secure command and control panel to some extent. 667 00:53:42,680 --> 00:53:47,880 For them, it's all about, like, selling and purchasing of data and extracting the things. 668 00:53:49,100 --> 00:53:53,700 And it depends on a lot of things. When you're doing research, you might have some gain of 669 00:53:53,700 --> 00:53:58,780 access to the samples. Then you can deploy and see how things are working. And, again, 670 00:53:58,820 --> 00:54:02,940 it's a problem of ‑‑ I won't say it's a problem. It's a choice. What kind of 671 00:54:02,940 --> 00:54:06,700 defense mechanism do you want to work? You want to go and bust the command and control 672 00:54:06,700 --> 00:54:11,280 panel. So you want to go ahead and, you know, build defense mechanism on the system side 673 00:54:11,720 --> 00:54:14,540 or building a secure browser and things like that? 674 00:54:17,340 --> 00:54:17,780 . 675 00:54:45,940 --> 00:54:48,640 Yeah, that's interesting. 676 00:55:03,260 --> 00:55:07,900 So, you can continue the questions and answers over at Q&A for room number three. 677 00:55:08,620 --> 00:55:09,540 And that's it. 678 00:55:09,980 --> 00:55:10,380 Yeah. 679 00:55:10,440 --> 00:55:11,100 Thanks, everyone. 680 00:55:12,360 --> 00:55:13,080 Sorry about that. 681 00:55:13,400 --> 00:55:13,580 Yeah. 682 00:55:14,040 --> 00:55:15,040 I've been glad to be here. 683 00:55:17,280 --> 00:55:18,920 It was just like you needed it.