WEBVTT

00:00.730 --> 00:08.680
Hi and welcome to video 2.4 Android device imaging with DC 3D in the previous video we looked at how

00:08.680 --> 00:15.070
to image a hard disk with DC 3D in this video we cover another common case that can occur in a digital

00:15.070 --> 00:16.150
investigation.

00:16.270 --> 00:21.790
The imaging of an Android device indeed mobile devices such as smartphones and tablets have become very

00:21.790 --> 00:23.500
common and widespread.

00:23.500 --> 00:29.770
And Android is by far the most used mobile platform in this video we're going to explain how data storage

00:29.830 --> 00:31.600
is organized on Android.

00:31.660 --> 00:36.940
What routing means the use of the Android de-bug bridge the two types of data acquisition logical and

00:36.940 --> 00:43.300
physical and how to practically perform both of them android like other mobile OS as stores data on

00:43.300 --> 00:49.990
two locations the internal flash memory of the device and the external removable micro SD card.

00:49.990 --> 00:55.000
The internal flash memory is the main storage location where the recovery image the kernel and system

00:55.030 --> 00:56.830
apps and data are stored.

00:56.830 --> 01:02.220
The external storage is usually used to mainly store user data like images videos and so on.

01:02.260 --> 01:04.990
But it can also contain user applications.

01:05.260 --> 01:08.440
The internal storage is divided into different partitions.

01:08.440 --> 01:09.990
These are the important ones.

01:10.090 --> 01:15.400
The bootloader partition is where the bootloader is responsible for initializing the device and booting

01:15.400 --> 01:20.920
the kernel resides the boot partition contains the files that are necessary to boot the device and the

01:20.920 --> 01:24.930
kernel while the recovery partition stores the recovery image.

01:25.240 --> 01:32.050
A minimal Android system used for recovery backup and Vered stalling custom Android ROMs the system

01:32.050 --> 01:35.920
partition is where the Android framework and system libraries are stored.

01:35.920 --> 01:41.350
While the data partition contains user application and all related data the data partition is where

01:41.350 --> 01:46.050
the most useful data for forensic investigation are supposed to be found.

01:46.360 --> 01:51.910
Standard users on Android are allowed to access only specific directories of the data partition and

01:51.910 --> 01:57.490
cannot access the other partitions at all to be able to access all the partitions of data on an Android

01:57.490 --> 01:58.180
device.

01:58.180 --> 02:03.550
We must obtain the root permissions root is the super user account analog to that.

02:03.550 --> 02:09.590
On Linux Unix systems and is not a surprise given that Android is derived from Linux.

02:09.610 --> 02:14.980
The procedure that allows the normal user to obtain root privileges on Android is called routing in

02:14.980 --> 02:20.710
order to route a device it's normally necessary to unlock the bootloader because manufacturers generally

02:20.710 --> 02:24.420
lock it to prevent users from tampering with the firmware.

02:24.430 --> 02:30.360
The procedure to unblock and Root a device greatly varies from model to model so we don't cover it here.

02:30.400 --> 02:34.860
A very useful resource for these topics is the a developer forum.

02:35.140 --> 02:39.040
In this video we assume that the device we're going to image is already routed.

02:39.040 --> 02:45.520
Therefore we have full access to its storage to communicate access and control the Android device connected

02:45.520 --> 02:48.450
via a USP port to our forensic workstation.

02:48.550 --> 02:55.300
A precious SEO tool is the android de-bug Bridge which is part of the Android SDK that comes pre-installed

02:55.360 --> 03:03.100
on Kalli Linux HTB has many options and allow us among others to list of ISIS connected to the computer

03:03.160 --> 03:08.610
pull and push files from and to the device execute a shell and install apps on the device.

03:08.620 --> 03:14.320
If we're connecting a running device to the computer the USP debugging feature must be set on for Android

03:14.320 --> 03:20.500
debugging bridge to work to set it on go to settings developer options the imaging of the device should

03:20.500 --> 03:22.900
not be performed when the device is turned on.

03:22.990 --> 03:29.470
Because Android OS and apps modify data when running the most forensically sound method is to boot the

03:29.470 --> 03:31.360
device into recovery mode.

03:31.360 --> 03:35.970
This way if the device screen is locked we cannot enable us be debugging.

03:35.980 --> 03:39.250
We can work around this issue and use Adeeb be the same.

03:39.250 --> 03:45.310
We have to previously install a custom recovery as 80 does not work with stock recovery images.

03:45.490 --> 03:51.190
When booted into recovery mode the partitions must be mounted to access them and we could do it selecting

03:51.190 --> 03:55.260
the appropriate entries in the menu with the hardware buttons.

03:55.270 --> 04:00.730
Basically there are two ways of acquiring data from a mobile device logically and physically.

04:00.730 --> 04:06.520
The logical acquisition involves the copy of all or specific files and directories at the file system

04:06.520 --> 04:10.740
level as we do as we would do when making a backup.

04:10.750 --> 04:11.640
The other side.

04:11.740 --> 04:17.530
Physical acquisition involves copying the device storage bit by bit at a raw level as we've already

04:17.530 --> 04:20.610
seen in the previous video with imaging the hard drive.

04:20.800 --> 04:24.070
Now we're going to see how to perform both types of acquisition.

04:24.070 --> 04:29.950
First step is to connect the device to a USP port of our forensic workstation then boot the device into

04:29.950 --> 04:34.300
recovery mode to communicate and execute commands on the device we use.

