CS 695 Host Forensics: Introduction

Slides:



Advertisements
Similar presentations
COEN 252 Computer Forensics Hard Drive Geometry. Drive Geometry Basic Definitions: Track Sector Floppy.
Advertisements

Computer Forensic Analysis By Aaron Cheeseman Excerpt from Investigating Computer-Related Crime By Peter Stephenson (2000) CRC Press LLC - Computer Crimes.
Next Generation Data Forensics & Linux Thomas Rude, CISSP August 2002.
Section 5a Types of Storage Devices.
An Introduction to Computer Forensics James L. Antonakos Professor Computer Science Department.
File System Analysis.
Guide to Computer Forensics and Investigations, Second Edition
Digital Forensics Module 11 CS /26/2004Module 112 Outline of Module #11 Overview of Windows file systems Overview of ProDiscover Overview of UNIX.
File Management Systems
Managing Your Hard Disk and Operating System 23,26 March :30pm - 4:00pm.
1 Web Server Administration Chapter 3 Installing the Server.
Computer Forensics Principles and Practices by Volonino, Anzaldua, and Godwin Chapter 6: Operating Systems and Data Transmission Basics for Digital Investigations.
Chapter 12 File Management Systems
Operating Systems.
Storage device.
COEN 252 Computer Forensics
Capturing Computer Evidence Extracting Information.
CIS 105 Concepts and Terminology Unit 3 CIS 105 Survey of Computer Information Systems Essential Concepts and Terminology Study Unit Three.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Internal components, Backing Storage, Operating Systems Software
BACS 371 Computer Forensics
 FILE S SYSTEM  DIFFERENT FILE SYSTEMS  FILE SYSTEM COMPONENTS  FILE OPERATIONS  LOG STRUCTERD FILE SYSTEM  FILE EXAMPLES.
Hardware Case that houses the computer Monitor Keyboard and Mouse Disk Drives – floppy disk, hard disk, CD Motherboard Power Supply (PSU) Speakers Ports.
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Computers in the real world Objectives Understand what is meant by memory Difference between RAM and ROM Look at how memory affects the performance of.
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
Understanding and Troubleshooting Your PC. Chapter 5: Understanding, Installing, and Troubleshooting Disk Drives2 Chapter Objectives  In this chapter,
Digital Crime Scene Investigative Process
Computer Forensics Principles and Practices
Guide to Linux Installation and Administration, 2e1 Chapter 2 Planning Your System.
Lecture No 11 Storage Devices
Bits, Bytes, Files, Hard Drives. Bits, Bytes, Letters and Words ● Bit – single piece of information ● Either a 0 or a 1 ● Byte – 8 bits of information.
Digital Forensics Dr. Bhavani Thuraisingham The University of Texas at Dallas Lecture #8 Computer Forensics Data Recovery and Evidence Collection September.
PC Maintenance: Preparing for A+ Certification Chapter 10: Introduction to Disk Storage.
MCTS Guide to Microsoft Windows Vista Chapter 4 Managing Disks.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
Chapter Two Input and Storage Devices Part II: Storage Devices.
File System Management File system management encompasses the provision of a way to store your data in a computer, as well as a way for you to find and.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Managing Disks and Drives Chapter 13 powered by dj.
Computer Forensics Peter Caggiano. Outline My Background What is it? What Can it do and not do? Goals Evidence Types of forensics Future problems How.
Guide to Computer Forensics and Investigations Fourth Edition
Chapter 3 Partitioning Drives using NTFS and FAT32 Prepared by: Khurram N. Shamsi.
Implementing Hard Drives. Partitioning and Formatting Process.
How To Install A New Hard Drive To Replace An Old One Sample Instructional Guide Odetta Rodriguez – Week 5.
COEN 252 Computer Forensics Hard Drive Geometry. Drive Geometry Basic Definitions: Track Sector Floppy.
Chapter 5 Processing Crime and Incident Scenes Guide to Computer Forensics and Investigations Fourth Edition.
Memory management.
 Forensics  Application of scientific knowledge to a problem  Computer Forensics  Application of the scientific method in reconstructing a sequence.
