Thank you for being here for this talk. How's DEF CON so far for all of you? The idea of our talk today is we've developed some anti-forensic techniques and it works against forensic tools like Celebrite, Axiom, and Belkasoft. So my students here are going to show it to you a bit later about what we actually do and how we actually go about doing that. First things first, we're going to talk about the big picture, why we did this, what's going on with the situation currently in terms of mobile forensics. Then we're going to talk a little bit about Honey Tokens, which is the approach that we use. Honey Tokens is like the tripwire, and once you deploy Honey Tokens, you can basically do whatever you want in terms of anti-forensic measures once it's triggered. And of course, proof of concept why it didn't happen. That's why we're going to show some videos, what we actually did against the software that we just mentioned just now. And of course, we conclude with some defensive strategies and what probably forensic experts will need to think about when it comes to going against anti-forensics. So this is teamwork. Now, together with me today are two of my students. Maybe you want to come on stage, come on. Yeah, Joseph, Isaac. They're the ones behind the brains of the Honey Token that we developed. And on top of that, we have also other students who are involved in this. Wilson, Aloysius, Junyu. We're all in Singapore, so three of them couldn't fly over. Two of them are here. And of course, there's myself. I'm basically the nobody. I'm the professor, actually. They did this part of my digital forensics module back in university. So it's this talk for you. How many of you have done mobile forensics? Yes? So you pretty much know that it's not like your traditional forensics. If you talk about traditional forensics, you say that, hey, plug this USB drive into a red blocker. Mobile forensics will be like, what the heck? What red blocker are we talking about? Mobile forensics is slightly different. And typically, it starts with trying to gain access to a device. Once you gain access to the device, then you start extracting evidence from there, whether it's a logical extraction or physical extraction and so on. But the idea is to get into the device first. So when we talk about logical extraction, and that's what we're focusing on, the typical workflow is like this. You gain access to the device, whether you unlock the device, you bypass security using whatever technologies that you might have, you extract the data, you do whatever you want with it, and you profit. So that's generally about the workflow. And this assumption typically underpins the workflow of a number of mainstream forensics software, whether it's UFED, whether it's Axiom, whether it's Belkersoft. The idea is you gain access to the device, you extract the data, and then basically the extraction is for you to start analyzing. Now, the problem with that is that there's something that these workflows don't really think about, which is what we call second-layer countermeasures. And it's not something really new. If we look at this screenshot over here, you may have recognized that screenshot a few years ago. Someone literally said that, if you use Celebrite against my mobile device, I will attack Celebrite. Moxiballance spike signal. So that is not something new. It's being done. It's being, in a way, weaponized in the past. And even the whole idea of TripWise isn't particularly new. This over there is a picture of a trap in Vietnam. Looks legit. Looks like just any other grass patch. You step on it, you fall into it. On a digital domain, we have done some research into anti-forensics. This paper here, for example, was published in 2011. In that paper, we talk about, well, how do we actually create a system where we can actually encrypt data without the forensic analyst actually knowing that data is being encrypted? And then later on, well, he can't really retrieve the data because it's encrypted. The system would not want to show it back to him. Alright. So we talk about anti-forensics. Basically, well, the idea is we can just deploy something, prevent people from accessing data, and so on. Yes, traditionally it can be done, quite easily in a mobile space as well. The conventional approach to anti-forensics in mobile, you can, for example, disable USB debugging. Put a piece of software in your mobile device that disables USB debugging. Whenever an examiner tries to extract data from the mobile device, basically because he can't access the USB debug interface, extraction may not happen. Another approach, you might monitor for forensic software installation, then block whatever ADB connections. If, let's say, you detect that ADB is actually happening, just block it. Or, you might do something like this. Just kill the forensic service. Implement a code that looks something like this. If I detect that, for example, a forensic software is installing a package, let's say Belkasov is installing a package, or Cellbrite is installing a package on the device, well, just kill the forensic service itself. Now, these are very intuitive, very straightforward kind of approach. But, if you do something like this, that's very obvious, red flags. If I'm the forensic software, or if I'm the forensic examiner, and I see that, hey, you know, what on earth is going on? I can't seem to get ADB, I can't seem to get my service to run, it's a red flag. And once that happens, what will an examiner do? They'll switch tactics, they'll perhaps look at more advanced approaches, more enhanced scrutiny, and so on. Well, they might just uncover what you're trying to do. And in all these cases, you pretty much don't protect whatever you're trying to protect in the device itself. You don't protect your data. Now, when they go into advanced approaches, your data can still be taken out. So, this really isn't the way. Now, we say, what if we try more power? What if we do something a little bit different? What if we try to deploy anti-forensic measures without the examiner actually realizing that they are being played? So, basically, we have anti-forensic measures in the phone. When the examiner tries to extract data from the phone, we say, okay, fine, go do whatever you want to do. But at the back end, what we are doing is we are encrypting data, we are destroying data, and we are doing whatever we want to do to make sure that the examiner doesn't get the data. And that's exactly what we plan to do. So, if you look at it, in a way, it's like we are being the adversary now. The forensic software, like what we said just now, will start to gain access, or will try to gain access to the device, will unlock the device, will try to bypass security, and so on. For us, we'll say, just let it happen. You want access to the device? Go ahead. Fine. Here it is. But at the back end, we run a service, we run some technology to destroy whatever data that we have, or to encrypt whatever data that we have, so that when extraction happens, those people don't actually get the data. And of course, forensic software, after that, will start to extract data. We say, just let it happen. By the time they may not get whatever data that they want, they'll start figuring out whatever they've got. We just let it be. And the goal is, at the end of the day, they don't get what they want, we protect the data that we're trying to protect. How it happens? I wish I could say it's magic. It's actually not. So we actually employ this approach. And before we go into the Honey Tokens itself, which Isaac will talk about, think about this whole situation for a second. As a device user, if let's say you have a mobile device, you typically only use certain things in the phone, right? A device intended user, you probably, let's say in this whole picture here, you have burgers, you have honey, you have beer. You typically only eat burgers or drink beer. But if you're talking about forensic software, once they get into the phone, what they typically would do is they try to get everything out of the phone. They try to get as much data as possible out of the phone. And that's what we're trying to exploit here. Because of that greediness, we said, hey, let's deploy something so that when they start extracting data out, we know that they're trying to extract data out and we try to take countermeasures against that. And to explain this further, I'll invite Isaac to come on stage to talk about the Honey Tokens and what it's about. So, Honey Tokens 101. So what exactly are these Honey Tokens? So these Honey Tokens are actually little bit files that contain rubbish information. So they are deployed deep within the file system directories and they're hidden within top-level directories such as documents. So the main idea is that once these bit files are accessed, we will activate our anti-forensic payloads. So these Honey Tokens can be deployed programmatically as well. And this will be very useful, especially when a new app is installed. So these are some examples of the Honey Token deployments. You can see at the top left, you can see some Honey Tokens being deployed at the Pictures folder and the Storage folder. And you can see Honey Tokens being deployed at the bottom left at Telegram, when they are being installed. So you can see at the right side, you can see from a normal user perspective, the normal user can't see these Honey Tokens at all. And that's because these Honey Tokens are hidden. And this will ensure that they won't accidentally click on these Honey Tokens to access it. So, how are these Honey Tokens being implemented? So, in a normal typical forensic process, what happens is the forensic examiner will access this device. They will access the device and they will acquire data. But for us, when we implement our Honey Token using a custom AOSP build with a few modifications to allow for our custom system application, when these Honey Tokens are being accessed, we use something called INotifyD to trigger a notification for us. So, what is INotifyD? So, INotifyD is actually a command in the user land that is built on top of INotify Linux kernel subsystem. And this is a useful mechanism for monitoring file system, more specifically on file system events, such as file creation, file modification, and more importantly, file read. So, INotifyD is actually part of Toybox, which is included in Android 6 and above. So, you can see a screenshot over here of some file event we have printed out for a simple command of cat on a text file. So, you can see R, A, and 0. So, R meaning that it's been opened. This file is being opened. A means that it's being accessed. And 0 means that it's closed without any rights on it. So, now we have a tripwire. Now what? So, we tested and tried two ways of anti-forensic mechanism. First of it is encryption of data. So, you can see secret.txt. There might be some important data, such as a password. And after encryption, the data is being encrypted. So, you can't see it anymore. The other is factory reset of the device. So, you can see the big image over here. You can see factory data reset. You know, the phone is being factory reset as we try to use magnetic axiom. So, there I pass the time to Joseph. Alright. So, now the fun stuff next is couple of demo videos. Three in particular against the vendors that we mentioned earlier. So, the first video itself is actually a test against Cellebrite. In particular, just a proof of concept experiment for our... what we implemented in the earlier slides. Specifically, it's actually encrypting the simulator crown jewel files as well as a couple of other data like contacts and SMSs. When the payload, the encrypted crown jewel payload is triggered by the Honey Token itself. So, at this first stage of the video, we're just showing you where exactly do we implement the Honey Token set. So, the Honey Tokens for this experiment itself is the hidden files actually within the top-level file system what we are highlighting now. Likewise, we'll also be showing you the contents of the crown jewel files to prove that they are encrypted later as well. So, there are two in particular, secrets.txt and secret.hidden.txt within a sub-folder called hidden. So, when we move on to the extraction process, we left all the settings in Cellebrite UFVD default. And, yep, so letting it load. And what you'll notice is that there's a couple of data types to extract here. There's a first stage, coined first stage here, which is the call logs all the way to calendar for the data types. What we noticed here is actually Cellebrite actually uses an agent, sideloads an agent to a device to extract those data directly from the device itself. And what you'll notice is that it will be able to actually extract those data because it's directly accessing the data itself. For example, contacts and SMSes. So, those will not be encrypted at this stage yet. But as it moves on to the second stage, which is from pictures to archives, you'll notice something a little bit different, which the screen should pop up soon. Yep. So, at this stage here, with this overview screen that you just saw, we actually noticed that it opens up and reads pictures in the device itself. And because we have actually implemented a Honey Token within the pictures directory as a picture itself, we have actually already started the encryption process. So , before the extraction occurs even, in that overview screen, the encryption process already started. The last stage itself, we noticed that it's using ADB backup to pull out whatever it can pull out from the device itself. Yep. So, now as we move on to the extraction folder itself, you'll notice two main folders. One is Logical and one is Backup. So, Logical is Stages 1 and 2 that you saw in Celerbrite UFVD earlier. And then, we're just running through the files itself. And then, Backup is actually the ADB backup process in Stage 3 that you saw earlier. So, like what I mentioned earlier, for Stage 1, you would not be able to encrypt the data itself yet because it's directly accessing those data points without triggering any of the Honey Tokens. So, for Contacts and SMS likewise. But then, when we move over to the Crown Jewel files, you will notice that we managed to trigger the entire process and get those Crown Jewel files encrypted. Yep, for both of the Crown Jewel files. And you will also notice the same for... Oh, on the right side, you will actually see that because we have extracted the Honey Tokens earlier, the Contacts itself would have been encrypted as well. So, if any of the Forensic Analysts or Examiner would go back to the device to extract or reanalyze the device again, those data would be encrypted subsequently. So, for the second video would be... Yep, for the second video would be BelkaSoft. Let me run the video first. So, just again, the standard steps that we have shown you earlier. So, I'll fast forward a little bit. So, we'll go through the default process for BelkaSoft, but we'll select the MTP option to acquire all the files on the system itself in the external storage. And once... you will notice that there is a process which BelkaSoft acquires, extracts data from, and actually starts with the top-level external storage directory first. So, you can see internal shared storage as the first option. I downloaded one file. That file is the Honey Token which actually started the... triggered the countermeasure payload of encryption, which by now, everything would have been encrypted successfully, which you will be able to see in a short moment. Yep, so... yeah, again, the data is encrypted again for the Crown Jewel files. Yep. So, for the last video itself would be, again, Magnet Axiom. Likewise, similar process to BelkaSoft, again. Just that the differences is that we have a ballast file in the system that we have moved to the documents directory and renamed it as the hidden file. So, that particular one of a... particular drug name and ignore.txt. So, selecting the process again for MTP. Letting the extraction process complete. So, again, likewise, the encryption... the Crown Jewel files are encrypted still. And then, the rest of the video, you will notice us going into ADB Logcat to verify if we have managed to trigger the process fully for all the Crown Jewel files that we have implemented. So, all these log events that you see for that file observer service is just the inotify events that we are picking up during the encryption process that Axiom does. And, of course, to just double verify using examine. Likewise, the data is encrypted as well. Yep. Passing my time back to Weihan. Thank you for that. So, actually, the students actually did a lot of work in these experiments. I had to learn to record the videos over and over again because, well, we want to show you exactly what they did and what they can implement and so on. So, yeah. Now what? You've seen those things happening. The question is, now what? For our proof of concept, it works MTP only, right? Yeah, so it works against MTP. But the technique itself or the idea of deploying honey tokens or the idea of deploying tripwires is something quite generic. And I'm quite certain that if someone thinks hard enough, well, you can have tripwires against other kinds of protocols as well if you really want to. But here we are defending, we are going against MTP and we've seen so far that it kind of works. So what can we do, right? If we are defenders, what can we do? Of course, if we're talking about tripwires itself, then, well, maybe we shouldn't be so greedy. We should do selective versus bulk acquisition. The challenge here is, of course, then what does selective mean? Then that would require actually understanding the anti-forensic techniques that's actually being deployed or the tripwires that's being deployed. Another approach I can use is exploit the weaknesses in anti-forensic mechanisms. So what was shown just now for Magnet, you need actually a very big file to so-called slow down the extraction process so that there's time to encrypt. So if you know that that's actually happening, then do something about it. Or, well, do cold system forensics, chip-off, bootloader, whatever other techniques, if that's ever possible. I mean, in the past, it used to be very possible. Nowadays, it's a little bit more complicated. But I think that one point I want to highlight here is basically, know your tools. The problem here really is that as forensic examiners, sometimes we think that, hey, alright, this is a tool that's being sold to us. Well, we just use it as what it is. Do we know our tool? Do we know what's the limitation of that tool? How does it react against, let's say, anti-forensics adversarially modified environments, for example? Do we know that? And for that to happen, we need to put in our effort to actually test the tools, to actually verify the tools work, for example, as intended. Or if it's not as intended, what are the kind of things that might potentially trip this tool, and so on. So as a conclusion, we found that there's kind of little prior research on how mobile forensic tools handle adversarially modified environments. And our test shows that Android devices can run stealthy second-layer countermeasures that can compromise evidence. And these countermeasures can silently manipulate or destroy data while extraction is actually happening, as you have seen just now. And because of that, we say that long-standing forensic workflows may need to be rethought about to account for these kind of adversarial environments. The last thing I'll leave you with is, well, gaining device access is just the beginning. What happens next during forensic extraction may not be what we all think. With that, thank you very much. So I think I have like two minutes left, so probably if there's any questions and so on, we'll probably just take it outside there, so that we don't disrupt the other speakers who are coming to speak.