Showing posts with label CAINE. Show all posts
Showing posts with label CAINE. Show all posts

Friday, September 11, 2020

Digital Forensics: How to Forensics image with CAINE Live USB/DVD Linux bootable

Digital Forensics: How to Forensics image  with CAINE Live USB/DVD


CAINE (Computer Aided Investigative Environment) is an Italian GNU/Linux live distribution created as a Digital Forensics project.

CAINE 11 - GNU/Linux Live Distribution For Digital Forensics Project, Windows Side Forensics And Incident Response 

CAINE 11.0 "Wormhole" 64bit - Official CAINE GNU/Linux distro latest release. 

The important news is that CAINE 11.0, 10.0, 9.0, 8.0 and 7.0 block all the block devices (e.g. /dev/sda), in Read-Only mode. You can use a tool with a GUI named UnBlock present on Caine's Desktop.

This new write-blocking method assures all disks are really preserved from accidentally writing operations, because they are locked in Read-Only mode.

By: https://www.caine-live.net


Tools

- CAINE 11 Live USB/DVD

-Kingston data Traveler_3.0  15.5 GB  (Evidence)

-Laptop Workstation 


After CAINE boots, choose the "Boot Live system". If all goes well, the following desktop should appear:

หลังจาก Boot ด้วย CAINE

CAINE  can boot on Uefi/Uefi+secure boot/Legacy Bios/Bios.

CAINE  can boot to RAM




CAINE has a utility called Mounter, which is located in the task bar. It's the tiny icon circled above. Double clicking this icon brings up a dialog box that shows which block devices are currently mounted:

From the CAINE website documentation:

This new write-blocking method assures all disks are really preserved from accidentally writing operations, because they are locked in Read-Only mode.
If you need to write a disk, you can unlock it with BlockOn/Off or using "Mounter" changing the policy in writable mode. 

1. เราจะทำ Forensic image  /dev/sdb1  evidence  สถานะ Read-only

   sdb Read-Only disk

การเขียนข้อมูลลง External HDD ที่เป็นระบบ NTFS ต้องทำการเขียนคำสั่ง - #sudo ntfs-3g -o rw /dev/sda4 /media/sda4

2.จะทำการ สร้าง Folder CF010 และเก็บไฟล์ CF010.e01 ไว้ที่ /dev/sda4  สถานะ Writable  /Media/sda4/CF010

3 Check Timezone and Date time Setting

4.ตั้งชื่อ Case Number ,Evidence number   CF010.e01

5.เปิดโปรแกรม Guymager เลือก  Forensic image  /dev/sdb  Kingston data Traveler_3.0  15.5 GB 

just start GuyMager (which is the imaging software we will use). A link to Guymager is on the main desktop.

The guymager main screen shows four disks. In our case disk WDC_WDS500G2B0A is the internal HDD (/dev/sda) and the Kingston data Traveler_3.0  is the Flash Drive. The third drive (linux loop) is the memory space CAINE uses to run the live USB/DVD.
Guymager supports two formats: Linux dd raw image and Expert Witness Format. Newer version of guymager also support the advanced forensic image format (AFF). Only DD and EWF support splitting the image onto subfile. This is recommended, as handling files larger than 4GB can be difficult on some filesystems (FAT). In this case we use EWF that support built-in metadata. EWF is a well supported format in most forensic packages (EnCase, Autopsy…etc).
this should be the location where the external hard drive is available. This is typically /media/root/<DISKNAME>. In this particular case, image verification is selected (which will make sure no errors have taken place during the capture).Select start 

6.เมื่อเสร็จ จะได้   CF010.e01

7.นำ Forensic image file  CF010.e01 ทำการวิเคราะห์ไฟล์โดยใช้ Autopsy 

A new page will open. Enter the details in ‘Case Name’ and ‘Base Directory’ . Then click on next to proceed to next step. 

