Logo Chipsec

Chipsec

Tổ chức
BrownFineSecurity
chipsec

Static analysis of UEFI/BIOS firmware dumps using Intel's chipsec framework. Decode firmware structure, detect known malware and rootkits (LoJax, ThinkPwn, HackingTeam, MosaicRegressor), generate EFI executable inventories with hashes, extract NVRAM variables, and parse SPI flash descriptors. Use when analyzing firmware .bin/.rom/.fd/.cap files offline without requiring hardware access.

Tổng quan

Nhà phát hànhBrownFineSecurity
Kho mãiothackbot
Tên kỹ năngchipsec
Sao
858
Bản fork
134
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được BrownFineSecurity công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Chipsec trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/BrownFineSecurity/iothackbot/tree/master/skills/chipsec
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/BrownFineSecurity/iothackbot.git /tmp/iothackbot
mkdir -p .claude/skills
cp -r /tmp/iothackbot/skills/chipsec .claude/skills/chipsec
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Chipsec trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Chipsec ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Chipsec không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Chipsec - UEFI Firmware Static Analysis

You are helping the user perform static security analysis of UEFI/BIOS firmware dumps using Intel's chipsec framework. This skill focuses exclusively on offline analysis capabilities that do not require kernel driver access or root privileges.

Tool Overview

Chipsec is Intel's Platform Security Assessment Framework. For static analysis of firmware dumps, it provides:

  • EFI executable inventory generation with cryptographic hashes
  • Detection of known UEFI malware and vulnerabilities
  • Firmware structure decoding and extraction
  • NVRAM/UEFI variable extraction
  • SPI flash descriptor parsing
  • Baseline comparison for change detection

Prerequisites

One-Time Setup (Fix Logging Permission)

Chipsec writes into a logs/ directory inside its install location. Create it once. The Python version in the path varies by system, so derive the path instead of hardcoding it:

bash
CHIPSEC_DIR="$(find /usr/lib/python3*/site-packages ~/.local/lib/python3*/site-packages -maxdepth 1 -name chipsec -type d 2>/dev/null | head -1)"
sudo mkdir -p "$CHIPSEC_DIR/logs"
sudo chmod 777 "$CHIPSEC_DIR/logs"

Verify Installation

bash
chipsec_main --version

Core Commands

All static analysis commands use these flags:

  • -i : Ignore platform check (required for offline analysis)
  • -n : No kernel driver (required for static analysis)

1. Malware and Vulnerability Scan (Primary Use)

Scan firmware for known threats including UEFI rootkits and SMM vulnerabilities:

bash
chipsec_main -i -n -m tools.uefi.scan_blocked -a <firmware.bin>

Detected Threats:

ThreatDescriptionReference
HT_UEFI_RootkitHackingTeam commercial UEFI rootkitMcAfee ATR
MR_UEFI_RootkitMosaicRegressor APT UEFI implantKaspersky
LoJaxFirst UEFI rootkit found in the wild (Sednit/APT28)ESET
ThinkPwnSystemSmmRuntimeRt SMM code execution vulnerabilitycr4.sh
FirmwareBleedSMM Return Stack Buffer stuffing vulnerabilityBinarly

Example Output (Threat Found):

[!] match 'ThinkPwn.SystemSmmRuntimeRt'
    GUID  : {7c79ac8c-5e6c-4e3d-ba6f-c260ee7c172e}
[!] found EFI binary matching 'ThinkPwn'
    MD5   : 59f5ba825911e7d0dffe06ee0d6d9828
    SHA256: 7f0e16f244151e7bfa170b7def014f6a225c5af626c223567f36a8b19f95e3ab

WARNING: Blocked EFI binary found in the UEFI firmware image

2. Generate EFI Executable Inventory

Create a JSON manifest of all EFI modules with cryptographic hashes:

bash
chipsec_main -i -n -m tools.uefi.scan_image -a generate <output.json> <firmware.bin>

Use Cases:

  • Create baseline for change detection
  • Inventory all DXE drivers, PEI modules, applications
  • Generate hashes for threat intelligence lookup

Output Format (efilist.json):

json
{
  "sha256_hash": {
    "sha1": "...",
    "guid": "EFD652CC-0E99-40F0-96C0-E08C089070FC",
    "name": "S3Resume",
    "type": "S_PE32"
  }
}

3. Compare Against Baseline

Check firmware against a known-good inventory:

bash
chipsec_main -i -n -m tools.uefi.scan_image -a check <baseline.json> <firmware.bin>