IT1001 – Personal Computer Hardware & system Operations Week7- Introduction to backup & restore tools Introduction to user account with access rights.
Chapter 8: Installing Linux The Complete Guide To Linux System Administration.
Copyright © Genetic Computer School 2008 Computer Systems Architecture SA 8- 0 Lesson 8 Secondary Management.
Digital Forensics Dr. Bhavani Thuraisingham The University of Texas at Dallas Lecture #8 File Systems September 22, 2008.
Chapter 8 File Systems FAT 12/16/32. Defragmentation Defrag a hard drive – Control Panel  System and Security  Administration tools  Defrag hard drive.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Main Memory Read Only Memory (ROM)
Chapter 11 Analysis Methodology Spring Incident Response & Computer Forensics.
John Samuels October, Why Now?  Vista Problems  New Features  >4GB Memory Support  Experience.
File System Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi Fujinoki CS 314.
By Jason Swoyer.  Computer forensics is a branch of forensic science pertaining to legal evidence found in computers and digital storage mediums.  Computer.
Digital Forensics Anthony Lawrence. Overview Digital forensics is a branch of forensics focusing on investigating electronic devises. Important in for.
File-System Management
Chapter 11: File System Implementation
Chapter 12: File System Implementation
Guide to Computer Forensics and Investigations Fifth Edition
Booting Up 15-Nov-18 boot.ppt.
CHFI & Digital Forensics [Part.1] - Basics & FTK Imager
Thursday April 19, 2018 (Discussion – Storing and Retrieving Data, Processing the Electronic Crime Scene)
Presentation transcript:

CS 695 Host Forensics: Introduction Georgios Portokalidis gportoka@stevens.edu

Overview What is host forensics Some examples Forensics methodology Course overview Course logistics CS-695 Host Forensics

Computer Forensics “Gathering and analyzing data in a manner as free from distortion or bias as possible to reconstruct data or what has happened in the past on a system”. “Computer forensics involves the collection, preservation, identification, extraction, documentation and interpretation of computer data”. -Why host forensics? -We are focusing on the host-end and not the network CS-695 Host Forensics

But we are not here to discuss law In a Few Words Answers.. In a way that .. IF WHO WHAT HOW WHEN WHY …is scientific Repeatable Falsifiable …can stand in court ‏ But we are not here to discuss law CS-695 Host Forensics

What Are Forensics Used For? Crime, corporate, or institutional investigations Research Damage assessment and post-mortem analysis Fraud Drug trafficking Child pornography Espionage Cyber-attacks Copyright infringement Discover what was lost Recover deleted data Discover entry point CS-695 Host Forensics

Two Names Forensics analysis Incident response Refers to cases where a “real” crime has occurred It’s primary goal is to uncover information Incident response Refers to cases where the computer has been the victim It’s primary goal is to answer how and who? Ideally to also provide a solution CS-695 Host Forensics

For Example: Fraud So the police got the computer. Isn’t that enough? http://valley.newhavenindependent.org/archives/entry/state_police_seize_computer_from_shelton_finance_department/ So the police got the computer. Isn’t that enough? Where are the forensics? CS-695 Host Forensics

For Example: Cyber-attacks http://www.geekosystem.com/stuxnet-story/ Guess how we learned what Stuxnet was doing? CS-695 Host Forensics

Anti-virus companies need to understand malware to create “remedies”. For Example: Malware http://news.cnet.com/8301-1009_3-57557434-83/zeus-botnet-steals-$47m-from-european-bank-customers/ Anti-virus companies need to understand malware to create “remedies”. CS-695 Host Forensics

For Example: Espionage http://www.reuters.com/article/2013/10/26/us-germany-usa-spying-idUSBRE99P08G20131026 How did we learn about this? CS-695 Host Forensics

The Forensics Process Formulated to ensure that findings can stand in court But we are not lawyers We will focus on the technical aspects We won’t cover dealing with courts, etc. Consists of 3 or 4 steps Depending on what/who you read Remember  keep notes of everything you do CS-695 Host Forensics

Computer Forensics: Incident Response Essentials The Three As Acquire the evidence without altering or damaging the original Authenticate that the recovered evidence is the same as the original Analyze the data without modifying it Computer Forensics: Incident Response Essentials Warren G Kruse II and Jay G. Heiser CS-695 Host Forensics

Acquiring the Evidence CS-695 Host Forensics

Where Can We Find Evidence? Storage Disks, floppies, CDs, DVDs, USB sticks, … Memory RAM, caches, processes Network Routers, server logs, etc. CS 665 focuses on the network aspect of forensics CS-695 Host Forensics

Things to Keep in Mind Speed is of the essence Don’t overdo it Anything you do disturbs the system …and can potentially alter data You can’t trust the system Anything could be running on it No size fits all Prepared to be surprised Expect failures CS-695 Host Forensics

Data “Spoils” Easily It’s extremely important to understand this Trying to obtain the data may alter them Simply doing nothing is also not good A running system continuously evolves The Heisenberg Uncertainty Principle of data gathering and system analysis As you capture data in one part of the computer you are changing data in another CS-695 Host Forensics

