start	end	text
0	2780	Thank you for being here for this talk.
2780	4340	How's DEF CON so far for all of you?
7240	17860	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.
18000	23780	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.
24600	31660	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.
32720	35920	Then we're going to talk a little bit about Honey Tokens, which is the approach that we use.
35920	43820	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.
44140	46840	And of course, proof of concept why it didn't happen.
47100	52440	That's why we're going to show some videos, what we actually did against the software that we just mentioned just now.
52860	61860	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.
63340	65240	So this is teamwork.
66320	69140	Now, together with me today are two of my students.
69140	70620	Maybe you want to come on stage, come on.
70960	72280	Yeah, Joseph, Isaac.
72540	76600	They're the ones behind the brains of the Honey Token that we developed.
77620	81080	And on top of that, we have also other students who are involved in this.
81920	85700	Wilson, Aloysius, Junyu.
85880	89720	We're all in Singapore, so three of them couldn't fly over.
89720	90860	Two of them are here.
90860	92080	And of course, there's myself.
92080	93920	I'm basically the nobody.
95100	96940	I'm the professor, actually.
96960	100920	They did this part of my digital forensics module back in university.
101900	103780	So it's this talk for you.
104220	106620	How many of you have done mobile forensics?
107740	108540	Yes?
108540	111720	So you pretty much know that it's not like your traditional forensics.
112200	117300	If you talk about traditional forensics, you say that, hey, plug this USB drive into a red blocker.
117640	119680	Mobile forensics will be like, what the heck?
120140	121700	What red blocker are we talking about?
123060	125460	Mobile forensics is slightly different.
125460	128820	And typically, it starts with trying to gain access to a device.
129820	136240	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.
136240	138380	But the idea is to get into the device first.
138720	145580	So when we talk about logical extraction, and that's what we're focusing on, the typical workflow is like this.
145580	157720	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.
158120	160820	So that's generally about the workflow.
160880	170020	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.
170020	176280	The idea is you gain access to the device, you extract the data, and then basically the extraction is for you to start analyzing.
176620	186140	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.
186200	188960	And it's not something really new.
188960	194840	If we look at this screenshot over here, you may have recognized that screenshot a few years ago.
195000	202780	Someone literally said that, if you use Celebrite against my mobile device, I will attack Celebrite.
204000	205760	Moxiballance spike signal.
206580	209040	So that is not something new.
209040	209500	It's being done.
209500	211520	It's being, in a way, weaponized in the past.
211520	214300	And even the whole idea of TripWise isn't particularly new.
214300	221280	This over there is a picture of a trap in Vietnam.
222240	223300	Looks legit.
223300	224800	Looks like just any other grass patch.
224800	226540	You step on it, you fall into it.
226920	231420	On a digital domain, we have done some research into anti-forensics.
231420	234480	This paper here, for example, was published in 2011.
235880	243620	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?
243620	247500	And then later on, well, he can't really retrieve the data because it's encrypted.
247620	249420	The system would not want to show it back to him.
250900	251560	Alright.
251700	253560	So we talk about anti-forensics.
254900	263100	Basically, well, the idea is we can just deploy something, prevent people from accessing data, and so on.
263560	266380	Yes, traditionally it can be done, quite easily in a mobile space as well.
266380	272100	The conventional approach to anti-forensics in mobile, you can, for example, disable USB debugging.
272100	277660	Put a piece of software in your mobile device that disables USB debugging.
277660	286840	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.
287180	291500	Another approach, you might monitor for forensic software installation, then block whatever ADB connections.
291500	296480	If, let's say, you detect that ADB is actually happening, just block it.
296480	297960	Or, you might do something like this.
297960	299500	Just kill the forensic service.
299940	301620	Implement a code that looks something like this.
301620	314540	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.
314700	317980	Now, these are very intuitive, very straightforward kind of approach.
318000	322000	But, if you do something like this, that's very obvious, red flags.
322180	327760	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?
327760	332900	I can't seem to get ADB, I can't seem to get my service to run, it's a red flag.
333060	335820	And once that happens, what will an examiner do?
335820	341680	They'll switch tactics, they'll perhaps look at more advanced approaches, more enhanced scrutiny, and so on.
341780	345940	Well, they might just uncover what you're trying to do.
345960	352300	And in all these cases, you pretty much don't protect whatever you're trying to protect in the device itself.
352300	353440	You don't protect your data.
354600	361160	Now, when they go into advanced approaches, your data can still be taken out.
361160	365180	So, this really isn't the way.
365960	368100	Now, we say, what if we try more power?
368180	369800	What if we do something a little bit different?
370740	378040	What if we try to deploy anti-forensic measures without the examiner actually realizing that they are being played?
378780	381740	So, basically, we have anti-forensic measures in the phone.
382620	389020	When the examiner tries to extract data from the phone, we say, okay, fine, go do whatever you want to do.
389080	396980	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.
397520	400380	And that's exactly what we plan to do.
400400	405440	So, if you look at it, in a way, it's like we are being the adversary now.
405660	413560	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.
413780	416500	For us, we'll say, just let it happen.
417100	418260	You want access to the device?
418260	418920	Go ahead.
418920	419600	Fine.
419600	420560	Here it is.
420600	432100	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.
432160	435080	And of course, forensic software, after that, will start to extract data.
435080	436440	We say, just let it happen.
436540	442800	By the time they may not get whatever data that they want, they'll start figuring out whatever they've got.
443280	444640	We just let it be.
445460	451860	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.
452060	453220	How it happens?
453260	454840	I wish I could say it's magic.
454840	455900	It's actually not.
457720	461600	So we actually employ this approach.
462040	469800	And before we go into the Honey Tokens itself, which Isaac will talk about, think about this whole situation for a second.
469940	478060	As a device user, if let's say you have a mobile device, you typically only use certain things in the phone, right?
478800	485120	A device intended user, you probably, let's say in this whole picture here, you have burgers, you have honey, you have beer.
485440	488840	You typically only eat burgers or drink beer.
489100	495560	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.
495680	498560	They try to get as much data as possible out of the phone.
498560	500320	And that's what we're trying to exploit here.
500320	510400	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.
510640	518240	And to explain this further, I'll invite Isaac to come on stage to talk about the Honey Tokens and what it's about.
521260	524020	So, Honey Tokens 101.
524020	526360	So what exactly are these Honey Tokens?
526420	531380	So these Honey Tokens are actually little bit files that contain rubbish information.
531380	538300	So they are deployed deep within the file system directories and they're hidden within top-level directories such as documents.
538300	545360	So the main idea is that once these bit files are accessed, we will activate our anti-forensic payloads.
545360	550160	So these Honey Tokens can be deployed programmatically as well.
550160	554060	And this will be very useful, especially when a new app is installed.
554800	557880	So these are some examples of the Honey Token deployments.
557880	569940	You can see at the top left, you can see some Honey Tokens being deployed at the Pictures folder and the Storage folder.
569940	575780	And you can see Honey Tokens being deployed at the bottom left at Telegram, when they are being installed.
575780	582640	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.
582640	585440	And that's because these Honey Tokens are hidden.
585720	589660	And this will ensure that they won't accidentally click on these Honey Tokens to access it.
590560	593920	So, how are these Honey Tokens being implemented?
594080	599660	So, in a normal typical forensic process, what happens is the forensic examiner will access this device.
599660	602420	They will access the device and they will acquire data.
602680	619760	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.
620560	622960	So, what is INotifyD?
622960	629860	So, INotifyD is actually a command in the user land that is built on top of INotify Linux kernel subsystem.
629960	640440	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.
640580	646460	So, INotifyD is actually part of Toybox, which is included in Android 6 and above.
646700	653880	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.
653880	656380	So, you can see R, A, and 0.
656380	658120	So, R meaning that it's been opened.
658120	659300	This file is being opened.
659300	661540	A means that it's being accessed.
661700	664440	And 0 means that it's closed without any rights on it.
665520	667520	So, now we have a tripwire.
667520	668360	Now what?
668460	672680	So, we tested and tried two ways of anti-forensic mechanism.
672680	676020	First of it is encryption of data.
676100	678480	So, you can see secret.txt.
678480	681540	There might be some important data, such as a password.
681620	684260	And after encryption, the data is being encrypted.
684600	686200	So, you can't see it anymore.
686360	688900	The other is factory reset of the device.
688920	690880	So, you can see the big image over here.
690880	693320	You can see factory data reset.
693320	698880	You know, the phone is being factory reset as we try to use magnetic axiom.
700240	701960	So, there I pass the time to Joseph.
703460	704760	Alright.
704760	709080	So, now the fun stuff next is couple of demo videos.
709080	713640	Three in particular against the vendors that we mentioned earlier.
713900	719180	So, the first video itself is actually a test against Cellebrite.
719180	723060	In particular, just a proof of concept experiment for our...
723060	725140	what we implemented in the earlier slides.
725440	735220	Specifically, it's actually encrypting the simulator crown jewel files as well as a couple of other data like contacts and SMSs.
735220	741440	When the payload, the encrypted crown jewel payload is triggered by the Honey Token itself.
746090	753190	So, at this first stage of the video, we're just showing you where exactly do we implement the Honey Token set.
753190	762310	So, the Honey Tokens for this experiment itself is the hidden files actually within the top-level file system what we are highlighting now.
762310	770090	Likewise, we'll also be showing you the contents of the crown jewel files to prove that they are encrypted later as well.
770090	776890	So, there are two in particular, secrets.txt and secret.hidden.txt within a sub-folder called hidden.
776890	784130	So, when we move on to the extraction process, we left all the settings in Cellebrite UFVD default.
784590	788130	And, yep, so letting it load.
788430	793510	And what you'll notice is that there's a couple of data types to extract here.
793510	802090	There's a first stage, coined first stage here, which is the call logs all the way to calendar for the data types.
802090	812830	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.
812830	820930	And what you'll notice is that it will be able to actually extract those data because it's directly accessing the data itself.
820930	822730	For example, contacts and SMSes.
822730	826790	So, those will not be encrypted at this stage yet.
826810	839750	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.
840550	841290	Yep.
842090	853610	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.
853610	861850	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.
861850	869430	So , before the extraction occurs even, in that overview screen, the encryption process already started.
869430	877330	The last stage itself, we noticed that it's using ADB backup to pull out whatever it can pull out from the device itself.
878970	879610	Yep.
879610	885410	So, now as we move on to the extraction folder itself, you'll notice two main folders.
885410	888350	One is Logical and one is Backup.
888750	893730	So, Logical is Stages 1 and 2 that you saw in Celerbrite UFVD earlier.
894130	898050	And then, we're just running through the files itself.
898050	903610	And then, Backup is actually the ADB backup process in Stage 3 that you saw earlier.
903730	914430	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.
916430	919030	So, for Contacts and SMS likewise.
919630	931290	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.
935000	937480	Yep, for both of the Crown Jewel files.
937980	941120	And you will also notice the same for...
941120	949400	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.
949400	961420	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.
967190	969370	So, for the second video would be...
970890	974310	Yep, for the second video would be BelkaSoft.
974650	976290	Let me run the video first.
978830	982910	So, just again, the standard steps that we have shown you earlier.
982910	984750	So, I'll fast forward a little bit.
992290	1002450	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.
1003490	1018450	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.
1018450	1022590	So, you can see internal shared storage as the first option.
1022590	1023950	I downloaded one file.
1023950	1038330	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.
1053780	1059540	Yep, so... yeah, again, the data is encrypted again for the Crown Jewel files.
1060320	1061180	Yep.
1062900	1068880	So, for the last video itself would be, again, Magnet Axiom.
1068880	1072580	Likewise, similar process to BelkaSoft, again.
1072580	1081780	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.
1081780	1084200	So, that particular one of a...
1084570	1087520	particular drug name and ignore.txt.
1091210	1095630	So, selecting the process again for MTP.
1097590	1101830	Letting the extraction process complete.
1113670	1117010	So, again, likewise, the encryption...
1117010	1119070	the Crown Jewel files are encrypted still.
1119350	1132770	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.
1138070	1151450	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.
1154340	1159580	And, of course, to just double verify using examine.
1159800	1163120	Likewise, the data is encrypted as well.
1168620	1169420	Yep.
1169420	1171880	Passing my time back to Weihan.
1181010	1182910	Thank you for that.
1184390	1188150	So, actually, the students actually did a lot of work in these experiments.
1188150	1195810	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.
1196330	1197730	So, yeah.
1197730	1198550	Now what?
1198790	1200950	You've seen those things happening.
1200950	1202410	The question is, now what?
1202410	1206470	For our proof of concept, it works MTP only, right?
1206510	1208330	Yeah, so it works against MTP.
1208430	1215550	But the technique itself or the idea of deploying honey tokens or the idea of deploying tripwires is something quite generic.
1215550	1222170	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.
1222510	1229110	But here we are defending, we are going against MTP and we've seen so far that it kind of works.
1229110	1230910	So what can we do, right?
1230910	1232730	If we are defenders, what can we do?
1232830	1237490	Of course, if we're talking about tripwires itself, then, well, maybe we shouldn't be so greedy.
1237490	1240170	We should do selective versus bulk acquisition.
1241490	1246470	The challenge here is, of course, then what does selective mean?
1247030	1252490	Then that would require actually understanding the anti-forensic techniques that's actually being deployed or the tripwires that's being deployed.
1253530	1257690	Another approach I can use is exploit the weaknesses in anti-forensic mechanisms.
1257850	1267370	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.
1267450	1270890	So if you know that that's actually happening, then do something about it.
1271210	1278030	Or, well, do cold system forensics, chip-off, bootloader, whatever other techniques, if that's ever possible.
1278030	1279570	I mean, in the past, it used to be very possible.
1279570	1281190	Nowadays, it's a little bit more complicated.
1281510	1285070	But I think that one point I want to highlight here is basically, know your tools.
1286150	1292450	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.
1292910	1295630	Well, we just use it as what it is.
1295850	1296850	Do we know our tool?
1296850	1299210	Do we know what's the limitation of that tool?
1299610	1304370	How does it react against, let's say, anti-forensics adversarially modified environments, for example?
1304370	1305350	Do we know that?
1305750	1312730	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.
1312890	1319550	Or if it's not as intended, what are the kind of things that might potentially trip this tool, and so on.
1319650	1327430	So as a conclusion, we found that there's kind of little prior research on how mobile forensic tools handle adversarially modified environments.
1327490	1333470	And our test shows that Android devices can run stealthy second-layer countermeasures that can compromise evidence.
1333510	1341070	And these countermeasures can silently manipulate or destroy data while extraction is actually happening, as you have seen just now.
1341070	1350830	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.
1351230	1355850	The last thing I'll leave you with is, well, gaining device access is just the beginning.
1355950	1362230	What happens next during forensic extraction may not be what we all think.
1362330	1364770	With that, thank you very much.
1374470	1382890	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.