Use Cases:

  • Detect unauthorized firmware modifications
  • Verify firmware update integrity
  • Incident response - compare compromised vs clean

4. Decode Firmware Structure

Extract and analyze firmware volumes, files, and sections:

bash
chipsec_util -i -n uefi decode <firmware.bin>

Creates output directory containing:

firmware.bin.dir/
├── firmware_volumes/     # Extracted FV regions
├── efi_files/           # Individual EFI binaries
├── nvram/               # NVRAM variables (if found)
└── ...

5. Extract NVRAM Variables

NVRAM variables are extracted as part of the uefi decode command:

bash
chipsec_util -i -n uefi decode <firmware.bin>

NVRAM output location:

firmware.bin.dir/
├── nvram_.nvram.lst          # List of NVRAM variables
├── nvram/                    # Extracted variable files (if present)
└── FV/                       # Firmware volumes

View extracted variables:

bash
cat firmware.bin.dir/nvram_.nvram.lst

Note: The standalone uefi nvram command requires driver access and cannot be used for static analysis. Use uefi decode instead, which extracts NVRAM as part of the full firmware decode process.

6. Parse SPI Flash Descriptor

Analyze SPI flash regions (requires platform hint):

bash
chipsec_util -p <PLATFORM> spidesc <firmware.bin>

Common Platform Codes:

CodePlatform
SNBSandy Bridge (2nd Gen Core)
IVBIvy Bridge (3rd Gen Core)
HSWHaswell (4th Gen Core)
BDWBroadwell (5th Gen Core)
SKLSkylake (6th Gen Core)
KBLKaby Lake (7th Gen Core)
CFLCoffee Lake (8th/9th Gen Core)
ICLIce Lake (10th Gen Core)
TGLTiger Lake (11th Gen Core)
ADLAlder Lake (12th Gen Core)
RPLRaptor Lake (13th Gen Core)

Shows:

  • Flash regions (Descriptor, BIOS, ME, GbE, PDR)
  • Region base addresses and sizes
  • Flash component information
  • Master access permissions

Supported Firmware Formats

ExtensionDescription
.binRaw firmware/SPI flash dumps
.romSPI flash ROM dumps
.fdUEFI Firmware Descriptor (OVMF, EDK2)
.capUEFI Capsule update files
.scapSigned UEFI Capsule updates
.fvUEFI Firmware Volume
.flashFull flash dumps

Workflows

Workflow 1: Standard Security Audit

Complete firmware security assessment:

bash
TARGET="firmware.bin"
OUTPUT_DIR="./chipsec-analysis"
mkdir -p "$OUTPUT_DIR"

# Step 1: Scan for known threats (most important)
echo "[+] Scanning for known malware/vulnerabilities..."
chipsec_main -i -n -m tools.uefi.scan_blocked -a "$TARGET" 2>&1 | tee "$OUTPUT_DIR/threat_scan.txt"

# Step 2: Generate EFI inventory
echo "[+] Generating EFI executable inventory..."
chipsec_main -i -n -m tools.uefi.scan_image -a generate "$OUTPUT_DIR/efi_inventory.json" "$TARGET"

# Step 3: Decode firmware structure
echo "[+] Decoding firmware structure..."
chipsec_util -i -n uefi decode "$TARGET"

# Step 4: Check for NVRAM in decoded output
echo "[+] Checking for extracted NVRAM variables..."
cat "$TARGET.dir/nvram_.nvram.lst" 2>/dev/null || echo "No NVRAM variables extracted"

echo "[+] Analysis complete. Results in: $OUTPUT_DIR/"
echo "[+] Decoded firmware in: $TARGET.dir/"

Workflow 2: Malware Detection Focus

Quick check for known threats:

bash
# Run blocklist scan
chipsec_main -i -n -m tools.uefi.scan_blocked -a firmware.bin 2>&1 | tee scan_results.txt

# Check for any matches
echo "[+] Checking for threat matches..."
grep -E "match|found|WARNING" scan_results.txt

# If threats found, get details
grep -A10 "found EFI binary matching" scan_results.txt

Workflow 3: Firmware Update Verification

Compare before/after firmware update:

bash
# Before update - create baseline
chipsec_main -i -n -m tools.uefi.scan_image -a generate baseline_before.json firmware_original.bin

# After update - compare
chipsec_main -i -n -m tools.uefi.scan_image -a check baseline_before.json firmware_updated.bin

# Also generate new inventory for diff analysis
chipsec_main -i -n -m tools.uefi.scan_image -a generate baseline_after.json firmware_updated.bin

# Compare inventories
diff baseline_before.json baseline_after.json