Can You Order These? Network state CD-ROMs, printouts, etc. Main Memory Registers, peripheral memory, caches, etc. Disk Floppies, backup media, etc. Running processes CS-695 Host Forensics

Order of Volatility Data type Lifetime Registers, peripheral memory, caches, etc. nanoseconds Main Memory Network state milliseconds Running processes seconds Disk minutes Floppies, backup media, etc. years CD-ROMs, printouts, etc. tens of years CS-695 Host Forensics

Consider the Following Turn-off the system? How? Pull the plug, normal shutdown? Leave it running to analyze? How? Browse the hard drive, open a console? You are assigned to do forensics on a running system. What is your first step? CS-695 Host Forensics

The Easy Path Let’s assume that you pull the plug and you now have a unpowered system with a disk full of evidence. CS-695 Host Forensics

Preserve the Evidence Use a writes blocker Making the OS aware of the partition is called mounting Mount it read-only Beware could alter FS meta-data CS-695 Host Forensics

Make Sure You Have Enough Time Hard drive capacity keeps growing Typical desktop HD capacity, say 1TB? Take typical transfer speeds SATA 2 can transfer over 300MB/s (SATA 3 doubles this), but traditional rotational drives reach approx 100MB/s at peak, and average at around 80MB/s. SSDs can max out the controller USB transfers even slower: 20 to 25 MB/s if you are lucky You can expect to wait several hours to complete a copy CS-695 Host Forensics

Live Booting Sometimes we need to work directly on the machine Uncommon HW and controllers or weird physical cases‏ Peculiar hardware Raid devices Specific investigation constraints Boot from a CD, DVD, USB stick Use a forensics-oriented distribution Helix, http://www.e-fense.com/helix/ DEFT, http://www.deftlinux.net/ Knoppix-S-T-D, http://s-t-d.org/ CS-695 Host Forensics

Sending An Image Over the Network Usually when the disk remains connected to the investigated machine It can also take significant time 1Gb/s  approx. 120MB/s Easy to do with the proper tools receiver$ nc -l -p 1234 > victim.hda1 sender# dd if=/dev/hda1 bs=100k | nc receiving-host 1234 Beware when transmitting plain text data Use SSH tunneling receiver$ ssh sender -x -z -R 2345:localhost:1234 CS-695 Host Forensics

Make a Clone (or More) Make a bit-per-bit copy E.g., dd if=/dev/sda of=image/sda_clone … Simply copying files is inaccurate Contents are preserved…but meta-data lost Meta-data include when a file was Modified Accessed Created We can know when something happens CS-695 Host Forensics

Can you think of such a case? The Hard Path The system is running and there is valuable information in memory. Can you think of such a case? CS-695 Host Forensics

Information of Interest Running processes ps aux Open files lsof file Open connections netstat Memory contents Challenging. Contents continuously change as we try obtain an accurate snapshot In Linux all process memory is available through /proc/pid/… and RAM through /proc/mem Use forensics tools (e.g., sleuthkit, grave-robber, and memdump) User data who, last, lastlog CS-695 Host Forensics

Collecting Volatile Information Use external tools to obtain data Remember? We cannot trust the system Better to immediately transmit to the network Writing anything to disk could destroy evidence CS-695 Host Forensics

Forensic Procedures If you plan to present your findings in court Identify everything in the scene Take pictures, use labels, baggies, … Maintain the chain-of-custody Document everything you do CS-695 Host Forensics

Authenticate the Evidence CS-695 Host Forensics

Integrity of the Evidence It’s not trivial to prove that everything is as it was All evidence ages Goals Show that you did not alter anything Show that any changes are part of natural processes (normal wear and tear) Incriminating evidence does not appear as part of some bits flipping on a disk! CS-695 Host Forensics

Hashes Ensure that original data has not been tampered Can be created at various steps of the process To be useful, must be either sealed in writing (e.g. on a signed report), or digitally signed A hash function maps a large dataset to smaller one Examples: MD5 or SHA1 Clone FS and create a hash at the same time dcfldd if=/dev/sda hash=md5,sha256 hashwindow=10G… CS-695 Host Forensics

Analyze the Evidence CS-695 Host Forensics

What Will You Need? Hardware Software Removable HD enclosures or connectors with different plugs Write blockers A DVD burner‏‏ External disks USB2, firewire, SATA and e-SATA controllers, if possible Software Multiple operating systems Linux: extensive native file system support VMs running various Windows versions (XP, Vista, 7, 8) Forensics toolkits E.g., SleuthKit http://www.sleuthkit.org/ CS-695 Host Forensics

Technical Awareness The most important requirement A little bit of knowledge can be dangerous You need to understand The implications of your actions How is data modified The layers of your system CS-695 Host Forensics