Here in next step you have to enter the case number and Examiner details and click on finish to proceed to next step.
A new window will open .It will ask for add data source in Step 1. Select source type to add & browse the file Path (Disk Image and click on NEXT Option to proceed further.
In Step .  Configure ingest Modules I have chosen all the modules as I am looking for complete information on evidence device or disk or system  etc. and click next to proceed further.
After Process completion, it will show Forensic Investigation Report.


สรุป 

   1. การใช้ CAINE 11 จะป้องการเขียนข้อมูลลงหลักฐาน โดยจะใช้ Read-Only mode.   หากจะเขียนข้อมูลลง  Disk ต้องเปลี่ยน  writable mode ก่อน  (Unblock)

    2.  การเขียนข้อมูลลง External HDD ที่เป็นระบบ NTFS ต้องทำการเขียนคำสั่ง - #sudo ntfs-3g -o rw /dev/sda1 /media/sda1

If the user wants to mount and write on an NTFS media should instead use the "ntfs-3g" command (e.g., $ sudo ntfs-3g -o rw /dev/sda1 /media/sda1).

sudo ntfs-3g -o rw /device-path /your-mount-point

     3.ถ้าไม่สามารถ  boot USB ได้ให้ลองปิด  disable  UEFI (   If secureboot failed, try to disable it from UEFI.)

    4. สามารถใช้  guymager  ในการทำ Imager 

   5. ตรวจสอบ วันเวลา Time setting


Cerdit:

 https://www.caine-live.net

https://www.dfir.vn

http://az4n6.blogspot.com

หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูลและเพื่อการศึกษาเท่านั้น


* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ

#WindowsForensic #computerforensic #ComputerForensics #dfir #forensics

#digitalforensics #investigation 

Saturday, October 8, 2016

Digital Forensics:Live Linux bootable USB

Digital Forensics:Live Linux bootable USB

How to image a Mac with Live Linux bootable USB

One thing I've learned when it's comes to imaging Macs is it's good to have options.
When encountering Macs, its seems like there is always a challenge.
No firewire ports for target disk mode, no easy way to remove the hard drive,
or if the the hard drive is removed,
you don't have the specific adapter needed to connect your write blocker to the drive...
and of course, encryption. I am planning on doing several blog posts about
different ways to image a Mac.Depending on the situation, some may work,
some may not, but I just wanted to throw some options out in the Google soup mix.




The first option I am going to go walk through is imaging a Mac with a Live Linux bootable USB. Many times cracking open something like a MacBook Air to grab a hard drive requires special tools and adapters which may not be readily available. If the Mac is already powered off, booting the Mac with a live Linux distro may be a good option. Once booted into Linux, an imaging tool with a GUI, like Guymager, can be used to create an image in E01 or dd format.

For this post, I have selected the CAINE distro. CAINE stands for Computer Aided Investigated Environment. This distro was made specifically for computer forensics. Upon boot, CAINE "blocks all the block devices (e.g. /dev/sda), in Read-Only mode." The examiner must take active steps, which includes nice big warnings, to turn off this feature.

While I did get Kali to work, it did not seem to offer the extra protection that CAINE did to keep the examiner for inadvertently mounting the wrong drive. If you are interested in making a Kali bootable USB drive for the Mac, I have included some brief instructions at the bottom of the post.

This method was tested with CAINE 7.0, Rufus 2.9, and a MacBook Air Early 2015 model 

Create the Bootable USB 

The first step is to create a bootable USB drive on a Windows machine. Download the CAINE iso and Rufus. Rufus is the Windows program that will create a bootable USB drive from the iso. Simply launch Rufus and select the CAINE iso as well as a blank USB drive bigger than 4GB. (NOTE - I tried various other tools to create the bootable USB drive, and not all of them worked when it came time to boot the Mac. Thanks to @APFMarc for the tip on Rufus). Below is a screen shot with the settings I used:

There was a pop up dialog box when I clicked start asking me to choose to write in ISO image mode or DD Image mode. I used the default, which was ISO mode. 

Boot into Linux

Once completed, this USB drive can be used to boot the Mac. In order to boot a Mac from a USB device, it must be put into Startup Mode. This is done by holding down the Alt/Option button when the systems boots. Once in Startup Mode, the boot device can be selected. The CAINE USB should show up as the EFI Boot choice:



After CAINE boots, choose the "Boot Live system". If all goes well, the following desktop should appear: 



CAINE has a utility called Mounter, which is located in the task bar. It's the tiny icon circled above. Double clicking this icon brings up a dialog box that shows which block devices are currently mounted:


 As demonstrated in the screen shot above, the only device that is currently mounted is the USB containing the CAINE distro (Shown as CAINLIVE). Running the df command also confirmed this:


The reason I like CAINE is that it does not let the examiner inadvertently mount a drive by accidentally clicking on something. For example, when I double clicked the Macintosh HD it gave me an error: 



From the CAINE website documentation: 
This new write-blocking method assures all disks are really preserved from accidentally writing operations, because they are locked in Read-Only mode.
If you need to write a disk, you can unlock it with BlockOn/Off or using "Mounter" changing the policy in writable mode. 
I personally prefer this extra layer of protection.

Mount the USB drive that will hold the image

Next, an external USB drive is needed to dump the image on. This external device needs to be mounted writable so the image can be placed on it. To do this, Read only mode needs to be turned off for any newly attached devices by using the Mounter program. Right clicking the Mounter icon in the task bar brings up the following dialog box:


I know this looks scary, all in red and what not, but clicking it brings up another dialog box confirming that this action will only make newly mounted devices writable, which is what is needed so the image can be dumped to the external drive:


After selecting Yes, a brief confirmation message pops up and the icon in the tray also turns red indicating the current status:

The next step is to plug in the USB drive that will contain the image. I named my external USB drive "Images" and formatted it with NTFS on a Windows system before beginning this process (FAT32 will work as well, just be aware of the 4GB file limit). Once the drive is plugged in, it can be mounted by opening up the "Caine's Home" folder on the desktop and double clicking the drive. This will mount the drive to /media/CAINE/YourDriveName:


Now the drive can be accessed to create folders, dump the image to etc. Note - if I try and do the same with the other devices on the host drive (e.g. BOOTCAMP and Macintosh HD), it will give me an error, thereby preventing me from accidentally mounting them.

Use Guymager to create the image

Now that the external USB drive is mounted, Guymager can be started to to create the image. Guymager is found on the Desktop, or under Menu>Forensic Tools>Guymager.

Once launched, select the device that needs to be imaged by right clicking it. In this example, the drive I want is the "ATA Apple SSD SM0256G":


The next step is to fill out all the requisite image data:


Once started, the previous table will show a status on the imaging process. When the image is complete Guymager will create a log file in the same directory as the image. An interesting tidbit - a while back, Eric Zimmerman did some testing on various imaging tools, and Guymager was one of the fastest :)


