Ethical Hacking & Digital Forensics Study Notes
Ethical Hacking & Digital Forensics
Unit Overview
- Course Title: DJS22CEC8014
- Instructor: Prof. Nilesh Ghavate
Unit 4: Introduction to Digital Forensics
- Definition and Scope of Digital Forensics
- Types and Characteristics of Digital Evidence
- Phases of a Digital Investigation
- File System Forensics (FAT, NTFS)
- Disk Imaging and Cloning (Bit-by-Bit Copy), Data Recovery Concepts
- Deleted File and Slack Space Analysis, Metadata Extraction and Timestamp Interpretation
- Disk Forensics Tools (FTK Imager, Autopsy, EnCase)
- Role of AI and Machine Learning in Digital Forensics
Introduction to Digital Forensics
- Definition: Digital forensics, also known as digital forensic science, is a branch of computer forensic science that focuses on the restoration and inspection of material found in digital devices, often in relation to cybercrime.
- Process: Digital forensic investigation involves the duplication of original data, preservation of original evidence, and a systematic investigation process to collect, identify, and validate digital information to reconstruct past events.
- Importance in Law: In a court case, both the process of gathering digital evidence and the validity of the evidence itself are crucial, with there being a focus on scrutinizing the evidence handling procedures prior to evaluating its value.
Organizations in Digital Forensics
- The Digital Forensic Research Workshop Group (DFRWS) and the American Society of Digital Forensics and e-Discovery (ASDFED) have established recommended processes for collecting digital evidence.
- Tools such as Encase, FTK, and Sleuth Kit have been recognized for their reliability in computer crime investigations, with both process and output deemed acceptable.
Need for Digital Forensics
- Definition: Computer forensics utilizes scientific knowledge for collecting, analyzing, and presenting evidence for civil or criminal courts.
- Utility for Network Administrators: Professionals managing networks and information systems must have comprehensive knowledge of computer forensics, as it pertains to the ability to present findings in court.
Rules of Computer/Digital Forensics
Key Rules To Follow During Digital Forensic Investigations (DFI)
- Original Media Protection: Never perform examinations on the original media.
- Forensically Sterile Media: Always make copies onto sterile media; use new media when available.
- Bit-by-Bit Copying: The copy of evidence must be an exact, bit-by-bit copy, referred to as a bit-stream copy.
- Protection During Acquisition: Protect the computer and data during acquisition to prevent data modification; use write-blocking devices whenever possible.
- Prevention of Evidence Modification: Ensure that examinations protect evidence from alteration.
- Clear Chain of Custody: Maintain a clear chain of custody for all evidence to provide an audit log of access and transfers.
Types of Digital Forensics
1. Computer Forensics
- Definition: Involves the identification, preservation, collection, analysis, and reporting on evidence found in computers and related storage media to support investigations and legal proceedings.
- Objective: Acquire evidence from computer systems, along with a collection of data such as system logs, internet history, and communication records.
2. Network Forensics
- Definition: The monitoring, capture, storage, and analysis of network activities to discover sources of security attacks and other problematic incidents.
- Purpose: To analyze computer network traffic (LAN/WAN and internet) in order to gather evidence of intrusions and assess compromised data.
- Examples: Includes IP logs, server logs, packet captures.
3. Mobile Devices Forensics
- Definition: The recovery of electronic evidence from mobile devices, including smartphones, SIM cards, and tablets.
- Data Recovered: Call logs, text messages, in-app communication, and location data from GPS logs.
4. Digital Image Forensics
- Definition: Examines digitally acquired photographs to validate authenticity and recover file metadata.
5. Digital Video/Audio Forensics
- Definition: Involves the collection, analysis, and evaluation of audio and video recordings to establish authenticity and detect tampering.
6. Memory Forensics
- Definition: Recovery of evidence from a computer's RAM during a live acquisition.
Introduction to Digital Evidence
- Definition: Digital evidence is information valuable to an investigation that is stored, received, or transmitted by electronic devices.
- Common Types: Text messages, emails, photographs, videos, and internet searches.
- Trustworthy Information: Information presented must be reliable; any material can potentially prove a case, including documents and electronic media.
The Best Evidence Rule
- Definition: The original document must be presented in court to prove its content, rather than relying on copies.
- Key Points: Ensures accuracy and authenticity, prevents manipulation, primarily applies to recorded content.
- Example: In legal proceedings, the original email file should be preferred over a screenshot or printed copy.
Original Evidence
- Definition: Actual, first-hand evidence, not a copy. In the digital context, examples include original hard disks, email records, and CCTV footage.
- Key Features: Most reliable, highest evidentiary value, and contains metadata.
Rules of Digital Evidence
- Admissibility: Evidence must be legally acceptable in court, relevant, and collected following proper procedures.
- Authenticity: Evidence must be verified as genuine and unaltered. - Tools: Hash values (MD5, SHA) and digital signatures.
- Integrity: Must remain unchanged from the moment of collection until presentation, ensured by write blockers and secure storage.
- Reliability: Evidence should be trustworthy, employing validated tools and methods.
- Completeness: Evidence must provide a complete picture, including incriminating and exculpatory data.
- Chain of Custody: Record details regarding evidence handling, ensuring no tampering occurs.
- Documentation: Record every step of the process including methods, tools used, and observations.
- Preservation: Must be protected from damage, alteration, and loss.
- Legality: Evidence must be collected following lawful procedures.
- Reproducibility: Another expert should replicate the process and achieve the same results.
Key Criteria for Handling Digital Evidence
- Proper Acquisition Protocol: Follow established protocols regardless of whether evidence is physical or digital, exercising care during collection.
- Special Handling Situations: Decisions may need to be made regarding shutting down devices to preserve evidence or allowing examination of memory.
- Chain of Custody Maintenance: All artifacts should be collected, retained, and transferred preserving chain of custody.
- Logging Evidence Collection: Date and time stamp materials, recording who collected them and their transport locations.
- Access Controls: Implement suitable access controls when storing evidence to restrict it to authorized individuals only.
Characteristics of Digital Evidence
Locard’s Exchange Principle
- Definition: States that “Every contact leaves a trace.” - Key Idea: Mutual exchange of evidence occurs with every interaction. - Examples: A hacker leaves login records, while a computer user may leave fingerprints or modified files.
Key Characteristics
- Intangible Nature: Digital evidence exists as data on electronic devices rather than physical forms.
- Highly Volatile: It is easily altered or destroyed, especially in RAM upon loss of power.
- Easily Duplicable: Exact copies can be made; this simplifies analysis but introduces authenticity challenges.
- Fragile and Sensitive: Improper handling can modify or damage evidence.
- Requires Specialized Tools: Collection and analysis require advanced forensic tools and knowledge.
- Large Volume: Digital devices can store significant amounts of data, complicating investigations.
- Metadata Availability: Includes hidden information like creation dates and authors.
- Persistent Yet Recoverable: Often, deleted data can still be recovered unless securely wiped.
- Chain of Custody Importance: Documenting evidence handling is vital for integrity and legal admissibility.
- Cross-Jurisdictional Nature: Digital evidence can be stored globally, complicating legal considerations.
Types of Evidence
- Illustrative Evidence: Representations of objects (photographs, videos).
- Electronic Evidence: Digital proof obtained from sources (emails, documents).
- Documented Evidence: Written proof presented in various media forms (contracts, invoices).
- Explainable Evidence: Supports defendants in criminal cases (exculpatory evidence).
- Substantial Evidence: Physical proof at a crime scene (fingerprints, blood samples).
- Testimonial Evidence: Spoken or written evidence provided under oath.
Phases of a Digital Investigation
A structured seven-phase process for digital forensic investigation:
Phase 1: First Response & Identification
- Locate & Catalog: Identify digital sources before any action.
- Initial Assessment: Determine scope and severity (data breach, insider threat).
- Secure the Scene: Restrict access to prevent unauthorized tampering.
Phase 2: Preservation
- Importance of Preservation: Fragile nature of digital evidence necessitates firm preservation protocols.
- Key Techniques: - Write-Blockers: Tools preventing data writes to original media. - Forensic Imaging: Bit-for-bit sector copies capturing all data. - Chain of Custody: Log documenting evidence handling.
Phase 3: Collection
- Retrieve Relevant Data: Extract files and inspect data for relevance.
- Eliminate Irrelevancies: Apply hash-value matching to focus the investigation.
- Use Forensic Tools: Utilize tools like FTK and EnCase for data extraction.
Phase 4: Examination
- Deep-Dive Analysis: Analyze for patterns and digital artifacts.
- Reconstruct Events: Use metadata and logs for chronological reconstruction.
- Identify Suspects: Link artifacts to uncover potential malicious actions.
Phase 5: Analysis
- Interpret Findings: Assess significance of artifacts in context.
- Connect Information: Build a narrative through synthesizing data from various sources.
- Scientific Method: Formulate and validate hypotheses against evidence, ensuring objectivity.
Phase 6: Documentation
- Formal Record: Document all actions, tools, and findings with timestamps.
- Methodology Transparency: Detail investigative techniques for replication.
- Evidence Integrity: Support chain of custody to assure legal admissibility.
Phase 7: Presentation
- Clear Communication: Translate findings into accessible language.
- Visual Aids: Use diagrams and timelines to illustrate narratives.
- Defensibility: Prepare to defend findings in legal proceedings.
File System Forensics (FAT, NTFS)
File System Forensics Definition
- Purpose: Analyze file systems to recover, interpret, and validate evidence.
- Goals: Recover deleted files, analyze activity, reconstruct event timelines, and detect tampering.
Fundamentals of a File System
- Core Purpose: Manages and organizes data on storage devices, essential to locate and retrieve files efficiently.
- Relevance in Forensics: Understanding file system operations is crucial for evidence reconstruction and identification.
File System Abstraction Model
- Complexities: Physical media analysis of hard drives requires extensive training.
- Flash Media Analysis: May offer more accessible analytical opportunities for a broader range of examiners.
Overview of File System Structure
- Hierarchy: - Disk: Contains partitions. - Partition: Transformed to a volume after formatting. - Volume: Stores files and folders.
FAT File System Characteristics
- Definition: FAT (File Allocation Table) is a simple file system used by various OS.
- Basic Data Structures: - File Allocation Table (FAT): Tracks file location. - Directories: Store file information.
- Versions: Includes FAT12, FAT16, FAT32, differing mainly in entry size.
FAT File Structure
- Directory Entry: Contains filename, size, metadata, and location info.
- Clusters: Basic storage unit, files are linked via FAT structure.
NTFS File System Characteristics
- Definition: NTFS (New Technology File System) provides enhanced reliability, performance, and security compared to FAT.
- Key Components: Includes MFT (Master File Table) that stores all file and folder information.
- Boot Sector: Initial sector containing system boot instructions and layout details.
Master File Table (MFT) in NTFS
- Function: Tables information about every file/folder, including system reserved records for MFT and backup.
- File Records: Attributes stored in fixed spaces for both resident and non-resident files.
Forensic Comparison: FAT vs. NTFS
- Complexity: FAT is simpler with minimal structures, whereas NTFS is complex and requires specialized tools.
- Metadata: FAT offers limited metadata, NTFS provides extensive data about file attributes.
- Deleted File Recovery: Generally easier in FAT, while NTFS can overwrite data rapidly due to dynamic allocation.
- Security Features: NTFS supports permissions and encryption; FAT does not.
Conclusion
- Digital forensics plays a crucial role in modern investigative processes, leveraging scientific methods and technological prowess to uncover and preserve vital evidence while adhering to strict legal and ethical standards.