LXR / security researcher
ع Contact
NOTEBOOK / PERSONAL / 0x0E

Following a MAVLink command from ground station to autopilot

2026-09-1214 MIN READLAB RESEARCH
MAVLINK ARDUPILOT PROTOCOLS

Every MAVLink message a ground station sends is a small, well-documented packet — and that is exactly what makes the protocol a good place to learn. Here I follow a single arm command from my laptop to a simulated autopilot.

The lab

Everything here runs locally: an ArduPilot SITL vehicle, a ground station, and a small Python client on the same machine. No real aircraft and no third-party systems were involved.

One packet, end to end

A MAVLink v2 frame is a header, a payload and a checksum. The header carries the sender's system and component IDs; the checksum only proves the bytes weren't corrupted on the way — it says nothing about who sent them.

STXFD11111101
LEN2000100000
INC0000000000
CMP0000000000
SEQ0700000111
SYSFF11111111
COMPBE10111110
MSG4C01001100
MSG0000000000
MSG0000000000
FIG. 1 — THE HEADER OF A COMMAND_LONG (ID 76). THE TWO BYTES THAT SAY WHO'S TALKING ARE HIGHLIGHTED — NOTHING CHECKS THEM.
arm.pyPYTHON
from pymavlink import mavutil
m = mavutil.mavlink_connection('udpin:0.0.0.0:14550')
m.wait_heartbeat()
m.mav.command_long_send(
m.target_system, m.target_component,
mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM,
0, 1, 0, 0, 0, 0, 0, 0) # param1 = 1 → arm

Where trust is decided

MAVLink v1 has no authentication at all. v2 adds optional message signing with a shared secret, but it has to be set up on both ends — in a default setup, the autopilot accepts any well-formed frame from anyone who can reach the link.

SCOPE — This is lab work against a simulator I control. Don't point these scripts at vehicles you don't own.

Takeaways

0x1The checksum is for integrity on a noisy link, not for identity.
0x2Signing only helps if it is enabled and the key is actually kept secret.
0x3Network reachability to the telemetry port is the real boundary — design for it.
← PREVIOUSCVE-2026-101339: the HIP record that walks off the end of the bufferNEXT →CVE-2026-101341: a TXT record that runs commands on your DNS server