[00:00.660 --> 00:05.220] Welcome to my talk, Where's the Money? Defeating ATM Disk [00:05.220 --> 00:08.940] Encryption. This is a Encore presentation to the MainStage [00:08.940 --> 00:12.560] Act I had just done earlier today. And before I came on [00:12.560 --> 00:15.160] stage you just found out I got a Wired article published. So [00:16.040 --> 00:22.020] all right. So starting off, my name is Matt Birch. I'm an [00:22.020 --> 00:25.060] independent security researcher with a passion for IOT and [00:25.060 --> 00:28.620] hardware devices. I am the developer of several MFA bypass [00:28.620 --> 00:32.240] tools affecting various MDM solutions. I have performed [00:32.240 --> 00:36.740] expert opinion against a major ATM manufacturer. And I've also [00:36.740 --> 00:40.600] had the opportunity of examining cartel designed ATM black box [00:40.600 --> 00:45.380] devices. For today's agenda, we'll take a brief look at the [00:45.380 --> 00:49.120] ATM industry, introduce Diebold Nixdorf's dynamic security [00:49.120 --> 00:51.960] suite, then dive a little bit deeper into the preboot [00:51.960 --> 00:55.620] authentication process of that software. And finally, we'll [00:55.620 --> 00:59.300] wrap up with a little bit of cat and mouse. So starting off, [00:59.300 --> 01:02.740] let's look at the industry. Essentially the ATM market is [01:02.740 --> 01:06.700] constructed of both consumer and financial class systems. The [01:06.700 --> 01:10.460] consumer devices are your standard ATMs that you see at [01:10.460 --> 01:14.360] your grocer, your gas station. Typically they run Windows CE [01:14.360 --> 01:18.700] and they're present everywhere in the market. They also lack a [01:18.700 --> 01:21.660] lot of the enterprise security controls that you typically see [01:21.660 --> 01:25.500] on most systems. However, the financial class systems are the [01:25.500 --> 01:29.520] enterprise ATM. These are the ones at your bank, the [01:29.520 --> 01:33.640] standalone units, through uh through wall units, and they're [01:33.640 --> 01:37.200] typically running Windows Embedded 10, uh some are now [01:37.200 --> 01:41.800] doing 11. And each manufacturer has their own ATM security [01:41.800 --> 01:45.660] stack. That security stack is designed to harden the ATM, [01:45.660 --> 01:51.800] provide endpoint protection and full disk encryption. Yep. So [01:51.800 --> 01:55.620] when you open up the ATM, uh it's essentially constructed [01:55.620 --> 02:01.820] across two hemispheres. You have the top half, which uh contains [02:01.820 --> 02:05.040] all the PC peripherals and computer components. And then [02:05.040 --> 02:08.520] you have the bottom half, aka the vault, which carries the [02:08.520 --> 02:12.080] cash cassettes and all the system's currency. Each halves [02:12.080 --> 02:15.720] are physically isolated from one another. And the physical [02:15.720 --> 02:19.740] security controls between the two vary drastically. The bottom [02:19.740 --> 02:22.700] half requires multi-factor authentication, has a digital [02:22.700 --> 02:25.700] combination lock, and uses an I button for secondary [02:25.700 --> 02:29.240] authorization. It's constructed with about an inch thick steel, [02:29.240 --> 02:32.280] has heavy bolt locking mechanisms. It is also equipped [02:32.280 --> 02:36.620] with seismic uh detection and tamper detection switches. [02:36.620 --> 02:38.980] However, the top half's significantly different. It's [02:38.980 --> 02:42.460] about one-eighth inch thick steel, has tons of vent holes, [02:42.460 --> 02:46.920] syst- uh the systems come with default tubular locks. And those [02:46.920 --> 02:49.640] locks leverage a cantilever locking mechanism where a [02:49.640 --> 02:52.380] cable's hooked up to the cylinder, so when you turn the [02:52.380 --> 02:55.840] key, the cantilevers come up and the front of the ATM will [02:55.840 --> 02:59.940] open. Uh additionally, the front of the ATM usually has a lot of [02:59.940 --> 03:03.580] plastic components, which makes it very easy for uh malicious [03:03.580 --> 03:06.580] entry- entry or destructive entry, maybe just stick a coat [03:06.580 --> 03:12.880] hanger in and pull the wire. Um and when we start looking at the [03:12.880 --> 03:17.600] attack vectors affecting ATMs, uh most of them all require some [03:17.600 --> 03:21.060] level of physical access. And with that, some of the most [03:21.060 --> 03:24.540] common attacks we usually see are black box devices, which are [03:24.540 --> 03:28.780] usually placed inside or outside the ATM, with the objective of [03:28.780 --> 03:31.860] intercepting the communications and getting the ATM to [03:31.860 --> 03:35.360] withdraw or dispense more funds than what was requested. Everyone [03:35.360 --> 03:37.660] knows the card skimmers, you plop those on the front, you [03:37.660 --> 03:41.400] steal people's card information, super interesting. Uh and then [03:41.400 --> 03:44.900] you have the heavy destructive attacks. Uh this involves RAM [03:44.900 --> 03:47.920] raiding. Uh you wrap a chain around an ATM, hook it up to [03:47.920 --> 03:51.120] your fork pickup, just rip the thing right out of the ground. [03:51.120 --> 03:53.740] Or you borrow your local construction company equipment, [03:53.740 --> 03:56.760] rip a hole right through the wall, and run away with the ATM. [03:56.980 --> 03:59.920] Some of the less common attacks we see here in the U.S. are [03:59.920 --> 04:04.580] explosive-derived attacks because our money ha- uh has a [04:04.580 --> 04:08.120] heavy paper consistency. Uh usually when you involve fire, [04:08.120 --> 04:11.220] it ignites and is counterproductive to theft. [04:11.220 --> 04:14.060] However, internationally, uh with the plastic-based currency [04:14.060 --> 04:16.920] that's not necessarily the case, and you see more of these [04:16.920 --> 04:23.940] attacks. Uh the ATM landscape is constructed of thousands of [04:23.940 --> 04:28.160] ATMs, all of which hold very large sums of cash. And despite [04:28.160 --> 04:31.220] the need for physical access, the criminal element against [04:31.220 --> 04:33.940] these systems has grown exponentially over the last few [04:33.940 --> 04:37.320] years. This is mostly associated to the deficiencies within the [04:37.320 --> 04:41.780] logical infrastructure of the ATM. Mainly the use of an [04:41.780 --> 04:45.780] unauthenticated API known as XFS that interacts between the [04:45.780 --> 04:49.000] software and hardware, allowing funds to be dispensed out of the [04:49.000 --> 04:53.160] ATM. Most of the applications on the ATM also are executed in [04:53.160 --> 04:56.760] the context of local admin. And then the ATMs are also designed [04:56.760 --> 05:01.460] with layers of default accounts for system administration, OS [05:01.460 --> 05:04.640] access, and other various activities. All of these have [05:04.640 --> 05:10.140] made the devices very attractive to organized crime. And we can't [05:10.140 --> 05:13.440] necessarily talk about ATMs without briefly mentioning the [05:13.440 --> 05:17.640] ATM network, which is what the ATM must be connected to so you [05:17.640 --> 05:21.980] can save your money from the bank. The ATM network is [05:21.980 --> 05:25.020] essentially a private connection that's restricted from the [05:25.020 --> 05:29.380] hosting provider or gatekeeper. And access to the ATM network [05:29.380 --> 05:32.420] requires some level of certification from that [05:32.420 --> 05:36.340] gatekeeper. And pieces of software and hardware are [05:36.340 --> 05:39.980] individually certified, so in environments where you have [05:39.980 --> 05:43.760] multiple different ATM vendors, it becomes very difficult for a [05:43.760 --> 05:46.760] financial institution to administer those systems. And [05:46.760 --> 05:49.340] usually they'll partner with some kind of managed services [05:49.340 --> 05:53.600] provider to ease that overhead. This all brings us to the [05:53.600 --> 05:57.680] subject of today's talk, which is Diebold Nixdorf and their [05:57.680 --> 06:01.720] proprietary Vynamic Security Suite software. Unlike all the [06:01.720 --> 06:06.300] other ATM security stacks, Vynamic Security has [06:06.300 --> 06:09.360] multi-vendor certification, allowing their software to be [06:09.360 --> 06:14.020] installed on any ATM platform and granting access to the ATM [06:14.020 --> 06:18.380] network. In 2015, they were assumed to represent about 35% [06:18.380 --> 06:22.260] of the ATM market. And in 2018 and 2019, they partnered with [06:22.260 --> 06:26.120] two of the largest financial institutions representing the [06:26.120 --> 06:31.400] U.S. gaming industry. AKA, Vynamic Security is present in [06:31.400 --> 06:35.260] almost every casino in the United States, if not most, [06:35.260 --> 06:40.340] right here on the Vegas Strip. It's cool. So now that we [06:40.340 --> 06:42.960] understand uh the landscape, let's take a look at the [06:42.960 --> 06:46.520] software. So just like all other security stacks, Vynamic [06:46.520 --> 06:50.000] Security has a number of default protections. USB filtering, [06:50.000 --> 06:53.840] firewall policy, delegated access, and disk encryption. [06:54.300 --> 06:57.800] However, it's not full disk encryption, where there's two [06:57.800 --> 07:01.740] partitions that are unencrypted. There's a UEFI partition, which [07:01.740 --> 07:04.240] is pretty common in your corporate image. But then [07:04.240 --> 07:06.940] there's also a Linux partition, which is somewhat of a red [07:06.940 --> 07:10.620] herring in a Windows-designed system. So taking a closer look [07:10.620 --> 07:13.960] of that Linux architecture, it self-identifies itself as [07:13.960 --> 07:18.100] Super's Chaff. Which, doing online reconnaissance didn't [07:18.100 --> 07:20.720] actually re- result in a whole lot of information being [07:20.720 --> 07:23.920] associated with that, but did identify this really cool game [07:23.920 --> 07:27.320] known as Worm's Armageddon. And in this game, you launch sheep [07:27.320 --> 07:31.740] as mobile projectiles against your enemies. The game was a lot [07:31.740 --> 07:34.580] of fun to play, I think we wasted at least 30 minutes on [07:34.580 --> 07:39.460] it, but that has nothing to do with ATMs at all. But what it [07:39.460 --> 07:42.720] did identify, because I'm really bad at foreign language, is [07:42.720 --> 07:48.640] Super's Chaff is actually German for Super Sheep. And Super [07:48.640 --> 07:52.720] Sheep was also an installation directly within the user [07:53.320 --> 07:56.840] directory path. And online reconnaissance of Super Sheep [07:56.840 --> 08:03.360] was much more resourceful. Specifically, in 2016 a [08:03.360 --> 08:07.220] consulting firm known as SecConsult released a blog [08:07.220 --> 08:10.620] article detailing code execution deficiency in a piece of [08:10.620 --> 08:14.840] software known as Cryptware, CryptoPro, and their underlying [08:14.840 --> 08:18.760] Super Sheep operating system. In this blog article there were a [08:18.760 --> 08:22.960] lot of similarities between dynamic security and Super [08:22.960 --> 08:25.940] Sheep, leading us to go back and then take a look at Debulb's [08:25.940 --> 08:29.580] user license agreements. And lo and behold, they specifically [08:29.580 --> 08:33.400] designated CryptoPro as being a third party licensed vendor. But [08:33.400 --> 08:36.440] that was only relevant in version 3.0 and all references [08:36.440 --> 08:39.320] to CryptoPro are removed from all later versions of dynamic [08:39.320 --> 08:44.040] security. So who is CryptoPro? It's a cryptographic spin-off [08:44.040 --> 08:47.440] started in 2002 designed to enhance the functionality of [08:47.440 --> 08:50.620] Microsoft BitLocker through pre-boot authentication. Today [08:50.620 --> 08:54.760] the organization is represented across numerous countries and a [08:54.760 --> 08:58.120] number of different domains, each one having a very unique [08:58.120 --> 09:02.720] and uh different online presence. However despite this [09:02.720 --> 09:06.560] suspicious representation they advertise over half a million [09:06.560 --> 09:11.340] licenses sold and they also uh state that employees love their [09:11.340 --> 09:16.160] encryption. So, you know, they got that going for them. So [09:17.000 --> 09:20.320] let's take a little bit deeper dive into how the pre-boot [09:20.320 --> 09:24.920] authentication function actually works. So powering on [09:24.920 --> 09:30.020] the ATM it executes a dual boot cycle. From UEFI a Linux [09:30.020 --> 09:34.220] partition is bootstrapped aka super sheep, does some black [09:34.220 --> 09:38.220] magic to the disk, shuts down, goes back through UEFI and then [09:38.220 --> 09:41.640] launches Windows. Windows performs an auto logon, [09:41.640 --> 09:44.560] bootstraps all the ATM software and the system comes up and [09:44.560 --> 09:49.120] becomes fully operational. Any attempt to modify the content of [09:49.120 --> 09:52.940] the Linux partition results into an integrity error page to be [09:52.940 --> 09:56.680] presented. But not all files are treated the same and modifying [09:56.680 --> 09:59.380] other directories or files results in a completely different [09:59.380 --> 10:04.360] integrity error uh to be shown. But this one has significantly [10:04.360 --> 10:07.760] more details represented in it and identifies about 253 [10:07.760 --> 10:13.300] elements are validated on the desk. Which uh leads us to need [10:13.300 --> 10:16.840] to understand what files are actually being checked. Going [10:16.840 --> 10:21.020] back to the Linux system we then start scouring the drive and [10:21.020 --> 10:25.480] looking to locate any uh hash sum indexes, tables or files [10:25.480 --> 10:29.440] that may have uh a list of what's actually being checked. [10:29.440 --> 10:33.080] Ultimately we found a log directory and in there there [10:33.080 --> 10:37.560] was a sum index of about 2500 files. Significantly larger than [10:38.640 --> 10:43.300] 253 however it did give us some indication of what was being [10:43.300 --> 10:47.880] checked. Uh the Linux partition itself had a little under 11,000 [10:47.880 --> 10:52.380] files giving us a delta of about 8200 files that needed to be [10:52.380 --> 10:55.820] validated as part of the integrity check. Or that weren't [10:55.820 --> 10:59.500] validated as part of the integrity check. So that's a [10:59.500 --> 11:02.740] whole lot of files to attempt to validate and identify a loophole [11:02.740 --> 11:08.360] in the validation uh process. But what I generally like to do [11:08.360 --> 11:11.780] is go back and take a look at a background image. I mean who [11:11.780 --> 11:14.980] really looks at background images uh and they have a very [11:14.980 --> 11:19.020] high visual representation when anything's modified. So we [11:19.020 --> 11:24.420] randomly pick an image, modify it, reboot the system and uh the [11:24.700 --> 11:28.140] default background is then presented. However just a few [11:28.140 --> 11:33.660] seconds later we got our hacked background. Being able to do [11:33.660 --> 11:36.800] this essentially establishes the foundation that the preboot [11:36.800 --> 11:40.460] authentication process is not completely infallible and there [11:40.460 --> 11:44.700] is an opportunity to redirect the execution workflow of the [11:44.700 --> 11:49.540] system. Ultimately with our modified background we were able [11:49.540 --> 11:52.960] to map out the authentic uh authentication process to occur [11:52.960 --> 11:57.340] across two phases. The first of which is executed within UEFI [11:57.340 --> 12:01.800] across the boot XSA or boot XSA2 system binaries. This is where [12:01.800 --> 12:05.660] the 253 contents of the disk were validated. Upon completing [12:05.660 --> 12:10.340] the UEFI validation uh Linux is then bootstrapped and from [12:10.340 --> 12:13.580] Linux out of root's profile phase two is initialized [12:13.580 --> 12:18.000] scanning the other 2500 files. Those 2500 files are then used [12:18.000 --> 12:22.360] as a seed to unlock the TPM. Unfortunately the ATM is [12:22.360 --> 12:26.480] configured with secure boots and all the binaries on the UEFI [12:26.480 --> 12:30.000] partition are digitally signed with the BIOS. Meaning we can't [12:30.000 --> 12:32.980] actually modify any of that content to gain control of the [12:32.980 --> 12:36.900] system. But what we can do is identify what files are [12:36.900 --> 12:40.800] validated during phase one. Identify anything that might be [12:40.800 --> 12:44.680] overlooked during the Linux initialization process allowing [12:44.680 --> 12:49.660] us to redirect the process of code execution prior to phase [12:49.660 --> 12:54.820] two being initialized. With that, challenge accepted. Let's [12:54.820 --> 13:00.280] play cat and mouse. We'll start off in version 18.X. In version [13:00.280 --> 13:03.640] 18.X we have uh the pre-boot authentication process carried [13:03.640 --> 13:07.940] out in UEFI. It's part of boot XSA2. 253 elements are [13:07.940 --> 13:13.020] validated. Uh the system is then initialized through uh the [13:13.020 --> 13:17.540] SysV architecture and several RC initialization scripts. Upon [13:17.540 --> 13:20.760] completing the RC initialization process, root performs an auto [13:20.760 --> 13:25.180] logon and then phase two is launched out of root's profile. [13:25.500 --> 13:27.700] When we take a look at the running environment of the Linux [13:27.700 --> 13:31.220] operating system, it's designed on the back of several temporary [13:31.220 --> 13:34.380] uh mount points. Temporary file system mount points. This is [13:34.380 --> 13:38.840] used to give a pseudo read only perspective of the disk cause [13:38.840 --> 13:41.560] the contents of those temporary file systems are then populated [13:41.560 --> 13:45.860] from tar archives. Again, those tar archives are also validated [13:45.860 --> 13:50.440] as part of phase one and not a valid attack surface. So this [13:50.440 --> 13:55.180] leaves us with a challenge. We know the index of phase one, [13:55.180 --> 13:58.200] what files are being checked and we need to compare that to the [13:58.200 --> 14:01.560] full initialization process of phase two in the SysV [14:01.560 --> 14:06.260] architecture. 253 elements though covers most of the RC [14:06.260 --> 14:09.200] initialization script and there's not a whole lot of uh [14:09.200 --> 14:12.680] attack surface or thread that we can take advantage of. Except [14:13.210 --> 14:18.440] they made one exception. Etsy init tab was overlooked. With [14:18.440 --> 14:21.600] that we have our uh initial foothold to perform code [14:21.600 --> 14:25.620] execution but we still need a staging directory to place uh [14:25.620 --> 14:29.680] things on the disk. Luckily like any good security solution, it [14:29.680 --> 14:33.980] ignores validation of most of its own integrity files and [14:33.980 --> 14:37.920] since the goal of this exercise was code execution, what better [14:37.920 --> 14:41.420] directory to use as a staging directory than super sheep of [14:41.420 --> 14:47.460] Europe. So with that, let's jackpot an ATM. Uh we cloned the [14:47.460 --> 14:50.540] RC initialization process over to our safe directory, patch [14:50.540 --> 14:54.220] global variables, inject uh proof of concept into the call [14:54.220 --> 14:58.260] to X, and then execute our new run level three from the [14:58.260 --> 15:05.260] unexamined Etsy init tab. With that, here's a demo, 2023-24064. [15:20.120 --> 15:21.920] Sorry guys. [15:36.580 --> 15:49.120] Okay. Unfortunately I have some technical difficulties with [15:49.120 --> 15:54.500] that. I apologize. Uh the videos are published as part of uh the [15:54.500 --> 15:57.060] media server. Apparently they don't execute well on this [15:57.060 --> 16:02.480] Macbook. Um anyhow in this video what I was demonstrating is we [16:02.860 --> 16:07.820] power on the virtualized file system. Uh it receives a preboot [16:07.820 --> 16:12.120] authentication error. We shut down the desk. We relocates uh [16:12.120 --> 16:17.940] our initialization files over to the uh staging directory. This [16:17.940 --> 16:21.720] then once root performs its auto log on, we receive code [16:21.720 --> 16:41.890] execution and a callback shell. So uh having code execution on [16:41.890 --> 16:47.550] the system uh essentially just having access to the Linux [16:47.550 --> 16:53.390] system itself. Uh the vanilla code execution is actually [16:53.390 --> 16:57.290] never enough. And uh the Windows partition is still [16:57.290 --> 17:02.410] technically encrypted. Uh however, Super Sheep comes with [17:02.410 --> 17:06.590] an app for that uh known as Mount Winpart. Uh Mount Winpart [17:06.590 --> 17:11.090] takes the TPM recovered disk encryption key and then passes [17:11.090 --> 17:15.890] that as a command line argument decrypting uh the Windows [17:15.890 --> 17:20.610] partition and giving it the uh opportunity to then execute a [17:20.610 --> 17:24.950] third phase of the integrity validation. So from uh having [17:24.950 --> 17:28.110] code execution on the Linux system, essentially all we need [17:28.110 --> 17:33.190] to do is uh resume the integrity validation process, monitor the [17:33.190 --> 17:37.310] proc command line, and then recover that TPM disk encryption [17:37.310 --> 17:42.450] key. From there, uh re-initializing the process just [17:42.590 --> 17:45.690] a few seconds later, we're able to recover the TPM disk [17:45.690 --> 17:51.710] encryption key, decrypt Windows, and uh load malware onto the [17:51.710 --> 17:56.090] system, interacting with the XFS API, giving us the ability to [17:56.090 --> 18:06.530] dispense funds from the ATM on demand. So uh doing the research [18:06.530 --> 18:10.790] essentially the timeline uh this vulnerability was observed to [18:10.790 --> 18:16.330] only impact version 18.X. Uh the vulnerability was identified in [18:16.330 --> 18:20.550] December of 21 and then confirmed remediated just a few [18:20.550 --> 18:24.230] days later in the next major release. At the time of this [18:24.230 --> 18:29.550] discovery, uh version 18 was designated to be end of life and [18:29.550 --> 18:33.830] uh Diebold Mixdorf had moved from uh to a new versioning [18:33.830 --> 18:37.330] number to introduce minor uh revision updates to their [18:37.330 --> 18:42.590] update. That's why it goes from 18 to 3.0. The way the attack [18:42.590 --> 18:47.070] surface was mitigated is phase one now validates Etsy and [18:47.070 --> 18:50.210] NetApp. So there's no opportunity to redirect code [18:50.210 --> 18:55.550] execution for the RC initialization process. However, [18:55.550 --> 19:01.030] what they also do is the PBA integrity process is decreased [19:01.030 --> 19:08.070] from 253 elements to only 56, about a 20% reduction. Reporting [19:08.070 --> 19:11.530] this to Diebold however, they did not designate this as a [19:11.530 --> 19:14.770] vulnerability and it indicated it was working by design because [19:14.770 --> 19:20.310] of the security protections that IMO provides. So what is IMO? [19:20.310 --> 19:24.630] Well IMO is an uh kernel integrity process where uh every [19:24.630 --> 19:27.650] binary on the system is digitally signed and that [19:27.650 --> 19:30.730] signature's also loaded into the Linux kernel. That signature [19:30.730 --> 19:34.370] carries details about the file name, the file path, very I know [19:34.590 --> 19:37.690] de- various I know details and that's appended as an extended [19:37.690 --> 19:41.590] attribute to every executable on the system. When you go to call [19:41.590 --> 19:46.030] those executables in a child or parent child relationship, uh [19:46.030 --> 19:48.830] the execution workflow and the signature is validated against [19:48.830 --> 19:51.210] the Linux kernel to decide whether or not that's allowed to [19:51.210 --> 19:56.390] be executed. However, the one thing that IMO doesn't do is it [19:56.390 --> 20:00.550] doesn't validate uh signature script interpretation. For [20:00.550 --> 20:03.690] example, if you call the system shell, which is an authorized [20:03.690 --> 20:08.370] signed binary, it's able to read uh the interpreted scripts, for [20:08.370 --> 20:12.770] example, root's profile script and then carry that execution [20:12.770 --> 20:19.410] workflow in the context of an authorized system binary. So [20:19.410 --> 20:24.470] let's carry on into service release nine. In service release [20:24.470 --> 20:29.910] nine, the Linux architecture is relatively unchanged. Uh however, [20:29.910 --> 20:34.050] examining the mountfs initialization script, there's a [20:34.050 --> 20:37.010] delete call that's initialized before the architecture of the [20:37.010 --> 20:41.410] system is actually mounted. Since the entire architecture of [20:41.410 --> 20:44.650] the system is mostly derived around the concept of a temporary [20:44.650 --> 20:51.970] file system, uh all we need to do is uh move fs tab to m tab. [20:51.970 --> 20:55.290] Then fs tab will be deleted before the mount command is [20:55.290 --> 20:58.090] called, removing all the instructions to build a [20:58.090 --> 21:02.650] temporary file system, allowing us to regain persistence to [21:02.650 --> 21:06.770] root's home directory. We patch the profile script and then [21:06.770 --> 21:13.150] again, gain code execution. Um I had a demo for this, uh 2023, [21:14.190 --> 21:17.250] 24063, uh unfortunately I I it's not playing properly on the [21:17.250 --> 21:22.050] Macbook, so I do uh apologize greatly for that. Uh but anyhow [21:22.050 --> 21:29.330] in the demo, uh if it were to play, it's uh we patch the [21:29.330 --> 21:34.850] offline disk, we uh move fs tab to m tab, uh the system auto [21:34.850 --> 21:38.290] boots back up, and then once root logs in, we get code [21:38.290 --> 21:43.010] execution and receive a callback to the initialization process. [21:46.320 --> 21:51.620] So this time, uh the scope and the timeline, uh this was [21:51.620 --> 21:55.400] observed to impact all prior versions of 330 as part of the [21:55.400 --> 21:59.160] dynamic security suites. Uh the vulnerability was identified in [21:59.160 --> 22:03.040] June of 22, and then confirm remediated the day after [22:03.040 --> 22:09.280] magically in uh version or service release 10. In service [22:09.280 --> 22:14.320] release 10, the mitigations were enforced by an uh update to [22:14.320 --> 22:17.840] the mount fs initialization script, now removing the delete [22:17.840 --> 22:23.120] call from uh to etsy m tab. So without etsy m tab there, uh we [22:23.120 --> 22:26.760] don't long we no longer have the opportunity to remove fs tab. [22:27.800 --> 22:32.860] Carrying on into service release 10. So as part of service [22:32.860 --> 22:38.060] release 10, uh we now have init tab validated, m tab does [22:38.060 --> 22:43.740] nothing, but what about the mount logic of the architecture? [22:44.720 --> 22:50.080] So mount is actually a very interesting command. Uh again, [22:50.080 --> 22:52.620] most of the security architecture of the security [22:52.620 --> 22:58.920] stack requires building a temporary file system. However, [22:58.920 --> 23:03.240] if we're able to use mount to stop uh that architecture from [23:03.240 --> 23:07.160] getting mounted, uh we then have an advantage to regain uh [23:07.160 --> 23:11.260] persistence to root's home directory. One very interesting [23:11.260 --> 23:15.200] limitation to mount is if you happen to execute mount against [23:15.200 --> 23:18.400] the mount point that's previously been leveraged, the [23:18.400 --> 23:22.820] call to mount will fail. In a Linux architecture, what's the [23:23.320 --> 23:26.640] default uh mount point that's used by the system? The root [23:26.640 --> 23:30.320] file system. So if we flatten the file system and then [23:30.320 --> 23:35.020] redirect root bar and temp to root, uh we're able to regain [23:35.020 --> 23:38.340] persistence to root's home directory because when those [23:38.340 --> 23:41.520] temporary file systems go to mount, the mount point already [23:41.520 --> 23:44.800] exists and that call will fail. This then gives us the [23:44.800 --> 23:49.900] opportunity to uh jackpot root's profile and regain code [23:49.900 --> 23:58.620] execution on the system. Again, I had a demo uh 2023-24064 uh [23:58.620 --> 24:05.020] where we uh flatten the file system and uh are able to [24:05.020 --> 24:09.480] redirect code execution powering back on the system uh once root [24:09.480 --> 24:18.940] logs in, we receive code execution. So this time going [24:18.940 --> 24:24.240] through uh going through the timeline, uh all prior versions [24:24.240 --> 24:27.880] of 330 were known to be vulnerable including uh this [24:27.880 --> 24:32.500] time 4.0, 4.1 and 4.2. The vulnerabilities were identified [24:32.500 --> 24:36.720] in June of 2022 and then confirmed remediated in version [24:36.720 --> 24:43.820] in service release 12 immediate uh in December of 22. In service [24:43.820 --> 24:46.920] release 12, the mountfs initialization script was then [24:46.920 --> 24:50.600] updated with several uh additional delete calls. Now [24:50.600 --> 24:56.140] we're moving root bar and temp and mount and uh removing any [24:56.140 --> 24:59.700] opportunities for us to do sim links or redirect the execution [24:59.700 --> 25:04.200] essentially ensuring those directories are empty. Let's [25:04.200 --> 25:10.120] carry on in service release 12. In service release 12, how do [25:10.120 --> 25:14.520] you work around a delete call? Well, mount still has some magic [25:14.520 --> 25:18.400] logic tied into it where earlier on in the initialization [25:18.400 --> 25:24.760] process, uh the kernel uh kernel run space is mounted to specific [25:24.760 --> 25:27.700] mount points. And whenever you place a file on a mount point, [25:27.700 --> 25:31.020] it no longer becomes accessible. Since all the previous mitigation [25:31.020 --> 25:36.280] uh steps were initiated as part of mountfs, uh essentially we [25:36.280 --> 25:41.300] just move mountfs to proc. Once the uh kernel initializes, the [25:41.300 --> 25:44.600] temporary file systems are built allowing us to regain persistence [25:44.600 --> 25:53.600] to root's profile script. Again, this was recognized as CVE-2023-28865 [25:53.600 --> 26:00.920] uh in the demo if it had played. Uh it would show that um we're [26:00.920 --> 26:06.740] able to uh redirect uh the file location uh move that over to [26:06.740 --> 26:10.500] proc and once the Linux kernel powers on, we receive code [26:10.500 --> 26:16.460] execution and our callback. Just as before, all prior versions [26:16.460 --> 26:18.700] of 330 were known to be vulnerable to this attack [26:18.700 --> 26:23.920] surface, including uh all versions of 4.0, 4.1, and 4.2. [26:23.920 --> 26:27.660] Essentially representing the entire security stack of dynamic [26:27.660 --> 26:31.340] security at this time. The vulnerabilities were identified [26:31.340 --> 26:35.180] in December of 2022 and then confirmed or mediated in [26:35.180 --> 26:40.420] February of 23 as part of service release 15. In service [26:40.420 --> 26:45.820] release 15, the uh phase one integrity check was further [26:45.820 --> 26:49.680] updated to include a number of null sum values. Essentially [26:49.680 --> 26:53.240] validating a number of critical mount points to truly be empty [26:53.240 --> 26:57.880] before the Linux partition was allowed to boot. With this, uh [26:57.880 --> 27:02.140] we don't have much opportunity to modify the disk and it closes [27:02.400 --> 27:07.120] a lot of the previous attack surfaces. So let's carry on with [27:07.120 --> 27:12.180] service release 15. So in service release 15, introducing [27:12.180 --> 27:16.860] those null sum values, uh I like to come across the idea that the [27:16.860 --> 27:21.240] more complex a security control is, the more likely that [27:21.240 --> 27:24.720] something is gonna be overlooked as part of that validation [27:24.720 --> 27:29.160] process. If we try to create a file or create a sim link to a [27:29.160 --> 27:32.780] known file, that produces a hash hash sum as part of the phase [27:32.780 --> 27:36.380] one integrity check and the pre-boot authentication process [27:36.380 --> 27:41.600] fails. However, if we establish a directory or a tree of uh [27:41.600 --> 27:47.680] empty directories, no sum value is created. Additionally, broken [27:47.680 --> 27:53.600] sim links also do not produce a hash sum value. However, to take [27:53.600 --> 27:56.620] advantage of this, we need this new staging directory. Uh to [27:56.620 --> 28:00.160] identify one, we would return to the previous attack surface and [28:00.160 --> 28:04.740] look to identify any directory structures that are created once [28:04.740 --> 28:08.140] the Linux kernel is initialized, but don't have a presence on the [28:08.140 --> 28:12.320] offline disk. Essentially allowing us to establish a [28:12.320 --> 28:18.460] transversal point to redirect uh to a new staging directory. [28:18.600 --> 28:21.320] Luckily after just a few seconds, we're able to locate [28:21.320 --> 28:25.180] dev block, which was a special mount point mod gate or uh [28:25.180 --> 28:29.120] associated to the block device of the Linux partition itself. [28:29.120 --> 28:31.940] This was also observed to be present in all versions of [28:31.940 --> 28:38.600] dynamic security. So, what we need to do is move uh our uh [28:38.600 --> 28:41.740] critical mount points over to a new staging location. For [28:41.740 --> 28:45.540] example, root to root 2. And then we link to those through [28:45.540 --> 28:49.940] our transversal point dev block. Offline on the disk, those sim [28:49.940 --> 28:52.960] links are then broken. However, once the Linux kernel [28:52.960 --> 28:57.500] initializes, those links then become valid, allowing us to [28:57.500 --> 29:01.340] redirect code execution and regain persistence to root's [29:01.340 --> 29:09.640] home directory. Uh this was identified as CVE-2023-33206. [29:09.760 --> 29:15.440] Again, uh in the demo, had it played uh properly, it would [29:15.440 --> 29:19.840] show that we uh create the new staging directories and [29:19.840 --> 29:23.360] redirect to our staging points. Once the virtualized system [29:23.360 --> 29:27.740] powers on, we would receive code execution and our callback [29:27.740 --> 29:34.660] shell. So, just as before and all the previous attacks, this [29:34.660 --> 29:37.400] vulnerability impacted all prior versions of dynamic [29:37.400 --> 29:41.520] security, including all versions, prior versions of 4.0, [29:41.520 --> 29:46.800] 4.1, 4.2, and 4.3. The vulnerability was identified in [29:46.800 --> 29:52.440] April of 2023 and then confirmed remediated in July of 23 as part [29:52.440 --> 29:58.280] of service release 16. In service release 16, the phase 1 [29:58.280 --> 30:02.060] integrity process was further updated, this time validating [30:02.600 --> 30:07.140] uh whether or not sim links were broken or valid uh on the Linux [30:07.140 --> 30:11.820] partition. Broken sim links now produce a uh pre-boot [30:11.820 --> 30:15.380] authentication failure, disabling the system to boot up. [30:15.380 --> 30:20.540] But, interestingly enough, they also, dbold also walked back the [30:20.540 --> 30:23.860] previous mitigation strategies that were observed in the mount [30:23.860 --> 30:28.240] FS uh initialization script. Although it doesn't necessarily [30:28.240 --> 30:31.180] reproduce the same attack surfaces, because now we're [30:31.180 --> 30:36.480] doing null sum validation and sim link validation, uh it is [30:36.480 --> 30:41.500] interesting that uh mitigation strategies are are backwalked. [30:42.240 --> 30:49.540] So, finally, this brings us to service release 16. As part of [30:49.540 --> 30:54.340] service release 16, we have sim link validation and null sums. [30:54.340 --> 30:58.580] The attack surface of the Linux architecture is relatively [30:59.120 --> 31:04.060] reduced. However, the whole architecture of the system is [31:04.060 --> 31:08.900] based around the requirement of hash sum values. You know what [31:08.900 --> 31:12.220] doesn't change a file's hash sum? The file attributes [31:12.220 --> 31:17.380] associated to that hash sum. So, for example, if we remove uh [31:17.380 --> 31:20.540] the execute permission of a file, the file still has the [31:20.540 --> 31:25.500] hash the same hash sum value. For example, if we just remove [31:25.500 --> 31:29.340] the execute permission from IMA, we're able to disable all [31:29.340 --> 31:31.940] signature verification processes of the Linux [31:31.940 --> 31:35.740] architecture entirely and then obtain the ability to execute [31:35.740 --> 31:41.600] any code that we want. This vulnerability was identified as [31:41.600 --> 31:50.360] CVE-2023-40261. Again, the video is not playing, um, but [31:51.500 --> 31:55.720] in the video, uh, we disabled the execute permissions of IMA [31:55.720 --> 32:00.880] and uh power on the virtualized file system. Once root performs [32:00.880 --> 32:05.060] its auto logon, we then re-regain code execution and [32:05.060 --> 32:09.080] receive our callback shell, essentially defeating the whole [32:09.080 --> 32:16.520] system once again. Just as before, this attack surface was [32:16.520 --> 32:21.320] observed to impact all prior versions of 330, including all [32:21.320 --> 32:27.340] prior versions of 4.0, 4.1, 4.2, and 4.3. Again, representing, [32:27.340 --> 32:31.780] uh, an impact against the entire dynamic security suite software. [32:31.780 --> 32:36.280] The vulnerability was identified in July of 23, and then [32:36.280 --> 32:39.540] DBolt had designated it was patched as part, as a November [32:39.540 --> 32:45.740] 2023 patch and service release 17. Additionally, version 3.3 [32:45.740 --> 32:53.140] was designated to be end of life in December of 23. So, with [32:53.140 --> 32:56.860] that, uh, through this talk, I've essentially demonstrated [32:56.860 --> 33:01.980] that the entire dynamic security suite can be impacted by a [33:01.980 --> 33:05.640] single vulnerability, and that attack surface represents a [33:05.640 --> 33:11.240] recursive impact against all prior versions. Although, although [33:11.240 --> 33:14.840] the system is still patched, the root cause is still derived [33:14.840 --> 33:18.800] around the fact that the Linux partition itself is unencrypted. [33:18.800 --> 33:21.760] So there is a high likelihood that new vulnerabilities or new [33:21.760 --> 33:26.920] attack surfaces are going to be identified. However, uh, you can [33:26.920 --> 33:30.500] rest assured because there are still some requirements of [33:30.500 --> 33:33.860] physical access in order to take advantage of this attack [33:33.860 --> 33:37.100] surface. So, with that, let's discuss some mitigation [33:37.100 --> 33:43.900] strategies. Uh, first and foremost, the, uh, ATM software [33:43.900 --> 33:47.820] should be patched up to the latest version representing each [33:47.820 --> 33:51.380] major version that any environment, uh, is currently [33:51.380 --> 33:54.940] running. With the goal of ultimately moving into version [33:54.940 --> 34:00.200] 4.4. I'm proud to announce as a direct result of the security [34:00.200 --> 34:03.900] research and working with Deepold next door, they have [34:04.700 --> 34:09.720] redesigned the SuperSheep architecture and now offer full [34:09.720 --> 34:12.280] encryption of the Linux partition. This was released [34:12.280 --> 34:17.100] this year in April of 24. Additionally, there's a security [34:17.100 --> 34:21.440] check known as enable signature check. Disabling this prevents [34:21.440 --> 34:25.720] the TPM disk encryption key from being handed over to mount [34:25.720 --> 34:29.400] Winpart, essentially reducing the attack surface from Linux to [34:29.400 --> 34:32.940] recover the TPM encryption key. Additionally, you could just [34:32.940 --> 34:36.620] replace dynamic security with an industry recognized, uh, full [34:36.620 --> 34:40.500] disk encryption solution. Several secondary actions are [34:40.500 --> 34:44.900] also monitor for any malicious top hat entry, disable u- disable [34:44.900 --> 34:48.100] the USB ports, and ensure the hard drive can't be easily [34:48.100 --> 34:50.920] removed. There is no business pur- purpose for the hard drive [34:50.920 --> 34:55.320] to be able to pull- be pulled out of the system. With that, I [34:55.320 --> 34:59.100] apologize, uh, my demo videos weren't great, but, uh, please [34:59.100 --> 35:02.480] feel free to reach out to me, uh, via social if there's any [35:02.480 --> 35:04.040] comments or questions. [35:04.180 --> 35:04.700] ... [35:05.420 --> 35:05.940] .. [35:05.940 --> 35:06.060] ... [35:06.900 --> 35:07.420] ... [35:08.040 --> 35:08.560] ... [35:08.560 --> 35:08.740] ... [35:08.740 --> 35:08.880] ... [35:08.880 --> 35:09.780] ... [35:09.780 --> 35:09.820] ... [35:09.820 --> 35:09.860] ... [35:09.860 --> 35:09.920] ...