Forensic Focus - Computer Forensics, Computer Forensic Training, Digital Forensics
LoginRegisterForumsColumnistsPapersEducationGraduatesReviewsInterviewsNewsletterJobsEventsBlogAdvertise
Search Forensic Focus
Custom Search

Find us on Facebook
Follow Forensic Focus on Twitter
Columnists
"I erred." "I was mistaken."
Craig Ball
Single Sign On
Simon Biles
Copyright and games console modification
Dan Gaskell
To GUI or not to GUI?
Chris Hargreaves
'Web 2.0' as evidence
Sean McLinden
Sometimes it’s all about timing
Sam Raincock
Avoiding common job application errors
David Sullivan
Scalability: A Big Headache
Dominik Weber
Graduate Recruitment

computer forensics graduate jobs

Main Menu
MY ACCOUNT
COMMUNITY
EMPLOYMENT
EDUCATION
RESOURCES
MISC
Follow Forensic Focus

Join newsletter

Join LinkedIn group

Follow on Twitter

Subscribe to news

Subscribe to forums

Subscribe to blog

Subscribe to tweets

Members' blogs

External feeds

Bookmark & share: Bookmark and Share

Computer Forensics Newsletter
Newsletter

You must be a
registered user
to receive our newsletter

Register Now!

Linux for computer forensic investigators: «pitfalls» of mounting file systems

by Suhanov Maxim
ITDefence.Ru

Introduction

Forensic Linux distribution is a customized Linux distribution that is commonly used to complete different tasks during computer forensics investigations. These distributions are often used to complete the following tasks:

– Quick preview of various data storage devices (for example, to determine installed operating system);
– Creating «bit-to-bit» copies of data storage devices;
– Conducting full analysis of data storage devices.

Some forensic Linux distributions may include network forensics tools and tools for acquiring volatile data from a running system.


Requirements for forensic Linux distributions

Every forensic Linux distribution should satisfy the following requirements:

– Do not allow any writes to evidentiary media without user's permission;
– Boot on most common hardware configurations;
– Use only up to date software and fix all security problems as soon as possible.

Blocking any writes to evidentiary media can be achieved by following these steps:

1. Boot scripts and programs do not mount any file systems, do not activate the swap space and do not activate software RAID arrays on evidentiary media without user's permission;
2. Automouting for all file system types on connected removable devices is disabled.

It is also possible to set all block devices to read-only mode during the boot process to protect evidence from incorrect user actions.


«Pitfalls» of mounting file systems in read-only mode

All Linux distributions allow users to mount a file systems in read-only mode (for example, using the following command: «mount -o ro /dev/sda1 /mnt/sda1»). However, mounting file systems in such a way does not guarantee that file system's data will never be altered by the operating system. For example, mounting a damaged Ext3 file system with only «-o ro» option will result in data modification during the recovery process:

EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.

Some forensic Linux distributions may show user a message saying that some data on evidentiary media has been overwritten

In this case some file system metadata gets updated after recovery:

FILE SYSTEM INFORMATION
--------------------------------------------
File System Type: Ext3
Volume Name:
Volume ID: 5962a06aa4c895b5104749a687ccb9e0
Last Written at: Mon Sep 7 17:41:01 2009
Last Checked at: Fri Sep 4 18:39:00 2009
Last Mounted at: Mon Sep 7 17:41:01 2009
Unmounted properly
Last mounted on:
Source OS: Linux
Dynamic Structure
Compat Features: Journal, Ext Attributes, Resize
Inode, Dir Index
InCompat Features: Filetype, Needs Recovery,
Read Only Compat Features: Sparse Super, Has
Large Files,
FILE SYSTEM INFORMATION
--------------------------------------------
File System Type: Ext3
Volume Name:
Volume ID: 5962a06aa4c895b5104749a687ccb9e0
Last Written at: Mon Sep 7 18:02:57 2009
Last Checked at: Fri Sep 4 18:39:00 2009
Last Mounted at: Mon Sep 7 17:41:01 2009
Unmounted properly
Last mounted on:
Source OS: Linux
Dynamic Structure
Compat Features: Journal, Ext Attributes, Resize
Inode, Dir Index
InCompat Features: Filetype,
Read Only Compat Features: Sparse Super, Has
Large Files,

Metadata changes after damaged Ext3 file system recovery

Mounting other file systems (for example, Ext4, ReiserFS and XFS) with only «-o ro» option may result in data modification too.


Mounting file systems in a forensically sound manner

To mount various file system types in a forensically sound manner the following methods can be used:

1. Loopback devices in read-only mode: can be switched on using «ro,loop» mount options (for example: «mount -o ro,loop /dev/sda1 /mnt/sda1»);
2. Block devices for disks and partitions in read-only mode: you can switch any block device to read-only mode by using blockdev tool (for example: «blockdev --setro /dev/sda1»);
3. You can disable all journal recovery actions for Ext3 and Ext4 file systems by using «ext2» file system type during the mount. Unfortunately, not all file systems support such kind of write protection — for example, there are no working write protection mount options for XFS (however, this was fixed in very recent kernel versions).

It should be noted that mounting damaged Ext3 and Ext4 file systems using these ways is only possible by utilizing alternate superblocks. You can get alternate superblocks locations by using «mke2fs -n» command (for example: «mke2fs -n /dev/sda1»).


