
PoC simulation of a critical CCSDS telecommand replay vulnerability in satellite command systems, demonstrating missing sequence-number validation and duplicate command execution.
# satellite_sim.py - Spacecraft that executes telecommands without checking sequence number
class Satellite:
def __init__(self):
self.executed = set()
def receive_tc(self, cmd_id, seq_num):
# Vulnerability: ignores seq_num, allowing replay of same command
self.execute(cmd_id)
def execute(cmd_id):
print(f"Executing command {cmd_id}")
sat = Satellite()
# Legitimate command
sat.receive_tc("ORBIT_CORRECTION", 1001)
# Attacker replays the same command
sat.receive_tc("ORBIT_CORRECTION", 1001)
A satellite command system accepts CCSDS telecommand packets but does not validate the sequence number to prevent replay. An attacker who intercepts a command can replay it, causing duplicate thruster burns or other harmful operations.
Run the simulation:
python satellite_sim.py
The same command is executed twice.