Register
Results 1 to 3 of 3
  1. #1
    Member

    Join Date
    May 2017
    Location
    City 17
    Posts
    47
    Thanks Thanks Given 
    25
    Thanks Thanks Received 
    36
    Thanked in
    10 Posts

    Default Decrypting VAG M/EDC17 Immobiliser Data

    Hi everyone. I've recently been studying with how the immobiliser data (PIN, CS & MAC) is stored and encrypted on VAG EDC17 ECUs.


    So far my understanding is as follows:
    Every 17-series ECU has a unique OTP burned from factory in to its tricore flash at 0x17F00 and is a few lines long. The EEPROM is structured in blocks 0x80 bytes long and the first byte of the block signifies its category.


    The blocks of interest for immo data are blocks 08, 09 and 0A and the immo data is repeated in these blocks. Each block also has 2 checksums: a 2 byte CRC near the beginning and 4 byte CRC at the tail of the block, these algos have very kindly been RE'd and documented with source by H2Deetoo and ozzy_rp on NefMoto.


    I understand that the immo data is ciphered with the OTP data and therefore the EEPROM immo data cannot be deciphered or altered without being accompanied with its respective flash read (obviously read must include the OTP section).


    I am however at a total loss as to how to decrypt this small section of data. I thought it might be some sort of simple XOR/substitution and/or shuffling method but despite my many attempts, I have been unable to get this algo worked out. Have found 2 functions pointing to 0x17F10 using Ghidra but the one returns a bool and the other returns a single byte and I don't think either function/label is important.


    If anyone could provide insight on the cipher or guidance in the right direction it would be hugely appreciated.

  2. #2
    DK Veteran
    avital's Avatar
    Join Date
    May 2010
    Posts
    1,233
    Thanks Thanks Given 
    145
    Thanks Thanks Received 
    1,001
    Thanked in
    562 Posts

    Default

    Ghidra keep all info for NSA investigation better use Radare2 or IDA ...
    Production and development professional IMMOBILIZER/TCU/ESL/ELV/SRS emulators for all brand cars
    PORSCHE / FERRARI / MASERATI / LAMBORGHINI - immobilizer solutions




  3. #3
    Member

    Join Date
    May 2017
    Location
    City 17
    Posts
    47
    Thanks Thanks Given 
    25
    Thanks Thanks Received 
    36
    Thanked in
    10 Posts

    Default

    Quote Originally Posted by avital View Post
    Ghidra keep all info for NSA investigation better use Radare2 or IDA ...
    I knew Ghidra was an NSA project but does it really log your usage?

    I do normally use IDA though but I find for me it sometimes incorrectly analyses code as data on tricore chips, even when I've tried to set the segment maps up correctly. Although IDA is my goto for x86 and ppc
    Last edited by navatar; 21st November, 2019 at 10:13 PM.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.