Workflow 4: Incident Response

Analyze potentially compromised firmware:

bash
SUSPECT="compromised_dump.bin"
KNOWN_GOOD="golden_image.bin"
OUTPUT_DIR="./ir-analysis"
mkdir -p "$OUTPUT_DIR"

# 1. Immediate threat scan
echo "[!] Scanning for known implants..."
chipsec_main -i -n -m tools.uefi.scan_blocked -a "$SUSPECT" 2>&1 | tee "$OUTPUT_DIR/threat_scan.txt"

# 2. Generate inventory of suspect firmware
chipsec_main -i -n -m tools.uefi.scan_image -a generate "$OUTPUT_DIR/suspect_inventory.json" "$SUSPECT"

# 3. If golden image available, compare
if [ -f "$KNOWN_GOOD" ]; then
    chipsec_main -i -n -m tools.uefi.scan_image -a generate "$OUTPUT_DIR/golden_inventory.json" "$KNOWN_GOOD"
    echo "[+] Comparing against known-good baseline..."
    chipsec_main -i -n -m tools.uefi.scan_image -a check "$OUTPUT_DIR/golden_inventory.json" "$SUSPECT"
fi

# 4. Full decode for manual analysis
chipsec_util -i -n uefi decode "$SUSPECT"

echo "[+] IR analysis complete. Review: $OUTPUT_DIR/"

Workflow 5: IoT Device Firmware Analysis

Analyze firmware extracted from IoT device:

bash
# After extracting firmware with ffind or binwalk
IOT_FIRMWARE="extracted_firmware.bin"

# Quick threat check
chipsec_main -i -n -m tools.uefi.scan_blocked -a "$IOT_FIRMWARE"

# Generate inventory for documentation
chipsec_main -i -n -m tools.uefi.scan_image -a generate iot_efi_list.json "$IOT_FIRMWARE"

# Extract structure for deeper analysis
chipsec_util -i -n uefi decode "$IOT_FIRMWARE"

# NVRAM variables extracted as part of decode - check output
cat "$IOT_FIRMWARE.dir/nvram_.nvram.lst" 2>/dev/null

Output Interpretation

Exit Codes

CodeMeaning
0All checks passed, no issues found
2Security issues detected (FAILED tests)
16Module execution errors
128Module not applicable

Result States

StateMeaningAction
PASSEDNo known threats detectedDocument and proceed
WARNINGPotential issue foundInvestigate further
FAILEDSecurity vulnerability confirmedRemediate immediately
NOT APPLICABLETest couldn't runCheck firmware format

Interpreting Threat Matches

When scan_blocked finds a match:

[!] match 'ThinkPwn.SystemSmmRuntimeRt'
    GUID  : {7c79ac8c-5e6c-4e3d-ba6f-c260ee7c172e}
    regexp: bytes '...' at offset 1184h
[!] found EFI binary matching 'ThinkPwn'
    MD5   : 59f5ba825911e7d0dffe06ee0d6d9828
    SHA1  : 4979bc7660fcf3ab5562ef2e1c4c45097ecb615e
    SHA256: 7f0e16f244151e7bfa170b7def014f6a225c5af626c223567f36a8b19f95e3ab

Key Information:

  • Threat Name: Which known threat was matched
  • GUID: Unique identifier of the affected EFI module
  • Hashes: For further threat intelligence lookup
  • Offset: Location in binary where pattern matched

Integration with IoTHackBot Tools

With ffind (Firmware Extraction)

bash
# Find firmware files in extracted filesystem
ffind /path/to/extracted -a

# Analyze found UEFI firmware
chipsec_main -i -n -m tools.uefi.scan_blocked -a found_firmware.bin

With binwalk (Pre-processing)

bash
# Extract firmware components first
binwalk -e firmware_package.bin

# Find and analyze UEFI images
find _firmware_package.bin.extracted -name "*.fd" -o -name "*.rom" | while read fw; do
    echo "[+] Analyzing: $fw"
    chipsec_main -i -n -m tools.uefi.scan_blocked -a "$fw"
done

Troubleshooting

Permission Denied on Logs

PermissionError: [Errno 13] Permission denied: '.../site-packages/logs/...'

Solution: create the logs directory inside the chipsec install (the Python version in the path varies, so derive it):

bash
CHIPSEC_DIR="$(find /usr/lib/python3*/site-packages ~/.local/lib/python3*/site-packages -maxdepth 1 -name chipsec -type d 2>/dev/null | head -1)"
sudo mkdir -p "$CHIPSEC_DIR/logs"
sudo chmod 777 "$CHIPSEC_DIR/logs"

