FORCEDENTRY - Paris (Video)
Presented by: Christopher Crowley
PresentationThe "FORCEDENTRY" exploit is a zero-day vulnerability in Apple's Core Graphics library that allows an attacker to send a message to a target's mobile device, compromise it, and gain access to private communications without user interaction. The exploit is characterized by an integer overflow flaw in the Core Graphics library and requires a mechanism to remotely break Address Space Layout Randomization (ASLR) and deal with code execution restrictions on iOS devices.
Featured Clips
"Hopefully you're using this information in a way that's useful to you, and hopefully you're using it in a way that's useful to you, and hopefully you're using this for good, and that you're helping yourself and your family and your company that you work for, and people in your community to understand the risks associated with mobile devices and the opportunities that some people avail themselves to in terms of abusing our mobile devices and the information that we share through them and our private communications."
Full Transcript / Content
--- Page 1 ---
Great. Thank you very much to everybody for tuning in. My name is Christopher Crowley. Most of you know who I am, but just a really brief background, because I have a lot of things to cover in the next 30 minutes. I've been working in computers for a really long time. I've worked across a number of different industries, formerly education, US government, civilian, Department of Energy and Department of Defense contractor for a number of years. Currently work as a consultant and an instructor. Basically, if you want the slide deck, you can download it from this URL. I'm going to post it shortly after this talk finishes. Also it'll be available through the SANS website. Basically, this information that I'm sharing in this webcast is, you know, kind of sensitive information in the sense that this is known to be used in order to track individuals. So I just ask that, you know, hopefully you're using this information in a way that's useful to you, and hopefully you're using it in a way that's useful to you, and hopefully you're using this for good, and that you're helping yourself and your family and your company that you work for, and people in your community to understand the risks associated with mobile devices and the opportunities that some people avail themselves to in terms of abusing our mobile devices and the information that we share through them and our private communications. If you want to find out more about me, CicroMontance on Twitter. I've got my handle on Twitter. I rarely use Twitter. I kind of feel like it's like television. And so it's like a million channels, nothing on and you have to really sift through stuff in order to find good things. We'll acknowledge there are some good things that are out there, but I'm just not there very frequently. If you do want to connect with me in some fashion, the better place is through LinkedIn. I have a bunch of these link shorteners that are in here, the Mgt517.com slash LinkedIn that you can go to. All of that is just link shortening to bring you to the actual resource because I just find that it's easy to do. Thank you. easier to do that. So I'm going to start with a brief section on what you really need to know up front. This will probably take me five to 10 minutes to get through, and then after that I'm going to go into a lot more details. All of the information that I'm presenting on today is derived from a couple primary sources. They basically are the citizen labs posts on the topic. The citizen lab post, the one that most people are focusing on is this 2021-09-13 blog post, which again, all of these links are case sensitive if you want to follow them. So cl-forcedentry, citizenlab-forcedentry, this was the one that just came out a couple of days ago, but there's actually an earlier blog post that cites forced entry as a zero day,
--- Page 2 ---
which came out a few weeks ago, with some additional technical details and I'll fold some of those. into this talk as well. And then of course the Apple security updates where they're acknowledging the fact that this is, you know, zero day, by citing that it was observed or suspected of being executed in the wild. So I do not have access to the actual phone or the or the exploit or the details. The information that I'm sharing here is derived from these sources with the presumption that these sources are trustworthy and accurate to the degree that they can be. So the reality of what we're talking about here is that we're talking about a lot of information that we don't have access to. So what we're dealing with is a dangerous zero click zero day, no longer truly zero day, because now a patch has actually been released. But when it actually came out, definitely a zero day, zero click. And this is the dangerous thing is that it's zero user interaction required, simply by an attacker sending a message to a target's mobile device. The mobile device becomes complex. becomes compromised. And this is what's especially dangerous about this particular circumstance. I'm going to go into some more details about this, but I'm just trying to keep it at the very high level for this initial section. So the net result is a patch now. The patch now covers basically two CVEs. So the updated 14.8 for iOS patch is covering 3860 and 3858 in order to address these. This has been dubbed forced entry by Citizen Labs, and I'm going to talk a little bit about more details related to this particular exploit chain and the components that are there. Also important things to understand is that this has probably been in use since February of this year. So here we are now in September. The phone that it was discovered on was provided to Citizen Labs of March of 2021. And so their assessment is that it was probably first released around February of 2021 and has been in active use since then. So as you're going back and doing your investigation from a historical perspective, you now need to think back to that time frame is when this probably started related to the exploits. Further, Citizen Labs is assessing the origin of this particular attack to NSO via their Pegasus software. And I'll talk about the details associated with that further in terms of the assessment and the origin and the capabilities that are in there. I'll also talk a little bit more later about the exploit. The exploit is assessed to be an integer overflow flaw in the core graphics. And that's that 3860 CVE that's there. And so this is what allows the initial zero click interaction. There are probably other latent flaws which have not yet been acknowledged or addressed or, you know, by Apple. But so that is the start of the exploit chain.
--- Page 3 ---
And that was what was patched. Also, the 30858 patch, and I'll talk about this in more detail later. This is a patch for essentially the same problem. The rest of the exploit chain which Citizen Labs in my opinion has likely assessed, and apple has likely assessed, have not been disclosed yet. And there's a mention in their blog post about the fact that there's, you know, basically limited details released related to that. And, in my opinion, on the suppression of those details is likely to increase the complexity for other threat actors. The small errors I'm going to talk about today, but typically, they're the。 uh attempting to reverse engineer and patch diff uh in order to determine how this particular exploit chain was actually constructed so right now your action items are to implement a patch now type approach on ios mac os and watch os okay so the core graphics library has this flaw across essentially all of the operating systems that apple is maintaining um to investigate the compromise scenario um back through february of uh 21 so february of this year now the unfortunate thing in terms of this is that there's likely zero visibility that a regular user would have in order to be able to assess that their phone has actually been compromised so there is some information that you can use from an analysis of a phone without having to jailbreak it so you can make a backup you can look through logs of any device which you think has been suspected for crashes related to the copy gift from path to destination path error in uh reported in either core graphics or image io and again i'm going to talk about more details related to this uh in the rest of the talk but i'm trying to just do a very high level overview citizen lab blog post has a bunch of links that are related to the specific iocs those iocs are related to what they assess to be pegasus infrastructure and so even if you can't get access to the phone itself you could look through if you have any network information you could look for communications to the specific iocs related to that in addition to that there is a there is a good initial summary for some of the forensics techniques that you could use in order to apply if you do have data to do the investigation and so do have a phone and if you do make a backup to look for detailed material which is present on the phone and this particular twitter thread which this link gives you you know a thread reader that's kind of a roll-up of the whole thing talks about how you would look for the specific gif files in the in the basically a specific database in order to identify if there were gifs that were sent in and then further i would use the citizen labs information about
--- Page 4 ---
the pdf attributes for having the jbig deflate essentially additional data thread that's inside of it and they have more that's inside of it and they have more details on their blog if you find that there were a bunch of gifs sent then you can actually look at those potentially on the file system in the backup in order to be able to determine if they have characteristics which citizen labs has identified okay so that is the 10 minute high level too long didn't read summary okay um and now i'm going to start to go into details and i have seen already in the zoom meeting that there are several questions that have been posted please put the questions in i will handle them at the end i have a ton of stuff that i need to go through in the next 20 minutes and so hopefully there's some time at the end in order to to answer those questions but first question yes the slides will be available now as i go into this i'm going to talk about a bunch of details i'm going to try to differentiate the details of what are known and where my speculation is i'm also going to cite some things that we know are have been investigated because individuals are being targeted and trapped probably by government organizations and i'm thankful to you know be able to say that i feel like i do live in a place where i'm able to uh you know protect my information systems and not feel like i'm specifically targeted you , although who knows after this talk um but the reality of this is is that there is real world threat to individuals as a result of the information uh that we're sharing here okay so just uh i want to treat it with appropriate sensitivity but also i want to acknowledge the fact that there are a lot of details in here um that are interesting to us um and in a way it's some schadenfreude uh in terms of our uh you know peeking behind the way that this actually works uh you know working as good as you did um but but in terms of of an uh how you could use it as a tool to advocate your situation i'll run the program pretty slow and give you a few slides on this i know it's really interesting because i'm making some거야 respond across and i'll tell everyone out there if that's ever an issue in the survey um ways that I think that you could do that. I think that this is important. So the zero day disclosure, in addition to now this being discovered, all of the other advanced threat actors who are working in this type of space are now aware that this exists and they were probably already in possession of an instrumented attack related to this. So whether it was NSO or not, I think that you need to think about it as now if you are
--- Page 5 ---
targeted and your staff are targeted by any of these sort of threat actors, then you should be considering that this has now actually been released. And so there's specific evidence which was presented in the Citizen Labs post and they allude to the fact which they've suppressed additional information and that they have and there's one specific detail, actually, two. specific details that they're going to talk about that they use in order to do the correlation. They probably have other information that they're not yet sharing and they're doing that for OPSEC reasons. In the schema that I use frequently for attribution in order to make it simpler is this graphic which I've derived from the Defense Science Board's report, which is something that's a phenomenal report. But the real coup de grace is this executive summary. One figure where they group threat actors into three tiers, the $10 club who reuses vulnerabilities, the million-dollar club, which is capable of discovering vulnerabilities and the billion-dollar club, which is capable of introducing vulnerabilities into information systems, according to the report, using the full spectrum of capabilities, which means that they basically can leverage all typical intelligence. Excuse me, tradecraft in order to introduce flaws in our information systems. And in my opinion, this particular one is the level million-dollar club, right? So this is someone who was able to discover a vulnerability based on assessment of the materials. Now, I don't like this. It's not a good thing. But at the same time, this is status quo for us in information systems. In the modern day, this is the reality of what we're dealing with right now. And in my opinion, if you're surprised by this, you're not ready for dealing with the state of worldwide affairs for information systems. You should be ready to be able to shift gear to deal with patching on a zero-day environment. And if you're not, you should work to operationalize that. Yeah. That's a good point. I think it's important to have that level of response capability. Now, if you do have the ability to digest specific indicators, if you do have the ability to do this sort of investigation, I suggest that you read through some of the details where Citizen Labs is talking about the various operators of Pegasus infrastructure. This is software which has sold. And I don't want to get into the details or debate related to the Pegasus infrastructure. the space for the sale of this sort of infrastructure but according to citizen labs this is software which is sold in order to be able to maintain visibility into people's phones and so you should be looking through the specific iocs from the multiple posts from citizen labs okay it cites infrastructure domains ip addresses and this is a way that they actually talk about the mechanism that the attack was conducted and how they actually initially monitored in order to do the visibility that they're now sharing with you okay so there are
--- Page 6 ---
those details i'm not going to go into the details in this talk of that but but we will talk about that in part but i will also go into the details of the question in the question that earlier in the video will talk about the becomes unneeded and what the infrastructure is because if it comes to that you're going to be away from that sort of infrastructure because it's all well documented it is likely that in addition to the iocs which they discovered and shared there are other undiscovered operators of this infrastructure realize that those IOCs have been spoiled for those operators and that your information might be different from that, but it still might point to this specific problem. So one of the key elements that Citizen Lab cites as attribution specifically to NSO is the fact that the phone was infected with the Pegasus spyware. And since Pegasus was on the phone, they're assessing that this was NSO, or at least a part of NSO having done that. That could be an incorrect assessment, but that is part of their assessment. Another part of their assessment is something which they cite as cascade fail. And this cascade fail name derives from a specific column in a table. And in this case, I'm showing the query at the bottom and I'll speak to it in a moment, but a specific column in a table where what they are saying is that their investigations of what they attribute to be NSO are not true. And so they're saying that they're not true. And so they're saying that they're not true. And so they're saying that they're not true. And so they're saying that they're not true. Pegasus injection actually has a distinctive characteristic with the incomplete deletion of data from the data usage SQLite table on iOS devices. And the rationale is that they suspect that the Pegasus software is intending to suppress usage information. And because this software is injected at a privileged level within the iOS device, they're deleting information from a table. But Citizen Labs is pointing out, would they assess to be a mistake that was made by citing the fact that they delete it from the from the Z process file, but they don't delete it from the Z live usage table. And so that table Z process has been cleaned up in order what's in order to suppress what's depicted to the user. However, if you actually do an investigation, you can actually find a smoking gun indicating that the information has been deleted from the Z process table, but was not deleted from the Z live usage table. And so this discrepancy then becomes something where you're catching the software in a lie, and able to assess this and Citizen Lab says they've only observed this from Pegasus. And so here is the specific SQL query that they cite in a blog post that allows you to actually make that
--- Page 7 ---
connection. A second assessment component that they cite in the write up, and this is the more recent write up, is that they cite in the write up, and this is the more recent write up, and this is the longer write up that, you know that they actually have is the presence of a process named set framed D, and set frame D is distinctive process name that was part of the exploit chain delivered. And so what they say in their blog post is that they have not previously disclosed the knowledge of this specific process. And so they said that they discovered it in July of 2020, but suppressed information. So this is, again, they're reinforcing their own position, saying this is what we saw previously, we assessed it to this particular group previously, and now we're seeing it again, and that this process name is distinctive enough from other attacks that we've studied that we're using this specific detail in order to accomplish the threat attribution to NSO. Okay, so this is the attribution component. Let's talk a little bit about the vulnerability. And so the common vulnerability enumeration 30860 is assessed by Apple to be an integer overflow. And so they cite the fact that this update applies to iOS, iPadOS. There are actually other posts in the Apple security updates, which you can link to. Which show this exact same core graphics fix. The core graphics fix, the 30860, is cited with credit to the Citizen Lab. The 30858 is actually cited to an anonymous researcher, and I'll talk about that in a bit. Okay, so this is what the flaw is that Apple patched. And there's some interesting details that cascade. Paid from this, and so I'm going to get into that, but I want to start here. This is the patch that was deployed, and the integer overflow. As a category of programmatic flaws, which are a result of a. Calculation which occurs in memory which then attempts to write information back into a memory space and because of the Interfer the integer overflow, it actually ends up result resulting in an overflow in memory. Which. allows for the introduction of additional information right and so this is classic buffer overflow implemented through a uh an integer overflow vector okay a common category of programmatic errors which allow introduction of attacker controlled material into memory and so now from that component i want to delve into the idea of zero clicks and so the idea of zero clicks is that for mobile devices there really isn't a service side opportunity for remote code execution it doesn't really exist if you want more details on like what the attack surface is for mobile devices there was actually a a talk that i gave at the end of last year which is hosted on san's website where i actually enumerate my opinion i'm sorry i provide my opinion and enumerating the entire product entirety of the attack surface of mobile devices. So if you want to get smart on that, that's a good
--- Page 8 ---
talk to go and sort of quickly absorb what the attack surface is for mobile devices. And so an attacker seeking remote code execution is probably going to be relegated simply to messaging apps to be able to deliver content that's processed by the device without any user interaction. And there's a classic example of this with stage fright targeting Android, where it was an MMS message that when the device attempted to render the content in a thumbnail form that the exploit was triggered. And so I'm synthesizing the next set of information from a Project Zero blog post where they talk about the needs for zero-click interaction. They say there needs to be some initial memory corruption vulnerability that allows the introduction of information into memory. That the attacker controls. And so this is that integer overflow, right? That's the integer overflow that we're dealing with. There also needs to be some mechanism to remotely break ASLR. And we know that iOS actually implements that. There also needs to be the opportunity to basically deal with the code execution restrictions that are in place on iOS. And there probably needs to also be some sandbox escape. And they're talking about this on Project Zero in the context of the code execution restrictions that are in place on iOS. And they're talking about this on the Blast Door service, which is basically set up specifically in order to make it much harder to be able to deliver zero-click exploits, whether they're zero-day or not. Blast Door was actually implemented in response to previous zero-click exploits. And they deployed it first in iOS 14. And so this is essentially a tainted data processor, which implements a large number of security controls in order to make it so that when the phone, the device, or whatever it is, is handling the data that's coming in, it'll actually rebase the randomization for instances of it. If there is a crash in anything inside of the Blast Door protected processing, they actually have a doubling off algorithm that makes it so that it's harder and harder for the attacker to be able to attempt to brute force things. And so I would encourage you, if you're interested in the details associated with this, in reading the entire Project Zero Blast Door, write up, because it's insightful in terms of what the protections are on iOS, which are specifically intended to stop this sort of attack. And so I'm simplifying that blog post in order to express what happens here. So we have the APSD, which is interacting with the Identity Service D, which is interacting with IAM Agent. And this is all governed by the Blast Door interactions. So restrictive coding practices, limited file system read, limited network read. It's all in the Blast Door managed space. And so part of this workflow of what Blast Door is handling is it checks to see if there's serialized data. And in the serialization and the
--- Page 9 ---
deserialization, if there is serialized data, it's handed over to the IAM Transcoder Agent. And so I mentioned IAM Transcoder Agent previously, and I'll bring it up again in a moment. And so this circumstance here is that in one of the, the write-ups that Citizen Labs talk about, they actually talk specifically about two crashes, momentarily coming up what they are, of IAM Transcoder Agent in the logs specifically relevant to this attack as they're observing it. The first is a crash, copy GIF from file, excuse me, from path to destination path error. And this is actually reported associated with image IO. Now the image IO is a file that is associated with the IAM Transcoder Agent. The image IO crash is a result of the 27 files, all of which are exactly the same from the phone that they're actually investigating for this. Okay, so that crash occurs from this IAM Transcoder Agent related to that particular copy GIF from path. And then the second type of crash is related to the core graphics processing for parsing the JBIG data in the PDF file. And they cite that they were actually four distinct pdf files on that phone that they were looking at that was compromised and so as i'm looking through this and synthesizing the information about how blast door is attempting to protect things and how the exploit was actually delivered right we have some additional details from the older blog post which talks about the thermal monitor d process which is reporting errors and then is invoking a process called tailspin now tailspin is a developer capability process which is intended to be able to monitor crashes and extract information from the crashes and what they report is that they see three crashes i'm sorry three processes spawned and two crashes so if you're thinking back to what i said about what project zero says that you need to do in order to actually have a zero-click interaction part of that manipulating inside of the space dealing with address space layout randomization they might be using the tailspin developer capability to collect information from the process in order to use that to deal with the address space layer randomization to extract the appropriate memory addresses to then be able to do the exploit now that part of that is speculation on my part i do not know that and i have not technically assessed it but based on the data that i've collected i think there's a lot of information out there that i'm going to be able to use to do that but based on synthesizing this information i think that that's where the next part of this exploit actually is right so this tailspin process survives and what's interesting also from the citizen lab blog post is that they cite that the amf id is attributed as the responsible process amf id apple mobile file integrity daemon is responsible for doing the checks for the digital signatures on the code which is attempting to run
--- Page 10 ---
very interesting that amf id would then spawn out a tailspin process essentially the thing which is responsible to check to see if digital signatures are valid is in some way responsible for the tailspin process which then is associated with the continuation of the exploit chain okay so these details of what is actually happening behind there have not been released by citizen labs these are my speculations but i'm not sure that there are any other things that are related to the exploit chain in terms of how it's working a couple of other interesting things to point out there's some weirdness in the timing of the communications between citizen labs the august 24th blog post cites that this was actually a zero day in forced entry and they say that they actually shared information with apple before the august 24th blog post and then they say that the psd and pdf files that were responsible were given to apple on september 7th so there are a couple of weeks that were inside of there right and so they do say that the crash logs were shared on august 24th and that apple was investigating it i'm not calling anything out specifically i'm just citing the fact that these details are present between the different blog posts i also mentioned this earlier it's interesting only you know limited interesting but interesting that core graphics and webkit actually have the same flaw which indicates that the same processing capability is present throughout multiple different libraries no big deal but just realize that there may have been another vector of and some of their initial investigations of phones is that they use a VPN file on the mobile phone that they were investigating in order to monitor communication from that mobile phone. And so I suggest that you consider this as part of your technique or repertoire of investigation for this, okay? And you can read the details of what they say, but basically they say, even if we don't have the encrypted insight to the communication, we can still watch what the phone's talking to by having the phone VPN to us, we then monitor the network communication and we look for things that are weird, okay? And in your analysis and assessment techniques, VPN and backup are the two that are there. So I'm almost on time here, and then we're going to get to a couple of questions potentially, but what we don't know, and my speculation is that we'll see some further patches coming from this, is that the ASLR and sandbox escape components will actually probably, be quietly patched by Apple for iOS, Mac OS, watch OS and everything else that has core graphics in it. We will probably see that patched later with a lot less fanfare that's accompanying this. And we will also probably see a bunch of hardening of processes and processing within the blast door in an attempt to further provide resistance for iOS
--- Page 11 ---
against these sort of zero click, interactions. So a quick recap, and then I'll look to see if there are any questions in there, but dangerous zero day, zero click exploit has a patch which was released for it, which you should make sure that everybody that you know is actually deploying this patch in order to protect themselves. In addition to that, this has actually been assessed to NSL labs. So you should be doing a patch now, investigating it back through February of 2021, use the backups, and VPN to look for crashes, specifically related to core graphics or image IO, and then use the IOCs, which are posted from citizen lab, potentially with VPN based inspection of remote mobile phone in order to determine if you or people who you're attempting to protect have been affected by this. So, like I said, I was making changes on this up to the last minute. So I'm going to shortly post this slide deck for sharing at this location, MGT517.com slash sell. So I'm gonna check to see if there are any questions here. So there are a couple of questions that are open that I'm gonna speak to. There's one that says mitigation to move to signal for messaging, or are there other apps in addition to iMessage you suggest, removing as phone hurting? So moving to signal wouldn't actually stop this because it's a zero click. So if somebody actually sent it to you and your iMessage and the system then attempted to ingest the message as part of the processing of the ingestion of the message is where the compromise happens. So that's why it's so scary and dangerous, okay? So there's that one. What about a similar application to Android using the same vector as they'll need access to, both types of device? As of now, as far as my understanding, this specific core graphics, we do not know of a similar specific integer overflow in the processing libraries for Android. Now it's possible that NSO, if that's who did it, or another similar actor has developed a totally different type of exploit in order to allow this sort of zero click interaction with Android, but no current indications that that is the case. Another question about Big Sur from a mitigation perspective. So that is something that there actually may be some patching available from Apple related to that. There was a Catalina patch that was released along this line in order to address that core graphics component. So those are the three questions that are there. I'm a little bit over where I wanted to be in terms of timing. Let me just quickly check this one thing to see if is there. Okay, so that was the same thing that was posted in chat. If you do have other questions and you want to ask them to me, LinkedIn or Sechromontans on Twitter for those questions, hopefully you find that this information is actually useful
--- Page 12 ---
and it helps you to help other people. So thank you very much. Thank you.
Related Q&A
- Q: OverviewA: Presentation details for FORCEDENTRY - Paris