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

acquiring-disk-image-with-dd-and-dcfldd is a skill for Claude Code from killvxk/cybersecurity-skills-zh. It costs 40 tokens per session (2,722 once invoked), scanned B, original, Apache-2.0.

A procedure for creating a forensic, bit-for-bit copy of a storage device with Linux tools such as `dd` or `dcfldd`, then checking its hash to verify that the copy is unchanged.

In plain words
What is it for?
Use it to image physical drives, USB devices, or memory cards during incident response or forensic work, with write protection, source notes, hashes, and logs.
Why use it?
It preserves an evidence copy for investigation or legal use and reduces the risk of altering the original drive during analysis.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the cybersecurity-skills-zh plugin — 58 skills shipped together

Good fit Use it to image physical drives, USB devices, or memory cards during incident response or forensic work, with write protection, source notes, hashes, and logs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/killvxk/cybersecurity-skills-zh/acquiring-disk-image-with-dd-and-dcfldd
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add killvxk/cybersecurity-skills-zh --skill acquiring-disk-image-with-dd-and-dcfldd
Clone the repo
git clone --depth 1 https://github.com/killvxk/cybersecurity-skills-zh

Made for: Claude Code.

Or install cybersecurity-skills-zh, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for acquiring-disk-image-with-dd-and-dcfldd

README.md
[![agentmods](https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/acquiring-disk-image-with-dd-and-dcfldd/github.svg)](https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/acquiring-disk-image-with-dd-and-dcfldd)
Your own site
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/acquiring-disk-image-with-dd-and-dcfldd"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/acquiring-disk-image-with-dd-and-dcfldd/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for acquiring-disk-image-with-dd-and-dcfldd

Your own site · 80×15
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/acquiring-disk-image-with-dd-and-dcfldd"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/acquiring-disk-image-with-dd-and-dcfldd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,722 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.02722
Opus 5 $0.00020 $0.01361
Sonnet 5 $0.00008 $0.00544
Haiku 4.5 $0.00004 $0.00272

Measured 12d ago against content hash d30471c39860, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

acquiring-disk-image-with-dd-and-dcfldd scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- 取证工作站上的 root/sudo 权限
skills/acquiring-disk-image-with-dd-and-dcfldd/SKILL.md · 231 lines

How it starts

The opening of the file, as written. The whole thing — 231 lines — stays where its author put it; the contents beside it link to each section on GitHub.

使用 dd 和 dcfldd 获取磁盘镜像

适用场景

  • 需要为调查创建嫌疑驱动器的取证副本时
  • 事件响应(Incident Response)期间,在分析前需要保全易失性磁盘证据时
  • 法律执行或法律程序要求经过验证的逐位副本时
  • 在对存储设备执行任何破坏性分析之前
  • 从物理驱动器、USB 设备或存储卡获取镜像时

前置条件

  • 基于 Linux 的取证工作站(SIFT、Kali 或任意 Linux 发行版)
  • dd(预装于所有 Linux 系统)或 dcfldd(增强版取证工具)
  • 已配置硬件写保护器或软件写保护
  • 目标驱动器有足够存储空间(大于源设备)
  • 取证工作站上的 root/sudo 权限
  • SHA-256 或 MD5 哈希工具(sha256summd5sum

工作流程

步骤 1:识别目标设备并启用写保护

# 列出所有已连接的块设备以识别目标
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,MODEL

# 验证设备详情
fdisk -l /dev/sdb

# 启用软件写保护(如果没有硬件写保护器)
blockdev --setro /dev/sdb

# 验证只读状态
blockdev --getro /dev/sdb
# 输出: 1(表示已启用只读)

# 或者,使用 udev 规则实现持久写保护
echo 'SUBSYSTEM=="block", ATTRS{serial}=="WD-WCAV5H861234", ATTR{ro}="1"' > /etc/udev/rules.d/99-writeblock.rules
udevadm control --reload-rules

步骤 2:准备目标位置并记录来源信息

# 创建案件目录结构
mkdir -p /cases/case-2024-001/{images,hashes,logs,notes}

# 记录源驱动器信息
hdparm -I /dev/sdb > /cases/case-2024-001/notes/source_drive_info.txt

# 记录序列号和型号
smartctl -i /dev/sdb >> /cases/case-2024-001/notes/source_drive_info.txt

# 预先对源设备进行哈希计算
sha256sum /dev/sdb | tee /cases/case-2024-001/hashes/source_hash_before.txt

步骤 3:使用 dd 获取镜像

# 带进度显示和错误处理的基本 dd 获取
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

# 压缩镜像以节省空间
dd if=/dev/sdb bs=4096 conv=noerror,sync status=progress | \
   gzip -c > /cases/case-2024-001/images/evidence.dd.gz

# 使用 dd 进行部分获取(指定数量)
dd if=/dev/sdb of=/cases/case-2024-001/images/first_1gb.dd \
   bs=1M count=1024 status=progress

步骤 4:使用 dcfldd 获取(推荐的取证方法)

# 如果未安装则安装 dcfldd
apt-get install dcfldd

# 带内置哈希和分割输出的镜像获取
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

# 将大型镜像分割成可管理的段
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

# 带验证的获取
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

Read the full file on GitHub · 231 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 231 lines · 40 tokens per session scan B d30471c39860

Subscribe to this mod's changes

acquiring-disk-image-with-dd-and-dcfldd is a skill published in the GitHub repository killvxk/cybersecurity-skills-zh (45 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 40 tokens to every session and 2,722 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

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

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…

mukul975/Anthropic-Cybersecurity-Skills · 92 tokens

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

Use when create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through hash verification. Use when createing forensically sound bit-for-bit disk images using dd and dcfldd.

oyi77/1ai-skills · 61 tokens

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

Create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through hash verification.

xalgorix/xalgorix · 38 tokens

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

Create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through hash verification.

26zl/cybersec-toolkit · 38 tokens

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

Create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through hash verification.

adriannoes/awesome-agentic-ai · 38 tokens

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

Create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through hash verification.

plurigrid/asi · 38 tokens