FORCEDENTRY (Video)
Presented by: Christopher Crowley
PresentationThe FORCEDENTRY vulnerability is a zero-day exploit that allows attackers to compromise an iOS device without any user interaction, attributed to NSO Group, a private company that sells surveillance software. The exploit chain involves an integer overflow flaw in the Core Graphics library, which allows attackers to inject malware into the device, and the use of Pegasus spyware to deliver the malware.
Featured Clips
"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."
"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. The initial. The initial. Zero click interaction."
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 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 use. So I think it's a good thing. 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 the reality of what we're dealing with is a dangerous zero click, zero day. No longer truly zero day because now the 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 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 timeframe is when this probably started related to the related to the exploits. Further, Citizen Labs is assessing the origin of this particular attack to NSC. So I'm 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. The initial. The initial. Zero click interaction. There are probably other latent flaws which have not yet been acknowledged or addressed or, you know, by Apple.
--- Page 3 ---
But so that is the start of the exploit chain and that was what was patched. Also the 3858 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. Attempting to reverse engineer and patched if 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. To investigate the. Compromise scenario. Back through February of 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. Okay. 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 reported in either core graphics or image IO. And again, I'm going to talk about more details related to this 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 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 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 gifts that were sent in. And then further, I would use the citizen labs information about the Pdf attributes for having the J big deflate essentially additional data thread that's inside of it, and they have more details on their blog.
--- Page 4 ---
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. 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 min. 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 be able to say that I feel like I do live in a place where I'm able to protect my information systems and not feel like I'm specifically targeted. Although who knows after this talk. But the reality of this is, is that there is real world threat to individuals. As a result of the information that we're sharing here. OK, so just want to treat it with appropriate sensitivity. But also I want to acknowledge the fact that there are a lot of details in here that are interesting to us. And in a way, it's some schadenfreude in terms of our, you know, peeking behind the way that this actually works. So the first part that I want to get into is the idea of the attribution to NSO that Citizen Labs is assessed. And so let's talk a little bit about attribution. In general, this is kind of a tricky business. And and in my opinion, I would ask you the question when we start to get into the attribution. What are you going to do different if this was NSO or not NSO? Like, how would you change your operational response if we're able to make an attribution assessment? There are some reasonable ways that I think that you could do that. I think that this is important, right? 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 is now if you are targeted and your staff are targeted by any of these sort of things.
--- Page 5 ---
And so I think that you need to think about it is now if you are 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 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 level of response capability. Okay? 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 is sold. And I don't want to get into the details or debate related to 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 this. Okay? 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.
--- Page 6 ---
Okay? So, there are those details. I'm not going to go into the details in this talk of 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 IOCs. Okay? There are other undiscovered operators of this infrastructure. And it is likely that the IOCs which have just been disclosed will likely shortly be abandoned and other ones will be put in their place. Okay? So, if you're looking for stuff from those IOCs, you need to 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. 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 Pegasus injection actually has a distinctive characteristic with the incomplete deletion of data from the data usage SQL light 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 making, is pointing out what they assess to be a mistake that was made by citing the fact that they delete it from the, from the zProcess file. And so, they're saying that this is a mistake. But Citizen Labs is making, is pointing out what they assess to be a mistake that was made by citing the fact that they deleted it from the zProcess file, but they don't delete it from the zLive 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 zLive usage table. And so this deleted from the zLive usage table. And so this deleted from the zLive usage table. 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
--- Page 7 ---
SQL query that they cite in their blog post that allows you to actually make that connection. A second assessment component that they cite in the write-up, and this is the more recent write-up that they actually have, is the presence of a process named setFramedD. And setFramedD is a 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 sharing that 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 enumerator, which is the one that we're using in the application, 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 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 is 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 integer overflow, it actually ends up resulting in an overflow in memory, which allows for the introduction of additional information, right? And so this is classic buffer overflow implemented through an integer overflow. And I'm going to talk about that in a bit. The part about the compounding of the integer overflow is that it's basically a kind of a flow vector. 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. Doesn't really exist. If you want more details on like what the code is, you can go to our website and go to the link in the description, and you can find it. So the idea of zero clicks is that for mobile devices, there really isn't a service side opportunity for remote code execution, doesn't really exist.
--- Page 8 ---
And if you want more details on like what the code is, you can go to our website and you can find it. attack surface is for mobile devices there was actually a talk that i gave at the end of last year which is hosted on sans website where i actually enumerate my opinion i'm sorry i provide my opinion in enumerating the entirety of the attack surface of mobile devices so if you want to get smart on that that's a good talk to go and uh you know 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 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 blast door service which is basically set up specifically in order to make it much harder to be able to deliver zero day excuse me zero click exploits whether they're zero day or not and so the data processor 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 is handling the data that's coming in it'll actually rebase the uh it'll rebase the um the randomization for instances of it if there is a crash and anything inside of the blast door protected um it'll actually be able to do that and so the data processing actually has a doubling off algorithm that makes it so that it's harder and harder for the uh 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 blaster 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
--- Page 9 ---
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 i am agent and this is all governed by the blastor interactions so restrictive coding practices limited file system read limited network read within the blastor managed space and so part of this workflow of what blastor is handling is it checks to see if there's serialized data and in the serialization and the deserialization if there is serialized data it's handled handed over to the im transcoder agent okay and so i mentioned i am transcoder agent previously and i'll bring it up again in a moment and so this circumstance here is that in one of the write-ups that citizen labs talk about they actually talk specifically about two crashes momentarily coming up what they are of i am transcoder agent in the logs specifically relevant to this attack and so i'm going to go ahead and get started and i'm going to go ahead and get started and i'm going to go ahead and get started and i'm going to go ahead and get started 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 a reported associated with image io now 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 um i am transcoder agent related to that particular uh that copy gift from path and then the second type of crash is related to the core graphics processing for for parsing the jbig data in the pdf file and they cite that there 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 blastor 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 layout randomization to extract the appropriate memory addresses to then be able to do the exploit now that part of
--- Page 10 ---
that is speculation on my part i do not know that and i have not technically assessed it 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 amfid is attributed as the responsible process amfid apple mobile file integrity damon is responsible for doing the checks for the digital signatures on the code which is attempting to run very interesting that amfid 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 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 for the exploit according to their assessment 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 in this presentation the fact that the crash logs are actually shared and they're not so the reason this is interesting though is that the fact that they are all shared by the same person or the same application is a huge disadvantage here so one of the things that we've been using to get the webkit out of error is separated from the other webkit operations and the way that this app works is a little bit different than what we were looking at 20 years ago where it was just sort of a one-plus-one method of sending the webkit out of error i don't know if you've noticed earlier it's interesting this integer overflow issue as well another thing that i want to call out that's an interesting thing is that what citizen labs talks about in terms of their assessment 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
--- Page 11 ---
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 um 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 attempt in an attempt to further provide resistance for ios 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 uh dangerous zero-day zero-click uh exploit um has a patch which was released for it which you should um make sure that everybody that you know is actually deploying this patch in order to protect themselves um in addition to that um this has actually been assessed to uh 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 um 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 a remote mobile phone in order to determine if uh you or uh people who you're attempting to protect um have been affected by this so like i said um i was making changes on this up to the last minute so i'm going to shortly post uh this uh this slide deck for sharing at this location mgt517.com so i'm going to check to see if there are any uh any questions here um so uh there are a couple of questions that are open that i'm going to speak to there's one that says mitigation to move to signal for messaging or there are other apps in addition to iMessage you suggest removing is phone hurting so um moving to signal wouldn't actually stop this because it's a zero click um so if somebody actually sent it to you in your iMessage and the system then attempted to ingest the message as part of the would be a zero click um so you're 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 uh there's that one um what about a
--- Page 12 ---
similar application to android using the same vector as they'll need um access to both types of device um as of now as far as my understanding um this specific core graphics uh we do not know of a similar specific uh integer overflow in the processing libraries for uh for android now it's possible that um nso if that's who did it or another similar actor has developed a totally different type of uh exploit in order to allow this sort of zero click interaction with android but no current indications that that is the uh that is the case um another question about big sir from a mitigation perspective um so that is something that they're they're actually um maybe some patching available from apple uh related to that there was a catalina patch that was released along along this uh 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 uh this one thing to see if uh is there okay so that was the same thing that was posted in chat if you do have other questions and you want to uh ask them to me uh linkedin or sikramontance on twitter for those questions hopefully you find that this information is uh is actually um useful and it helps you to help other people so thank you very much
Related Q&A
- Q: OverviewA: Presentation details for FORCEDENTRY