CaringCaribou / caringcaribou

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

Support for UDS over DoIP #72

Closed Cr0wTom closed 2 years ago

Cr0wTom commented 2 years ago

Hello guys,

A lot of manufacturers start using this implementation. It will be good to see if first of all it is applicable and if we can implement it in the tool. It will be a nice addition.

kasperkarlsson commented 2 years ago

Hello @Cr0wTom,

This is indeed interesting, but I must admit that I have only read about this standard, and never actually tinkered with it myself. I do not know it well enough to estimate how hard it would be to add it to the UDS module (or perhaps as an alternative way to initialize IsoTP in caringcaribou/tool/lib/iso15765_2.py?)

Do you have any ideas about how this could be implemented in CC? By pulling in an existing "pretty much python-can compatible" DoIP implementation, or writing a new one? I guess it would make sense if one can simply choose another transport layer than CAN when using ISO-TP, but I am open to any suggestions.

To summarize: I am not very familiar with this, but if we can find a way to get this into CC that would be great!

Cr0wTom commented 2 years ago

Hello @kasperkarlsson

Yes i also hope to be as simple as choosing another transport layer.

I had some preliminary analysis and now i have a device in my hands (under NDA unfortunately) so i will start developing the tooling as i need to test the device either way!

I'll keep this updated and I'll come back with a pull request if i succeed :)

kasperkarlsson commented 2 years ago

That sounds great! We'll wait and see if your research leads to any promising results which can be shared, then.

Your engagement is, as always, very appreciated 😃

Cr0wTom commented 2 years ago

Hello @kasperkarlsson , I build the script using doipclient and udsoncan libraries as it was the "easy" way forward.

In the previous modules of cc, I can see that you are using custom libraries for the different ISOs that I don't have the time to implement.

Please let me know if I should create a pull request or if I should keep my fork for now, as a usable alternative with DoIP functionality :)

kasperkarlsson commented 2 years ago

That sounds awesome, @Cr0wTom!

I did indeed implement some ISOs on my own, when I couldn't find solid implementations with suitable licenses at the time. Using existing libraries instead (whenever possible) is great 👍 A PR would be most welcome!

Cr0wTom commented 2 years ago

Hello,

A bit late, but I managed in the end. You can find the PR here https://github.com/CaringCaribou/caringcaribou/pull/73

Unfortunately, I will not have access anymore to the DoIP unit, so from now on I will not be able to fix any potential issues. All the functions of the module are working though. :)

kasperkarlsson commented 2 years ago

That's great, @Cr0wTom ! I will check this out as soon as I can find a suitable time slot (so don't worry if it takes a few days) 👍

kasperkarlsson commented 2 years ago

Implemented in #73.