मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी35k · #7594

acquiring-disk-image-with-dd-and-dcfldd

यह क्या करती है

यह टूल किसी हार्ड ड्राइव या दूसरे storage device की एकदम सटीक, sector-by-sector कॉपी बनाता है। यह पक्का करता है कि कॉपी मूल डिवाइस जैसी ही हो और उसमें मौजूद सारी जानकारी, यहाँ तक कि delete हो चुका डेटा भी, सुरक्षित रहे। साथ ही यह security codes (hashes) की मदद से जांचता है कि कॉपी बिल्कुल सही है।

कब इस्तेमाल करें

  • ✓किसी संदिग्ध हार्ड ड्राइव की जांच करते समय।
  • ✓विश्लेषण से पहले ज़रूरी डेटा बचाने के लिए, क्योंकि विश्लेषण से वह बदल सकता है।
  • ✓जब कानूनी उद्देश्य के लिए किसी डिवाइस की सटीक और सत्यापित कॉपी चाहिए हो।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/acquiring-disk-image-with-dd-and-dcfldd/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/acquiring-disk-image-with-dd-and-dcfldd/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“/dev/sdb डिस्क की एक सटीक कॉपी बनाओ और जांचो कि वह बिल्कुल मूल जैसी है।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

टूल Linux सिस्टम पर `dd` या `dcfldd` जैसे commands का इस्तेमाल करता है। यह मूल डिवाइस को पढ़कर हर bit को एक image file में लिख देता है। कॉपी से पहले और बाद में यह hashes निकालता है, ताकि पक्का हो कि कुछ भी बदला नहीं है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Acquiring Disk Image with dd and dcfldd

When to Use

  • When you need to create a forensic copy of a suspect drive for investigation
  • During incident response when preserving volatile disk evidence before analysis
  • When law enforcement or legal proceedings require a verified bit-for-bit copy
  • Before performing any destructive analysis on a storage device
  • When acquiring images from physical drives, USB devices, or memory cards

Prerequisites

  • Linux-based forensic workstation (SIFT, Kali, or any Linux distro)
  • dd (pre-installed on all Linux systems) or dcfldd (enhanced forensic version)
  • Write-blocker hardware or software write-blocking configured
  • Destination drive with sufficient storage (larger than source)
  • Root/sudo privileges on the forensic workstation
  • SHA-256 or MD5 hashing utilities (sha256sum, md5sum)

Workflow

Step 1: Identify the Target Device and Enable Write Protection

# List all connected block devices to identify the target
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,MODEL

# Verify the device details
fdisk -l /dev/sdb

# Enable software write-blocking (if no hardware blocker)
blockdev --setro /dev/sdb

# Verify read-only status
blockdev --getro /dev/sdb
# Output: 1 (means read-only is enabled)

# Alternatively, use udev rules for persistent write-blocking
echo 'SUBSYSTEM=="block", ATTRS{serial}=="WD-WCAV5H861234", ATTR{ro}="1"' > /etc/udev/rules.d/99-writeblock.rules
udevadm control --reload-rules

Step 2: Prepare the Destination and Document the Source

# Create case directory structure
mkdir -p /cases/case-2024-001/{images,hashes,logs,notes}

# Document source drive information
hdparm -I /dev/sdb > /cases/case-2024-001/notes/source_drive_info.txt

# Record the serial number and model
smartctl -i /dev/sdb >> /cases/case-2024-001/notes/source_drive_info.txt

# Pre-hash the source device
sha256sum /dev/sdb | tee /cases/case-2024-001/hashes/source_hash_before.txt

Step 3: Acquire the Image Using dd

# Basic dd acquisition with progress and error handling
dd if=/dev/sdb of=/cases/case-2024-001/images/evidence.dd \
   bs=4096 \
   conv=noerror,sync \
   status=progress 2>&1 | tee /cases/case-2024-001/logs/dd_acquisition.log

# For compressed images to save space
dd if=/dev/sdb bs=4096 conv=noerror,sync status=progress | \
   gzip -c > /cases/case-2024-001/images/evidence.dd.gz

# Using dd with a specific count for partial acquisition
dd if=/dev/sdb of=/cases/case-2024-001/images/first_1gb.dd \
   bs=1M count=1024 status=progress

Step 4: Acquire Using dcfldd (Preferred Forensic Method)

# Install dcfldd if not present
apt-get install dcfldd

# Acquire image with built-in hashing and split output
dcfldd if=/dev/sdb \
   of=/cases/case-2024-001/images/evidence.dd \
   hash=sha256,md5 \
   hashwindow=1G \
   hashlog=/cases/case-2024-001/hashes/acquisition_hashes.txt \
   bs=4096 \
   conv=noerror,sync \
   errlog=/cases/case-2024-001/logs/dcfldd_errors.log

# Split large images into manageable segments
dcfldd if=/dev/sdb \
   of=/cases/case-2024-001/images/evidence.dd \
   hash=sha256 \
   hashlog=/cases/case-2024-001/hashes/split_hashes.txt \
   bs=4096 \
   split=2G \
   splitformat=aa

# Acquire with verification pass
dcfldd if=/dev/sdb \
   of=/cases/case-2024-001/images/evidence.dd \
   hash=sha256 \
   hashlog=/cases/case-2024-001/hashes/verification.txt \
   vf=/cases/case-2024-001/images/evidence.dd \
   verifylog=/cases/case-2024-001/logs/verify.log

Step 5: Verify Image Integrity

# Hash the acquired image
sha256sum /cases/case-2024-001/images/evidence.dd | \
   tee /cases/case-2024-001/hashes/image_hash.txt

# Compare source and image hashes
diff <(sha256sum /dev/sdb | awk '{print $1}') \
     <(sha256sum /cases/case-2024-001/images/evidence.dd | awk '{print $1}')

# If using split images, verify each segment
sha256sum /cases/case-2024-001/images/evidence.dd.* | \
   tee /cases/case-2024-001/hashes/split_image_hashes.txt

# Re-hash source to confirm no changes occurred
sha256sum /dev/sdb | tee /cases/case-2024-001/hashes/source_hash_after.txt
diff /cases/case-2024-001/hashes/source_hash_before.txt \
     /cases/case-2024-001/hashes/source_hash_after.txt

Step 6: Document the Acquisition Process

# Generate acquisition report
cat << 'EOF' > /cases/case-2024-001/notes/acquisition_report.txt
DISK IMAGE ACQUISITION REPORT
==============================
Case Number: 2024-001

…
अक्सर पूछे जाने वाले सवाल

'hash' क्या है?

Hash किसी file या disk का एक अनोखा digital fingerprint होता है। अगर मूल और कॉपी का fingerprint मिल जाता है, तो पता चल जाता है कि कॉपी बिल्कुल सही है।

'write-blocker' क्यों इस्तेमाल होता है?

Write-blocker कॉपी के दौरान गलती से भी मूल डिवाइस पर डेटा लिखे जाने से रोकता है, ताकि सबूत खराब न हो।

`dd` और `dcfldd` में क्या फर्क है?

`dcfldd`, `dd` का बेहतर वर्ज़न है जो forensic जांच के लिए बना है। इसमें कॉपी के दौरान integrity verification और hash बनाने जैसी उपयोगी सुविधाएं होती हैं।

जानकारी

लेखक का मूल विवरण

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings bef

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#7594
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills