def disturbTiming(a):
    """ Selects a device that sends time sensitive messages from configuration and sends an additional arbitrary but correct SOME/IP Packet to disturb the timing of the victim."""
    toremove = []
    preselect = copy.deepcopy(a.clientConfigs)
    for client in preselect:

        services = preselect[client]['service']

        for service in services:

            for method in service['method']:
                if not method['timesensitive']:
                    service['method'].remove(method)
            if len(service['method']) == 0:
                services.remove(service)
        if len(services) == 0:
            toremove.append(client)

    for client in toremove:
        del preselect[client]

    victim = AttackerHelper.selectVictim(preselect)
    timestamp = None
    msg = Msg.Msg(victim['client'], victim['server'], victim['msg'], timestamp)
    return msg
def disturbTiming(a):
    """ Selects a device that sends time sensitive messages from configuration and sends an additional arbitrary but correct SOME/IP Packet to disturb the timing of the victim."""
    toremove = []
    preselect = copy.deepcopy(a.clientConfigs)
    for client in preselect:
        
        services = preselect[client]['service']
        
        for service in services:
            
            for method in service['method']:
                if not method['timesensitive']:
                    service['method'].remove(method)
            if len(service['method']) == 0:
                services.remove(service)
        if len(services) == 0:
            toremove.append(client)

    for client in toremove:
        del preselect[client]
    
    victim = AttackerHelper.selectVictim(preselect)
    timestamp = None
    msg = Msg.Msg(victim['client'], victim['server'], victim['msg'], timestamp)
    return msg
def wrongInterface(a):
    """ Sends a valid message impersonating another device with the wrong interface Number 0x03. """
    victim = AttackerHelper.selectVictim(a.clientConfigs)
    victim['msg']['clientID'] = a.clientID
    victim['msg']['iface'] = 0x03
    timestamp = None
    msg = Msg.Msg(a.name, victim['server'], victim['msg'], timestamp)
    return msg
def fakeClientID(a):
    """ Attack that sends an arbitrary SOME/IP Packet using the own configuration (IP and MAC) but impersonates with another valid client id. """
    victim = AttackerHelper.selectVictim(a.clientConfigs)
    timestamp = None
    msg = Msg.Msg(a.name, victim['server'], victim['msg'], timestamp)
    return msg
Example #5
0
def fakeClientID(a):
    """ Attack that sends an arbitrary SOME/IP Packet using the own configuration (IP and MAC) but impersonates with another valid client id. """
    victim = AttackerHelper.selectVictim(a.clientConfigs)
    timestamp = None
    msg = Msg.Msg(a.name, victim['server'], victim['msg'], timestamp)
    return msg