profinet
Skill này làm gì
Hướng dẫn này nói về kiểm tra bảo mật cho PROFINET, một mạng trường dùng trong nhà máy, hoạt động ở tầng mạng thấp nhất. Dành cho đội bảo mật nhà máy làm việc có phê duyệt bằng văn bản, vì thay đổi có thể dừng sản xuất.
Khi nào nên dùng
- ✓Khi một đánh giá nhà máy được ủy quyền cần kiểm kê các thiết bị PROFINET trên một phân đoạn mạng.
- ✓Khi bạn muốn xác nhận thiết bị nào có mặt mà không thay đổi cài đặt của chúng.
- ✓Khi một nhóm cần hiểu việc đổi tên hoặc đổi địa chỉ thiết bị có thể làm gián đoạn sản xuất như thế nào.
Liên kết skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/ics-ot/profinet/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Vui lòng liệt kê các thiết bị PROFINET trên phân đoạn nhà máy của chúng tôi bằng khám phá chỉ đọc, và cho tôi biết mỗi thiết bị là gì.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent gửi yêu cầu khám phá chỉ đọc trên phân đoạn cục bộ, liệt kê từng thiết bị tìm được và ghi lại tên và loại. Không gửi bất kỳ thay đổi nào.
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.
PROFINET Attack Playbook (EtherType 0x8892 / DCP)
PROFINET is the dominant European/Siemens fieldbus for deterministic real-time process automation — deployed in Siemens SIMATIC PLC networks, Beckhoff TwinCAT, Phoenix Contact, and virtually all post-2005 EU manufacturing. Unlike Modbus or EtherNet/IP, PROFINET RT operates at Layer 2 (EtherType 0x8892) — there is no IP header, no routing, and no firewall coverage at the IP layer. The attacker must be on the same Ethernet broadcast domain (OT L2 segment, or have a SPAN/TAP into it). DCP (Discovery and basic Configuration Protocol) provides unauthenticated device enumeration, naming, IP assignment, and factory-reset — all without credentials.
SAFETY FIRST
DCP Set commands (station-name reassignment, IP change, factory-reset) immediately disrupt the IO-controller ↔ IO-device association. When an IO-device loses its expected station name, the PROFINET IO controller goes to BF (Bus Fault) state and the process typically enters a safe/halt state or continues with the last-known values depending on watchdog configuration. This is a process-disruption event. Confirm written scope authorization before any DCP Set or RT frame injection. DCP Identify (read) is safe.
Prerequisites
- Physical or logical access to the OT L2 segment (direct port, rogue switch, SPAN, compromised HMI/engineering workstation on the same VLAN).
- Wireshark with
pn_dcpdissector (ships by default — filter:pn_dcp). - Python with
scapyfor DCP crafting (orpython-profinetlibrary).
# Verify interface sees PROFINET frames
sudo tcpdump -i eth0 ether proto 0x8892 -c 20
# If frames appear: you are on the OT segment
# Install scapy (already on Kali)
pip install scapy
# python-profinet (alternative higher-level library)
pip install profinet
Phase 1 — Discover: DCP Identify-All broadcast
DCP Identify-All is a Layer-2 broadcast to 01:0E:CF:00:00:00 (PROFINET multicast). All devices on the segment reply with their station name, IP, MAC, device type, vendor, order number, firmware.
Wireshark passive discovery
# Capture DCP traffic — Identify requests and responses
sudo wireshark -i eth0 -f "ether proto 0x8892" -k
# Filter in Wireshark: pn_dcp.block_type == 0x0101 (NameOfStation)
# Filter for Identify responses: pn_dcp.service_id == 5 && pn_dcp.service_type == 1
Active DCP Identify-All broadcast (Scapy)
from scapy.all import Ether, sendp, sniff
import struct, socket, time
PROFINET_ETHERTYPE = 0x8892
DCP_MULTICAST_MAC = "01:0e:cf:00:00:00"
IFACE = "eth0" # replace with your OT interface
def build_dcp_identify_all(xid=1):
"""Build a PROFINET DCP Identify-All request frame."""
# PROFINET Real-Time header: FrameID 0xFEFE (DCP Identify)
frame_id = struct.pack(">H", 0xFEFE)
# DCP header: ServiceID=5 (Identify), ServiceType=0 (Request), XID, Reserved, DCPDataLength
dcp_header = struct.pack(">BBHHHH",
0x05, # ServiceID: Identify
0x00, # ServiceType: Request
xid, # XID
0x0000, # Reserved
0x0000, # ResponseDelay (0=immediate broadcast)
0x0004, # DCPDataLength (4 bytes for the suboption block)
)
# DCP block: Option=All (0xFF), Suboption=All (0xFF), DCPBlockLength=0
dcp_block = struct.pack(">BBH", 0xFF, 0xFF, 0x0000)
payload = frame_id + dcp_header + dcp_block
frame = Ether(dst=DCP_MULTICAST_MAC, src="00:11:22:33:44:55", type=PROFINET_ETHERTYPE) / payload
return frame
def dcp_identify_all(iface=IFACE, timeout=3):
frame = build_dcp_identify_all()
sendp(frame, iface=iface, verbose=False)
print(f"[*] DCP Identify-All sent on {iface}, listening {timeout}s for responses...")
responses = sniff(
iface=iface,
filter=f"ether proto {hex(PROFINET_ETHERTYPE)}",
timeout=timeout,
count=200,
)
devices = []
for pkt in responses:
raw = bytes(pkt.payload)
frame_id = struct.unpack(">H", raw[:2])[0]
if frame_id == 0xFEFE and len(raw) > 10:
# This is a DCP response — parse it
src_mac = pkt.src
# Extract NameOfStation from block (simple heuristic parse)
# Full parsing requires walking DCP blocks; Wireshark's pn_dcp is most reliable
devices.append({"mac": src_mac, "raw_len": len(raw)})
print(f" Response from {src_mac} ({len(raw)} bytes) — open in Wireshark for details")
return devices
dcp_identify_all()
Câu hỏi thường gặp
Vì sao PROFINET khác biệt?
Hướng dẫn cho biết nó hoạt động ở tầng mạng thấp nhất, nên chỉ truy cập được từ cùng phân đoạn cục bộ.
Rủi ro của một thay đổi là gì?
Đổi tên hoặc địa chỉ thiết bị có thể làm đứt liên kết giữa bộ điều khiển và thiết bị, và hướng dẫn coi đó là gián đoạn quy trình.
Bước duy nhất an toàn là gì?
Khám phá chỉ đọc, mà hướng dẫn mô tả là an toàn.
Chi tiết
Mô tả gốc của tác giả
PROFINET (L2 EtherType 0x8892 / DCP) attack playbook — DCP Identify-All broadcast enumeration, device fingerprinting, station-name and IP reassignment (breaks IO-controller mapping), flash-LED physical location, factory-reset, RT frame injection/replay for cyclic-IO spoofing. Siemens/EU fieldbus peer of S7Comm; requires same L2 broadcast domain.
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #14040
- Giấy phép
- Apache-2.0
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
detector-overview
6.5kGiúp agent của bạn đọc code mà một công cụ quét đã đánh dấu, rồi quyết định điểm nào là lỗ hổng bảo mật thật và điểm nào là báo động giả.
exploiter-overview
6.5kGiúp agent của bạn ghép nhiều lỗ hổng bảo mật đã xác nhận thành một chuỗi kiểm thử và kiểm tra chuỗi đó có thể gây hậu quả đến đâu.
llm-redteam-overview
6.5kGiúp agent của bạn tìm đúng hướng dẫn red-team AI cho một bài kiểm thử, bao quát 15 nhóm chiến thuật từ prompt injection đến lạm dụng mô hình.
aatmf-t01-prompt-injection
6.5kGiải thích prompt injection, khi các chỉ dẫn ẩn cố ghi đè một hệ thống AI, để chuyên gia bảo mật có thể kiểm tra lỗi này.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.