CaringCaribou / caringcaribou

A friendly car security exploration tool for the CAN bus
GNU General Public License v3.0
738 stars 193 forks source link

Initial working implementation for security_seed (Issue #12) #54

Closed bhass1 closed 4 years ago

bhass1 commented 5 years ago

Added new security_seed functionality to UDS module. This function asks the UDS server for a Security Access seed repeatedly and records every seed received. It can be used to analyze the randomness of the UDS server's Security Access seed. Supported options include different "Security Access levels", different "Diagnostic Sessions", and performing different types of "ECU Resets" between seed requests. Results are printed to stdout.

image

image

bhass1 commented 5 years ago

Addresses Issue #12

kasperkarlsson commented 5 years ago

Thank you very much for this contribution!

There are some issues which need to be resolved before this can be merged.

General:

ISO-14229-1: It would be preferable if changes here were kept to a minimum.

UDS

I am looking forward to accepting this PR! If you would like assistance to take care of the issues mentioned above, just let me know :smiley:

bhass1 commented 4 years ago

Sorry for the force push, I messed up my rebase earlier! :weary:

I haven't been able to test with a real CAN dongle yet, but I did some sanity checks and ran it through flake8... I will try to test with my two vehicles in the next week. :car: :car:

Thanks for the detailed feedback before!! It should all be addressed with the latest commits. Please let me know if you see any issues or want more changes.

kasperkarlsson commented 4 years ago

Great! I will review these new commits shortly :smiley:

bhass1 commented 4 years ago

Tested on my vehicles. It works as intended, but I have to admit the user interface for the "sad" path is not the greatest. I'd like to make it more apparent for users when seeds aren't being collected. It'd also be nice to build in a flag for fuzzing various security access levels until valid seeds start popping out...

Nonetheless I was still able to use it to find some weak implementations in my car tonight, so it works.

kasperkarlsson commented 4 years ago

Thank you very much for your contribution, @bhass1! :smiley_cat: