1 00:00:00,000 --> 00:00:07,100 This talk is about VPN filter, the malware campaign, and because this is the ICS village, 2 00:00:07,280 --> 00:00:11,520 we're going to focus about half the talk on the ICS specific component of this, 3 00:00:12,120 --> 00:00:17,740 which had some Modbus capability, and try and give everybody a better understanding of exactly what that was. 4 00:00:19,660 --> 00:00:22,800 So, I'm Patrick DeSantis, this is Carlos Pacho. 5 00:00:22,900 --> 00:00:29,800 We are two of many researchers at Cisco TELUS that spent a long time working on this project. 6 00:00:30,000 --> 00:00:35,560 Many months, many hours, lots of really smart people doing really cool stuff with this. 7 00:00:36,080 --> 00:00:43,220 We're two small pieces of a much larger group that probably did a lot cooler stuff than we did, 8 00:00:43,320 --> 00:00:44,880 but you get to talk to us instead. 9 00:00:45,220 --> 00:00:51,320 So, some boundaries I'm going to set for the talk. 10 00:00:51,640 --> 00:00:55,420 I will talk about VPN filter and its technical capabilities. 11 00:00:55,740 --> 00:00:59,980 We'll talk about the targets, and specifically, we'll spend a lot of time talking about the modbus, 12 00:01:00,000 --> 00:01:04,540 I will not talk about attribution, the U.S. government took care of that. 13 00:01:04,720 --> 00:01:09,520 I will not talk about any of our partners or victims associated with this campaign. 14 00:01:11,700 --> 00:01:12,620 So, no. 15 00:01:13,980 --> 00:01:21,220 So, VPN filter is a multi-year, state-sponsored, very sophisticated malware campaign 16 00:01:21,220 --> 00:01:27,720 targeting primarily edge devices in the small office, home office realm. 17 00:01:28,360 --> 00:01:29,980 It's been going on since... 18 00:01:30,000 --> 00:01:30,900 at least 2016. 19 00:01:31,220 --> 00:01:36,900 2016 was the oldest sample that we are aware of, so it's been going on since before that. 20 00:01:37,220 --> 00:01:43,140 And at the time we went public in May, we estimated there were about half a million infected devices globally. 21 00:01:44,420 --> 00:01:47,560 You know, that number can go up and down, depending on how active the actor is. 22 00:01:47,880 --> 00:01:52,260 So, this is a nice conservative estimate, at least half a million, which is still a significant amount. 23 00:01:53,280 --> 00:01:55,440 And it's interesting because it's cross-platform. 24 00:01:55,740 --> 00:01:59,000 This is malware that runs on multiple operating systems, 25 00:01:59,000 --> 00:02:01,060 and even multiple architectures. 26 00:02:01,520 --> 00:02:04,140 So, we've got, you know, samples that run on MIPS, 27 00:02:04,760 --> 00:02:08,100 variant on MIPS, MIPS-Lexra, x86, Tile, more. 28 00:02:09,360 --> 00:02:12,440 And then, within the specific architectures that it targeted, 29 00:02:12,640 --> 00:02:16,940 the binders that were compiled were specific for the devices that we're going to run on. 30 00:02:17,100 --> 00:02:18,300 And there were a lot of devices. 31 00:02:18,600 --> 00:02:23,120 So, we're aware of over 75 distinct device models 32 00:02:24,040 --> 00:02:28,980 from several vendors that have capabilities compiled specifically for those devices. 33 00:02:29,000 --> 00:02:33,280 Which is some pretty serious effort on the part of the actor 34 00:02:33,280 --> 00:02:35,680 to go through and put that much work into it. 35 00:02:36,400 --> 00:02:40,120 Especially when a lot of these are, you know, sub-$50 Soho devices. 36 00:02:40,640 --> 00:02:46,860 Other ones are, like, the MicroTik or Mikrotik, I'm not sure how the correct pronunciation is. 37 00:02:47,060 --> 00:02:49,980 Those are rack mount, like, enterprise-grade network appliances. 38 00:02:50,300 --> 00:02:52,040 Most of the rest are Soho devices. 39 00:02:52,540 --> 00:02:55,340 Some are basic, like, home wireless routers. 40 00:02:55,920 --> 00:02:58,980 And then, QNAP stuff that we saw was mostly, you know, 41 00:03:00,200 --> 00:03:02,080 pretty sure it was just network-attached storage devices. 42 00:03:04,000 --> 00:03:06,100 So, during the time that we were working on this, 43 00:03:06,240 --> 00:03:10,480 a vast majority of the activity was targeting MicroTik and QNAP devices. 44 00:03:11,540 --> 00:03:13,880 But that was just during the time we were looking at it. 45 00:03:13,920 --> 00:03:17,240 If we had looked six months before, there may have been more or less activity. 46 00:03:18,120 --> 00:03:20,980 And, you know, if we're looking six months from now, it may vary also. 47 00:03:21,300 --> 00:03:27,240 So, but at the time we looked, mostly MicroTik, mostly QNAP, and lots of devices. 48 00:03:27,540 --> 00:03:28,940 So, we needed to get into it. 49 00:03:29,000 --> 00:03:37,620 To a position where we could bait the actor into delivering some of their, you know, 50 00:03:38,960 --> 00:03:42,080 some of those custom payloads for those other devices to us 51 00:03:42,080 --> 00:03:47,560 without tipping off our hand that we were actually working on, learning more about it. 52 00:03:48,360 --> 00:03:53,480 So, we were kind of stuck in a position where we wanted to set up, like, a honeypot infrastructure, 53 00:03:53,660 --> 00:03:58,760 leverage honeypots, but your traditional honeypots are often limited in their capabilities. 54 00:03:59,220 --> 00:04:03,920 We couldn't give any indication that we were in a, you know, in a honeypot. 55 00:04:03,980 --> 00:04:06,380 So, a virtualized or emulated environment was a no-go. 56 00:04:07,140 --> 00:04:12,300 Also, often your honeypot configurations don't capture full network traffic. 57 00:04:12,440 --> 00:04:13,360 We needed full peak end. 58 00:04:13,420 --> 00:04:17,140 We couldn't deal, or we couldn't handle just metadata about the traffic. 59 00:04:17,560 --> 00:04:22,680 We needed to be able to look at everything that the device has received and pull files out of them 60 00:04:22,680 --> 00:04:26,060 because if the actor bricked the device, we lose all forensic artifacts. 61 00:04:26,200 --> 00:04:27,720 So, we needed all network traffic. 62 00:04:28,540 --> 00:04:28,980 So, we needed all network traffic. 63 00:04:30,720 --> 00:04:31,380 So, we needed all network traffic. 64 00:04:31,380 --> 00:04:33,340 So, we had to set up our own honeypot infrastructure, 65 00:04:33,760 --> 00:04:35,300 and we did that using real devices. 66 00:04:35,360 --> 00:04:39,300 So, it was full interaction, honeypots, real devices. 67 00:04:39,420 --> 00:04:40,760 We bought about 40 of them. 68 00:04:42,500 --> 00:04:46,940 So, in the diagram, we've got, you know, you've got your internet, 69 00:04:47,360 --> 00:04:53,820 and then in this area here is where we break off onto our attack or our target network. 70 00:04:53,940 --> 00:04:55,300 This is the target zone. 71 00:04:55,840 --> 00:04:57,020 So, these are real devices, 72 00:04:57,440 --> 00:05:04,720 and they are on the internet using commercial or residential IP space instead of, you know, Cisco IP, 73 00:05:05,040 --> 00:05:06,380 because that would kind of be a dead giveaway, 74 00:05:06,960 --> 00:05:10,360 or, you know, like a virtual machine on AWS. 75 00:05:12,120 --> 00:05:16,260 So, we had real devices, and it had to be not obvious that it was Cisco. 76 00:05:18,020 --> 00:05:21,920 And the switch here, these devices can talk out and everything can talk in, 77 00:05:21,980 --> 00:05:23,520 so it's like they're on the internet directly, 78 00:05:23,640 --> 00:05:26,880 but they can't talk to each other unless it goes out and comes back. 79 00:05:27,020 --> 00:05:28,600 So, they don't see each other. 80 00:05:28,860 --> 00:05:33,060 And the switch has a mirror port, a spam port that goes to a network tap, 81 00:05:33,220 --> 00:05:36,120 one-way network tap, which goes to our analysis workstation, 82 00:05:36,300 --> 00:05:41,160 which was very locked down and is set up to not allow any traffic out. 83 00:05:41,420 --> 00:05:48,060 So, we've got three places to block any outbound traffic from our analysis zone here. 84 00:05:48,960 --> 00:05:53,100 It would not be a good thing if the actors associated with this campaign 85 00:05:53,100 --> 00:05:56,760 were able to go from here to our internal corporate network. 86 00:05:58,860 --> 00:06:01,120 I wouldn't be here talking about it today if we did. 87 00:06:02,480 --> 00:06:04,600 I may be out there with you handing out my resume. 88 00:06:06,100 --> 00:06:09,060 So, we spent a lot of time and effort on this component. 89 00:06:10,120 --> 00:06:13,480 Right here we had full network traffic, so gigabytes of traffic a day 90 00:06:14,080 --> 00:06:17,440 associated with activity on these devices was living here, 91 00:06:17,540 --> 00:06:18,560 and that's where we did our analysis. 92 00:06:21,340 --> 00:06:25,020 So, standing up this full interaction honeypot environment has some issues, 93 00:06:25,140 --> 00:06:26,040 some challenges. 94 00:06:26,760 --> 00:06:30,220 There's a reason why people use the limited interaction honeypots, 95 00:06:30,260 --> 00:06:33,920 and it offers a lot more convenience, especially when you're spinning up VMs. 96 00:06:33,940 --> 00:06:34,820 You can just replicate them. 97 00:06:35,860 --> 00:06:38,040 You don't have to actually manage the physical devices. 98 00:06:38,440 --> 00:06:40,680 We had 40 devices, 40-ish. 99 00:06:41,420 --> 00:06:43,580 Some of them we bought used, so you can't trust them. 100 00:06:43,680 --> 00:06:46,920 So, we had to go through each device, validate that it wasn't already owned, 101 00:06:47,420 --> 00:06:50,160 set it up in an intentionally vulnerable configuration, 102 00:06:50,520 --> 00:06:51,680 because we wanted them to get owned. 103 00:06:52,260 --> 00:06:54,760 So, we had to put vulnerable... 104 00:06:54,760 --> 00:06:57,260 or firmware on there with known vulnerabilities 105 00:06:57,260 --> 00:06:59,080 and publicly available exploits. 106 00:06:59,920 --> 00:07:01,140 We set them up for configurations. 107 00:07:03,480 --> 00:07:05,440 There was a large volume of traffic, 108 00:07:05,520 --> 00:07:08,560 and none of it was legitimate because these devices weren't doing anything, 109 00:07:09,140 --> 00:07:09,560 but... 110 00:07:12,500 --> 00:07:14,420 Oh, it didn't show up on your screen. 111 00:07:14,880 --> 00:07:16,520 Flamingo wants you to join their Wi-Fi, Larry. 112 00:07:18,960 --> 00:07:21,960 So, all traffic going to these devices was malicious, 113 00:07:22,700 --> 00:07:24,660 or even if it was benign, it was not legitimate. 114 00:07:24,760 --> 00:07:26,420 So, there's an old phrase, 115 00:07:26,560 --> 00:07:28,040 looking for a needle in a stack of needles. 116 00:07:28,200 --> 00:07:29,800 It applies very... 117 00:07:30,380 --> 00:07:31,620 It's very applicable to this, 118 00:07:31,680 --> 00:07:34,840 because every bit of traffic was not legitimate. 119 00:07:35,220 --> 00:07:36,840 And we don't really know what we're looking for. 120 00:07:36,980 --> 00:07:41,680 So, we have to find something bad in gigabytes and gigabytes of bad stuff. 121 00:07:42,520 --> 00:07:44,500 And then there's the security versus usability. 122 00:07:44,740 --> 00:07:45,760 I think Carlos and I... 123 00:07:45,760 --> 00:07:48,740 Well, we probably had each other in a headlock a few times. 124 00:07:49,060 --> 00:07:50,740 As I'm advocating for security, 125 00:07:51,220 --> 00:07:54,200 as I said, if the actor made their way into our network, 126 00:07:54,200 --> 00:07:55,120 bad stuff. 127 00:07:56,160 --> 00:07:58,040 But every time I lock something down, 128 00:07:58,120 --> 00:08:00,500 or I advocate for something to be locked down more, 129 00:08:00,580 --> 00:08:04,020 it's inconvenience and annoyance for the researchers 130 00:08:04,020 --> 00:08:06,140 that need to be able to interact with the devices 131 00:08:06,140 --> 00:08:07,960 and do analysis on the traffic. 132 00:08:08,340 --> 00:08:10,440 But because of the sophistication of the actor, 133 00:08:10,520 --> 00:08:12,000 we had to err on the side of security, 134 00:08:13,180 --> 00:08:16,120 much to my team and other people's... 135 00:08:17,780 --> 00:08:19,560 Well, I owe them some beer, I guess. 136 00:08:20,560 --> 00:08:21,820 And then device limitations. 137 00:08:22,060 --> 00:08:22,840 So, you see this. 138 00:08:22,840 --> 00:08:24,160 This is just like in control systems. 139 00:08:24,380 --> 00:08:25,840 These are often embedded systems. 140 00:08:27,240 --> 00:08:28,920 The legitimate management interfaces 141 00:08:29,500 --> 00:08:32,180 don't provide a lot of functionality for legitimate users. 142 00:08:32,720 --> 00:08:34,380 So, you can't just drop down in a shell 143 00:08:34,380 --> 00:08:37,260 and log in as root and do whatever you want in Linux. 144 00:08:37,840 --> 00:08:40,060 You know, you might be in a limited environment 145 00:08:40,540 --> 00:08:44,060 or maybe the only administrative control you have is through a web interface. 146 00:08:45,060 --> 00:08:46,540 So, just like in ICS, 147 00:08:46,560 --> 00:08:48,120 an attacker who owns the device 148 00:08:48,740 --> 00:08:51,220 has more control over it than the legitimate user. 149 00:08:51,220 --> 00:08:52,820 So, we found ourselves in a position 150 00:08:52,820 --> 00:08:56,040 of actually exploiting and owning our own devices 151 00:08:56,040 --> 00:08:58,720 just to find out if they had been owned by somebody else, 152 00:08:58,920 --> 00:09:00,000 which is interesting. 153 00:09:01,880 --> 00:09:03,460 So, that was kind of how we dealt with 154 00:09:04,680 --> 00:09:07,940 the risk associated with interacting with 155 00:09:07,940 --> 00:09:11,420 and having live targets intentionally infected by a state actor. 156 00:09:12,660 --> 00:09:16,100 Now, the malware itself that we were going to get with, 157 00:09:16,180 --> 00:09:20,520 there were several groups that did reversing and analysis. 158 00:09:21,220 --> 00:09:22,400 Of the actual malware. 159 00:09:23,180 --> 00:09:25,920 But I do have to clarify one thing before we go into that. 160 00:09:26,020 --> 00:09:27,940 Since we went public in May, 161 00:09:28,420 --> 00:09:29,120 there's kind of been, 162 00:09:29,260 --> 00:09:30,720 I don't know how it started, 163 00:09:30,820 --> 00:09:32,840 but there was an initial misconception 164 00:09:33,980 --> 00:09:37,760 about the relationship between VPN filter and Black Energy malware. 165 00:09:38,380 --> 00:09:42,700 So, Black Energy has a flaw 166 00:09:43,220 --> 00:09:46,100 in the implementation of the RC4 encryption algorithm, 167 00:09:46,380 --> 00:09:49,980 where it fails to properly initialize the S-boxes 168 00:09:49,980 --> 00:09:51,780 during their permutation stage. 169 00:09:52,120 --> 00:09:54,240 So, it's a very, very, very specific flaw. 170 00:09:54,460 --> 00:09:55,420 It's not just like, 171 00:09:55,420 --> 00:09:56,560 whoops, we used the wrong library. 172 00:09:57,040 --> 00:09:59,700 VPN filter has the exact same flaw 173 00:09:59,700 --> 00:10:02,820 and the exact same part of the implementation 174 00:10:02,820 --> 00:10:05,100 of the S-boxes in the permutation stage 175 00:10:05,100 --> 00:10:06,520 of the RC4 encryption algorithm. 176 00:10:06,840 --> 00:10:08,200 So, there's overlap there, 177 00:10:08,240 --> 00:10:09,360 and it's a very specific overlap. 178 00:10:10,540 --> 00:10:13,700 VPN filter does not contain a full copy of Black Energy. 179 00:10:13,940 --> 00:10:15,800 So, it's just the overlap. 180 00:10:15,880 --> 00:10:18,840 That was the only connection 181 00:10:18,840 --> 00:10:20,900 that Talos identified and reported. 182 00:10:21,200 --> 00:10:22,760 So, if you see anything else out there, 183 00:10:23,640 --> 00:10:25,400 it's just RC4. 184 00:10:27,900 --> 00:10:29,860 So, multistage malware. 185 00:10:31,660 --> 00:10:32,740 Very sophisticated. 186 00:10:33,120 --> 00:10:34,700 I'm going to probably say that 20 times, 187 00:10:34,820 --> 00:10:36,560 but you start with initial exploitation 188 00:10:36,560 --> 00:10:38,560 and the malware drops a persistent loader 189 00:10:38,560 --> 00:10:41,640 that's specific for the target device that it drops on. 190 00:10:41,820 --> 00:10:43,580 The loader in stage one 191 00:10:43,580 --> 00:10:45,380 is the only part of the malware 192 00:10:45,380 --> 00:10:48,280 that has persistence that can survive a reboot, 193 00:10:48,280 --> 00:10:49,560 and that depends on the device. 194 00:10:50,180 --> 00:10:51,560 Aside from being persistent, 195 00:10:52,080 --> 00:10:55,600 stage one's only job is to find the stage two server, 196 00:10:55,800 --> 00:10:57,920 retrieve and install stage two. 197 00:10:58,880 --> 00:11:00,500 It has some really interesting ways 198 00:11:00,500 --> 00:11:01,820 of finding the stage two server. 199 00:11:02,500 --> 00:11:03,740 First is it'll look out 200 00:11:03,740 --> 00:11:05,640 and grab some images off Photobucket 201 00:11:06,200 --> 00:11:08,300 within the exif data and the images, 202 00:11:08,340 --> 00:11:10,620 specifically in the latitude and longitude. 203 00:11:11,780 --> 00:11:14,240 You run it through a decoding routine, 204 00:11:14,420 --> 00:11:16,300 which one of our guys reversed, 205 00:11:16,540 --> 00:11:18,260 and you can pull out IP addresses 206 00:11:18,280 --> 00:11:19,560 out of the latitude and longitude. 207 00:11:20,340 --> 00:11:22,340 It'll then reach out to the IP address 208 00:11:22,340 --> 00:11:23,960 and try to get stage two. 209 00:11:24,040 --> 00:11:24,840 If it doesn't work, 210 00:11:24,880 --> 00:11:26,380 it tries a couple more images. 211 00:11:26,600 --> 00:11:27,380 If it doesn't work, 212 00:11:27,420 --> 00:11:28,940 it eventually goes to a hard-coded domain. 213 00:11:29,900 --> 00:11:31,020 If that doesn't work, 214 00:11:31,200 --> 00:11:33,140 it does what I think is probably 215 00:11:33,720 --> 00:11:35,760 the most interesting part of this stage. 216 00:11:36,000 --> 00:11:38,460 It opens up a raw socket 217 00:11:39,100 --> 00:11:42,360 and listens for all traffic on all ports, 218 00:11:43,100 --> 00:11:45,280 and if it receives a TCP SYN 219 00:11:45,280 --> 00:11:46,700 with a very, you know, 220 00:11:46,700 --> 00:11:48,680 with specific bytes at a specific value, 221 00:11:48,980 --> 00:11:50,700 it'll grab another set of bytes, 222 00:11:50,900 --> 00:11:52,220 and that's the IP address 223 00:11:52,220 --> 00:11:54,380 for the stage two server. 224 00:11:54,760 --> 00:11:56,560 So it's basically, it looks out, 225 00:11:56,580 --> 00:11:58,580 tries to get stage two, can't get it, 226 00:11:58,620 --> 00:12:00,160 it looks out another way, can't get it, 227 00:12:00,240 --> 00:12:02,280 falls back into this passive listening mode 228 00:12:02,280 --> 00:12:05,880 where the actor can intentionally task it with this, 229 00:12:05,960 --> 00:12:08,020 but just by using one TCP SYN 230 00:12:08,020 --> 00:12:09,280 to give it the IP address 231 00:12:09,280 --> 00:12:10,600 of the current stage two server. 232 00:12:11,640 --> 00:12:12,920 When it gets stage two, 233 00:12:12,980 --> 00:12:15,340 stage two is your framework, 234 00:12:15,340 --> 00:12:16,520 it's the workhorse. 235 00:12:17,920 --> 00:12:19,920 The closest equivalent I can give you 236 00:12:19,920 --> 00:12:21,120 is like it's the meterpreter component 237 00:12:21,120 --> 00:12:23,240 in that it has some baked-in functionality, 238 00:12:23,900 --> 00:12:25,400 and it also is extensible 239 00:12:25,400 --> 00:12:26,460 and you can add other modules. 240 00:12:26,640 --> 00:12:27,740 So you can execute shell commands, 241 00:12:27,960 --> 00:12:29,120 it's got some collection capability, 242 00:12:29,480 --> 00:12:30,440 it's got some exfil capability. 243 00:12:31,320 --> 00:12:33,560 Some of the older stage twos we looked at 244 00:12:33,560 --> 00:12:35,440 had a built-in kill capability 245 00:12:35,440 --> 00:12:37,220 where it would actually brick the devices. 246 00:12:38,480 --> 00:12:39,960 We'll talk about that in a second too. 247 00:12:40,340 --> 00:12:42,840 And then it's extendable through these stage three 248 00:12:43,300 --> 00:12:44,540 modules and plug-ins. 249 00:12:45,840 --> 00:12:48,060 Which, because it's extensible through modules, 250 00:12:48,800 --> 00:12:50,940 the functionality is essentially unlimited. 251 00:12:51,620 --> 00:12:52,840 It's only limited by 252 00:12:52,840 --> 00:12:56,040 what the actor actually develops for it. 253 00:12:58,520 --> 00:13:00,280 So Carlos is going to talk about 254 00:13:00,280 --> 00:13:02,200 one of those stage three modules. 255 00:13:03,040 --> 00:13:04,980 This is a diagram of what I described, 256 00:13:05,160 --> 00:13:06,560 the process of going from exploitation 257 00:13:06,560 --> 00:13:09,560 to stage one to stage two to stage three. 258 00:13:09,740 --> 00:13:11,420 I could spend an hour up here 259 00:13:11,420 --> 00:13:13,040 talking just about this slide. 260 00:13:13,620 --> 00:13:14,940 I can't do that. 261 00:13:15,340 --> 00:13:16,060 I'm not going to do that. 262 00:13:16,160 --> 00:13:17,000 I don't want to do that. 263 00:13:19,340 --> 00:13:20,900 But everybody that worked on this with me, 264 00:13:20,960 --> 00:13:22,700 we sat through several hours trying to understand this 265 00:13:22,700 --> 00:13:23,680 from many angles. 266 00:13:24,720 --> 00:13:26,320 This image is on the Telos blog, 267 00:13:27,400 --> 00:13:29,180 the initial blog post that described 268 00:13:29,600 --> 00:13:31,260 when we went public with VPN filter. 269 00:13:32,020 --> 00:13:33,220 It's very interesting, 270 00:13:33,420 --> 00:13:34,800 obviously very sophisticated. 271 00:13:35,860 --> 00:13:37,180 When the takedown happened, 272 00:13:37,660 --> 00:13:39,700 there was essentially 273 00:13:42,120 --> 00:13:44,340 the photo bucket or to-know-all angle. 274 00:13:44,340 --> 00:13:46,900 That angle had been taken down. 275 00:13:48,100 --> 00:13:52,180 The only thing left was the raw socket. 276 00:13:53,000 --> 00:13:54,780 So if a person had a device that was infected, 277 00:13:54,780 --> 00:13:55,740 if you rebooted it, 278 00:13:55,860 --> 00:13:57,080 it would try to go to photo bucket. 279 00:13:57,220 --> 00:13:58,340 The stuff wasn't there anymore. 280 00:13:58,460 --> 00:14:00,020 It would try to go to know-all. 281 00:14:00,120 --> 00:14:00,660 It couldn't. 282 00:14:01,020 --> 00:14:02,380 So it would sit with the raw socket. 283 00:14:03,280 --> 00:14:04,440 It was still vulnerable, 284 00:14:04,580 --> 00:14:06,260 but the actor is going to have to reach out 285 00:14:06,260 --> 00:14:08,060 and touch it manually at that point. 286 00:14:11,020 --> 00:14:13,360 So some of the stage three plug-ins that we've seen. 287 00:14:14,340 --> 00:14:16,160 These are the modules that come after stage three. 288 00:14:16,220 --> 00:14:16,780 These are the extensions. 289 00:14:17,360 --> 00:14:18,460 There's a packet sniffer. 290 00:14:18,740 --> 00:14:20,580 This is the one that Carlos is going to talk about. 291 00:14:21,600 --> 00:14:23,320 There's one that we refer to as ESLR, 292 00:14:23,460 --> 00:14:25,160 which is interesting 293 00:14:25,160 --> 00:14:28,600 because this module allows for modification of traffic 294 00:14:28,600 --> 00:14:31,200 as it passes through the compromised device. 295 00:14:31,520 --> 00:14:32,880 So you've got your perimeter device, 296 00:14:33,220 --> 00:14:34,340 your edge router, 297 00:14:35,600 --> 00:14:37,140 all traffic on port 80 298 00:14:37,140 --> 00:14:39,420 or going to port 80 is getting manned in the middle. 299 00:14:39,820 --> 00:14:44,320 And JavaScript can be injected into the traffic 300 00:14:44,320 --> 00:14:46,480 that returns to the devices on the inside of the network. 301 00:14:46,820 --> 00:14:49,460 So this module allows the actor to compromise devices 302 00:14:49,460 --> 00:14:50,980 on the inside of the security perimeter 303 00:14:50,980 --> 00:14:53,780 without actively scanning and exploiting them. 304 00:14:53,880 --> 00:14:57,860 It happens invisibly at the router. 305 00:14:59,340 --> 00:15:00,280 There's a Tor module, 306 00:15:00,520 --> 00:15:02,300 which gives stage two the ability to communicate 307 00:15:02,300 --> 00:15:03,400 with command and control over Tor. 308 00:15:03,880 --> 00:15:07,840 And then the kill brick component 309 00:15:08,600 --> 00:15:10,180 that I mentioned was in stage two. 310 00:15:10,480 --> 00:15:12,820 The older stage twos we found 311 00:15:12,820 --> 00:15:15,420 had baked in kill. 312 00:15:15,940 --> 00:15:17,040 The newer ones, 313 00:15:17,720 --> 00:15:18,620 it was missing, 314 00:15:18,680 --> 00:15:20,100 and we had a suspicion that, 315 00:15:20,140 --> 00:15:22,320 okay, there's probably a stage three that does that. 316 00:15:22,380 --> 00:15:23,320 And later on, we confirmed. 317 00:15:23,900 --> 00:15:25,320 So this destroy 318 00:15:25,320 --> 00:15:29,720 will go through and clear artifacts, 319 00:15:30,040 --> 00:15:31,500 like indicators of compromise. 320 00:15:31,680 --> 00:15:33,460 It's trying to erase any tracks of its presence. 321 00:15:33,840 --> 00:15:35,800 And then it will brick the device. 322 00:15:36,720 --> 00:15:39,740 Usually the brick is by overwriting the first, 323 00:15:40,380 --> 00:15:42,140 I think 5,000 was the most, 324 00:15:42,180 --> 00:15:42,540 when we saw, 325 00:15:42,820 --> 00:15:44,100 5,000 bytes of flash. 326 00:15:44,660 --> 00:15:47,200 So it's essentially wiping out the bootloader 327 00:15:47,200 --> 00:15:48,800 and the device is done 328 00:15:48,800 --> 00:15:50,700 unless you can reprogram that flash memory, 329 00:15:50,920 --> 00:15:53,280 which you're not doing on any of these devices. 330 00:15:53,560 --> 00:15:56,360 And 99.9% of the population couldn't even do it 331 00:15:56,360 --> 00:15:57,340 if the capability was there. 332 00:15:58,260 --> 00:16:00,080 So brick device, bad. 333 00:16:01,080 --> 00:16:03,200 I said very sophisticated. 334 00:16:05,720 --> 00:16:07,160 So why would somebody go through the trouble 335 00:16:07,160 --> 00:16:08,480 of actually building something like this, 336 00:16:08,600 --> 00:16:10,800 spending several years doing it, 337 00:16:10,820 --> 00:16:11,620 deploying it globally, 338 00:16:11,620 --> 00:16:15,360 obviously it probably costs millions of dollars over time. 339 00:16:16,000 --> 00:16:18,460 This is a global intelligence infrastructure. 340 00:16:19,800 --> 00:16:22,220 What we used to refer to as computer network operations 341 00:16:22,220 --> 00:16:23,940 are now referred to as cyber operations. 342 00:16:24,180 --> 00:16:27,580 This gives a massive distributed global network 343 00:16:27,580 --> 00:16:29,540 to conduct those cyber operations from 344 00:16:29,540 --> 00:16:30,740 and mask attribution. 345 00:16:31,040 --> 00:16:34,120 So any attacks or traffic that comes through this network 346 00:16:34,120 --> 00:16:36,940 is going to look like it comes from a SOHO device, 347 00:16:37,900 --> 00:16:40,580 you know, somewhere and wherever they choose 348 00:16:40,580 --> 00:16:41,680 to make it look like it comes from. 349 00:16:41,720 --> 00:16:43,160 It makes it difficult to track people 350 00:16:43,160 --> 00:16:45,380 or attribute attacks. 351 00:16:47,220 --> 00:16:49,940 It's also a data collection platform, passively. 352 00:16:51,240 --> 00:16:52,560 What Carlos is going to talk about, 353 00:16:52,620 --> 00:16:53,800 he's going to mention some passive collection. 354 00:16:54,000 --> 00:16:56,000 And active, these devices have been used 355 00:16:56,000 --> 00:16:57,520 to scan for other things 356 00:16:58,080 --> 00:17:00,400 and then sometimes scan for other vulnerable things 357 00:17:00,400 --> 00:17:02,060 and then exploit them and add them 358 00:17:02,060 --> 00:17:03,160 to the VPN filter network. 359 00:17:04,120 --> 00:17:06,180 The destructive attack is the thing that we were 360 00:17:06,180 --> 00:17:08,180 the most worried about when we had to decide 361 00:17:08,180 --> 00:17:09,440 whether or not we were going to go public, 362 00:17:09,440 --> 00:17:11,660 or when we would eventually go public, 363 00:17:11,740 --> 00:17:15,240 but this kind of drove us to go public when we did. 364 00:17:16,240 --> 00:17:19,660 The actor had the ability to effectively knock 365 00:17:20,240 --> 00:17:23,640 about half a million networks off the internet all at once. 366 00:17:24,060 --> 00:17:25,500 So not half a million devices. 367 00:17:25,700 --> 00:17:27,420 By knocking these routers off, you're knocking 368 00:17:27,420 --> 00:17:29,460 everything behind the routers off the internet too. 369 00:17:29,680 --> 00:17:32,620 So to take a half a million networks off the internet 370 00:17:32,620 --> 00:17:34,560 all at once is pretty serious stuff 371 00:17:34,560 --> 00:17:36,280 and we were pretty worried about that. 372 00:17:36,320 --> 00:17:37,360 Thankfully it never happened. 373 00:17:38,380 --> 00:17:41,660 Also, we've got the ability to exploit inside the network. 374 00:17:43,040 --> 00:17:45,280 If the actor was on the internal network 375 00:17:45,280 --> 00:17:46,720 and had been kicked out, 376 00:17:47,260 --> 00:17:48,880 they have a point of presence on the edge router 377 00:17:49,620 --> 00:17:52,260 and unless the incident response team actually went and validated 378 00:17:52,260 --> 00:17:53,620 that they were booted off those edge routers, 379 00:17:53,740 --> 00:17:54,880 they can come right back in. 380 00:17:55,320 --> 00:17:57,000 And then everything that their botnet can do, 381 00:17:57,040 --> 00:17:57,640 this can do too. 382 00:17:57,760 --> 00:17:59,080 So it has a lot of value. 383 00:18:02,540 --> 00:18:04,320 So that's kind of the big picture overview. 384 00:18:04,320 --> 00:18:09,200 The four hour discussion about what VPN filter is 385 00:18:09,200 --> 00:18:11,120 distilled down into 15 minutes. 386 00:18:11,580 --> 00:18:13,040 This is the ICS Village. 387 00:18:13,180 --> 00:18:15,280 We want to talk about stuff that ICS people care about. 388 00:18:15,740 --> 00:18:18,960 Carlos is going to talk about the technical aspects 389 00:18:18,960 --> 00:18:21,700 of the VPN filter Modbus module. 390 00:18:22,480 --> 00:18:23,040 Carlos? 391 00:18:23,240 --> 00:18:23,920 Thanks Patrick. 392 00:18:26,140 --> 00:18:26,700 Alright. 393 00:18:27,060 --> 00:18:30,800 So I'm going to talk about the VPN filter packet sniffer module. 394 00:18:32,800 --> 00:18:34,040 The packet sniffer module, 395 00:18:34,040 --> 00:18:36,060 was responsible for inspecting packets 396 00:18:36,060 --> 00:18:37,500 and logging certain connections. 397 00:18:38,440 --> 00:18:40,060 Specifically, the packet sniffer module 398 00:18:40,060 --> 00:18:41,820 would log connection information about HTTP 399 00:18:41,820 --> 00:18:43,380 and certain Modbus connections. 400 00:18:44,440 --> 00:18:45,700 The packet sniffer module 401 00:18:45,700 --> 00:18:47,760 was targeting the R600 VPN router 402 00:18:47,760 --> 00:18:49,800 which is a five port SOHO router. 403 00:18:50,340 --> 00:18:52,020 When we did a quick search on Shodan, 404 00:18:52,100 --> 00:18:53,720 we found around 5,000 of these devices online. 405 00:18:54,100 --> 00:18:55,800 But I think it's safe to assume that there's 406 00:18:55,800 --> 00:18:57,920 a lot more than 5,000 devices of these online 407 00:18:57,920 --> 00:19:00,100 because Shodan was just showing us ones that were 408 00:19:00,820 --> 00:19:02,060 that had remote management enabled 409 00:19:02,060 --> 00:19:03,380 and were accessible on the internet. 410 00:19:04,380 --> 00:19:06,740 So this is a picture of the device, 411 00:19:06,920 --> 00:19:08,860 the TVLink R600 VPN router. 412 00:19:10,060 --> 00:19:12,440 The malware was specifically targeting this device. 413 00:19:14,880 --> 00:19:17,700 So the packet sniffer is compiled for LXRA. 414 00:19:17,800 --> 00:19:19,020 Has anybody here heard of LXRA? 415 00:19:20,220 --> 00:19:21,440 Cool. Two people. 416 00:19:21,720 --> 00:19:22,020 Alright. 417 00:19:23,540 --> 00:19:25,820 This project is the first time I've ever worked with 418 00:19:25,820 --> 00:19:26,580 or even heard of LXRA. 419 00:19:26,720 --> 00:19:27,860 It's really similar to MIPS, 420 00:19:27,980 --> 00:19:29,480 but it's missing some instructions. 421 00:19:31,200 --> 00:19:32,940 Initially, when I started working on this, 422 00:19:32,940 --> 00:19:34,920 I thought the device and sample were MIPS, 423 00:19:35,320 --> 00:19:37,080 and this was problematic because Patrick and I 424 00:19:37,080 --> 00:19:38,420 were attempting to get compiled MIPS code 425 00:19:38,420 --> 00:19:39,100 running on the R600, 426 00:19:39,740 --> 00:19:41,040 but we kept getting segfaults. 427 00:19:41,600 --> 00:19:43,640 Eventually, one of our coworkers found out it was LXRA 428 00:19:43,640 --> 00:19:45,000 and helped us out with that. 429 00:19:45,120 --> 00:19:45,680 So it was good. 430 00:19:48,400 --> 00:19:50,640 So first off, I want to give a huge shout out to Carl Hurd. 431 00:19:50,740 --> 00:19:52,520 He works on our team at Cisco Talos, 432 00:19:52,620 --> 00:19:54,860 and he was the first one to reverse the packets for module. 433 00:19:56,080 --> 00:19:58,900 The sample was first uploaded to VirusTotal in 2016. 434 00:19:59,780 --> 00:20:01,400 So this module's been around for quite some time. 435 00:20:02,000 --> 00:20:04,140 I wonder how long the module's actually been around, 436 00:20:04,300 --> 00:20:06,280 because 2016 is just the first time 437 00:20:06,280 --> 00:20:07,700 it was uploaded to VirusTotal. 438 00:20:08,680 --> 00:20:10,520 The module is a Linux ELF. 439 00:20:10,620 --> 00:20:11,820 It's stripped and statically compiled. 440 00:20:12,540 --> 00:20:14,160 The fact that it was stripped and statically compiled 441 00:20:14,160 --> 00:20:15,620 made reversing a little bit more difficult. 442 00:20:15,820 --> 00:20:17,240 We had no function names. 443 00:20:17,340 --> 00:20:19,120 Even libc functions, they were unnamed, 444 00:20:19,220 --> 00:20:20,080 which was pretty annoying. 445 00:20:22,840 --> 00:20:25,120 So the sample will inspect every packet. 446 00:20:26,780 --> 00:20:28,020 It'll initially do some checks. 447 00:20:28,280 --> 00:20:31,220 So it'll first check to see if the packet is greater than 150 bytes. 448 00:20:31,400 --> 00:20:33,040 If the packet's IPv4. 449 00:20:33,300 --> 00:20:34,460 And if the packet's TCP. 450 00:20:34,760 --> 00:20:36,000 If all those conditions are met, 451 00:20:36,140 --> 00:20:39,980 then the sample will look for Modbus and HTTP. 452 00:20:42,460 --> 00:20:45,560 So in order for the packet sniffer module to run, 453 00:20:45,680 --> 00:20:46,960 two arguments need to be provided. 454 00:20:47,700 --> 00:20:49,780 The first argument is the logging directory. 455 00:20:50,160 --> 00:20:51,540 This is where the logs will be stored. 456 00:20:51,860 --> 00:20:53,700 And the second is an IP address. 457 00:20:54,500 --> 00:20:56,120 If these two arguments are not provided, 458 00:20:56,540 --> 00:20:57,760 the sample will just exit. 459 00:20:58,080 --> 00:20:59,620 But if the two arguments are provided, 460 00:21:00,080 --> 00:21:03,020 we immediately enter the packet's parsing loop. 461 00:21:04,880 --> 00:21:07,000 So in the packet parsing loop, 462 00:21:07,140 --> 00:21:09,680 in the beginning we have some IP checks, 463 00:21:09,800 --> 00:21:12,140 checking for IPv4, TCP, and the packet size. 464 00:21:12,880 --> 00:21:14,020 And if those checks pass, 465 00:21:14,240 --> 00:21:16,740 then we will start looking for Modbus. 466 00:21:17,880 --> 00:21:21,040 And if the loop does not detect Modbus, 467 00:21:21,140 --> 00:21:22,960 then it will check for HTTP. 468 00:21:26,340 --> 00:21:28,640 So all network traffic passes through this loop. 469 00:21:29,700 --> 00:21:32,160 And the loop is specifically looking for Modbus and HTTP. 470 00:21:32,340 --> 00:21:33,860 And it will discard anything else. 471 00:21:34,780 --> 00:21:37,180 So if something doesn't meet the criteria for Modbus or HTTP, 472 00:21:37,960 --> 00:21:39,080 the packet will be discarded, 473 00:21:39,180 --> 00:21:40,940 and the loop will be restarted with the next packet. 474 00:21:45,040 --> 00:21:46,120 So for each packet, 475 00:21:46,320 --> 00:21:48,880 the loop's going to check to see if the packet's greater than 150 bytes. 476 00:21:49,920 --> 00:21:52,160 Then the loop's going to make sure the packet's IPv4 and TCP. 477 00:21:52,760 --> 00:21:56,180 And finally, we start the Modbus and HTTP checks. 478 00:21:58,340 --> 00:21:59,280 So first off, 479 00:21:59,620 --> 00:22:00,800 for those of you that may not know, 480 00:22:00,900 --> 00:22:02,060 Modbus is an ICS protocol. 481 00:22:02,500 --> 00:22:03,900 It's commonly used by PLCs. 482 00:22:04,160 --> 00:22:05,440 It runs on port 502. 483 00:22:06,100 --> 00:22:08,820 And the protocol is open, 484 00:22:08,900 --> 00:22:10,220 so you can grab it from Modbus.org. 485 00:22:10,600 --> 00:22:11,820 And it doesn't support encryption. 486 00:22:15,360 --> 00:22:17,340 So once the loop has done the initial IP checks, 487 00:22:17,880 --> 00:22:19,200 the loop's going to check for Modbus. 488 00:22:19,480 --> 00:22:22,340 It does this by checking to see the packet's destination port 489 00:22:22,340 --> 00:22:23,660 and seeing if it equals 502. 490 00:22:24,060 --> 00:22:26,260 If it does, then the next check is 491 00:22:26,780 --> 00:22:29,200 if the packet's destination address is the same IP 492 00:22:29,200 --> 00:22:31,300 as the IP provided by the second argument 493 00:22:31,300 --> 00:22:32,140 provided to the binary. 494 00:22:32,780 --> 00:22:34,160 If both those checks return true, 495 00:22:34,680 --> 00:22:37,320 then the sample considers this packet a Modbus packet 496 00:22:37,320 --> 00:22:38,760 and login code gets called. 497 00:22:41,380 --> 00:22:44,100 So the log file is stored in the location 498 00:22:44,100 --> 00:22:45,240 provided by the first argument. 499 00:22:46,320 --> 00:22:49,680 The log file will be named rep underscore percent u dot bin 500 00:22:49,680 --> 00:22:51,860 where percent u is the time the log file was written. 501 00:22:53,580 --> 00:22:54,760 The only thing that gets logged 502 00:22:55,300 --> 00:22:56,640 for the Modbus portion is 503 00:22:57,200 --> 00:22:58,880 the source IP, source port, 504 00:22:58,880 --> 00:23:01,540 destination IP, and the destination port. 505 00:23:03,600 --> 00:23:07,020 So this is an example of what the log file might be named 506 00:23:07,020 --> 00:23:07,840 and what it might contain. 507 00:23:08,280 --> 00:23:11,280 So rep underscore and a time value dot bin 508 00:23:11,280 --> 00:23:12,240 would be the name of the file. 509 00:23:12,400 --> 00:23:14,480 And then what's highlighted in orange 510 00:23:14,480 --> 00:23:16,960 is what would actually be inside the file. 511 00:23:17,820 --> 00:23:19,980 So we have asterisk Modbus asterisk, 512 00:23:20,060 --> 00:23:22,420 new line, source IP, colon source port, 513 00:23:22,540 --> 00:23:23,140 with a little arrow, 514 00:23:23,240 --> 00:23:25,780 to destination IP, destination port. 515 00:23:29,800 --> 00:23:32,520 So I wonder why a sample specifically designed 516 00:23:32,520 --> 00:23:33,900 for a SOHA router is looking for Modbus. 517 00:23:34,460 --> 00:23:36,320 I don't know if this router will ever be in a position 518 00:23:36,320 --> 00:23:39,840 to look at ICS traffic or Modbus traffic. 519 00:23:40,680 --> 00:23:42,680 And additionally I wonder what value 520 00:23:42,680 --> 00:23:44,980 the Modbus log provides. 521 00:23:45,740 --> 00:23:47,240 The only thing that's in the log is the source IP, 522 00:23:47,380 --> 00:23:49,120 source port, destination IP, and destination port. 523 00:23:49,600 --> 00:23:53,460 And the destination IP address and the destination port 524 00:23:53,460 --> 00:23:55,680 have to be provided to the binary. 525 00:23:55,900 --> 00:23:58,820 So the only thing that you get really is the source IP address 526 00:23:58,820 --> 00:23:59,320 and the source port. 527 00:24:05,720 --> 00:24:07,000 So as the loop continues, 528 00:24:07,180 --> 00:24:10,880 if the loop determines that the packet is not Modbus, 529 00:24:11,020 --> 00:24:13,480 then it will start looking for HTTP authorization. 530 00:24:15,380 --> 00:24:16,480 So just a quick recap. 531 00:24:16,760 --> 00:24:18,720 In order for the HTTP checks to start, 532 00:24:18,800 --> 00:24:22,920 the packet needs to be TCP IPv4 greater than 150 bytes 533 00:24:23,520 --> 00:24:24,620 and not Modbus. 534 00:24:24,780 --> 00:24:26,720 Then we have, then the HTTP checks start. 535 00:24:29,220 --> 00:24:32,720 So the HTTP checks consist of checking the destination IP address, 536 00:24:32,920 --> 00:24:35,020 source port, length of the data, 537 00:24:35,160 --> 00:24:36,540 and then several strings checks. 538 00:24:37,740 --> 00:24:40,740 The destination IP must be the same as the IP address 539 00:24:40,740 --> 00:24:42,820 that was provided to the sample when the sample was initially started. 540 00:24:42,900 --> 00:24:44,240 So it's looking for a very specific IP address. 541 00:24:45,160 --> 00:24:47,980 The source port must be greater than 1024, 542 00:24:48,200 --> 00:24:51,400 but it can't be 80 or 8088. 543 00:24:52,740 --> 00:24:55,440 The length of the data must also be greater than 20 bytes. 544 00:24:55,660 --> 00:24:57,440 And then we move on to the strings check. 545 00:24:58,920 --> 00:25:01,080 So in order for the packet to be logged, 546 00:25:01,660 --> 00:25:05,400 the packet must not contain any of the strings in that code block. 547 00:25:10,660 --> 00:25:14,780 And additionally, the packet must contain the string authorization basic 548 00:25:14,780 --> 00:25:17,480 or a username and password combination, 549 00:25:17,700 --> 00:25:18,480 but it can't contain both. 550 00:25:18,620 --> 00:25:21,220 If it contains both, the packet will be discarded 551 00:25:21,220 --> 00:25:23,100 and the loop will restart with the next packet. 552 00:25:24,620 --> 00:25:26,160 So in this code block on the left, 553 00:25:26,220 --> 00:25:28,080 I have usernames, 554 00:25:28,820 --> 00:25:29,380 user parameters, 555 00:25:29,540 --> 00:25:30,860 and on the right, password parameters, 556 00:25:30,980 --> 00:25:32,140 so you have to have one from each side 557 00:25:32,140 --> 00:25:34,400 in order for the packet to be logged. 558 00:25:37,200 --> 00:25:39,060 If the HTTP logging criteria has been met, 559 00:25:40,600 --> 00:25:41,880 the entire packet is logged 560 00:25:43,280 --> 00:25:46,000 to rep underscore percent u dot bin, 561 00:25:46,120 --> 00:25:48,620 where percent u is the time of logging. 562 00:25:50,880 --> 00:25:53,120 And the log will be stored 563 00:25:53,760 --> 00:25:58,020 in the location provided to the sample 564 00:25:58,020 --> 00:25:58,820 when you initially ran it. 565 00:26:01,840 --> 00:26:03,960 So it looks like the HTTP checks 566 00:26:03,960 --> 00:26:05,540 are looking for credentials to a specific website. 567 00:26:06,000 --> 00:26:07,000 It's highly targeted, 568 00:26:07,080 --> 00:26:08,680 as the destination IP address is already known 569 00:26:08,680 --> 00:26:11,160 and needed for the packet zipper sample. 570 00:26:11,720 --> 00:26:14,500 Additionally, the sample does not send logs off to a remote server, 571 00:26:14,620 --> 00:26:16,500 but maybe another sample does this. 572 00:26:16,620 --> 00:26:17,620 I don't know. 573 00:26:20,600 --> 00:26:21,900 So in conclusion, 574 00:26:22,120 --> 00:26:25,580 the sample is targeting specifically the R600 VPN router, 575 00:26:25,720 --> 00:26:26,820 which is a SOHO router. 576 00:26:26,820 --> 00:26:28,940 The sample is looking for a specific IP address, 577 00:26:29,100 --> 00:26:32,200 and is grabbing modless HTTP information. 578 00:26:33,560 --> 00:26:35,000 The sample cannot modify traffic 579 00:26:35,500 --> 00:26:36,800 without a significant code rewrite, 580 00:26:37,020 --> 00:26:38,360 but as Patrick said, 581 00:26:38,480 --> 00:26:39,760 we've observed other samples 582 00:26:39,760 --> 00:26:41,980 that are able to modify traffic. 583 00:26:44,400 --> 00:26:46,020 So thanks for coming to the talk. 584 00:26:46,060 --> 00:26:46,680 Hope you guys enjoyed it. 585 00:26:54,040 --> 00:26:55,740 I just want to reinforce, 586 00:26:56,320 --> 00:26:58,160 it's very, very targeted. 587 00:26:58,500 --> 00:27:00,400 Just that model of device. 588 00:27:01,380 --> 00:27:03,500 You have to give it the destination IP address. 589 00:27:04,600 --> 00:27:07,940 It's logging just the source IP 590 00:27:07,940 --> 00:27:09,360 and source port of Modbus traffic, 591 00:27:09,560 --> 00:27:10,020 nothing else. 592 00:27:10,400 --> 00:27:12,740 And it's got a bunch of filters in place 593 00:27:12,740 --> 00:27:14,880 to discard a lot of the HTTP auth stuff. 594 00:27:15,540 --> 00:27:16,920 And it's storing the whole packet. 595 00:27:17,300 --> 00:27:19,540 But the filters in place will ensure 596 00:27:19,540 --> 00:27:21,940 that only a few of the packets 597 00:27:21,940 --> 00:27:23,400 that contain the HTTP authentication stuff 598 00:27:23,400 --> 00:27:24,140 actually get saved. 599 00:27:25,820 --> 00:27:27,500 So the question is, 600 00:27:27,520 --> 00:27:30,460 in what environment are you going to find this router? 601 00:27:31,280 --> 00:27:37,620 And what ICS device would be on the target of this? 602 00:27:38,920 --> 00:27:41,540 Where somebody would be on one side of this router 603 00:27:41,540 --> 00:27:43,000 and there would be an ICS device on the other, 604 00:27:43,580 --> 00:27:46,120 and both Modbus traffic and HTTP traffic 605 00:27:46,120 --> 00:27:47,580 are passing to the same device, 606 00:27:47,760 --> 00:27:50,560 because the IP address is given as an argument 607 00:27:50,560 --> 00:27:52,120 when the module is run. 608 00:27:53,560 --> 00:27:55,500 So that is the... 609 00:27:55,740 --> 00:27:56,540 the question of the day. 610 00:27:57,740 --> 00:27:59,860 Where is this device being used? 611 00:28:00,320 --> 00:28:04,640 And what ICS device receives Modbus traffic 612 00:28:04,640 --> 00:28:07,600 and gets authentication over HTTP? 613 00:28:09,460 --> 00:28:10,380 We'll take questions. 614 00:28:10,940 --> 00:28:12,980 I was wondering, is it common at all 615 00:28:12,980 --> 00:28:17,000 for ICS-type environments to use SOHO routers? 616 00:28:17,120 --> 00:28:17,820 Has that been found? 617 00:28:17,940 --> 00:28:20,240 Is that possible that the attackers 618 00:28:20,240 --> 00:28:22,380 have a very specific configuration in mind 619 00:28:22,380 --> 00:28:23,540 that they're going for somewhere 620 00:28:23,540 --> 00:28:25,820 that uses that sort of setup? 621 00:28:26,060 --> 00:28:27,580 So in this case, 622 00:28:27,660 --> 00:28:30,360 this is obviously intended to target 623 00:28:30,360 --> 00:28:31,980 either a specific individual 624 00:28:31,980 --> 00:28:34,420 or a specific group that does things a certain way. 625 00:28:35,780 --> 00:28:37,480 This specific module isn't going to work 626 00:28:37,480 --> 00:28:38,440 on any of the other... 627 00:28:38,440 --> 00:28:40,080 It won't work as a plug-in to 628 00:28:40,740 --> 00:28:42,280 Stage 2 on a different device. 629 00:28:42,520 --> 00:28:44,980 It only works on the TP-Link R600 VPN. 630 00:28:45,720 --> 00:28:47,120 And it only... 631 00:28:47,120 --> 00:28:48,720 You have to give it that destination IP 632 00:28:48,720 --> 00:28:50,020 before it'll log anything. 633 00:28:50,380 --> 00:28:51,940 So when the actor dropped this, 634 00:28:52,800 --> 00:28:55,520 it's obvious that they were looking for certain stuff 635 00:28:55,520 --> 00:28:56,380 and only certain stuff 636 00:28:56,380 --> 00:28:57,720 because it filters out everything else, 637 00:28:57,820 --> 00:28:59,440 even things that would be valuable 638 00:28:59,440 --> 00:29:00,900 like other HTTP credentials. 639 00:29:02,760 --> 00:29:03,900 They might have... 640 00:29:03,900 --> 00:29:04,540 I mean, it's hard to say, 641 00:29:04,540 --> 00:29:06,180 but they might have had something specific in mind. 642 00:29:06,340 --> 00:29:06,580 Yeah. 643 00:29:06,740 --> 00:29:08,380 And whether or not this device should be 644 00:29:08,380 --> 00:29:09,040 in an ICS environment? 645 00:29:09,240 --> 00:29:09,520 No. 646 00:29:09,620 --> 00:29:10,760 But whether or not it is? 647 00:29:11,100 --> 00:29:11,540 Yeah. 648 00:29:12,680 --> 00:29:16,280 So I think some bigger, like, 649 00:29:16,280 --> 00:29:17,120 little companies and stuff 650 00:29:17,120 --> 00:29:18,540 backhaul their ICS communication 651 00:29:18,540 --> 00:29:20,860 back to their conditional . 652 00:29:22,040 --> 00:29:24,160 So you can continually sue that 653 00:29:24,160 --> 00:29:25,120 suit on someone's desk? 654 00:29:27,720 --> 00:29:28,960 I don't have a question. 655 00:29:29,100 --> 00:29:30,040 What type of... 656 00:29:30,040 --> 00:29:31,820 I'm curious, like, 657 00:29:32,720 --> 00:29:34,160 I would like to, 658 00:29:34,200 --> 00:29:35,780 you know, for you guys, 659 00:29:35,880 --> 00:29:38,080 if you can think of any field devices 660 00:29:38,080 --> 00:29:40,220 that may be, you know, 661 00:29:40,680 --> 00:29:42,160 what the actor was looking 662 00:29:42,160 --> 00:29:43,560 to receive the information about, 663 00:29:44,400 --> 00:29:45,880 if you want to let me know, 664 00:29:45,920 --> 00:29:46,240 let me know. 665 00:29:46,500 --> 00:29:46,940 Otherwise... 666 00:29:46,940 --> 00:29:48,220 It's not like a module 667 00:29:48,220 --> 00:29:50,160 for another part of... 668 00:29:50,160 --> 00:29:50,840 You know, like, 669 00:29:50,860 --> 00:29:52,340 industrial hard, like, device. 670 00:29:53,140 --> 00:29:53,700 What do you mean? 671 00:29:54,040 --> 00:29:54,860 Well, you know, like, 672 00:29:54,900 --> 00:29:55,720 did they use that same 673 00:29:55,720 --> 00:29:57,260 for another, like, 674 00:29:57,340 --> 00:29:58,360 industrial hard device? 675 00:29:58,820 --> 00:29:59,300 For the TP-Link? 676 00:29:59,880 --> 00:30:01,000 Not to my knowledge. 677 00:30:01,200 --> 00:30:02,400 It's just that, yeah. 678 00:30:03,500 --> 00:30:04,460 As far as I know. 679 00:30:05,100 --> 00:30:06,140 And it's that weird, 680 00:30:06,320 --> 00:30:06,960 like Carlos said, 681 00:30:07,020 --> 00:30:07,760 it's that lecture architecture. 682 00:30:08,920 --> 00:30:10,520 So as we were writing 683 00:30:10,520 --> 00:30:12,800 our own proof of concept code 684 00:30:12,800 --> 00:30:14,980 and executing it on the device, 685 00:30:15,220 --> 00:30:15,760 it was... 686 00:30:15,760 --> 00:30:16,520 We were getting seg faults 687 00:30:16,520 --> 00:30:16,960 all day long. 688 00:30:17,340 --> 00:30:18,240 And it turns out 689 00:30:18,240 --> 00:30:19,560 we needed a custom tool chain 690 00:30:19,560 --> 00:30:20,140 to compile code 691 00:30:20,860 --> 00:30:21,020 for this device. 692 00:30:21,780 --> 00:30:23,200 So it's not like it's... 693 00:30:23,580 --> 00:30:24,400 You know, the code 694 00:30:24,400 --> 00:30:24,900 may be portable, 695 00:30:25,020 --> 00:30:25,800 but it's still got to be compiled 696 00:30:25,800 --> 00:30:27,040 specifically for this. 697 00:30:27,360 --> 00:30:28,540 And I don't know of anything... 698 00:30:28,540 --> 00:30:29,360 And there's strings 699 00:30:29,360 --> 00:30:30,060 in the code, 700 00:30:30,120 --> 00:30:30,800 in the binary, 701 00:30:30,880 --> 00:30:31,900 that say R600 VPN. 702 00:30:32,360 --> 00:30:33,000 You know, so, 703 00:30:33,080 --> 00:30:34,460 even if there was something else 704 00:30:34,460 --> 00:30:35,800 that, you know... 705 00:30:35,800 --> 00:30:36,720 Using that more... 706 00:30:36,720 --> 00:30:37,060 Right. 707 00:30:37,200 --> 00:30:37,940 ...or incorporating it. 708 00:30:38,100 --> 00:30:38,200 Yeah. 709 00:30:38,440 --> 00:30:38,580 Yeah. 710 00:30:40,440 --> 00:30:41,580 So just to be clear, 711 00:30:41,740 --> 00:30:42,400 is every packet 712 00:30:42,400 --> 00:30:43,260 going through it? 713 00:30:43,840 --> 00:30:44,200 Every... 714 00:30:44,200 --> 00:30:45,240 It looks at every packet 715 00:30:45,240 --> 00:30:46,720 that travels through it. 716 00:30:46,940 --> 00:30:47,720 And then it goes 717 00:30:47,720 --> 00:30:48,180 through the checks 718 00:30:48,180 --> 00:30:48,880 that Carlos explained 719 00:30:48,880 --> 00:30:50,520 to filter out 720 00:30:50,520 --> 00:30:50,860 the stuff 721 00:30:50,860 --> 00:30:51,480 that it doesn't want. 722 00:30:52,100 --> 00:30:52,960 And if it meets 723 00:30:52,960 --> 00:30:53,380 all the checks 724 00:30:53,380 --> 00:30:53,960 for Modbus, 725 00:30:54,080 --> 00:30:55,180 it just logs 726 00:30:55,800 --> 00:30:56,880 stuff that it already knew. 727 00:30:56,980 --> 00:30:57,480 Like, it knows 728 00:30:57,480 --> 00:30:58,920 the destination IP 729 00:30:58,920 --> 00:30:59,940 because it's an argument 730 00:30:59,940 --> 00:31:00,960 that was passed to it 731 00:31:01,580 --> 00:31:02,520 when that module 732 00:31:02,520 --> 00:31:02,960 was executed. 733 00:31:03,560 --> 00:31:04,380 It doesn't log 734 00:31:04,380 --> 00:31:05,460 any of the Modbus data. 735 00:31:05,720 --> 00:31:06,440 It just... 736 00:31:06,440 --> 00:31:07,540 The IP address 737 00:31:07,540 --> 00:31:08,220 that the traffic 738 00:31:08,220 --> 00:31:08,820 came from 739 00:31:08,820 --> 00:31:09,480 and the port 740 00:31:09,480 --> 00:31:10,140 that it came from 741 00:31:10,140 --> 00:31:11,420 and the IP address 742 00:31:11,420 --> 00:31:12,200 that it was going to, 743 00:31:12,260 --> 00:31:12,720 which we know, 744 00:31:12,840 --> 00:31:13,880 and port 502, 745 00:31:14,000 --> 00:31:14,540 which we know. 746 00:31:14,760 --> 00:31:15,580 So the only thing 747 00:31:15,580 --> 00:31:16,060 the actor learns 748 00:31:16,060 --> 00:31:16,500 that's new 749 00:31:19,320 --> 00:31:20,520 and then any 750 00:31:20,520 --> 00:31:21,240 HTTP 751 00:31:22,120 --> 00:31:22,620 traffic 752 00:31:22,620 --> 00:31:23,260 that meets 753 00:31:23,260 --> 00:31:24,000 all those filters 754 00:31:24,000 --> 00:31:25,360 going to the same 755 00:31:25,360 --> 00:31:25,860 IP address 756 00:31:25,860 --> 00:31:26,760 as the Modbus 757 00:31:26,760 --> 00:31:27,300 is going to, 758 00:31:27,380 --> 00:31:28,260 it'll log 759 00:31:28,260 --> 00:31:28,940 that entire packet. 760 00:31:30,760 --> 00:31:31,260 Yes? 761 00:31:44,000 --> 00:31:45,540 So in this instance 762 00:31:45,540 --> 00:31:46,280 I would imagine 763 00:31:46,280 --> 00:31:47,120 they either did it manually 764 00:31:47,120 --> 00:31:48,380 especially since it's 765 00:31:48,880 --> 00:31:49,340 not connected 766 00:31:49,340 --> 00:31:50,280 or there may have 767 00:31:50,280 --> 00:31:51,400 been capability 768 00:31:51,400 --> 00:31:52,400 at the C2 node 769 00:31:52,400 --> 00:31:53,580 that would connect 770 00:31:53,580 --> 00:31:54,340 and pull, 771 00:31:54,580 --> 00:31:54,940 right? 772 00:31:57,040 --> 00:31:57,520 No. 773 00:31:58,400 --> 00:31:58,880 They... 774 00:31:59,640 --> 00:32:00,580 Stage 2 had 775 00:32:00,580 --> 00:32:01,420 the ability 776 00:32:01,420 --> 00:32:02,540 to execute 777 00:32:02,540 --> 00:32:03,040 shell commands 778 00:32:03,040 --> 00:32:03,640 so it would be 779 00:32:03,640 --> 00:32:04,140 just like you were 780 00:32:04,140 --> 00:32:04,520 logged in 781 00:32:04,520 --> 00:32:05,060 to the terminal, 782 00:32:05,200 --> 00:32:05,820 you know, 783 00:32:05,820 --> 00:32:06,700 as Linux root. 784 00:32:07,460 --> 00:32:08,300 Were you able 785 00:32:08,300 --> 00:32:09,580 to do any analysis 786 00:32:09,580 --> 00:32:10,740 just where, 787 00:32:10,780 --> 00:32:11,620 you know, 788 00:32:11,640 --> 00:32:11,940 so there's 789 00:32:11,940 --> 00:32:13,040 5,000 routers, 790 00:32:13,180 --> 00:32:13,840 you know, 791 00:32:13,840 --> 00:32:14,480 was there any... 792 00:32:14,480 --> 00:32:14,700 I mean, 793 00:32:14,720 --> 00:32:15,180 that's a lot. 794 00:32:15,740 --> 00:32:16,740 Were there any 795 00:32:17,320 --> 00:32:18,000 kind of 796 00:32:18,000 --> 00:32:18,960 geographic trends 797 00:32:18,960 --> 00:32:19,420 that you see 798 00:32:19,420 --> 00:32:20,320 in certain countries 799 00:32:20,320 --> 00:32:21,280 or in certain areas? 800 00:32:22,860 --> 00:32:23,500 Nothing has 801 00:32:23,500 --> 00:32:24,120 stood out at the time 802 00:32:24,120 --> 00:32:24,540 but we have 803 00:32:24,540 --> 00:32:25,040 the map 804 00:32:25,040 --> 00:32:25,940 and slides 805 00:32:25,940 --> 00:32:26,640 we can put it up 806 00:32:26,640 --> 00:32:27,000 on the... 807 00:32:27,000 --> 00:32:27,800 if you can zoom 808 00:32:27,800 --> 00:32:28,360 into the... 809 00:32:28,360 --> 00:32:29,060 Yeah. 810 00:32:30,620 --> 00:32:31,740 Most of the U.S. 811 00:32:32,540 --> 00:32:33,000 So, 812 00:32:33,080 --> 00:32:34,100 almost 900 813 00:32:34,100 --> 00:32:34,780 in the U.S., 814 00:32:34,780 --> 00:32:35,800 600 in Russia, 815 00:32:36,400 --> 00:32:36,860 Brazil, 816 00:32:37,380 --> 00:32:37,840 Portland, 817 00:32:38,080 --> 00:32:38,720 Uruguay 818 00:32:38,720 --> 00:32:39,280 and this is just 819 00:32:40,040 --> 00:32:40,500 specifically 820 00:32:40,500 --> 00:32:41,460 the TP-Link R 821 00:32:41,460 --> 00:32:42,300 600 VPN 822 00:32:42,300 --> 00:32:43,700 with remote management 823 00:32:43,700 --> 00:32:44,000 enabled. 824 00:32:46,000 --> 00:32:46,920 My first thought 825 00:32:46,920 --> 00:32:47,300 was it's... 826 00:32:49,580 --> 00:32:50,960 It was oil and gas. 827 00:32:51,960 --> 00:32:52,680 Oil and gas. 828 00:32:53,160 --> 00:32:53,680 That's right. 829 00:32:55,040 --> 00:32:55,660 I mean, 830 00:32:55,660 --> 00:32:55,980 it's just 831 00:32:55,980 --> 00:32:57,060 not a lot of evidence, 832 00:32:57,120 --> 00:32:57,860 not a lot of evidence. 833 00:32:57,900 --> 00:32:58,060 Right. 834 00:32:58,420 --> 00:32:58,820 No, 835 00:32:58,820 --> 00:32:59,040 it's not. 836 00:32:59,840 --> 00:33:00,420 Yes, sir. 837 00:33:00,420 --> 00:33:00,620 Peace 838 00:33:00,620 --> 00:33:01,040 until the bread 839 00:33:01,040 --> 00:33:01,480 comes together. 840 00:33:02,860 --> 00:33:03,260 Follow 841 00:33:03,260 --> 00:33:03,640 when the bread 842 00:33:03,640 --> 00:33:03,880 comes, 843 00:33:03,900 --> 00:33:04,100 you know, 844 00:33:04,100 --> 00:33:04,240 peace. 845 00:33:06,700 --> 00:33:07,200 Yes, sir. 846 00:33:07,520 --> 00:33:07,920 Yeah, 847 00:33:07,920 --> 00:33:08,560 for the first 848 00:33:08,560 --> 00:33:08,780 day 849 00:33:08,780 --> 00:33:09,180 we tried 850 00:33:09,180 --> 00:33:09,460 to rock 851 00:33:09,460 --> 00:33:09,780 on it. 852 00:33:10,500 --> 00:33:10,900 Yeah. 853 00:33:13,640 --> 00:33:14,300 Did anybody 854 00:33:15,360 --> 00:33:15,700 get a box? 855 00:33:16,080 --> 00:33:16,420 Yeah. 856 00:33:16,440 --> 00:33:16,520 So, 857 00:33:16,580 --> 00:33:17,220 anybody that knows 858 00:33:17,220 --> 00:33:17,700 what that 859 00:33:18,640 --> 00:33:19,120 SYNMEC is 860 00:33:20,300 --> 00:33:20,640 can 861 00:33:21,360 --> 00:33:22,500 own any device 862 00:33:22,500 --> 00:33:23,160 that is in that 863 00:33:23,160 --> 00:33:24,380 passive raw socket mode. 864 00:33:25,080 --> 00:33:25,420 So, 865 00:33:25,440 --> 00:33:26,020 you just have 866 00:33:26,020 --> 00:33:26,940 to send a SYNM that has 867 00:33:26,940 --> 00:33:27,840 the right magic bites 868 00:33:28,460 --> 00:33:29,080 and then 869 00:33:29,080 --> 00:33:30,080 it's going to pull out 870 00:33:30,560 --> 00:33:31,420 an IP address 871 00:33:31,420 --> 00:33:32,880 and it's going to reach out 872 00:33:32,880 --> 00:33:33,560 and you're going to have 873 00:33:33,560 --> 00:33:34,660 to deliver stage two to it. 874 00:33:34,860 --> 00:33:35,200 But, 875 00:33:35,240 --> 00:33:35,340 I mean, 876 00:33:35,360 --> 00:33:36,260 if you know enough. 877 00:33:36,380 --> 00:33:36,520 So, 878 00:33:36,540 --> 00:33:36,640 yeah, 879 00:33:36,660 --> 00:33:37,140 you could do that. 880 00:33:40,580 --> 00:33:41,080 Yes, ma'am. 881 00:33:41,200 --> 00:33:41,580 You said 882 00:33:41,580 --> 00:33:42,120 that there would be 883 00:33:42,120 --> 00:33:42,740 some sort of 884 00:33:42,740 --> 00:33:43,800 modification required 885 00:33:43,800 --> 00:33:44,420 to manipulate 886 00:33:44,420 --> 00:33:45,220 the traffic 887 00:33:45,220 --> 00:33:45,640 and what's 888 00:33:45,640 --> 00:33:45,780 there? 889 00:33:45,920 --> 00:33:47,200 For this module, 890 00:33:48,960 --> 00:33:50,000 because it's set up 891 00:33:50,000 --> 00:33:50,320 to just 892 00:33:50,880 --> 00:33:51,320 log 893 00:33:51,880 --> 00:33:52,700 data about 894 00:33:52,700 --> 00:33:53,320 what goes through, 895 00:33:53,500 --> 00:33:54,320 it would be, 896 00:33:54,480 --> 00:33:55,260 it would need to be 897 00:33:55,260 --> 00:33:56,460 seriously modified 898 00:33:56,460 --> 00:33:57,900 to intercept. 899 00:33:59,040 --> 00:33:59,480 So, 900 00:33:59,500 --> 00:33:59,840 instead of just 901 00:33:59,840 --> 00:34:00,580 looking at the packet 902 00:34:00,580 --> 00:34:01,500 and allowing it 903 00:34:01,500 --> 00:34:01,960 to go through, 904 00:34:02,140 --> 00:34:02,680 it's going to have 905 00:34:02,680 --> 00:34:03,180 to stop it, 906 00:34:03,220 --> 00:34:04,180 change it, 907 00:34:04,260 --> 00:34:04,960 pass it through. 908 00:34:05,100 --> 00:34:06,020 This module doesn't 909 00:34:06,020 --> 00:34:06,740 have any capability 910 00:34:06,740 --> 00:34:07,300 to do that, 911 00:34:07,400 --> 00:34:08,280 but that other 912 00:34:08,280 --> 00:34:08,880 module does. 913 00:34:12,160 --> 00:34:13,740 This module does not, 914 00:34:13,780 --> 00:34:14,680 but it's still 915 00:34:14,680 --> 00:34:15,180 possible. 916 00:34:18,500 --> 00:34:19,540 How alarming 917 00:34:19,540 --> 00:34:20,480 is this behavior? 918 00:34:20,840 --> 00:34:21,480 Has there been 919 00:34:21,480 --> 00:34:22,140 any sort of effort 920 00:34:22,140 --> 00:34:22,680 to go out 921 00:34:22,680 --> 00:34:22,900 and be like, 922 00:34:23,000 --> 00:34:23,500 have you seen 923 00:34:23,500 --> 00:34:23,940 this router 924 00:34:23,940 --> 00:34:24,480 to, like, 925 00:34:24,480 --> 00:34:25,160 potential industrial 926 00:34:25,160 --> 00:34:25,720 use cases 927 00:34:25,720 --> 00:34:26,100 or anything? 928 00:34:26,360 --> 00:34:27,180 Or is it kind of 929 00:34:27,180 --> 00:34:27,720 still a pretty 930 00:34:27,720 --> 00:34:28,460 passive collection 931 00:34:28,460 --> 00:34:28,980 and like, 932 00:34:29,540 --> 00:34:30,060 maybe, 933 00:34:30,300 --> 00:34:30,840 you know? 934 00:34:31,020 --> 00:34:31,680 I'm here asking 935 00:34:31,680 --> 00:34:32,120 you guys. 936 00:34:35,380 --> 00:34:36,180 It's intriguing 937 00:34:36,180 --> 00:34:36,800 because it's so 938 00:34:36,800 --> 00:34:37,340 targeted. 939 00:34:38,280 --> 00:34:38,800 But, 940 00:34:39,840 --> 00:34:40,720 because of 941 00:34:40,720 --> 00:34:41,380 the wide 942 00:34:42,120 --> 00:34:42,960 vendors and 943 00:34:42,960 --> 00:34:43,780 devices that 944 00:34:43,780 --> 00:34:44,220 were also 945 00:34:44,740 --> 00:34:45,800 known to be 946 00:34:45,800 --> 00:34:46,340 used, 947 00:34:47,880 --> 00:34:48,840 this type 948 00:34:48,840 --> 00:34:49,380 of activity 949 00:34:49,900 --> 00:34:50,500 could be used 950 00:34:50,500 --> 00:34:51,080 on any of those 951 00:34:51,080 --> 00:34:51,520 other devices. 952 00:34:51,660 --> 00:34:52,020 They just had to 953 00:34:52,020 --> 00:34:52,540 pile for the 954 00:34:52,540 --> 00:34:52,920 device and 955 00:34:52,920 --> 00:34:53,360 push it out. 956 00:35:00,540 --> 00:35:01,020 So, 957 00:35:03,440 --> 00:35:04,560 it depends on 958 00:35:04,560 --> 00:35:05,260 which stage 959 00:35:05,260 --> 00:35:05,880 it's in 960 00:35:05,880 --> 00:35:06,760 and what 961 00:35:06,760 --> 00:35:07,580 device it is. 962 00:35:07,720 --> 00:35:08,400 There's a whole 963 00:35:08,400 --> 00:35:08,740 bunch of 964 00:35:09,340 --> 00:35:09,860 weird ways 965 00:35:09,860 --> 00:35:10,620 to figure it 966 00:35:10,620 --> 00:35:10,780 out. 967 00:35:10,840 --> 00:35:13,380 If it's in 968 00:35:13,380 --> 00:35:13,920 that raw socket 969 00:35:13,920 --> 00:35:14,220 mode, 970 00:35:14,480 --> 00:35:15,940 you can detect 971 00:35:15,940 --> 00:35:16,240 it. 972 00:35:17,700 --> 00:35:18,380 CyberX put out 973 00:35:18,380 --> 00:35:18,600 a script 974 00:35:18,600 --> 00:35:19,200 a few weeks 975 00:35:19,200 --> 00:35:19,420 ago, 976 00:35:19,480 --> 00:35:19,820 it's up on 977 00:35:19,820 --> 00:35:20,080 GitHub, 978 00:35:20,280 --> 00:35:21,160 where it'll 979 00:35:21,160 --> 00:35:21,480 send the 980 00:35:21,480 --> 00:35:21,860 SYN packet 981 00:35:23,300 --> 00:35:24,180 and it'll 982 00:35:24,180 --> 00:35:24,660 reach out 983 00:35:24,660 --> 00:35:25,180 to an IP 984 00:35:25,180 --> 00:35:25,800 that the 985 00:35:25,800 --> 00:35:26,260 script gives. 986 00:35:27,500 --> 00:35:27,940 Also, 987 00:35:28,000 --> 00:35:28,340 I think 988 00:35:28,340 --> 00:35:28,800 someone 989 00:35:30,980 --> 00:35:31,620 corrected me 990 00:35:31,620 --> 00:35:31,800 if I'm 991 00:35:31,800 --> 00:35:31,940 wrong, 992 00:35:32,540 --> 00:35:33,420 Symantec had 993 00:35:33,420 --> 00:35:33,940 a tool 994 00:35:36,080 --> 00:35:36,440 that would 995 00:35:36,440 --> 00:35:36,920 let you know 996 00:35:36,920 --> 00:35:37,180 if, 997 00:35:37,280 --> 00:35:37,980 I think it'd be 998 00:35:37,980 --> 00:35:38,180 a stage 999 00:35:38,180 --> 00:35:38,380 tune? 1000 00:35:41,100 --> 00:35:41,580 Or... 1001 00:35:45,920 --> 00:35:46,400 That's it? 1002 00:35:47,340 --> 00:35:47,900 All right, 1003 00:35:47,940 --> 00:35:48,020 well, 1004 00:35:48,120 --> 00:35:48,620 yes? 1005 00:35:48,820 --> 00:35:49,240 I mentioned 1006 00:35:49,240 --> 00:35:49,840 about the 1007 00:35:49,840 --> 00:35:50,240 module, 1008 00:35:50,480 --> 00:35:50,900 did you define 1009 00:35:50,900 --> 00:35:51,780 that destination 1010 00:35:51,780 --> 00:35:52,360 might be 1011 00:35:52,360 --> 00:35:53,440 configured at all 1012 00:35:53,440 --> 00:35:53,920 or you just 1013 00:35:53,920 --> 00:35:54,180 have the 1014 00:35:54,180 --> 00:35:54,420 module? 1015 00:35:54,700 --> 00:35:55,180 Just the 1016 00:35:55,180 --> 00:35:55,460 module. 1017 00:36:01,960 --> 00:36:02,620 If you 1018 00:36:02,620 --> 00:36:03,260 devices, 1019 00:36:03,800 --> 00:36:04,840 if you have 1020 00:36:04,840 --> 00:36:05,500 live devices 1021 00:36:05,500 --> 00:36:06,020 established 1022 00:36:06,700 --> 00:36:07,460 connection to 1023 00:36:07,460 --> 00:36:07,680 command and 1024 00:36:07,680 --> 00:36:07,920 control, 1025 00:36:08,720 --> 00:36:09,720 they just 1026 00:36:09,720 --> 00:36:10,520 never had that 1027 00:36:10,520 --> 00:36:11,020 module pushed 1028 00:36:11,020 --> 00:36:11,200 out. 1029 00:36:11,260 --> 00:36:11,660 So one of the 1030 00:36:11,660 --> 00:36:12,160 interesting things 1031 00:36:12,160 --> 00:36:12,420 about the 1032 00:36:12,420 --> 00:36:12,760 stage three 1033 00:36:12,760 --> 00:36:12,980 modules, 1034 00:36:13,660 --> 00:36:14,940 the device 1035 00:36:14,940 --> 00:36:15,280 has to be 1036 00:36:15,280 --> 00:36:16,140 tasked to 1037 00:36:16,140 --> 00:36:16,540 pull them 1038 00:36:16,540 --> 00:36:16,800 down. 1039 00:36:16,960 --> 00:36:17,560 There's no 1040 00:36:17,560 --> 00:36:18,140 list of 1041 00:36:18,140 --> 00:36:19,280 modules in 1042 00:36:19,280 --> 00:36:19,880 stage two 1043 00:36:19,880 --> 00:36:21,240 that it 1044 00:36:21,240 --> 00:36:21,560 knows, 1045 00:36:21,560 --> 00:36:22,200 you have to 1046 00:36:22,200 --> 00:36:22,560 know the 1047 00:36:22,560 --> 00:36:22,880 name of 1048 00:36:22,880 --> 00:36:23,220 the module, 1049 00:36:23,400 --> 00:36:24,160 the device has 1050 00:36:24,160 --> 00:36:24,640 to be told, 1051 00:36:24,700 --> 00:36:25,400 reach out and 1052 00:36:25,400 --> 00:36:26,280 get this 1053 00:36:26,280 --> 00:36:27,080 module and 1054 00:36:27,080 --> 00:36:27,300 then it will 1055 00:36:27,300 --> 00:36:27,780 reach out to 1056 00:36:27,780 --> 00:36:28,020 command and 1057 00:36:28,020 --> 00:36:28,240 control, 1058 00:36:28,640 --> 00:36:29,220 request the 1059 00:36:29,220 --> 00:36:29,480 module, 1060 00:36:29,720 --> 00:36:30,380 retrieve it 1061 00:36:30,380 --> 00:36:31,020 and execute 1062 00:36:31,020 --> 00:36:31,280 it. 1063 00:36:31,760 --> 00:36:33,660 So I'd 1064 00:36:33,660 --> 00:36:34,780 like to be able 1065 00:36:34,780 --> 00:36:35,000 to say, 1066 00:36:35,080 --> 00:36:35,640 I just 1067 00:36:35,640 --> 00:36:36,260 requested all 1068 00:36:36,260 --> 00:36:36,680 the modules 1069 00:36:36,680 --> 00:36:37,560 from command 1070 00:36:37,560 --> 00:36:37,840 and control, 1071 00:36:37,980 --> 00:36:38,620 but without 1072 00:36:38,620 --> 00:36:39,060 knowing the 1073 00:36:39,060 --> 00:36:39,380 names of 1074 00:36:39,380 --> 00:36:39,480 them. 1075 00:36:41,000 --> 00:36:41,740 They could have 1076 00:36:41,740 --> 00:36:42,100 had it and 1077 00:36:42,100 --> 00:36:42,720 we just never 1078 00:36:42,720 --> 00:36:43,120 saw it. 1079 00:36:44,000 --> 00:36:44,560 They were 1080 00:36:44,560 --> 00:36:45,120 selective about 1081 00:36:45,120 --> 00:36:45,400 what they 1082 00:36:45,400 --> 00:36:45,860 deployed and 1083 00:36:45,860 --> 00:36:46,080 where they 1084 00:36:46,080 --> 00:36:46,480 deployed it. 1085 00:36:47,860 --> 00:36:48,480 I saw 1086 00:36:48,480 --> 00:36:48,620 another 1087 00:36:48,620 --> 00:36:48,900 hand. 1088 00:36:54,580 --> 00:36:55,460 This module 1089 00:36:55,460 --> 00:36:55,780 did, 1090 00:36:55,840 --> 00:36:56,060 yes. 1091 00:37:04,800 --> 00:37:05,680 So this 1092 00:37:05,680 --> 00:37:06,380 specific 1093 00:37:06,380 --> 00:37:08,020 binary is 1094 00:37:08,560 --> 00:37:09,000 ELF 1095 00:37:09,000 --> 00:37:09,500 executable, 1096 00:37:09,560 --> 00:37:10,000 so Linux 1097 00:37:10,000 --> 00:37:10,520 executable, 1098 00:37:10,600 --> 00:37:11,420 and they 1099 00:37:11,420 --> 00:37:12,120 uploaded that 1100 00:37:12,820 --> 00:37:13,260 executable. 1101 00:37:13,520 --> 00:37:14,000 I wonder how 1102 00:37:14,000 --> 00:37:14,440 they got it. 1103 00:37:14,880 --> 00:37:15,540 You asked 1104 00:37:15,540 --> 00:37:15,920 if I was 1105 00:37:15,920 --> 00:37:16,080 still 1106 00:37:16,080 --> 00:37:16,380 able to 1107 00:37:16,380 --> 00:37:16,880 upload it? 1108 00:37:17,120 --> 00:37:19,420 I mean, 1109 00:37:19,440 --> 00:37:20,780 shoot me 1110 00:37:20,780 --> 00:37:21,000 a video. 1111 00:37:21,460 --> 00:37:21,900 Right. 1112 00:37:24,400 --> 00:37:25,180 I'm just 1113 00:37:25,180 --> 00:37:25,700 wondering how 1114 00:37:25,700 --> 00:37:26,240 they would 1115 00:37:26,240 --> 00:37:26,540 have got 1116 00:37:26,540 --> 00:37:26,720 it. 1117 00:37:26,960 --> 00:37:27,720 I would 1118 00:37:27,720 --> 00:37:28,120 love to 1119 00:37:28,120 --> 00:37:28,300 know. 1120 00:37:28,520 --> 00:37:29,100 I would 1121 00:37:29,100 --> 00:37:29,280 love to 1122 00:37:29,280 --> 00:37:29,520 know who 1123 00:37:29,520 --> 00:37:30,080 uploaded it. 1124 00:37:38,020 --> 00:37:38,300 I feel like 1125 00:37:38,300 --> 00:37:39,220 our 600s 1126 00:37:39,220 --> 00:37:40,060 had basically 1127 00:37:40,060 --> 00:37:41,280 a backdoor 1128 00:37:41,280 --> 00:37:42,120 web shell 1129 00:37:42,120 --> 00:37:43,120 that was 1130 00:37:43,120 --> 00:37:43,360 known, 1131 00:37:43,480 --> 00:37:45,300 so somebody 1132 00:37:45,300 --> 00:37:45,580 could have 1133 00:37:45,580 --> 00:37:46,660 used that 1134 00:37:46,660 --> 00:37:47,160 and saw 1135 00:37:47,160 --> 00:37:47,500 that they 1136 00:37:47,500 --> 00:37:47,880 were in fact 1137 00:37:47,880 --> 00:37:48,280 pulled it 1138 00:37:48,280 --> 00:37:48,520 off and 1139 00:37:48,520 --> 00:37:49,000 uploaded it. 1140 00:37:49,100 --> 00:37:49,640 The actor 1141 00:37:49,640 --> 00:37:49,900 may have 1142 00:37:49,900 --> 00:37:50,480 uploaded it. 1143 00:37:51,620 --> 00:37:52,380 Some people 1144 00:37:52,380 --> 00:37:52,740 will trade 1145 00:37:52,740 --> 00:37:53,320 graphics a 1146 00:37:53,320 --> 00:37:53,440 little. 1147 00:37:54,220 --> 00:37:54,680 Everybody's 1148 00:37:54,680 --> 00:37:54,900 been known 1149 00:37:54,900 --> 00:37:55,100 to make 1150 00:37:55,100 --> 00:37:55,400 mistakes. 1151 00:37:55,820 --> 00:37:56,520 So maybe 1152 00:37:56,520 --> 00:37:56,660 they, 1153 00:37:56,820 --> 00:37:57,700 other than 1154 00:38:08,020 --> 00:38:08,120 me, 1155 00:38:12,460 --> 00:38:13,340 I don't 1156 00:38:13,340 --> 00:38:13,620 know. 1157 00:38:14,160 --> 00:38:14,440 I would 1158 00:38:14,440 --> 00:38:14,820 love to 1159 00:38:15,640 --> 00:38:16,520 hear ideas 1160 00:38:16,520 --> 00:38:17,100 and scenarios 1161 00:38:17,100 --> 00:38:17,420 for, 1162 00:38:18,000 --> 00:38:18,720 and this 1163 00:38:18,720 --> 00:38:18,980 is just 1164 00:38:18,980 --> 00:38:19,480 one of 1165 00:38:20,260 --> 00:38:20,700 countless 1166 00:38:20,700 --> 00:38:21,460 modules, 1167 00:38:21,700 --> 00:38:23,500 so we 1168 00:38:23,500 --> 00:38:24,140 know how 1169 00:38:24,140 --> 00:38:24,540 many we've 1170 00:38:24,540 --> 00:38:24,780 seen, 1171 00:38:24,880 --> 00:38:25,720 but theoretically 1172 00:38:27,600 --> 00:38:28,160 it's up 1173 00:38:28,160 --> 00:38:28,360 to the 1174 00:38:28,360 --> 00:38:28,620 actor. 1175 00:38:28,660 --> 00:38:28,840 They can 1176 00:38:28,840 --> 00:38:29,140 just write 1177 00:38:29,140 --> 00:38:29,320 it in 1178 00:38:29,320 --> 00:38:29,600 the file 1179 00:38:29,600 --> 00:38:29,880 and push 1180 00:38:29,880 --> 00:38:30,140 it out 1181 00:38:30,140 --> 00:38:30,800 because 1182 00:38:30,800 --> 00:38:31,000 they're 1183 00:38:31,460 --> 00:38:32,180 plug-ins. 1184 00:38:38,020 --> 00:38:38,500 mentioned it 1185 00:38:38,500 --> 00:38:38,780 or not. 1186 00:38:39,660 --> 00:38:40,100 Yeah, 1187 00:38:40,200 --> 00:38:41,140 so there is, 1188 00:38:41,160 --> 00:38:41,520 it's in 1189 00:38:41,520 --> 00:38:41,780 the wrong 1190 00:38:41,780 --> 00:38:42,100 possible 1191 00:38:42,100 --> 00:38:42,520 that the 1192 00:38:42,520 --> 00:38:43,040 actor put 1193 00:38:43,040 --> 00:38:43,380 that in 1194 00:38:43,380 --> 00:38:43,800 there to 1195 00:38:43,800 --> 00:38:44,660 kind of 1196 00:38:44,660 --> 00:38:44,960 distract 1197 00:38:44,960 --> 00:38:45,260 you. 1198 00:38:45,380 --> 00:38:45,660 Like, 1199 00:38:45,700 --> 00:38:46,240 oh shit, 1200 00:38:46,320 --> 00:38:46,460 they're 1201 00:38:46,460 --> 00:38:46,780 looking for 1202 00:38:46,780 --> 00:38:47,140 ModBus. 1203 00:38:47,540 --> 00:38:47,980 Yeah, 1204 00:38:49,060 --> 00:38:49,280 exactly. 1205 00:38:50,320 --> 00:38:50,760 Right. 1206 00:38:53,160 --> 00:38:54,040 Were they 1207 00:38:54,040 --> 00:38:54,160 really 1208 00:38:54,160 --> 00:38:54,540 looking at 1209 00:38:54,540 --> 00:38:54,880 ModBus 1210 00:38:54,880 --> 00:38:55,100 or did 1211 00:38:55,100 --> 00:38:55,300 they want 1212 00:39:09,760 --> 00:39:10,160 ModBus? 1213 00:39:10,340 --> 00:39:10,560 I mean, 1214 00:39:10,620 --> 00:39:11,440 if you're, 1215 00:39:11,520 --> 00:39:11,960 if you have 1216 00:39:11,960 --> 00:39:12,640 a paid account 1217 00:39:12,640 --> 00:39:12,780 of 1218 00:39:12,780 --> 00:39:12,940 total 1219 00:39:12,940 --> 00:39:13,580 UMX 1220 00:39:13,580 --> 00:39:13,860 and all 1221 00:39:13,860 --> 00:39:14,220 that stuff, 1222 00:39:14,400 --> 00:39:15,220 so anybody 1223 00:39:15,220 --> 00:39:15,580 in this 1224 00:39:15,580 --> 00:39:15,780 room 1225 00:39:15,780 --> 00:39:16,320 could 1226 00:39:16,760 --> 00:39:17,160 search. 1227 00:39:21,760 --> 00:39:22,160 So, 1228 00:39:22,720 --> 00:39:23,260 Talos is 1229 00:39:23,260 --> 00:39:23,800 working with 1230 00:39:24,460 --> 00:39:24,860 several 1231 00:39:24,860 --> 00:39:25,220 partners 1232 00:39:25,220 --> 00:39:25,840 external 1233 00:39:25,840 --> 00:39:26,360 to Talos 1234 00:39:26,360 --> 00:39:27,160 and that's 1235 00:39:27,160 --> 00:39:27,540 one of those 1236 00:39:27,540 --> 00:39:27,940 things that 1237 00:39:27,940 --> 00:39:28,480 I'm not 1238 00:39:28,480 --> 00:39:28,660 going to 1239 00:39:28,660 --> 00:39:28,960 get into. 1240 00:39:29,380 --> 00:39:29,780 So, 1241 00:39:29,920 --> 00:39:30,380 but the 1242 00:39:30,380 --> 00:39:30,640 Talos, 1243 00:39:30,680 --> 00:39:31,540 the blog post 1244 00:39:31,540 --> 00:39:31,940 that initially 1245 00:39:31,940 --> 00:39:32,780 disclosed this 1246 00:39:33,360 --> 00:39:34,260 will tell you 1247 00:39:34,260 --> 00:39:34,860 as much as 1248 00:39:34,860 --> 00:39:35,320 we're 1249 00:39:35,320 --> 00:39:36,020 comfortable 1250 00:39:36,020 --> 00:39:36,420 releasing. 1251 00:39:36,720 --> 00:39:37,380 But we work 1252 00:39:37,380 --> 00:39:37,700 with people 1253 00:39:37,700 --> 00:39:38,180 outside of 1254 00:39:38,180 --> 00:39:38,460 Talos. 1255 00:39:42,100 --> 00:39:42,500 So, 1256 00:39:42,540 --> 00:39:42,820 if you have 1257 00:39:42,820 --> 00:39:42,920 any, 1258 00:39:43,060 --> 00:39:43,240 okay, 1259 00:39:44,260 --> 00:39:44,660 sure. 1260 00:39:51,080 --> 00:39:51,880 I don't 1261 00:39:51,880 --> 00:39:52,060 remember, 1262 00:39:52,100 --> 00:39:52,200 do you 1263 00:39:52,200 --> 00:39:52,260 remember 1264 00:39:52,260 --> 00:39:52,640 the VPN 1265 00:39:52,640 --> 00:39:53,020 function 1266 00:39:53,020 --> 00:39:53,380 in that? 1267 00:39:53,520 --> 00:39:54,040 I don't 1268 00:39:54,040 --> 00:39:54,260 remember. 1269 00:39:54,260 --> 00:39:54,900 I'm pretty sure 1270 00:39:54,900 --> 00:39:55,160 it was just 1271 00:39:55,160 --> 00:39:55,760 using OpenVPN. 1272 00:39:56,020 --> 00:39:56,240 Yeah. 1273 00:39:56,420 --> 00:39:57,380 It was BusyBox 1274 00:39:57,380 --> 00:39:58,580 and OpenSSL 1275 00:39:58,580 --> 00:39:59,120 and OpenVPN 1276 00:39:59,120 --> 00:39:59,680 were the, 1277 00:40:00,240 --> 00:40:00,900 pretty sure. 1278 00:40:01,160 --> 00:40:01,760 I can double 1279 00:40:01,760 --> 00:40:02,020 check, 1280 00:40:02,180 --> 00:40:02,460 but, 1281 00:40:03,920 --> 00:40:04,660 but if anybody 1282 00:40:04,660 --> 00:40:05,180 has any other 1283 00:40:05,180 --> 00:40:06,040 questions or 1284 00:40:06,040 --> 00:40:06,540 follow ups, 1285 00:40:07,240 --> 00:40:07,920 you can just 1286 00:40:07,920 --> 00:40:08,220 hit me or 1287 00:40:08,220 --> 00:40:08,720 Carlos up 1288 00:40:08,720 --> 00:40:09,220 here or 1289 00:40:09,220 --> 00:40:10,040 afterwards. 1290 00:40:12,640 --> 00:40:13,080 I 1291 00:40:13,080 --> 00:40:13,300 I 1292 00:40:13,300 --> 00:40:13,640 I 1293 00:40:13,640 --> 00:40:13,860 I 1294 00:40:13,860 --> 00:40:14,040 I 1295 00:40:14,040 --> 00:40:14,200 I 1296 00:40:14,200 --> 00:40:14,320 I 1297 00:40:14,320 --> 00:40:14,340 I 1298 00:40:14,340 --> 00:40:15,080 I 1299 00:40:24,320 --> 00:40:24,720 I 1300 00:40:33,740 --> 00:40:34,140 I 1301 00:40:38,380 --> 00:40:38,780 I 1302 00:40:38,780 --> 00:40:38,860 I 1303 00:40:38,860 --> 00:40:39,300 I 1304 00:40:39,300 --> 00:40:39,500 I 1305 00:40:39,500 --> 00:40:39,620 I 1306 00:40:40,260 --> 00:40:40,660 I 1307 00:40:40,660 --> 00:40:40,760 I 1308 00:40:40,760 --> 00:40:40,900 I 1309 00:40:40,900 --> 00:40:40,960 I 1310 00:40:43,440 --> 00:40:43,840 I 1311 00:40:43,840 --> 00:40:43,860 I 1312 00:40:43,860 --> 00:40:43,880 I 1313 00:40:43,880 --> 00:40:44,120 I 1314 00:40:53,760 --> 00:40:54,160 I 1315 00:40:54,160 --> 00:40:54,180 I 1316 00:40:54,980 --> 00:40:56,600 We think there's a couple, yeah. 1317 00:40:58,440 --> 00:41:02,540 So it can take three parameters or arguments, 1318 00:41:02,720 --> 00:41:04,040 but it only takes two. 1319 00:41:04,180 --> 00:41:05,460 So what's the third? 1320 00:41:05,600 --> 00:41:06,380 What are they off by one? 1321 00:41:07,820 --> 00:41:08,640 What was the other? 1322 00:41:08,800 --> 00:41:11,340 So it'll accept, it'll log the traffic. 1323 00:41:11,400 --> 00:41:13,620 It said if it has HTTP basic authorization 1324 00:41:14,140 --> 00:41:16,280 or a username and password combination. 1325 00:41:16,580 --> 00:41:19,620 But if both are present, it ignores it. 1326 00:41:20,260 --> 00:41:21,760 So, I mean, there were a few things where 1327 00:41:23,160 --> 00:41:24,940 my theory was that they were eliminating 1328 00:41:24,940 --> 00:41:26,180 as much noise as possible. 1329 00:41:26,500 --> 00:41:28,380 Because if you start logging everything that matches 1330 00:41:28,380 --> 00:41:31,080 HTTP basic auth and everything that matches Modbus, 1331 00:41:31,260 --> 00:41:32,380 the device is going to fill up 1332 00:41:32,380 --> 00:41:33,300 and you're going to have a break. 1333 00:41:34,060 --> 00:41:36,100 So they wanted to filter out everything 1334 00:41:36,100 --> 00:41:38,380 except what they were specifically looking for. 1335 00:41:38,520 --> 00:41:40,140 That's just my theory. 1336 00:41:40,920 --> 00:41:42,700 And, yeah, I think there's a couple of mistakes. 1337 00:41:46,120 --> 00:41:46,980 All right, thank you. 1338 00:41:47,340 --> 00:41:47,960 Appreciate it. 1339 00:41:48,200 --> 00:41:48,600 Thank you. 1340 00:41:51,760 --> 00:41:51,960 Thank you.