04:34.300 --> 04:39.600
As I said before the Android debugging bridge to check at the device is recognised.

04:39.640 --> 04:45.940
We run the devices in a terminal the output should look like this.

04:46.020 --> 04:53.520
A device ID and the state as recovery to spot a shell on the device we execute the command Adeeb shell

04:55.320 --> 04:56.730
if the device is rooted.

04:56.730 --> 05:00.270
The shell should appear with the symbol hash.

05:00.390 --> 05:06.930
Since we have root privileges we can list all the directories on the list with the last dash L command.

05:06.930 --> 05:10.800
We could list for example the contents of the data data directory

05:20.910 --> 05:27.380
data slash data directory that stores all the apps data like databases settings and so on.

05:29.930 --> 05:36.520
Each app in the relative directory suppose that we're only interested in the directory for investigators.

05:36.780 --> 05:39.200
We'd like to copy it to our computer.

05:39.270 --> 05:44.760
We cannot execute the copy command in the shell because it only works internally on the device storage

05:45.330 --> 05:53.240
so we exit the shell with the exit command returning to the one on a workstation to copy the data slushed

05:53.240 --> 06:01.060
data we have to use the Adeeb pool where the option shows the copy progress and the last parameter is

06:01.060 --> 06:02.080
the local directory

06:07.060 --> 06:09.640
on the workstation where we want to copy the data

06:26.370 --> 06:32.590
if we want to copy all the directory tree of the device we would type slash instead of slash data slash

06:32.590 --> 07:07.480
data.

07:07.650 --> 07:14.430
For more information on how a D-B works and its options please refer to the official Adeeb user guide.

07:14.430 --> 07:20.010
The limit of logical acquisition is that it misses unallocated and slacke storage spaces.

07:20.280 --> 07:27.450
So we would not be able to recover deleted files to obtain a full dump of all or some partitions we

07:27.450 --> 07:33.780
have to perform a physical acquisition physical imaging involves acquiring both removable micro SD card

07:33.990 --> 07:36.950
and the internal memory to image the micro sd.

07:36.990 --> 07:42.780
We must remove it from the device and connect to the workstation using a hardware right blocking device

07:43.140 --> 07:45.400
or software right blocking techniques.

07:45.540 --> 07:51.510
Then we image it with DC 3D in the same way as we've seen in the previous video with the hard drive

07:52.110 --> 07:58.880
imaging the internal storage is trickier as we have to copy and execute DC 3D directly on the device.

07:58.890 --> 08:02.440
Of course it could not be the standard PC comp. DC 3D.

08:02.490 --> 08:06.140
We have to look for a version compiled for the ARMM architecture.

08:06.270 --> 08:09.510
This is available among other tools at this page.

08:10.550 --> 08:17.280
We click on download and save the file in the current working directory.

08:17.320 --> 08:22.970
We should not copy it on the internal storage because it would modify and corrupt possible evidence.

08:22.960 --> 08:29.040
Instead we could insert a clean micro SD card and copy the binary file on it.

08:29.110 --> 08:35.350
In our case when we melt the SD card in the recovery menu we see that it's mounted under the storage

08:35.680 --> 08:40.940
slash SD card one directory so we execute the command.

08:41.340 --> 08:48.040
Be pushed DC 3 D flash storage flash SD card one

08:52.220 --> 08:59.280
the output shows the transfer rate and the bytes copied.

08:59.280 --> 09:02.900
Now we spawn a shell on the device with HDB shell.

09:02.940 --> 09:10.020
We have to identify the input for DC 3D to image remembered that DC 3D does not except directories as

09:10.020 --> 09:18.030
input but block device files on Android these device files are associated with partitions to list block

09:18.030 --> 09:19.020
device files.

09:19.050 --> 09:28.340
We run LS slashed Deb slash block slash command the eternal flash memory is usually associated with

09:28.340 --> 09:35.800
the NMC B-L case zero device file and all the files with this name followed by P and a number represents

09:35.870 --> 09:39.750
its partitions to image the entire internal memory.

09:39.770 --> 09:49.050
We move into the storage slash SD card one directory and execute DC 3 DD before doing so we must remount

09:49.090 --> 09:57.070
the SD card to run DC 3D as by default Android mounts SD cards with the no exec option.

09:57.220 --> 10:00.620
It does not allow to run applications on the SD card itself.

10:00.850 --> 10:11.250
So we run the following command.

10:11.470 --> 10:12.520
Then we execute

10:36.140 --> 10:42.590
in some cases we might only be interested in imaging specific partitions like for example the data partition

10:43.130 --> 10:49.430
to see which partition corresponds to which device we give a look to the slash proc slash Maltz file

10:54.150 --> 11:00.320
as we note the data partition is associated with this device file.

11:00.350 --> 11:04.960
So if we only want to image this partition we would run the same command as before

11:08.970 --> 11:17.120
but with a different input file specifying the one device file associated with will be a partition

11:24.720 --> 11:25.680
great.

11:25.710 --> 11:31.170
So we're at the end of this video where we covered the organization of storage and partitions on Android

11:31.170 --> 11:32.340
devices.

11:33.060 --> 11:38.700
We introduced the concept of routing and the tool and finally explain the difference between logical

11:38.730 --> 11:45.810
and physical data acquisition and how to practically execute them in the next video image acquisition

11:45.870 --> 11:47.200
with Guy Maigre.

11:47.430 --> 11:52.740
We're going to cover a GeoEye program to acquire forensic image that is Guy Magar.
