def start(self, stop_event): time.sleep(Config.adversaries['ddos_infotainment']['start_delay']) while True: hostile_message = Message(target_component='fuel', data=[0x66, 0x66, 0x66]) self.bus.send(hostile_message) self.journal.incr_hostile() time.sleep(Config.adversaries['ddos_infotainment']['injection_delay']) if stop_event.is_set(): self.bus.shutdown() break
def start(self, stop_event): # Normally this message would be stolen off of the bus and then replayed, but for sake of demo we'll use a message with a random key hostile_message = Message(target_component='fuel', data=[0x66, 0x66, 0x66]) time.sleep(Config.adversaries['external_node']['start_delay']) while True: self.bus.send(hostile_message) self.journal.incr_hostile() time.sleep( Config.adversaries['ddos_infotainment']['injection_delay']) if stop_event.is_set(): self.bus.shutdown() break
def adjust_temperature(self): # message with id for the climate control ecu climate_message = Message(target_component='climate_control', data=[0x11, 0x11, 0x11]) self.non_critical_bus.send(climate_message) self.journal.incr_innocent()
def change_music(self): # message with id for the infotainment ecu infotainment_message = Message(target_component='infotainment', data=[0x11, 0x11, 0x11]) self.non_critical_bus.send(infotainment_message) self.journal.incr_innocent()
def turn(self): # message with id for the steering ecu steering_message = Message(target_component='steering', data=[0x11, 0x11, 0x11]) self.critical_bus.send(steering_message) self.journal.incr_innocent()
def accelerate(self): # message with id for the brakes ecu fuel_message = Message(target_component='fuel', data=[0x11, 0x11, 0x11]) self.critical_bus.send(fuel_message) self.journal.incr_innocent()
def apply_brakes(self): # message with id for the brakes ecu brake_message = Message(target_component='brakes', data=[0x11, 0x11, 0x11]) self.critical_bus.send(brake_message) self.journal.incr_innocent()
def request_fuel_diagnostic(self): fuel_message = Message(target_component='fuel', data=[0x22, 0x22, 0x22]) self.bus.send(fuel_message)