1 00:00:00,000 --> 00:00:04,440 Let's give Andrew a big round of applause and welcome him to the DEF CON stage. 2 00:00:09,200 --> 00:00:10,340 Thank you. 3 00:00:10,800 --> 00:00:11,880 Thanks so much. 4 00:00:11,880 --> 00:00:12,440 Wow. 5 00:00:12,440 --> 00:00:14,960 Yeah, not a lot of interest in this talk I can tell. 6 00:00:14,960 --> 00:00:16,400 I'm Andrew Brandt. 7 00:00:17,280 --> 00:00:28,800 Firewalls under fire, it's the story of a five-year campaign by threat actors who attack firewalls in order to access the customers and the networks that those firewalls protect. 8 00:00:29,460 --> 00:00:34,000 So this talk is perhaps a little less technical than you might expect from a DEF CON talk. 9 00:00:34,000 --> 00:00:38,300 But telling the story and its aftermath is a big part of this research. 10 00:00:38,480 --> 00:00:40,340 But keep your phone cameras handy. 11 00:00:40,780 --> 00:00:49,560 Where there's relevant research, and I wrote most of it for Sophos when I was there, I've put in QR codes that link to that. 12 00:00:49,560 --> 00:00:51,920 So no Rickrolls, I promise. 13 00:00:52,480 --> 00:00:54,380 A little bit about myself. 14 00:00:54,380 --> 00:00:56,480 So I do a lot of things. 15 00:00:56,580 --> 00:01:01,220 Today I work as the principal threat researcher for a company called Netcraft. 16 00:01:01,340 --> 00:01:07,600 But through the time frame of this research, I was doing that role at Sophos. 17 00:01:07,720 --> 00:01:10,980 I'm also helping out at Malware Village downstairs. 18 00:01:10,980 --> 00:01:18,900 So please drop in if you are interested in watching talks or doing workshops on learning how to do malware analysis. 19 00:01:19,140 --> 00:01:21,020 And I'm doing a lot of other side projects. 20 00:01:21,020 --> 00:01:22,660 I do tech policy. 21 00:01:22,740 --> 00:01:29,440 I recruit and train candidates for elected office through an organization I run called Elect More Hackers. 22 00:01:29,460 --> 00:01:40,860 And I maintain retrocomputing gear for the largest retrocomputing museum in North America at the University of Colorado Boulder called the Media Archeology Lab. 23 00:01:41,560 --> 00:01:47,820 So a little bit about the context of where XOPS is in the big scheme of Sophos. 24 00:01:48,100 --> 00:01:52,200 So this was the team I was the first member of at Sophos. 25 00:01:52,400 --> 00:02:02,160 It serves as a connection hub between teams that do malware research, EDR, MDR, incident response and security operations. 26 00:02:02,160 --> 00:02:09,580 So because it sits at the intersection of all of these groups, it acts as sort of internal threat intel fusion center. 27 00:02:10,660 --> 00:02:15,240 And it's always good to know a little bit about who's who in a story. 28 00:02:15,260 --> 00:02:17,080 So here's your play bill. 29 00:02:17,380 --> 00:02:23,240 Of course there's Sophos, but the rest of the security industry plays a supporting role as well. 30 00:02:23,260 --> 00:02:34,100 On the adversary list, there are several individuals, a few companies and a university based in Chengdu, the capital of China's central province of Sichuan. 31 00:02:34,100 --> 00:02:42,120 And of course one of the big players is this guy, the XG firewall as well as a few other firewalls. 32 00:02:42,680 --> 00:02:50,660 So the attacks that this research covers encompass what I call three phases or epics of activity. 33 00:02:50,660 --> 00:02:57,360 Beginning as far back as 2018 when Sophos itself was a victim of a cyber intrusion. 34 00:02:57,360 --> 00:03:07,520 The second phase begins in 2020 when a series of public attacks induces Sophos to tell the world about what they knew about what was happening. 35 00:03:07,780 --> 00:03:18,000 And then finally, the attacks enter a third phase in which threat actors didn't make big public splashes but targeted just a few customers at a time. 36 00:03:18,000 --> 00:03:23,300 By then, the attackers knew who they wanted and what they were looking for. 37 00:03:23,680 --> 00:03:33,120 And even though Sophos published this information last Halloween, it's important to note that attacks like these have not stopped. 38 00:03:33,120 --> 00:03:38,460 They continue against every major firewall vendor even today. 39 00:03:39,500 --> 00:03:47,440 So a big part of Sophos' response to these attacks was to reveal what the company knew as quickly as possible. 40 00:03:47,540 --> 00:04:00,520 We call this radical transparency and we believe it's just a natural good for the industry to talk about what's gone wrong because if you don't talk about what's gone wrong, you can't learn from it and fix it. 41 00:04:00,700 --> 00:04:15,680 So beginning with the first big public attack, nicknamed ASNAROC, EXOPS published five major reports that went into extraordinary detail about the methods, tooling and to the extent possible, the targeting used by the attackers. 42 00:04:15,780 --> 00:04:20,660 Each of these describes one or more CVEs and how the attackers used them. 43 00:04:20,660 --> 00:04:25,500 And then finally Pacific Rim ties them all together and contextualizes them. 44 00:04:26,380 --> 00:04:38,720 So Sophos called the attack campaign Pacific Rim and part of the reason for that was practical because a lot of the targeted attacks hit organizations in the Asia Pacific region. 45 00:04:38,720 --> 00:04:47,220 And part of it was also based on these code names that you see that security operations folks gave and assigned to each successive attack. 46 00:04:47,220 --> 00:04:55,820 Each of which referenced a part of the world sometimes known as the ring of fire where tectonic plates meet and earthquakes and volcanoes often form. 47 00:04:56,500 --> 00:05:01,020 So let's start at the very beginning with an attack called Cloud Snooper. 48 00:05:01,020 --> 00:05:03,740 And to start, I want to highlight this diagram. 49 00:05:03,740 --> 00:05:05,760 It's the coolest one I've ever seen. 50 00:05:05,760 --> 00:05:10,600 It was created by one of Sophos' senior threat analysts, Sergei Shevchenko. 51 00:05:10,700 --> 00:05:27,860 It describes an attack against an Amazon AWS cloud server using tooling that gives the attackers an ability to covertly steal information and to exfiltrate it, piggybacked on what looks like to a normal web application firewall as regular web traffic. 52 00:05:28,060 --> 00:05:35,520 The attackers managed to plant a root kit and a tool that inspects inbound packets onto this cloud server. 53 00:05:35,700 --> 00:05:50,940 When a correctly crafted packet arrives, like the wolf in sheep's clothing at the bottom left, it enters the compromised server, steals data and then retransmits the stolen data right through the same TCP connection that the packet used to enter the server, 54 00:05:50,940 --> 00:05:54,260 the web application firewall never knowing the difference. 55 00:05:54,740 --> 00:06:01,480 So the story begins, as many good stories do, with some weird stuff going on in a sales department. 56 00:06:01,980 --> 00:06:12,780 Sophos had recently acquired a company in India called CyberRoam whose technology would eventually become the Sophos SFOS, the operating system underlying the firewall. 57 00:06:13,440 --> 00:06:20,080 While still onboarding the new company, Sophos Security Operations discovers a device scanning the internal network. 58 00:06:20,120 --> 00:06:29,860 It turns out to be a small computer, like the one shown here, attached to the back of a TV monitor that displays a sales team leader board in their bullpen. 59 00:06:30,160 --> 00:06:41,560 So digging deeper, SecOps discovers that this computer contains malware, such as ghost rat, utilities to probe the internal network and a very unusual connection to a cloud server. 60 00:06:42,700 --> 00:07:01,620 Following this bread crumb trail, leading from the compromised computer, the security team discovers the connection to a server the CyberRoam team uses for storing sensitive information, which leads them to discover the root kit and its payload, which named itself the not at all suspicious name Snoopy. 61 00:07:01,620 --> 00:07:06,640 Snoopy is the deep packet inspection engine that enables the cloud Snoopy to work. 62 00:07:06,640 --> 00:07:14,340 It does this by doing something incredibly simple, watching for specific source port numbers of inbound packets. 63 00:07:14,460 --> 00:07:24,080 So source ports and TCP connections, most of you probably know, are usually ephemeral, meaning they can be completely random and they usually have no significance. 64 00:07:24,080 --> 00:07:29,660 But in this case, the source port is the coded instruction for Snoopy. 65 00:07:29,660 --> 00:07:33,620 So as I mentioned, the tool steals information. 66 00:07:33,820 --> 00:07:40,620 But Sergey and another analyst, Tim Easton, discovered that the Snoopy tool seems to be a work in progress. 67 00:07:40,620 --> 00:07:42,600 It has some broken functions. 68 00:07:42,600 --> 00:07:47,040 But more importantly, it isn't the only thing the team finds. 69 00:07:47,040 --> 00:07:53,380 Between the cloud server and the machine in the Sophos office, analysts find at least 11 different malware. 70 00:07:53,380 --> 00:08:03,340 Oddly, one of them is a DLL meant to run on Windows computers, even though both the cloud server and the box that was connected to the leaderboard TV run Linux. 71 00:08:04,200 --> 00:08:12,520 When the team disassembles the Snoopy tool, they discover that it helpfully prints out all sorts of useful debug messages in Chinese. 72 00:08:12,620 --> 00:08:23,020 And although the tool encrypts its C2 traffic, part of the method that it uses to perform that encryption involves hashing the value of the phrase, replace with your password. 73 00:08:23,160 --> 00:08:30,880 And the C2s that Snoopy communicates with seem to be named as a reference to the country TLD for Nepal. 74 00:08:30,880 --> 00:08:34,780 A country we know China is, has particular interest in. 75 00:08:34,780 --> 00:08:39,740 And a weirdly specific collegiate activity. 76 00:08:40,240 --> 00:08:42,000 College smooch. 77 00:08:43,620 --> 00:08:46,480 Sophos doesn't initially disclose this attack. 78 00:08:46,480 --> 00:08:56,220 About 18 months after I joined the company, Sergey brings me a write-up that describes a really interesting targeted attack that's very complex but actually doesn't tell me the target. 79 00:08:56,220 --> 00:09:05,380 I edit the piece, produce it for the blog, Sophos publishes it and it all happens just before the COVID pandemic changes everything in the world. 80 00:09:05,700 --> 00:09:12,540 Which then leads us directly into the beginning of the mass attack phase of the Pacific Rim campaign. 81 00:09:12,540 --> 00:09:19,860 Where instead of attacking Sophos itself, an unknown adversary begins to target Sophos firewalls everywhere. 82 00:09:19,960 --> 00:09:30,980 And it begins when a customer calls tech support and sends Sophos this screen shot that shows something unexpected inside their Sophos XG firewall user interface. 83 00:09:31,120 --> 00:09:38,840 The text in the box that's highlighted here normally should contain an address of a machine used to remotely manage the firewall. 84 00:09:38,840 --> 00:09:50,960 But as you can see, the box contains what looks like Linux commands to change the working directory to temp and then to retrieve something from a URL that begins with Sophos firewall update dot com. 85 00:09:51,540 --> 00:09:55,760 So this begins the attack that I named Asnorock. 86 00:09:55,760 --> 00:10:12,680 And after the initial response to nail down the attack, a postmortem analysis reveals that in fact, Sophos had been given the precise attack method one day before the attack began as a bug bounty. 87 00:10:12,740 --> 00:10:17,080 Seems like they wanted to get paid before someone launched the attack. 88 00:10:17,300 --> 00:10:31,580 So as the security operations and the engineering teams worked to devise a solution, which does receive its bounty by the way, an unknown attacker begins exploiting the bug to strike every Sophos firewall that they could find facing the public Internet. 89 00:10:31,980 --> 00:10:36,760 So that same day, I'm asked to help Sophos communicate the attack to the world. 90 00:10:36,760 --> 00:10:44,800 And three days after the attack begins, XOPS publishes the first of two blog posts linked here to describe the attack in detail. 91 00:10:45,280 --> 00:10:52,060 So I can't go into all of the attack detail of Asnorock because there's so much. 92 00:10:52,060 --> 00:10:56,900 But the attacker's little personal details and touches stood out to me. 93 00:10:56,900 --> 00:11:03,260 For one thing, they go to the trouble to register domains with Sophos in the name just before the attack. 94 00:11:03,260 --> 00:11:09,860 Then they use those domains to launch the attack, which is a SQL injection vulnerability to execute arbitrary code. 95 00:11:09,960 --> 00:11:15,260 That code downloads and runs a Linux script that changes the internal workings of the firewall. 96 00:11:15,260 --> 00:11:23,780 It also drops a payload called to own that steals local configuration data and stores it in a file called info dot XG. 97 00:11:23,880 --> 00:11:31,340 The attacker is either some kind of fashionista or reads urban dictionary because they encrypt the data with the password Gucci. 98 00:11:31,340 --> 00:11:34,020 As in, no problem dog, it's all Gucci. 99 00:11:35,080 --> 00:11:42,300 Sophos firewalls also have this ability to automatically apply small updates or fixes without user intervention. 100 00:11:42,300 --> 00:11:43,980 They get the name hot fix. 101 00:11:43,980 --> 00:11:49,860 A hot fix can also clean up files left behind after an update or anything else. 102 00:11:49,860 --> 00:11:54,520 So one thing I hadn't seen before was this thing called a dead man switch. 103 00:11:54,520 --> 00:12:00,720 The attacker dropped a completely empty file into the firewall and then monitored it. 104 00:12:00,720 --> 00:12:26,000 And if some process like a hot fix deletes that file, it triggered an action by calling a different URL, Ragnarok from Asgard, which is either a hat tip to Norse mythology or more likely a reference to the sequence of events that led to the destruction of the home city of both Marvel's supervillain Loki and his brother Thor, 105 00:12:26,000 --> 00:12:34,040 the legendary city of the Norse gods as depicted in the movie Thor Ragnarok, except this was a Ragnarok from Asgard. 106 00:12:34,040 --> 00:12:35,560 That was kind of weird. 107 00:12:36,180 --> 00:12:44,000 This Ragnarok in this case is a ransomware attack against any Windows computers on the land side of the firewall. 108 00:12:44,000 --> 00:12:46,540 So literally that's the ransomware's name. 109 00:12:46,540 --> 00:12:47,600 Ragnarok. 110 00:12:47,600 --> 00:12:59,800 The attack would leverage eternal blue and double pulsar to deploy a ransomware executable which the attackers ironically and probably not coincidentally named hot fix. 111 00:13:00,100 --> 00:13:11,680 And by the way, just a few months before Asnarok, an attack involving Citrix ADC servers deploys the same ransomware using almost the same method. 112 00:13:12,320 --> 00:13:20,000 Now, most ransomware of this era has a built‑in safety to prevent the creator or operator accidentally nuking their laptop. 113 00:13:20,020 --> 00:13:27,220 The safety usually prevents the ransomware from running if the computer's localization settings are set to Russian. 114 00:13:27,280 --> 00:13:32,620 This is the first ransomware I had seen that had added Chinese to this safety measure. 115 00:13:33,340 --> 00:13:48,920 Now, the good news is that the eternal blue and double pulsar exploit combo that they used only worked well against Windows 7 computers of which there were a diminishing number still running as Windows 7 end of life was in January of that year. 116 00:13:49,040 --> 00:13:52,860 And Windows update inoculated newer OSes against it. 117 00:13:52,920 --> 00:13:56,900 So the ransomware didn't ever execute as far as we could tell. 118 00:13:57,160 --> 00:14:03,160 The ransom note Ragnarok would drop had it executed called itself very hot fix. 119 00:14:03,600 --> 00:14:05,340 Okay, Ragnarok master, we get it. 120 00:14:05,340 --> 00:14:09,020 You know what Sophos calls its firewall patches and you're big on puns. 121 00:14:09,020 --> 00:14:10,440 Yuck, yuck, yuck. 122 00:14:11,220 --> 00:14:16,360 So Sophos gets its first big break just a week and a half after Asnarok hits. 123 00:14:16,440 --> 00:14:25,780 The Ragnarok from Asgard domain was hosted on a server in the Netherlands and the Dutch seized not only the domain but the physical server that the attackers controlled. 124 00:14:26,140 --> 00:14:33,420 Sophos asked to transfer the domain to them and they set it up as a sinkhole where they could host it and monitor everything that connects into it. 125 00:14:33,420 --> 00:14:35,620 That revealed something very interesting. 126 00:14:35,680 --> 00:14:50,280 Based on the user agent strings and other fingerprinting of those inbound connections, Sophos discovers that a bunch of different small business and home routers and firewalls of different models from different manufacturers were all connecting to this website. 127 00:14:51,220 --> 00:14:56,300 So it was at this point that Sophos decides it's time to strike back. 128 00:14:56,300 --> 00:15:03,980 So security operations engineers a tool that they call the implant or just the kernel implant. 129 00:15:03,980 --> 00:15:10,560 It's designed to retrieve logs and files that unexpectedly drop into the firewall's file system. 130 00:15:10,560 --> 00:15:11,660 And it's stealthy. 131 00:15:11,660 --> 00:15:15,040 It doesn't appear on the list of running processes. 132 00:15:15,920 --> 00:15:19,860 Only firewalls that pique the team's interest get the implant. 133 00:15:19,860 --> 00:15:41,800 For instance, just hypothetically, if you happen to register a new firewall to a free web mail account on 163.com and it connects back to Sophos from an IP address range that maps to central China, it might get someone's attention not like anything like that would ever happen . 134 00:15:42,080 --> 00:15:48,180 So security operations starts to take a closer look at some of these suspicious firewalls. 135 00:15:48,180 --> 00:15:53,440 The implant gives Sophos the ability to virtually look over the attacker's shoulder as they're working. 136 00:15:53,440 --> 00:16:04,020 When the company could deploy hot fixes to every other ‑‑ every firewall in the world other than the ones that the attackers were using. 137 00:16:04,300 --> 00:16:10,780 And they figure out, for instance, which firewall was the first one to deploy the ASNAROC exploit. 138 00:16:10,800 --> 00:16:21,080 The initial deployment happens weeks before the bug bounty and the start of the big ASNAROC attack so they drop the implant on that machine first and it immediately pays off. 139 00:16:21,080 --> 00:16:30,180 They discover new exploitable vulnerabilities the attacker is testing and then tests and samples of malicious code that the exploits are meant to deliver. 140 00:16:30,880 --> 00:16:32,960 So summer 2020 rolls around. 141 00:16:32,960 --> 00:16:34,420 Take yourself back. 142 00:16:34,420 --> 00:16:39,580 We're all locked down in our homes trying to find a way to enjoy socializing over Zoom. 143 00:16:39,580 --> 00:16:42,240 But another mass attack begins. 144 00:16:42,620 --> 00:16:47,140 The official name for this attack is the bookmark feature buffer overflow. 145 00:16:47,140 --> 00:16:48,380 Too long. 146 00:16:48,380 --> 00:16:51,000 Sophos nicknames the attack Baha. 147 00:16:51,000 --> 00:16:52,760 And Baha is pretty unique. 148 00:16:52,760 --> 00:17:03,860 Unlike with ASNAROC, Sophos sees a variety of payloads, new capabilities like the ability to wipe whole logs or delete individual lines from the logs. 149 00:17:04,420 --> 00:17:16,280 Attackers begin to experiment with targeting specific firewalls and by now they have apparently reverse engineered the ASNAROC hot fix repairs and found a workaround for that, too, so they're doing that again. 150 00:17:16,380 --> 00:17:23,720 A telemetry hunt reveals that this new exploit, new, was being tested before ASNAROC. 151 00:17:23,720 --> 00:17:41,080 And by this point, Sophos has gotten really good at deploying hot fixes, patching nearly all devices, but there are still a few zombie firewalls abandoned running in some closet somewhere whose admins aren't responding to e‑mails or phone calls. 152 00:17:41,160 --> 00:17:52,220 And dealing with this digital detritus, the bare metal equivalent of abandoned ware becomes a burdensome chore because the attackers start taking advantage of those machines. 153 00:17:53,300 --> 00:18:07,320 So one of the threat hunts points to not just one but a whole cluster of firewalls, some virtual machines, some bare metal, but all of which are set up, and this is the scientific technical term, weird. 154 00:18:07,320 --> 00:18:24,080 They also appear to have been registered with non‑corporate e‑mail accounts and normally firewalls are there to protect devices inside a LAN, but in many cases with these devices there was no LAN or anything resembling a real network. 155 00:18:24,260 --> 00:18:30,080 Most of the devices were registered to someone whose e‑mail address begins with GBIGMAO. 156 00:18:30,080 --> 00:18:37,320 I did a search for a GBIGMAO and I did find this 120‑foot tall statue that was built in Henan province a few years ago. 157 00:18:37,320 --> 00:18:43,500 I also found a quote from the dean of the China's Mao Zedong research center. 158 00:18:43,500 --> 00:18:51,620 He said to the Guardian newspaper, in contemporary China Mao Zedong represents the embodiment of fairness and justice. 159 00:18:52,000 --> 00:18:56,760 Which seems pretty ironic given what this GBIGMAO was doing. 160 00:18:56,780 --> 00:19:04,220 Is it the embodiment of fairness or justice to engage in the online equivalent of a smash and grab burglary? 161 00:19:05,140 --> 00:19:15,300 So as these hunts continue and the team finds more devices that seem like they are being used as exploit development platforms, they start to notice some odd behavior. 162 00:19:15,540 --> 00:19:25,920 One of the bare metal firewalls they are watching had previously been purchased by a professor at USC, a techie university in, you guessed it, Chengdu. 163 00:19:25,920 --> 00:19:32,980 This box seems to be checking into SOPHOS from IP addresses in more than one far‑flung location. 164 00:19:33,080 --> 00:19:40,640 Seeming to bounce back and forth instantly between Chengdu and Hong Kong 1,400 kilometers away. 165 00:19:40,640 --> 00:19:45,020 Now I'm pretty sure that they haven't invented a Star Trek transporter. 166 00:19:45,020 --> 00:19:51,180 So it looks like this person is experimenting using a network that's intermittently connected to a VPN. 167 00:19:51,600 --> 00:19:59,480 And one of the email addresses used to register some of the cluster starts with T Stark. 168 00:19:59,820 --> 00:20:00,920 So wait, Tony Stark? 169 00:20:00,920 --> 00:20:08,520 This guy puts himself on par with the billionaire industrialist who invented Iron Man and went on to become a Marvel superhero as his hacker handle? 170 00:20:08,520 --> 00:20:09,960 Stay humble, bro. 171 00:20:10,220 --> 00:20:17,080 At this point you have to wonder if these threat actors are more in danger from the FBI or Disney's IP lawyers. 172 00:20:17,800 --> 00:20:20,120 But T Stark is no slacker. 173 00:20:20,120 --> 00:20:25,920 The SOPHOS implant discovers a copy of the root kit on one of the firewalls he controls. 174 00:20:25,920 --> 00:20:39,980 Again, the SOPHOS team rapidly rolls out hot fixes that will prevent the root kit from running on any firewall but doesn't roll them out to the growing number of firewalls the team assumes is under hostile control. 175 00:20:39,980 --> 00:20:44,560 It seems to work because nobody ever sees this root kit deployed anywhere else. 176 00:20:45,040 --> 00:20:53,200 Win NTI is closely associated with a threat actor more commonly known as APT41 whose interests include industrial and other espionage. 177 00:20:53,200 --> 00:20:59,660 There must be something in the water in Chengdu because Chengdu appears to be a nexus for APT41 activity. 178 00:20:59,660 --> 00:21:00,340 Isn't that cute? 179 00:21:00,340 --> 00:21:08,380 There's a Win T the Pooh Malmon that was created for me by our malware village sponsor, Lena Yu. 180 00:21:08,920 --> 00:21:15,660 So then a week later another weird thing happens on one of the T Stark firewalls. 181 00:21:15,660 --> 00:21:24,640 The implant unexpectedly discovers programs that only run on Apple Mac computers and on iPhones and other iOS devices. 182 00:21:24,700 --> 00:21:29,000 And that Apple stuff planted on the firewall, here's another interesting story. 183 00:21:29,000 --> 00:21:42,480 A week and a half after Sophos finds them, the security firm Valexity publishes a report on malware that they call insomnia that they say is being used in a wider campaign that they've nicknamed Evil Eye. 184 00:21:42,480 --> 00:21:50,480 And get this, Evil Eye's goal is to target certain kinds of organizations that support the Uyghur diaspora. 185 00:21:50,480 --> 00:21:55,840 Uyghurs as a group have come under increasing oppression by the government of China. 186 00:21:56,120 --> 00:22:04,820 Sophos and Valexity talk, share samples, and it turns out that the Apple malware is in fact related to the ones Valexity wrote up. 187 00:22:04,820 --> 00:22:14,180 Except that the Sophos samples came from firewalls that were being used by organizations who support the Tibetan diaspora. 188 00:22:14,180 --> 00:22:14,460 Huh. 189 00:22:14,460 --> 00:22:16,280 I wonder what the connection is there. 190 00:22:16,820 --> 00:22:17,380 Okay. 191 00:22:17,380 --> 00:22:19,100 Last big mass attack. 192 00:22:19,280 --> 00:22:25,520 Near the end of 2020 someone exploits a bug on the soon to be end of life cyber room devices. 193 00:22:25,520 --> 00:22:28,060 Remember this is the company that Sophos bought. 194 00:22:28,740 --> 00:22:35,180 The exploit gets used to create a new admin level account on every cyber room device called cyber support. 195 00:22:35,240 --> 00:22:38,880 Sophos rushes the product to end of life, end of story. 196 00:22:38,880 --> 00:22:49,200 Eight months later France's ANSI cyber security agency publishes a statement attributing this cyber room attack to APT31, another China based threat actor group. 197 00:22:50,000 --> 00:22:59,640 So after the cyber room incident Sophos never again sees an attack on all of its products or all of its customers all at once. 198 00:22:59,640 --> 00:23:10,200 Every subsequent attack against an XG firewall is targeted at specific organizations and that targeting becomes increasingly narrow as time goes on. 199 00:23:10,240 --> 00:23:13,140 So let's jump ahead to spring of 2022. 200 00:23:13,220 --> 00:23:19,340 Once again Sophos gets a bug bounty submission for a pre-authentication remote code execution bug. 201 00:23:19,340 --> 00:23:24,760 The bounty submitter who wishes to remain anonymous claims to be located in Japan. 202 00:23:24,860 --> 00:23:30,160 But the IP addresses that they use in communication with the bug bounty program trace back to China. 203 00:23:30,260 --> 00:23:38,020 And once again the bug gets used in an attack the very next day after the bug bounty submission. 204 00:23:38,020 --> 00:23:39,900 This is starting to become routine. 205 00:23:40,440 --> 00:23:53,040 So I named this campaign personal panda because it did seem to be targeted at very specific groups or countries that are part of China's sphere of influence and also because I'm a fan of old school Depeche mode and the lyrics just kind of work. 206 00:23:53,720 --> 00:24:01,500 So personal panda involved two CVEs, an exploit to break into the firewall and another to use open SSL to get root. 207 00:24:01,660 --> 00:24:06,680 Sophos responsibly disclosed the vulnerability to open SSL and they patched it right away. 208 00:24:06,940 --> 00:24:20,940 But while many organizations targeted in the personal panda attacks appear to be the focus of China's so‑called belt and road initiative, some of the victimology paralleled what we saw in the evil eye insomnia attacks. 209 00:24:21,700 --> 00:24:28,640 So some of the payloads deployed during personal panda contained some, again, technical term, weird stuff. 210 00:24:28,980 --> 00:24:35,420 One thing was this bogus certificate authority cert that was forged to look like it had been signed by Fortinet. 211 00:24:35,420 --> 00:24:42,420 I checked with my fellow cyber threat alliance counterparts at Fortinet and they say it was definitely not theirs. 212 00:24:42,440 --> 00:24:44,020 Why would they do this? 213 00:24:44,020 --> 00:24:46,320 One might speculate laziness. 214 00:24:46,360 --> 00:24:52,820 Well, we went to all this trouble to hand craft this artisanal certificate for a different attack. 215 00:24:52,820 --> 00:24:54,280 But yeah, we'll just reuse it. 216 00:24:54,280 --> 00:24:56,440 But actually we don't really know why. 217 00:24:56,440 --> 00:24:57,900 It was just weird. 218 00:24:58,700 --> 00:25:04,540 That cert was embedded into a malware that was called Lib Sophos.SO. 219 00:25:04,540 --> 00:25:13,460 It was deployed to two firewalls that were protecting a very high‑level government office in a country in that region. 220 00:25:13,680 --> 00:25:23,160 And the malware could perform machine‑in‑the‑middle TLS decryption , essentially stripping the HTTPS off of web traffic so it could sniff and steal passwords. 221 00:25:23,500 --> 00:25:38,560 Sophos shared the sample with the U.K.'s national cyber security center and they write up their own analysis linked here and they nickname it pygmy goat, which is actually kind of deceptively cute because this pygmy goat is pretty seriously sophisticated. 222 00:25:39,280 --> 00:25:46,260 And as with all of these incidents, the security operation teams goes hunting to see if it was deployed elsewhere and they found the firewall. 223 00:25:46,260 --> 00:25:48,600 Where it was tested belongs to our old friend T. 224 00:25:48,600 --> 00:25:49,240 Stark. 225 00:25:49,240 --> 00:25:49,660 T. 226 00:25:49,660 --> 00:25:57,920 Stark had tested this same file, like binary equal same file, that was deployed on the Sophos customer's firewalls. 227 00:25:57,920 --> 00:26:09,300 And he also had an earlier build called libgoat.so, earning him a new avatar since he created the goatiest malware of all time. 228 00:26:09,980 --> 00:26:12,800 Meanwhile, Vellexity comes back to Sophos. 229 00:26:12,800 --> 00:26:17,400 They were called in to investigate this campaign which they called drifting cloud. 230 00:26:17,400 --> 00:26:21,720 Their investigation reveals a C2 IP address that Sophos didn't have. 231 00:26:21,720 --> 00:26:30,360 Pivoting that search off of that C2, Sophos finds another single firewall running something else totally unique. 232 00:26:30,360 --> 00:26:45,200 A Linux binary compiled from security firm Bishop Fox's sliver adversary emulation framework which is similar to MITRE's caldera or, you know, cobalt strike which everyone uses but these guys just have to be different. 233 00:26:45,320 --> 00:26:57,320 And the team also observes the threat actor attempt to flash UFE boot kit code onto a bare metal firewall that the threat actor controls. 234 00:26:57,320 --> 00:27:01,480 Kaspersky first documented this boot kit called vector EDK. 235 00:27:01,560 --> 00:27:07,260 The boot kit never successfully deploys and the owner never again attempts to flash it. 236 00:27:08,060 --> 00:27:13,280 Another incident involved a country in the region that has its own nuclear power industry. 237 00:27:13,280 --> 00:27:23,260 Attackers targeted firewalls protecting both their nuclear regulatory commission and their main national supplier for the nuclear energy industry. 238 00:27:23,280 --> 00:27:28,380 The attack led to the discovery of a new exploit which we called covert channels. 239 00:27:28,380 --> 00:27:35,100 And in this case the attackers had installed an array of malware and dual use tools on firewalls. 240 00:27:35,120 --> 00:27:41,680 The covert channel exploit works by delivering modified Java jars to firewalls. 241 00:27:41,680 --> 00:27:45,020 These Trojan eyes jars add back door functionality. 242 00:27:45,060 --> 00:27:48,240 I wrote up the attacks for the X ops blog that October. 243 00:27:48,240 --> 00:28:02,400 The report detailed how sec ops had found eight different malware samples on firewalls including a metasploit module, termite malware, ghost rat again, other tools and a custom Trojan written in Go. 244 00:28:02,900 --> 00:28:14,140 In one of the attacks the adversary embedded this malware called termite into the Trojan eyes jar and then used it to replace an existing jar with the same name that was on the firewall. 245 00:28:14,140 --> 00:28:15,540 Termite is devious. 246 00:28:15,540 --> 00:28:27,360 It scrapes stored credentials that are stored locally in the firewall and then attempts to access internal domain controllers by reusing those captured credentials to try to log in. 247 00:28:27,360 --> 00:28:38,900 It marks a turning point because this was the first time the team had seen attackers probe civilian infrastructure because it was water and power utilities that these firewalls were protecting. 248 00:28:39,880 --> 00:28:43,960 Covert channels attacks were also notable for their variety. 249 00:28:43,960 --> 00:28:49,940 In spring 2023 a threat actor targeted a government‑owned supply company in the region. 250 00:28:49,940 --> 00:28:56,100 The attack left behind a socks proxy server, Linux executable password sniffers and a rat. 251 00:28:56,100 --> 00:29:00,220 And to illustrate this I put a couple of pictures of rats in socks. 252 00:29:01,500 --> 00:29:09,000 A threat actor in a May 2023 attack gained persistence and kind of a boring tool. 253 00:29:09,000 --> 00:29:11,660 It was just a really simple web shell. 254 00:29:11,660 --> 00:29:13,980 But they used a really interesting technique. 255 00:29:13,980 --> 00:29:16,560 This tool called PLT hook. 256 00:29:16,560 --> 00:29:29,300 The attacker uses the tool to put the remote shell into a file system partition that's usually reserved for storing the firmware updates during a firmware upgrade so they don't get wiped out. 257 00:29:29,440 --> 00:29:38,060 Sec ops later finds a binary equal copy of this tooling on a firewall known to be controlled by a threat actor that was already under surveillance. 258 00:29:38,980 --> 00:29:42,740 And this is where the Pacific Rim story ends. 259 00:29:42,740 --> 00:29:48,220 Not because the attacks ended, but because Sophos needed to find a place to stop. 260 00:29:48,220 --> 00:29:56,680 Which necessarily raises the question, where do we as an industry, as a nation, go from here? 261 00:29:58,820 --> 00:30:03,140 ASNAROC and the attacks that followed did lasting harm. 262 00:30:03,200 --> 00:30:05,760 Not all firewalls could be fixed. 263 00:30:06,260 --> 00:30:13,980 After ASNAROC the FBI put out this notice asking the public for its help finding the people behind that first mass attack. 264 00:30:15,340 --> 00:30:24,520 In the Pacific Rim appendix, sec ops curated a list of 206 serious firewall vulnerabilities through 2023. 265 00:30:24,800 --> 00:30:33,440 The CVSS score for 92 of them, 44 percent, have a strong score of 9.8 or higher. 266 00:30:33,940 --> 00:30:46,040 Increasingly these firewalls are being turned into relays, ORBs or operational relay beacons used to route traffic so attacks appear to come from somewhere else. 267 00:30:46,040 --> 00:30:48,120 So let that sink in for a second. 268 00:30:48,120 --> 00:30:56,260 The adversaries are using our own firewalls to conduct our attacks, to conduct attacks against us. 269 00:30:56,720 --> 00:31:04,000 And if it seems like things are accelerating, it's because by every measure they are. 270 00:31:04,000 --> 00:31:10,900 This isn't even a complete list of just the major incidents in the past month. 271 00:31:10,900 --> 00:31:20,080 Even this week news was breaking about another possible zero day in a firewall device being used to deploy ransomware. 272 00:31:20,080 --> 00:31:29,300 130 new CVEs per day and 80 percent year over year rise in the known exploited vulnerabilities. 273 00:31:29,340 --> 00:31:33,100 More than half of which are just from this year. 274 00:31:33,100 --> 00:31:34,460 And it's only August. 275 00:31:34,460 --> 00:31:37,060 There's four more months of this to go. 276 00:31:37,800 --> 00:31:39,900 This problem isn't new. 277 00:31:39,900 --> 00:31:56,080 In 2022, my former colleague, Kristen Del Rosso, compared the raw number of known bugs in CVE to China's CNVD and found that the Chinese repository seemed to contain more entries overall. 278 00:31:56,080 --> 00:32:06,620 But she struggled to do this research because over and over and over again she found herself blocked from conducting this comparison, being locked out of connecting to the website. 279 00:32:08,120 --> 00:32:17,380 So we did some OSINT and it revealed mailing list posts made eight years earlier by someone using a particular handle, GBIGMAO. 280 00:32:17,380 --> 00:32:25,660 And this GBIGMAO has the same fixation with firewall vulnerabilities, but he seems a little bit more idealistic. 281 00:32:25,660 --> 00:32:29,780 He wants to fix these bugs quickly, not abuse them. 282 00:32:30,100 --> 00:32:32,600 But this is GBIGMAO today. 283 00:32:32,640 --> 00:32:33,960 We know his name. 284 00:32:33,960 --> 00:32:35,440 It's Guan Tianfeng. 285 00:32:35,440 --> 00:32:41,880 He's a 30‑year‑old employee of a company called Sichuan Silence Information Technology Co. 286 00:32:41,880 --> 00:32:49,960 And for his efforts, he earned a $10 million reward for just his bounty on his head. 287 00:32:50,440 --> 00:32:57,600 This bright young man, he was once so idealistic, he'll never be able to leave China again without risking arrest. 288 00:32:57,620 --> 00:33:00,760 And I can't help but wonder, was it worth it? 289 00:33:01,940 --> 00:33:09,480 This industry, all of us who work in it, we're caught in the crossfire of a struggle between great powers. 290 00:33:10,260 --> 00:33:17,260 I mean, I would like China's government to stop its adversarial and destructive path, just like I want my own nation to act in good faith. 291 00:33:17,800 --> 00:33:22,000 The only real permanent solution to this problem is diplomacy. 292 00:33:22,140 --> 00:33:24,280 But we can't do that right now. 293 00:33:24,520 --> 00:33:28,920 So what must we as an industry do in the meantime? 294 00:33:30,840 --> 00:33:34,420 So there's a lot of pride in doing a job well. 295 00:33:34,480 --> 00:33:37,340 And much of it in this industry is well deserved. 296 00:33:37,400 --> 00:33:40,480 But pride doesn't serve us in this moment. 297 00:33:40,640 --> 00:33:44,200 None of us alone can fix everything. 298 00:33:44,640 --> 00:33:48,760 So maybe we just do what we can do right now. 299 00:33:48,840 --> 00:33:51,600 It might be the form of mutual aid. 300 00:33:51,600 --> 00:34:06,660 The infosec industry is mature enough to run its own ISAC or some other way not to share everything but to communicate in a safe and open way to protect those who protect everyone else. 301 00:34:07,740 --> 00:34:20,040 As an industry, we share a sacred trust with our customers and with each other to protect the vulnerable and to safeguard that which we're entrusted to defend. 302 00:34:20,740 --> 00:34:23,780 There's really only one way to counter this threat. 303 00:34:23,780 --> 00:34:25,100 And it's together. 304 00:34:26,460 --> 00:34:27,740 And that's my talk. 305 00:34:27,740 --> 00:34:49,620 I want to make sure that I thank all of these folks from Sophos who did the majority of this research, my former colleagues, as well as these researchers from Fullexity, Recorded Future and all these other government agencies and many more who were not willing to be named but who contributed in one way or another to helping us understand the scope of this. 306 00:34:50,140 --> 00:34:58,880 If you do have questions about this, as I said, I'm no longer with Sophos but they've set up this e‑mail address, Pacific Rim at Sophos.com. 307 00:34:59,080 --> 00:35:02,200 And feel free to just e‑mail them if you want to follow up. 308 00:35:02,240 --> 00:35:03,840 But thank you so much for your time. 309 00:35:03,840 --> 00:35:06,140 I'm so grateful for your attendance here today.