Kali live Linux bootable USB for Mac 

So far, I've only found one method that works consistently to boot into Kali Linux on a Mac (at least on my test Mac). That method is to use the Mac Linux USB Loader on a Mac to create the bootable USB.

There is a video here that has step by step instructions for the Mac Linux USB Loader, but it's pretty straight forward to use. The basic steps are 1) Download Kali Linux; 2) Using Disk Utilities on Mac to format a USB drive with Fat32 and MBR; 3) Run Mac Linux USB Loader and select the Kali Iso; 4) Choose Kali from the distro type

You can now boot into Kali and use Guymager on a Mac using the same steps I detailed in the sections above. One very important thing to note - using this method will automatically boot you into the Kali Live environment and you will not be given the choice for the Kali Linux Forensics Mode.

In my limited testing it does not appear to mount the host drive, or make any changes to the drive. It also does not have the additional steps and warnings when it comes to inadvertently mounting drives that CAINE does. The Live version will also auto-mount plugged in USB devices. Proceed at your own risk, and as they state on the Kali website:
If you plan on using Kali for real world forensics of any type, we recommend that you don’t just take our word for any of this. All forensic tools should always be validated to ensure that you know how they will behave in any circumstance in which you are going to be using them
Echoing these same sediments, although I have walked though a method of imaging a Mac from a live Linux distro, please test and validate before using either of these methods in the the real world.
 Referent:
 https://bit.ly/2y6XQGR

หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูลและเพื่อการศึกษาเท่านั้น

* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ

#WindowsForensic #computerforensic #ComputerForensics #dfir #forensics
#digitalforensics #investigation #cybercrime #fr

Volatility Lab

Volatility Lab  Image Wanna.vmem P.73 windows.info #python3  vol.py   -f '/home/kali/Desktop/Wanna/Wanna-MEM.vmem' windows.info     ...