1 00:00:00,660 --> 00:00:04,020 Welcome to my talk, Where's the Money? 2 00:00:04,020 --> 00:00:06,020 Defeating ATM Disk Encryption. 3 00:00:06,020 --> 00:00:11,160 This is a Encore presentation to the MainStage Act I had just done earlier today. 4 00:00:11,160 --> 00:00:15,160 And before I came on stage you just found out I got a Wired article published. 5 00:00:15,160 --> 00:00:17,580 So all right. 6 00:00:19,100 --> 00:00:21,720 So starting off, my name is Matt Birch. 7 00:00:21,720 --> 00:00:26,440 I'm an independent security researcher with a passion for IOT and hardware devices. 8 00:00:26,440 --> 00:00:31,420 I am the developer of several MFA bypass tools affecting various MDM solutions. 9 00:00:31,420 --> 00:00:36,140 I have performed expert opinion against a major ATM manufacturer. 10 00:00:36,140 --> 00:00:41,920 And I've also had the opportunity of examining cartel designed ATM black box devices. 11 00:00:42,260 --> 00:00:54,520 For today's agenda, we'll take a brief look at the ATM industry, introduce Diebold Nixdorf's dynamic security suite, then dive a little bit deeper into the preboot authentication process of that software. 12 00:00:54,520 --> 00:00:57,460 And finally, we'll wrap up with a little bit of cat and mouse. 13 00:00:57,920 --> 00:01:00,760 So starting off, let's look at the industry. 14 00:01:00,940 --> 00:01:06,600 Essentially the ATM market is constructed of both consumer and financial class systems. 15 00:01:06,600 --> 00:01:12,120 The consumer devices are your standard ATMs that you see at your grocer, your gas station. 16 00:01:12,120 --> 00:01:17,320 Typically they run Windows CE and they're present everywhere in the market. 17 00:01:17,320 --> 00:01:23,020 They also lack a lot of the enterprise security controls that you typically see on most systems. 18 00:01:23,140 --> 00:01:27,180 However, the financial class systems are the enterprise ATM. 19 00:01:27,180 --> 00:01:38,380 These are the ones at your bank, the standalone units, through uh through wall units, and they're typically running Windows Embedded 10, uh some are now doing 11. 20 00:01:38,380 --> 00:01:42,640 And each manufacturer has their own ATM security stack. 21 00:01:42,640 --> 00:01:48,980 That security stack is designed to harden the ATM, provide endpoint protection and full disk encryption. 22 00:01:49,620 --> 00:01:50,940 Yep. 23 00:01:51,120 --> 00:01:57,940 So when you open up the ATM, uh it's essentially constructed across two hemispheres. 24 00:01:57,940 --> 00:02:04,540 You have the top half, which uh contains all the PC peripherals and computer components. 25 00:02:04,540 --> 00:02:11,360 And then you have the bottom half, aka the vault, which carries the cash cassettes and all the system's currency. 26 00:02:11,360 --> 00:02:14,340 Each halves are physically isolated from one another. 27 00:02:14,360 --> 00:02:19,240 And the physical security controls between the two vary drastically. 28 00:02:19,240 --> 00:02:27,040 The bottom half requires multi-factor authentication, has a digital combination lock, and uses an I button for secondary authorization. 29 00:02:27,140 --> 00:02:31,580 It's constructed with about an inch thick steel, has heavy bolt locking mechanisms. 30 00:02:31,580 --> 00:02:36,620 It is also equipped with seismic uh detection and tamper detection switches. 31 00:02:36,620 --> 00:02:38,700 However, the top half's significantly different. 32 00:02:38,700 --> 00:02:46,120 It's about one-eighth inch thick steel, has tons of vent holes, syst- uh the systems come with default tubular locks. 33 00:02:46,120 --> 00:02:56,740 And those locks leverage a cantilever locking mechanism where a cable's hooked up to the cylinder, so when you turn the key, the cantilevers come up and the front of the ATM will open. 34 00:02:56,800 --> 00:03:08,040 Uh additionally, the front of the ATM usually has a lot of plastic components, which makes it very easy for uh malicious entry- entry or destructive entry, maybe just stick a coat hanger in and pull the wire. 35 00:03:09,740 --> 00:03:19,640 Um and when we start looking at the attack vectors affecting ATMs, uh most of them all require some level of physical access. 36 00:03:19,880 --> 00:03:35,040 And with that, some of the most common attacks we usually see are black box devices, which are usually placed inside or outside the ATM, with the objective of intercepting the communications and getting the ATM to withdraw or dispense more funds than what was requested. 37 00:03:35,080 --> 00:03:40,540 Everyone knows the card skimmers, you plop those on the front, you steal people's card information, super interesting. 38 00:03:40,700 --> 00:03:43,860 Uh and then you have the heavy destructive attacks. 39 00:03:43,860 --> 00:03:45,540 Uh this involves RAM raiding. 40 00:03:45,540 --> 00:03:51,120 Uh you wrap a chain around an ATM, hook it up to your fork pickup, just rip the thing right out of the ground. 41 00:03:51,120 --> 00:03:56,760 Or you borrow your local construction company equipment, rip a hole right through the wall, and run away with the ATM. 42 00:03:56,980 --> 00:03:59,520 Some of the less common attacks we see here in the U.S. 43 00:03:59,520 --> 00:04:05,900 are explosive-derived attacks because our money ha- uh has a heavy paper consistency. 44 00:04:05,980 --> 00:04:10,940 Uh usually when you involve fire, it ignites and is counterproductive to theft. 45 00:04:10,960 --> 00:04:18,020 However , internationally, uh with the plastic-based currency that's not necessarily the case, and you see more of these attacks. 46 00:04:20,300 --> 00:04:27,240 Uh the ATM landscape is constructed of thousands of ATMs, all of which hold very large sums of cash. 47 00:04:27,240 --> 00:04:34,680 And despite the need for physical access, the criminal element against these systems has grown exponentially over the last few years. 48 00:04:34,680 --> 00:04:39,640 This is mostly associated to the deficiencies within the logical infrastructure of the ATM. 49 00:04:39,740 --> 00:04:49,940 Mainly the use of an unauthenticated API known as XFS that interacts between the software and hardware, allowing funds to be dispensed out of the ATM. 50 00:04:49,940 --> 00:04:55,040 Most of the applications on the ATM also are executed in the context of local admin. 51 00:04:55,040 --> 00:05:03,880 And then the ATMs are also designed with layers of default accounts for system administration, OS access, and other various activities. 52 00:05:03,880 --> 00:05:08,580 All of these have made the devices very attractive to organized crime. 53 00:05:08,860 --> 00:05:19,840 And we can't necessarily talk about ATMs without briefly mentioning the ATM network, which is what the ATM must be connected to so you can save your money from the bank. 54 00:05:20,520 --> 00:05:27,420 The ATM network is essentially a private connection that's restricted from the hosting provider or gatekeeper. 55 00:05:27,460 --> 00:05:33,560 And access to the ATM network requires some level of certification from that gatekeeper. 56 00:05:33,600 --> 00:05:45,920 And pieces of software and hardware are individually certified, so in environments where you have multiple different ATM vendors, it becomes very difficult for a financial institution to administer those systems. 57 00:05:45,920 --> 00:05:51,340 And usually they'll partner with some kind of managed services provider to ease that overhead. 58 00:05:51,760 --> 00:06:00,240 This all brings us to the subject of today's talk, which is Diebold Nixdorf and their proprietary Vynamic Security Suite software. 59 00:06:00,240 --> 00:06:14,820 Unlike all the other ATM security stacks, Vynamic Security has multi -vendor certification, allowing their software to be installed on any ATM platform and granting access to the ATM network. 60 00:06:14,820 --> 00:06:20,020 In 2015, they were assumed to represent about 35% of the ATM market. 61 00:06:20,020 --> 00:06:26,480 And in 2018 and 2019, they partnered with two of the largest financial institutions representing the U.S. 62 00:06:26,480 --> 00:06:27,920 gaming industry. 63 00:06:28,160 --> 00:06:37,740 AKA, Vynamic Security is present in almost every casino in the United States, if not most, right here on the Vegas Strip. 64 00:06:38,840 --> 00:06:39,860 It's cool. 65 00:06:39,860 --> 00:06:43,820 So now that we understand uh the landscape, let's take a look at the software. 66 00:06:44,160 --> 00:06:49,100 So just like all other security stacks, Vynamic Security has a number of default protections. 67 00:06:49,100 --> 00:06:53,840 USB filtering, firewall policy, delegated access, and disk encryption. 68 00:06:54,300 --> 00:06:59,980 However, it's not full disk encryption, where there's two partitions that are unencrypted. 69 00:06:59,980 --> 00:07:03,960 There's a UEFI partition, which is pretty common in your corporate image. 70 00:07:03,960 --> 00:07:09,180 But then there's also a Linux partition, which is somewhat of a red herring in a Windows-designed system. 71 00:07:09,360 --> 00:07:15,440 So taking a closer look of that Linux architecture, it self-identifies itself as Super's Chaff. 72 00:07:15,680 --> 00:07:25,340 Which, doing online reconnaissance didn't actually re- result in a whole lot of information being associated with that, but did identify this really cool game known as Worm's Armageddon. 73 00:07:25,340 --> 00:07:30,120 And in this game, you launch sheep as mobile projectiles against your enemies. 74 00:07:30,220 --> 00:07:37,520 The game was a lot of fun to play, I think we wasted at least 30 minutes on it, but that has nothing to do with ATMs at all. 75 00:07:38,060 --> 00:07:47,620 But what it did identify, because I'm really bad at foreign language, is Super's Chaff is actually German for Super Sheep. 76 00:07:47,800 --> 00:07:54,820 And Super Sheep was also an installation directly within the user directory path. 77 00:07:54,820 --> 00:07:59,380 And online reconnaissance of Super Sheep was much more resourceful. 78 00:07:59,440 --> 00:08:16,540 Specifically, in 2016 a consulting firm known as SecConsult released a blog article detailing code execution deficiency in a piece of software known as Cryptware, CryptoPro, and their underlying Super Sheep operating system. 79 00:08:16,780 --> 00:08:27,520 In this blog article there were a lot of similarities between dynamic security and Super Sheep , leading us to go back and then take a look at Debulb's user license agreements. 80 00:08:27,580 --> 00:08:33,080 And lo and behold, they specifically designated CryptoPro as being a third party licensed vendor. 81 00:08:33,080 --> 00:08:40,480 But that was only relevant in version 3.0 and all references to CryptoPro are removed from all later versions of dynamic security. 82 00:08:40,700 --> 00:08:42,540 So who is CryptoPro? 83 00:08:42,540 --> 00:08:50,200 It's a cryptographic spin-off started in 2002 designed to enhance the functionality of Microsoft BitLocker through pre-boot authentication. 84 00:08:50,380 --> 00:09:01,520 Today the organization is represented across numerous countries and a number of different domains, each one having a very unique and uh different online presence. 85 00:09:01,520 --> 00:09:12,180 However despite this suspicious representation they advertise over half a million licenses sold and they also uh state that employees love their encryption. 86 00:09:12,180 --> 00:09:14,980 So, you know, they got that going for them. 87 00:09:15,500 --> 00:09:23,580 So let's take a little bit deeper dive into how the pre-boot authentication function actually works. 88 00:09:23,580 --> 00:09:28,300 So powering on the ATM it executes a dual boot cycle. 89 00:09:28,300 --> 00:09:39,520 From UEFI a Linux partition is bootstrapped aka super sheep, does some black magic to the disk, shuts down, goes back through UEFI and then launches Windows. 90 00:09:39,520 --> 00:09:46,480 Windows performs an auto logon, bootstraps all the ATM software and the system comes up and becomes fully operational. 91 00:09:46,580 --> 00:09:53,900 Any attempt to modify the content of the Linux partition results into an integrity error page to be presented. 92 00:09:53,900 --> 00:10:02,300 But not all files are treated the same and modifying other directories or files results in a completely different integrity error uh to be shown. 93 00:10:02,420 --> 00:10:09,780 But this one has significantly more details represented in it and identifies about 253 elements are validated on the desk. 94 00:10:09,780 --> 00:10:16,300 Which uh leads us to need to understand what files are actually being checked. 95 00:10:16,300 --> 00:10:29,440 Going back to the Linux system we then start scouring the drive and looking to locate any uh hash sum indexes, tables or files that may have uh a list of what's actually being checked. 96 00:10:29,440 --> 00:10:36,060 Ultimately we found a log directory and in there there was a sum index of about 2500 files. 97 00:10:36,140 --> 00:10:44,300 Significantly larger than 253 however it did give us some indication of what was being checked. 98 00:10:44,300 --> 00:10:54,760 Uh the Linux partition itself had a little under 11,000 files giving us a delta of about 8200 files that needed to be validated as part of the integrity check. 99 00:10:54,760 --> 00:10:57,880 Or that weren't validated as part of the integrity check. 100 00:10:57,880 --> 00:11:05,180 So that's a whole lot of files to attempt to validate and identify a loophole in the validation uh process. 101 00:11:05,180 --> 00:11:11,100 But what I generally like to do is go back and take a look at a background image. 102 00:11:11,160 --> 00:11:18,700 I mean who really looks at background images uh and they have a very high visual representation when anything's modified. 103 00:11:18,700 --> 00:11:27,140 So we randomly pick an image, modify it, reboot the system and uh the default background is then presented. 104 00:11:27,140 --> 00:11:32,100 However just a few seconds later we got our hacked background. 105 00:11:32,460 --> 00:11:45,780 Being able to do this essentially establishes the foundation that the preboot authentication process is not completely infallible and there is an opportunity to redirect the execution workflow of the system. 106 00:11:45,820 --> 00:11:54,460 Ultimately with our modified background we were able to map out the authentic uh authentication process to occur across two phases. 107 00:11:54,460 --> 00:12:01,400 The first of which is executed within UEFI across the boot XSA or boot XSA2 system binaries. 108 00:12:01,400 --> 00:12:04,940 This is where the 253 contents of the disk were validated. 109 00:12:04,940 --> 00:12:15,800 Upon completing the UEFI validation uh Linux is then bootstrapped and from Linux out of root's profile phase two is initialized scanning the other 2500 files. 110 00:12:15,800 --> 00:12:20,340 Those 2500 files are then used as a seed to unlock the TPM. 111 00:12:20,640 --> 00:12:29,000 Unfortunately the ATM is configured with secure boots and all the binaries on the UEFI partition are digitally signed with the BIOS. 112 00:12:29,000 --> 00:12:33,640 Meaning we can't actually modify any of that content to gain control of the system. 113 00:12:33,640 --> 00:12:38,900 But what we can do is identify what files are validated during phase one. 114 00:12:39,160 --> 00:12:51,760 Identify anything that might be overlooked during the Linux initialization process allowing us to redirect the process of code execution prior to phase two being initialized. 115 00:12:52,220 --> 00:12:54,600 With that, challenge accepted. 116 00:12:54,600 --> 00:12:56,320 Let's play cat and mouse. 117 00:12:56,800 --> 00:12:59,340 We'll start off in version 18.X. 118 00:12:59,660 --> 00:13:04,820 In version 18.X we have uh the pre-boot authentication process carried out in UEFI. 119 00:13:04,820 --> 00:13:06,700 It's part of boot XSA2. 120 00:13:06,800 --> 00:13:09,020 253 elements are validated. 121 00:13:09,280 --> 00:13:17,300 Uh the system is then initialized through uh the SysV architecture and several RC initialization scripts. 122 00:13:17,300 --> 00:13:25,180 Upon completing the RC initialization process, root performs an auto logon and then phase two is launched out of root's profile. 123 00:13:25,500 --> 00:13:32,640 When we take a look at the running environment of the Linux operating system, it's designed on the back of several temporary uh mount points. 124 00:13:32,640 --> 00:13:34,040 Temporary file system mount points. 125 00:13:34,040 --> 00:13:43,120 This is used to give a pseudo read only perspective of the disk cause the contents of those temporary file systems are then populated from tar archives. 126 00:13:43,120 --> 00:13:49,320 Again, those tar archives are also validated as part of phase one and not a valid attack surface. 127 00:13:49,960 --> 00:13:52,100 So this leaves us with a challenge. 128 00:13:52,120 --> 00:14:02,940 We know the index of phase one, what files are being checked and we need to compare that to the full initialization process of phase two in the SysV architecture. 129 00:14:03,240 --> 00:14:12,140 253 elements though covers most of the RC initialization script and there's not a whole lot of uh attack surface or thread that we can take advantage of. 130 00:14:12,140 --> 00:14:15,040 Except they made one exception. 131 00:14:15,580 --> 00:14:17,560 Etsy init tab was overlooked. 132 00:14:18,100 --> 00:14:27,120 With that we have our uh initial foothold to perform code execution but we still need a staging directory to place uh things on the disk. 133 00:14:27,380 --> 00:14:42,300 Luckily like any good security solution, it ignores validation of most of its own integrity files and since the goal of this exercise was code execution, what better directory to use as a staging directory than super sheep of Europe. 134 00:14:43,220 --> 00:14:45,760 So with that, let's jackpot an ATM. 135 00:14:46,320 --> 00:15:00,880 Uh we cloned the RC initialization process over to our safe directory, patch global variables, inject uh proof of concept into the call to X, and then execute our new run level three from the unexamined Etsy init tab. 136 00:15:00,880 --> 00:15:05,260 With that, here's a demo, 2023-24064. 137 00:15:20,120 --> 00:15:21,920 Sorry guys. 138 00:15:36,580 --> 00:15:38,020 Okay. 139 00:15:46,680 --> 00:15:49,460 Unfortunately I have some technical difficulties with that. 140 00:15:49,460 --> 00:15:50,820 I apologize. 141 00:15:50,820 --> 00:15:55,380 Uh the videos are published as part of uh the media server. 142 00:15:55,380 --> 00:15:58,180 Apparently they don't execute well on this Macbook. 143 00:15:58,180 --> 00:16:05,760 Um anyhow in this video what I was demonstrating is we power on the virtualized file system. 144 00:16:05,760 --> 00:16:09,180 Uh it receives a preboot authentication error. 145 00:16:09,180 --> 00:16:10,460 We shut down the desk. 146 00:16:10,460 --> 00:16:17,700 We relocates uh our initialization files over to the uh staging directory. 147 00:16:17,700 --> 00:16:24,200 This then once root performs its auto log on, we receive code execution and a callback shell. 148 00:16:37,470 --> 00:16:49,570 So uh having code execution on the system uh essentially just having access to the Linux system itself. 149 00:16:49,750 --> 00:16:54,210 Uh the vanilla code execution is actually never enough. 150 00:16:54,210 --> 00:16:59,970 And uh the Windows partition is still technically encrypted. 151 00:16:59,990 --> 00:17:05,730 Uh however, Super Sheep comes with an app for that uh known as Mount Winpart. 152 00:17:05,730 --> 00:17:22,670 Uh Mount Winpart takes the TPM recovered disk encryption key and then passes that as a command line argument decrypting uh the Windows partition and giving it the uh opportunity to then execute a third phase of the integrity validation. 153 00:17:22,690 --> 00:17:38,230 So from uh having code execution on the Linux system, essentially all we need to do is uh resume the integrity validation process, monitor the proc command line, and then recover that TPM disk encryption key. 154 00:17:38,230 --> 00:18:00,070 From there, uh re-initializing the process just a few seconds later, we're able to recover the TPM disk encryption key, decrypt Windows, and uh load malware onto the system, interacting with the XFS API, giving us the ability to dispense funds from the ATM on demand. 155 00:18:03,350 --> 00:18:14,190 So uh doing the research essentially the timeline uh this vulnerability was observed to only impact version 18.X. 156 00:18:14,190 --> 00:18:23,030 Uh the vulnerability was identified in December of 21 and then confirmed remediated just a few days later in the next major release. 157 00:18:23,030 --> 00:18:37,730 At the time of this discovery, uh version 18 was designated to be end of life and uh Diebold Mixdorf had moved from uh to a new versioning number to introduce minor uh revision updates to their update. 158 00:18:37,730 --> 00:18:40,370 That's why it goes from 18 to 3.0. 159 00:18:41,270 --> 00:18:47,750 The way the attack surface was mitigated is phase one now validates Etsy and NetApp. 160 00:18:47,750 --> 00:18:54,870 So there's no opportunity to redirect code execution for the RC initialization process. 161 00:18:54,870 --> 00:19:07,330 However, what they also do is the PBA integrity process is decreased from 253 elements to only 56, about a 20% reduction. 162 00:19:07,670 --> 00:19:17,470 Reporting this to Diebold however, they did not designate this as a vulnerability and it indicated it was working by design because of the security protections that IMO provides. 163 00:19:18,410 --> 00:19:19,650 So what is IMO? 164 00:19:19,870 --> 00:19:30,110 Well IMO is an uh kernel integrity process where uh every binary on the system is digitally signed and that signature's also loaded into the Linux kernel. 165 00:19:30,110 --> 00:19:40,870 That signature carries details about the file name, the file path, very I know de- various I know details and that's appended as an extended attribute to every executable on the system. 166 00:19:40,890 --> 00:19:52,290 When you go to call those executables in a child or parent child relationship, uh the execution workflow and the signature is validated against the Linux kernel to decide whether or not that's allowed to be executed. 167 00:19:52,570 --> 00:20:00,370 However, the one thing that IMO doesn't do is it doesn't validate uh signature script interpretation. 168 00:20:00,370 --> 00:20:17,570 For example, if you call the system shell, which is an authorized signed binary, it's able to read uh the interpreted scripts, for example, root's profile script and then carry that execution workflow in the context of an authorized system binary. 169 00:20:18,650 --> 00:20:22,410 So let's carry on into service release nine. 170 00:20:23,170 --> 00:20:28,830 In service release nine, the Linux architecture is relatively unchanged. 171 00:20:28,830 --> 00:20:38,910 Uh however, examining the mountfs initialization script, there's a delete call that's initialized before the architecture of the system is actually mounted. 172 00:20:39,070 --> 00:20:51,970 Since the entire architecture of the system is mostly derived around the concept of a temporary file system, uh all we need to do is uh move fs tab to m tab. 173 00:20:51,970 --> 00:21:03,890 Then fs tab will be deleted before the mount command is called, removing all the instructions to build a temporary file system, allowing us to regain persistence to root's home directory. 174 00:21:03,890 --> 00:21:08,410 We patch the profile script and then again, gain code execution. 175 00:21:10,130 --> 00:21:21,310 Um I had a demo for this, uh 2023, 24063 , uh unfortunately I I it's not playing properly on the Macbook, so I do uh apologize greatly for that. 176 00:21:21,310 --> 00:21:43,010 Uh but anyhow in the demo, uh if it were to play, it's uh we patch the offline disk, we uh move fs tab to m tab, uh the system auto boots back up, and then once root logs in, we get code execution and receive a callback to the initialization process. 177 00:21:46,320 --> 00:21:56,940 So this time, uh the scope and the timeline, uh this was observed to impact all prior versions of 330 as part of the dynamic security suites. 178 00:21:56,940 --> 00:22:08,060 Uh the vulnerability was identified in June of 22, and then confirm remediated the day after magically in uh version or service release 10. 179 00:22:08,680 --> 00:22:20,700 In service release 10, the mitigations were enforced by an uh update to the mount fs initialization script, now removing the delete call from uh to etsy m tab. 180 00:22:20,700 --> 00:22:26,760 So without etsy m tab there, uh we don't long we no longer have the opportunity to remove fs tab. 181 00:22:27,800 --> 00:22:31,280 Carrying on into service release 10. 182 00:22:32,020 --> 00:22:43,740 So as part of service release 10, uh we now have init tab validated, m tab does nothing, but what about the mount logic of the architecture? 183 00:22:44,720 --> 00:22:49,220 So mount is actually a very interesting command. 184 00:22:49,220 --> 00:22:57,440 Uh again, most of the security architecture of the security stack requires building a temporary file system. 185 00:22:57,920 --> 00:23:09,080 However, if we're able to use mount to stop uh that architecture from getting mounted, uh we then have an advantage to regain uh persistence to root's home directory. 186 00:23:09,080 --> 00:23:20,120 One very interesting limitation to mount is if you happen to execute mount against the mount point that's previously been leveraged, the call to mount will fail. 187 00:23:20,200 --> 00:23:25,660 In a Linux architecture, what's the default uh mount point that's used by the system? 188 00:23:25,900 --> 00:23:27,900 The root file system. 189 00:23:27,940 --> 00:23:43,820 So if we flatten the file system and then redirect root bar and temp to root, uh we're able to regain persistence to root's home directory because when those temporary file systems go to mount, the mount point already exists and that call will fail. 190 00:23:43,820 --> 00:23:52,040 This then gives us the opportunity to uh jackpot root's profile and regain code execution on the system. 191 00:23:53,120 --> 00:24:12,700 Again, I had a demo uh 2023-24064 uh where we uh flatten the file system and uh are able to redirect code execution powering back on the system uh once root logs in, we receive code execution. 192 00:24:15,160 --> 00:24:31,080 So this time going through uh going through the timeline, uh all prior versions of 330 were known to be vulnerable including uh this time 4.0, 4.1 and 4.2. 193 00:24:31,080 --> 00:24:41,520 The vulnerabilities were identified in June of 2022 and then confirmed remediated in version in service release 12 immediate uh in December of 22. 194 00:24:42,840 --> 00:24:50,380 In service release 12, the mountfs initialization script was then updated with several uh additional delete calls. 195 00:24:50,380 --> 00:25:03,080 Now we're moving root bar and temp and mount and uh removing any opportunities for us to do sim links or redirect the execution essentially ensuring those directories are empty. 196 00:25:03,640 --> 00:25:06,360 Let's carry on in service release 12. 197 00:25:07,380 --> 00:25:11,940 In service release 12, how do you work around a delete call? 198 00:25:12,080 --> 00:25:25,660 Well, mount still has some magic logic tied into it where earlier on in the initialization process, uh the kernel uh kernel run space is mounted to specific mount points. 199 00:25:25,660 --> 00:25:29,520 And whenever you place a file on a mount point, it no longer becomes accessible. 200 00:25:29,520 --> 00:25:38,160 Since all the previous mitigation uh steps were initiated as part of mountfs, uh essentially we just move mountfs to proc. 201 00:25:38,160 --> 00:25:47,160 Once the uh kernel initializes, the temporary file systems are built allowing us to regain persistence to root's profile script. 202 00:25:48,800 --> 00:25:57,280 Again, this was recognized as CVE-2023-28865 uh in the demo if it had played. 203 00:25:57,520 --> 00:26:12,580 Uh it would show that um we're able to uh redirect uh the file location uh move that over to proc and once the Linux kernel powers on, we receive code execution and our callback. 204 00:26:14,280 --> 00:26:23,920 Just as before, all prior versions of 330 were known to be vulnerable to this attack surface, including uh all versions of 4.0, 4.1, and 4.2. 205 00:26:23,920 --> 00:26:29,600 Essentially representing the entire security stack of dynamic security at this time. 206 00:26:29,600 --> 00:26:38,920 The vulnerabilities were identified in December of 2022 and then confirmed or mediated in February of 23 as part of service release 15. 207 00:26:39,320 --> 00:26:49,280 In service release 15, the uh phase one integrity check was further updated to include a number of null sum values. 208 00:26:49,280 --> 00:26:56,700 Essentially validating a number of critical mount points to truly be empty before the Linux partition was allowed to boot. 209 00:26:56,860 --> 00:27:04,500 With this, uh we don't have much opportunity to modify the disk and it closes a lot of the previous attack surfaces. 210 00:27:05,360 --> 00:27:08,760 So let's carry on with service release 15. 211 00:27:09,100 --> 00:27:25,740 So in service release 15, introducing those null sum values, uh I like to come across the idea that the more complex a security control is, the more likely that something is gonna be overlooked as part of that validation process. 212 00:27:25,740 --> 00:27:36,780 If we try to create a file or create a sim link to a known file, that produces a hash hash sum as part of the phase one integrity check and the pre-boot authentication process fails . 213 00:27:36,780 --> 00:27:45,400 However, if we establish a directory or a tree of uh empty directories, no sum value is created. 214 00:27:45,440 --> 00:27:51,640 Additionally, broken sim links also do not produce a hash sum value. 215 00:27:52,800 --> 00:27:56,200 However, to take advantage of this, we need this new staging directory. 216 00:27:56,200 --> 00:28:09,340 Uh to identify one, we would return to the previous attack surface and look to identify any directory structures that are created once the Linux kernel is initialized, but don't have a presence on the offline disk. 217 00:28:09,340 --> 00:28:17,560 Essentially allowing us to establish a transversal point to redirect uh to a new staging directory. 218 00:28:17,660 --> 00:28:28,500 Luckily after just a few seconds, we're able to locate dev block, which was a special mount point mod gate or uh associated to the block device of the Linux partition itself. 219 00:28:28,500 --> 00:28:33,620 This was also observed to be present in all versions of dynamic security. 220 00:28:34,100 --> 00:28:41,680 So, what we need to do is move uh our uh critical mount points over to a new staging location. 221 00:28:41,680 --> 00:28:43,960 For example, root to root 2. 222 00:28:43,960 --> 00:28:48,200 And then we link to those through our transversal point dev block. 223 00:28:48,200 --> 00:28:51,480 Offline on the disk, those sim links are then broken. 224 00:28:51,480 --> 00:29:02,760 However, once the Linux kernel initializes, those links then become valid, allowing us to redirect code execution and regain persistence to root's home directory. 225 00:29:03,500 --> 00:29:09,640 Uh this was identified as CVE-2023-33206. 226 00:29:09,760 --> 00:29:22,180 Again, uh in the demo, had it played uh properly, it would show that we uh create the new staging directories and redirect to our staging points. 227 00:29:22,180 --> 00:29:28,640 Once the virtualized system powers on, we would receive code execution and our callback shell. 228 00:29:30,620 --> 00:29:45,000 So, just as before and all the previous attacks, this vulnerability impacted all prior versions of dynamic security, including all versions, prior versions of 4.0, 4.1, 4.2, and 4.3. 229 00:29:45,000 --> 00:29:54,920 The vulnerability was identified in April of 2023 and then confirmed remediated in July of 23 as part of service release 16. 230 00:29:56,040 --> 00:30:08,240 In service release 16, the phase 1 integrity process was further updated, this time validating uh whether or not sim links were broken or valid uh on the Linux partition. 231 00:30:08,240 --> 00:30:15,380 Broken sim links now produce a uh pre-boot authentication failure, disabling the system to boot up. 232 00:30:15,380 --> 00:30:27,080 But, interestingly enough, they also, dbold also walked back the previous mitigation strategies that were observed in the mount FS uh initialization script. 233 00:30:27,080 --> 00:30:41,500 Although it doesn't necessarily reproduce the same attack surfaces, because now we're doing null sum validation and sim link validation, uh it is interesting that uh mitigation strategies are are backwalked. 234 00:30:42,240 --> 00:30:48,200 So, finally, this brings us to service release 16. 235 00:30:48,800 --> 00:30:54,340 As part of service release 16, we have sim link validation and null sums. 236 00:30:54,340 --> 00:31:00,300 The attack surface of the Linux architecture is relatively reduced. 237 00:31:00,420 --> 00:31:08,020 However, the whole architecture of the system is based around the requirement of hash sum values. 238 00:31:08,480 --> 00:31:11,080 You know what doesn't change a file's hash sum? 239 00:31:11,080 --> 00:31:14,120 The file attributes associated to that hash sum. 240 00:31:14,120 --> 00:31:22,840 So, for example, if we remove uh the execute permission of a file, the file still has the hash the same hash sum value. 241 00:31:23,100 --> 00:31:37,960 For example, if we just remove the execute permission from IMA, we're able to disable all signature verification processes of the Linux architecture entirely and then obtain the ability to execute any code that we want. 242 00:31:39,100 --> 00:31:45,720 This vulnerability was identified as CVE-2023-40261. 243 00:31:46,840 --> 00:31:59,860 Again, the video is not playing, um, but in the video, uh, we disabled the execute permissions of IMA and uh power on the virtualized file system. 244 00:31:59,860 --> 00:32:10,660 Once root performs its auto logon, we then re-regain code execution and receive our callback shell, essentially defeating the whole system once again. 245 00:32:12,900 --> 00:32:25,400 Just as before, this attack surface was observed to impact all prior versions of 330, including all prior versions of 4.0, 4.1, 4.2, and 4.3. 246 00:32:25,400 --> 00:32:31,780 Again, representing, uh, an impact against the entire dynamic security suite software. 247 00:32:31,780 --> 00:32:43,300 The vulnerability was identified in July of 23, and then DBolt had designated it was patched as part, as a November 2023 patch and service release 17. 248 00:32:43,480 --> 00:32:50,100 Additionally, version 3.3 was designated to be end of life in December of 23. 249 00:32:51,080 --> 00:33:09,680 So, with that, uh, through this talk, I've essentially demonstrated that the entire dynamic security suite can be impacted by a single vulnerability, and that attack surface represents a recursive impact against all prior versions. 250 00:33:10,140 --> 00:33:18,800 Although, although the system is still patched, the root cause is still derived around the fact that the Linux partition itself is unencrypted. 251 00:33:18,800 --> 00:33:25,320 So there is a high likelihood that new vulnerabilities or new attack surfaces are going to be identified. 252 00:33:25,540 --> 00:33:34,720 However, uh, you can rest assured because there are still some requirements of physical access in order to take advantage of this attack surface. 253 00:33:34,720 --> 00:33:38,400 So, with that, let's discuss some mitigation strategies. 254 00:33:39,700 --> 00:33:52,120 Uh, first and foremost, the, uh, ATM software should be patched up to the latest version representing each major version that any environment, uh, is currently running. 255 00:33:52,120 --> 00:33:56,400 With the goal of ultimately moving into version 4.4. 256 00:33:56,400 --> 00:34:11,600 I'm proud to announce as a direct result of the security research and working with Deepold next door, they have redesigned the SuperSheep architecture and now offer full encryption of the Linux partition. 257 00:34:11,600 --> 00:34:15,580 This was released this year in April of 24. 258 00:34:15,580 --> 00:34:19,920 Additionally, there's a security check known as enable signature check. 259 00:34:19,920 --> 00:34:31,600 Disabling this prevents the TPM disk encryption key from being handed over to mount Winpart, essentially reducing the attack surface from Linux to recover the TPM encryption key. 260 00:34:31,840 --> 00:34:38,420 Additionally, you could just replace dynamic security with an industry recognized, uh, full disk encryption solution. 261 00:34:38,940 --> 00:34:48,660 Several secondary actions are also monitor for any malicious top hat entry, disable u- disable the USB ports, and ensure the hard drive can't be easily removed. 262 00:34:48,660 --> 00:34:53,480 There is no business pur- purpose for the hard drive to be able to pull- be pulled out of the system. 263 00:34:54,320 --> 00:35:04,040 With that, I apologize, uh, my demo videos weren't great, but, uh, please feel free to reach out to me, uh, via social if there's any comments or questions. 264 00:35:04,180 --> 00:35:04,180 .. 265 00:35:04,180 --> 00:35:04,700 . 266 00:35:05,420 --> 00:35:05,940 .. 267 00:35:05,940 --> 00:35:06,060 ... 268 00:35:06,900 --> 00:35:07,420 ... 269 00:35:08,040 --> 00:35:08,560 ... 270 00:35:08,560 --> 00:35:08,740 ... 271 00:35:08,740 --> 00:35:08,880 ... 272 00:35:08,880 --> 00:35:09,780 ... 273 00:35:09,780 --> 00:35:09,820 ... 274 00:35:09,820 --> 00:35:09,860 ... 275 00:35:09,860 --> 00:35:09,920 ...