«Pitfalls» of automounting file systems

Automounting of file systems in Linux may occur in following situations: during the boot process and after connecting removable device (for example, USB Flash drive) to a running system.

Removing all entries for file systems on evidentiary media from «/etc/fstab» does not guarantee that they will never be mounted during the boot — file systems can be mounted (and modified) during execution of initrd scripts or during execution of hardware detection scripts.

Automounting of file systems on removable data storage devices is controlled by special software programs that are properly configured (or disabled) on most forensic Linux distributions.


Testing popular forensic Linux Live CD distributions

I have tested several major forensic Linux Live CD distributions for various mounting issues.

Information about tested forensic Linux Live CD distributions

Test results:

– All tested distributions do not mount file systems on connected USB Flash devices;
– Some distributions automatically mount (and sometimes modify) file systems on evidentiary media during the boot process: SPADA mounts file systems during execution of hardware detection scripts, other automounting distributions alter the data on evidentiary media during execution of initrd scripts.

Test results


Testing automatic swap space activation

The following distributions were tested for automatic swap space activation during the boot: Helix3 (old version), SMART Linux (Slackware), grml, LinEn Boot CD and RIPLinux.

None of these distributions activate the swap space on evidentiary media during the boot process.


Conclusions

I have found that some forensic Linux Live CD distributions do mount and recover several file system types during the boot process. However, I didn't test Linux RAID and LVM activation issues, so it is recommended to use distributions that do not activate software RAID arrays and LVM without users' permission (e.g. grml).



Forensic Education

computer forensics education choices COURSE DIRECTORY

User Info

Welcome Anonymous

Nickname

Membership:
Latest: vanya66
New Today: 7
New Yesterday: 19
Overall: 15536

People Online:
Members: 5
Visitors: 17
Bots: 6
Staff: 0
Staff Online:

No staff members are online!
Latest Jobs

Computer Forensic - Associate - London - £45,000-£55,000pa+
Last post by ForensicsRecruiter in Computer Forensics Job Vacancies on Sep 01, 2010 at 14:34:53

Computer Forensic Specialist - Team Lead - London £55-£80k+
Last post by ForensicsRecruiter in Computer Forensics Job Vacancies on Sep 01, 2010 at 14:23:04

COMPUTER FORENSIC/EDISCOVERY CONTRACT ROLE, LONDON 4-8 WEEKS
Last post by ScottBurkeman in Computer Forensics Job Vacancies on Aug 27, 2010 at 16:29:03

Computer Forensic Vacancy South Wales
Last post by stezer2000 in Computer Forensics Job Vacancies on Aug 19, 2010 at 09:41:54

CF Investigator (LE experience). London
Last post by DavidSullivan in Computer Forensics Job Vacancies on Aug 18, 2010 at 17:00:41

Computer/Video Forensic Examiners (Fredericksburg, VA, USA)
Last post by snorris in Computer Forensics Job Vacancies on Aug 18, 2010 at 00:09:50

Senior Forensic Computer Examiner - London
Last post by pgro in Computer Forensics Job Vacancies on Aug 17, 2010 at 13:26:19

Phd studentship available at University of Surrey.
Last post by apurva.rustagi in Computer Forensics Job Vacancies on Aug 16, 2010 at 22:52:52

Consultant- London- £25K-£40K
Last post by Teval in Computer Forensics Job Vacancies on Aug 05, 2010 at 07:37:45

Forensic Consultant - Singapore
Last post by darrencerasi in Computer Forensics Job Vacancies on Aug 05, 2010 at 01:00:18

Computer Forensics Blog
· 'Web 2.0' as evidence
· Scalability: A Big Headache
· Single Sign On
· Authentication and Authorisation
· UK student competition: Win free training on "Investigating Connection Records" course
· 10% Discount on Connection Records/Intro to CSA Training (UK)
· Mobile Forensics Training: Investigating Connection Records (UK, Aug 23/24)
· Windows Search forensics
· Computer Forensics - sometimes it’s all about timing
· Forensic Focus 2010 survey

read more...
Members' Blogs

Start Blogging

What is Computer Forensics?
Computer forensics (or forensic computing) is the use of specialized techniques for recovery, authentication, and analysis of electronic data with a view to presenting evidence in a court of law.
Computer Forensics Downloads
  1: Forensic Examination of Digital Evidence: A Guide for Law Enforcement (pdf)
  2: ACPO Good Practice Guide for Computer based Electronic Evidence
  3: Electronic Crime Scene Investigation: A Guide for First Responders (pdf)
  4: Ancysoft Data Recovery Software
  5: Forensics Plan Guide & Forensic Cookbook
  6: HELIX incident response CD
  7: PDA Forensic Tools:An Overview and Analysis
  8: Recover My Files
  9: Autopsy Forensic Browser Version 2.03 (source code)
  10: Handy Recovery
Forensic Focus

Forensic Focus

Copy and paste the text below to insert the button displayed above on your site. Thanks for your support!


Use of this website signifies your agreement to the Terms of Use/Privacy Policy available here.

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2010 Forensic Focus


Interactive software released under GNU GPL, Code Credits, Privacy Policy
.: fisubsilver shadow phpbb2 style by Daz :: CPG-Nuke port by norseman :: ported to CPG-Dragonfly by jamin :.