Module Not Found

ERROR: No module named 'chipsec.modules.tools.uefi.scan_blocked'

Solution: Verify chipsec installation:

bash
pip show chipsec
pip install --upgrade chipsec

Invalid Firmware Format

[CHIPSEC] Found 0 EFI executables in UEFI firmware image

Possible Causes:

  • File is not valid UEFI firmware
  • File is encrypted or compressed
  • File needs pre-processing (binwalk extraction)

Diagnosis:

bash
file firmware.bin
binwalk firmware.bin

Platform Required for spidesc

ERROR: This module requires a configuration to be loaded.

Solution: Specify platform with -p:

bash
chipsec_util -p SKL spidesc firmware.bin

NVRAM Not Extracted

If nvram_.nvram.lst is empty or shows an error after decode:

Possible Causes:

  • Firmware doesn't contain standard NVRAM format
  • NVRAM region is encrypted or compressed
  • Non-standard vendor format

Alternative Analysis:

bash
# Search for variable-like patterns in decoded output
grep -r "Setup\|Boot\|SecureBoot" firmware.bin.dir/

# Use binwalk to find NVRAM signatures
binwalk -R "\x06\x00\x00\x00" firmware.bin

Best Practices

1. Always Run Threat Scan First

The blocklist scan is quick and catches known threats:

bash
chipsec_main -i -n -m tools.uefi.scan_blocked -a firmware.bin

2. Generate Inventory for Every Firmware

Create baselines for future comparison:

bash
chipsec_main -i -n -m tools.uefi.scan_image -a generate "$(basename firmware.bin .bin)_inventory.json" firmware.bin

3. Save All Output

Redirect output for documentation:

bash
chipsec_main -i -n -m tools.uefi.scan_blocked -a firmware.bin 2>&1 | tee analysis_$(date +%Y%m%d).txt

4. Verify Firmware Format First

Before running chipsec:

bash
file firmware.bin
binwalk firmware.bin | head -20

5. Use Organized Output Directories

bash
mkdir -p analysis/{threats,inventories,decoded,nvram}

6. Cross-Reference with Other Tools

  • UEFITool: Visual firmware structure analysis
  • binwalk: Entropy analysis and extraction
  • strings: Quick secrets/URL discovery

Command Reference

Quick Reference Table

TaskCommand
Scan for malwarechipsec_main -i -n -m tools.uefi.scan_blocked -a <fw>
Generate inventorychipsec_main -i -n -m tools.uefi.scan_image -a generate <out.json> <fw>
Compare baselinechipsec_main -i -n -m tools.uefi.scan_image -a check <base.json> <fw>
Decode structure + NVRAMchipsec_util -i -n uefi decode <fw>
Parse SPI descriptorchipsec_util -p <PLAT> spidesc <fw>

Flag Reference

FlagPurpose
-iIgnore platform check (required for offline)
-nNo kernel driver (required for static analysis)
-mSpecify module to run
-aModule arguments
-pSpecify platform (for spidesc)
-jJSON output file

Security and Ethics

IMPORTANT: Only analyze firmware you own or have explicit authorization to analyze.

  • Respect intellectual property and licensing
  • Follow responsible disclosure for vulnerabilities found
  • Document all analysis activities
  • Be aware that some firmware may contain proprietary code
  • Use findings for defensive security purposes only

Success Criteria

A successful chipsec static analysis includes:

  • Threat scan completed (PASSED or findings documented)
  • EFI inventory JSON generated with module hashes
  • Firmware structure decoded (if applicable)
  • NVRAM variables extracted (if present)
  • All findings documented with:
    • Threat name and severity
    • Affected module GUID and hashes
    • Recommendations for remediation
  • Output files organized and saved for reporting

Câu hỏi thường gặp

Kỹ năng AI Chipsec làm được gì?

Static analysis of UEFI/BIOS firmware dumps using Intel's chipsec framework. Decode firmware structure, detect known malware and rootkits (LoJax, ThinkPwn, HackingTeam, MosaicRegressor), generate EFI executable inventories with hashes, extract NVRAM variables, and parse SPI flash descriptors. Use when analyzing firmware .bin/.rom/.fd/.cap files offline without requiring hardware access.

Vì sao nên dùng Chipsec trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Chipsec là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Chipsec trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/BrownFineSecurity/iothackbot/tree/master/skills/chipsec. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Chipsec?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Chipsec với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Chipsec với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Chipsec có miễn phí không?

Có. Kỹ năng này được BrownFineSecurity phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