Special bytes signify it’s an image Layers and Illusions An image FF D8 … 05 AE FF … FF D9 A series of bytes mona_lisa.jpg A file Special bytes signify it’s an image Bits in the disk Block meta-data A series of blocks and meta-data CS-695 Host Forensics

Special bytes signify it’s an image Layers and Illusions An image FF D8 … 05 AE FF … FF D9 A series of bytes mona_lisa.jpg A file Special bytes signify it’s an image The file system (FS) Where visible files live Downloaded malware System log files User files Bits in the disk Block meta-data A series of blocks and meta-data CS-695 Host Forensics

Layers and Illusions The disk Where everything lives, including: Previously delete files Previous content of files Hidden data Bits in the disk CS-695 Host Forensics

Disk Controller Without the controller to interface with the disk, you might as well use it as paperweight SCSI (Small Computer Systems Interface) More common in servers Can connect up to 7 drives High performance IDE (Integrated Drive Electronics) or “ATA” More common everywhere else 4 drives maximum, 2 of them (master and slave) on each connection cable ATA-3 introduced security features (passwords) Hidden protected area (HPA) introduced with ATA-4 SATA (Serial ATA) Higher data rates CS-695 Host Forensics

Hard Disk Geometry CS-695 Host Forensics

Disk Organization Logical block addressing (LBA) Decouples logical and physical locations on disk Can mask corrupted blocks Allows older BIOSes to handle newer larger HDs Master book record (MBR) First block on disk Contains boot code and partition table Home of “boot viruses” CS-695 Host Forensics

Disk Partitions You can get a list of your partitions using fdisk Help you organize the disk E.g., each partition can have a different OS Maximum number of 4 partitions Special extended partition Takes normal disk space to hold pointers to an unlimited number of partitions Defined by start and end sector on disk You can get a list of your partitions using fdisk Device Boot Start End Blocks Id System /dev/sda1 * 63 41961779 20980858+ 83 Linux /dev/sda2 41961780 92309489 25173855 82 Linux swap /dev/sda3 92309552 196194303 51942376 5 Extended /dev/sda4 196196095 1953525167 878664536+ 83 Linux /dev/sda5 92309553 113290379 10490413+ 83 Linux /dev/sda6 113290443 155236094 20972826 83 Linux /dev/sda7 155238400 196194303 20477952 83 Linux CS-695 Host Forensics

How Are Files Stored? Slack space A sector is the smallest area that can be written Clusters are groups of sectors Slack space mona_lisa.jpg CS-695 Host Forensics

Slack Space All unallocated space can hide information Examples Un-partitioned space Sectors not allocated to files from the FS Slack space in a sector that is partially written CS-695 Host Forensics

The File System Where you will probably spend most of your time Home of all files, logs, binaries, downloads, files “recovered” by you, etc. Each partition hosts its own file system Take your pick: FAT, NTFS, ext2, ext3, reiserFS, HFS+ You usually create a FS using format (or mkfs in Unix) Not necessarily the way to destroy one CS-695 Host Forensics

Can You Really Ever Erase Data? No! If using magnetic media Every time you delete something magnetic trails of the written contents remain Most likely you’ll be never called to recover data this way You can make it really hard through secure erase Darik's Boot and Nuke (DBAN) How about solid state drives? NAND-based not magnetic But still, the answer is no! CS-695 Host Forensics

What about memory data? CS-695 Host Forensics

Memory Organization Typical OS organization Process Kernel Typical OS organization Physical memory OS kernel provides services & controls the hardware User processes interact with the kernel Both processes and kernel assume a flat memory space …but RAM is shared CS-695 Host Forensics

Virtual Memory Physical RAM is organized into pages Physical pages are frequently 4K The kernel manages these pages Pages are given to processes that need them The CPU performs address translation Virtual pages given to a process are mapped to physical pages Allows for the illusion of a flat continuous address space CS-695 Host Forensics

Paging/Swapping to Disk RAM is never enough! Virtual memory can be larger than physical Memory pages that are not needed are saved to disk E.g., memory pages not used recently The OS kernel manages this process Keep lists of free/used physical pages Keep track of pages swapped to disk CS-695 Host Forensics

Why Should I Care? Unallocated memory contents can be also recovered Contents can still be in physical RAM …or the swap file Very fragile! CS-695 Host Forensics

Analyzing Binaries Data Code Reconstructed process image 0xbf… stack Data heap .text Code constants Understanding what an arbitrary malware does has been the subject of research for a long time! 0x00… CS-695 Host Forensics

This course will focus on the analysis phase of forensics! CS-695 Host Forensics