Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính35k · #8284

performing-plc-firmware-security-analysis

Skill này làm gì

Công cụ này phân tích phần mềm nội bộ (firmware) của bộ điều khiển logic khả trình (PLC) để tìm lỗi bảo mật. Nó tìm mật khẩu ẩn, phương thức cập nhật không an toàn và các lỗ hổng khác.

Khi nào nên dùng

  • ✓Khi kiểm tra bảo mật một PLC trước khi dùng nó ở các vị trí quan trọng.
  • ✓Khi nghi ngờ phần mềm của PLC đã bị thay đổi.
  • ✓Khi kiểm thử bảo mật các loại PLC mới trong môi trường phòng thí nghiệm.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-plc-firmware-security-analysis/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-plc-firmware-security-analysis/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Phân tích bảo mật firmware của PLC Siemens S7 này.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ trích xuất phần mềm của PLC và kiểm tra các vấn đề đã biết. Nó so sánh phần mềm hiện tại với một phiên bản đáng tin cậy để xem có thay đổi nào đã xảy ra không.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Performing PLC Firmware Security Analysis

When to Use

  • When assessing PLC security as part of an IEC 62443 component security evaluation (IEC 62443-4-2)
  • When validating firmware integrity after a suspected compromise or supply chain attack
  • When evaluating the security of a new PLC platform before deployment in critical infrastructure
  • When performing vulnerability research on industrial control system devices in an authorized lab
  • When responding to an incident where PLC logic or firmware tampering is suspected

Do not use on live production PLCs without explicit authorization and safety controls in place. Firmware extraction and analysis should be performed on lab devices or offline backups. Never upload PLC firmware to public analysis services. See performing-ics-penetration-testing for authorized live testing procedures.

Prerequisites

  • Isolated lab environment with the target PLC hardware or an emulated environment
  • PLC programming software for the target platform (Siemens TIA Portal, Rockwell Studio 5000, Schneider EcoStruxure)
  • Firmware extraction tools (binwalk, firmware-mod-kit, JTAG/SWD debugger)
  • Static analysis tools (Ghidra, IDA Pro, Binary Ninja with ARM/MIPS/PowerPC support)
  • Understanding of PLC architecture (real-time OS, ladder logic execution, I/O scanning)
  • Reference copy of known-good firmware for integrity comparison

Workflow

Step 1: Acquire PLC Firmware for Analysis

Extract or obtain PLC firmware through authorized methods. This can be done by downloading from the vendor, extracting from a lab device, or obtaining from a project backup.

#!/usr/bin/env python3
"""PLC Firmware Acquisition and Integrity Verification.

Supports firmware extraction from project files, network downloads,
and binary image comparison against known-good baselines.
"""

import hashlib
import json
import os
import struct
import sys
import zipfile
from datetime import datetime
from pathlib import Path


class PLCFirmwareAcquisition:
    """Handles PLC firmware acquisition from various sources."""

    def __init__(self, output_dir="firmware_analysis"):
        self.output_dir = Path(output_dir)
        self.output_dir.mkdir(exist_ok=True)
        self.manifest = {
            "acquisition_date": datetime.now().isoformat(),
            "firmware_samples": [],
        }

    def extract_from_siemens_project(self, project_path):
        """Extract firmware/program blocks from Siemens TIA Portal project.

        TIA Portal projects (.ap16/.ap17) are ZIP archives containing
        XML-encoded PLC program blocks and system configuration.
        """
        print(f"[*] Analyzing Siemens project: {project_path}")
        results = {"platform": "Siemens", "blocks": []}

        if zipfile.is_zipfile(project_path):
            with zipfile.ZipFile(project_path, "r") as zf:
                for info in zf.infolist():
                    # Program blocks are stored as XML in specific paths
                    if "ProgramBlocks" in info.filename or "SystemBlocks" in info.filename:
                        block_data = zf.read(info.filename)
                        block_hash = hashlib.sha256(block_data).hexdigest()

                        block_path = self.output_dir / info.filename.replace("/", "_")
                        block_path.write_bytes(block_data)

                        results["blocks"].append({
                            "name": info.filename,
                            "size": info.file_size,
                            "sha256": block_hash,
                            "extracted_to": str(block_path),
                        })
                        print(f"  [+] Extracted: {info.filename} ({info.file_size} bytes)")

        self.manifest["firmware_samples"].append(results)
        return results

    def extract_from_rockwell_project(self, acd_path):
        """Extract program data from Rockwell Studio 5000 ACD file.

        ACD files contain controller program, tags, and configuration.
        """
        print(f"[*] Analyzing Rockwell project: {acd_path}")
        results = {"platform": "Rockwell/Allen-Bradley", "blocks": []}

        with open(acd_path, "rb") as f:
            header = f.read(256)
            # ACD files have a specific signature
            if b"RSLogix" in header or b"Studio 5000" in header:
                f.seek(0)
                full_data = f.read()
                file_hash = hashlib.sha256(full_data).hexdigest()


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

PLC là gì?

Bộ điều khiển logic khả trình (PLC) là máy tính công nghiệp dùng để điều khiển máy móc và quy trình trong nhà máy và các cơ sở khác.

Firmware là gì?

Firmware là phần mềm cơ bản điều khiển phần cứng của thiết bị, như PLC. Nó giống hệ điều hành của máy tính.

Tôi có thể dùng công cụ này trên PLC đang hoạt động không?

Không, đừng bao giờ dùng công cụ này trên PLC đang điều khiển một quy trình thật nếu không có sự cho phép rõ ràng và các biện pháp an toàn. Việc phân tích nên thực hiện trên thiết bị thử nghiệm hoặc bản sao lưu ngoại tuyến.

Chi tiết

Mô tả gốc của tác giả

This skill covers analyzing Programmable Logic Controller (PLC) firmware for security vulnerabilities including hardcoded credentials, insecure update mechanisms, backdoor functions, memory corruption flaws, and undocumented debug interfaces. It addresses firmware extraction from common PLC platforms (Siemens S7, Allen-Bradley, Schneider Modicon), static analysis of firmware images, dynamic analys

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#8284
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự