Packet Sniffing - nicholasaleks/Damn-Vulnerable-Drone GitHub Wiki
Capturing MAVLink packets transmitted over the air to analyze drone communications.
Damn Vulnerable Drone > Attack Scenarios > Reconnaissance > Packet Sniffing
MAVLink packet sniffing involves intercepting the MAVLink messages exchanged between UAVs (Unmanned Aerial Vehicles) and ground control stations or between UAVs in a network.
By analyzing the captured packets, you can gain insights into the drone's operational status, commands being sent or received, and how the system handles various data types.
β οΈ Solution Guide (Non-WiFi Mode)
We will be using Wireshark to analyze the real-time MAVLink traffic. This should already be installed with your Kali Linux distribution. If not, you can install it from:
https://www.wireshark.org/download.html
Install MAVLink following the official guide:
https://mavlink.io/en/getting_started/installation.html
sudo apt install python3 python3-pip
git clone https://github.com/mavlink/mavlink.git --recursive
cd mavlink
python3 -m pip install -r pymavlink/requirements.txt
Generate the MAVLink WLua libraries:
python3 -m pymavlink.tools.mavgen --lang=WLua --wire-protocol=2.0 --output=mavlink_2_common message_definitions/v1.0/ardupilotmega.xml
Update the plugin to specify MAVLink UDP ports:
local udp_dissector_table = DissectorTable.get("udp.port")
udp_dissector_table:add(14550, mavlink_proto)
udp_dissector_table:add(14580, mavlink_proto)
udp_dissector_table:add(18570, mavlink_proto)
Copy mavlink_2_common.lua
to the Wireshark plugin directory. Possible paths include:
/usr/lib/x86_64-linux-gnu/wireshark
/usr/lib/aarch64-linux-gnu/wireshark
~/.local/lib/wireshark/plugins
~/.wireshark/plugins
Then open Wireshark and go to:
Help β About Wireshark β Plugins to verify itβs loaded.
Launch Wireshark and select the appropriate interface. You should begin seeing MAVLink packets in real-time.
β οΈ Solution Guide (WiFi Mode)
Use the output of Wireless Analysis & Cracking to obtain the WEP key.
Follow the same instructions as above.
sudo apt install python3 python3-pip
git clone https://github.com/mavlink/mavlink.git --recursive
cd mavlink
python3 -m pip install -r pymavlink/requirements.txt
python3 -m pymavlink.tools.mavgen --lang=WLua --wire-protocol=2.0 --output=mavlink_2_common message_definitions/v1.0/ardupilotmega.xml
local udp_dissector_table = DissectorTable.get("udp.port")
udp_dissector_table:add(14550, mavlink_proto)
udp_dissector_table:add(14580, mavlink_proto)
udp_dissector_table:add(18570, mavlink_proto)
/usr/lib/x86_64-linux-gnu/wireshark
/usr/lib/aarch64-linux-gnu/wireshark
~/.local/lib/wireshark/plugins
~/.wireshark/plugins
Confirm plugin is listed in
Help β About Wireshark β Plugins.
Select your connected interface and begin capturing. MAVLink packets will appear in the stream.
Use the WEP key (1234567890
) to decrypt packets:
- Open Wireshark
- Go to Edit β Preferences
- Expand Protocols β Select IEEE 802.11
- Click the Decryption Keys tab
- Edit
Key #1
and enter:1234567890
- Click OK
- Begin capturing β Wireshark will decrypt packets automatically