Login Register

Vida CEM swapping

A mid-size luxury crossover SUV, the Volvo XC90 made its debut in 2002 at the Detroit Motor Show. Recognized for its safety, practicality, and comfort, the XC90 is a popular vehicle around the world. The XC90 proved to be very popular, and very good for Volvo's sales numbers, since its introduction in model year 2003 (North America). P2 platform.
Post Reply
vtl
Posts: 4724
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 603 times

Re: Vida CEM swapping

Post by vtl »

charlie13 wrote: 27 Apr 2022, 14:22 hash collision found
SEED b6 cb 58, PIN 00 00 ff ff ff, KEY 68 4d 50, 292 pins/s
No way! :-D

alevol
Posts: 31
Joined: 4 August 2021
Year and Model: 2005 S60
Location: Finland
Has thanked: 6 times
Been thanked: 3 times

Post by alevol »

vtl wrote: 27 Apr 2022, 13:45 pps is pins per second for your CEM.
Thanks for your help!

I have used it this exact way. I was thinking it is needed for accelerating computing of pin codes for given seed+key. But a little bit confusing for me is the fact, that for other seed+key pair from THE SAME cem other pin codes are generated. As far i see no coincidences.

User avatar
gnalan
Posts: 968
Joined: 21 July 2020
Year and Model: 2001 S60
Location: Ohio
Has thanked: 557 times
Been thanked: 135 times

Post by gnalan »

alevol wrote: 28 Apr 2022, 00:38 But a little bit confusing for me is the fact, that for other seed+key pair from THE SAME cem other pin codes are generated. As far i see no coincidences.
For a single CEM using just one working seed/key pair will give you 65536 pins that will work. (Assuming 5 byte hex, not BCD.)
2001 S60, B5244S, AW55-50SN, FWD (Sold)
Cancer/Illness/Caregiver Support Thread

alevol
Posts: 31
Joined: 4 August 2021
Year and Model: 2005 S60
Location: Finland
Has thanked: 6 times
Been thanked: 3 times

Post by alevol »

Code computes BCD digits. For a different single pairs it gives different amounts of pins. I have tried two pairs, and results are 709 and 614 different passwords. Do all of them really work for P3 cem?
I am afraid i don't get the idea. If seed+key is timed out, the passwords will not work!? So i see, there must be passwords, that match many seed+key pairs, because they must match the one single password that is kept in flash memory of CEM's MCU.

User avatar
charlie13
Posts: 46
Joined: 23 March 2022
Year and Model: 2009 XC70
Location: Krakow
Has thanked: 8 times
Been thanked: 18 times

Post by charlie13 »

alevol wrote: 28 Apr 2022, 01:41 Code computes BCD digits. For a different single pairs it gives different amounts of pins. I have tried two pairs, and results are 709 and 614 different passwords. Do all of them really work for P3 cem?
I am afraid i don't get the idea. If seed+key is timed out, the passwords will not work!? So i see, there must be passwords, that match many seed+key pairs, because they must match the one single password that is kept in flash memory of CEM's MCU.
I only calculated 4 but they work on one P3 cem.
1844518461 original from file
00 00 ff ff ff
ff ff 81 86 c5
00 21 86 28 06

User avatar
gnalan
Posts: 968
Joined: 21 July 2020
Year and Model: 2001 S60
Location: Ohio
Has thanked: 557 times
Been thanked: 135 times

Post by gnalan »

alevol wrote: 28 Apr 2022, 01:41 Code computes BCD digits. For a different single pairs it gives different amounts of pins. I have tried two pairs, and results are 709 and 614 different passwords. Do all of them really work for P3 cem?
I am afraid i don't get the idea. If seed+key is timed out, the passwords will not work!? So i see, there must be passwords, that match many seed+key pairs, because they must match the one single password that is kept in flash memory of CEM's MCU.
Yes, for the P3 and SPA that use the same Algo. Seed in, pin is in the individual ECUs, and key out. The exact pin isn't necessary, just an exact key response. So any of the 65536 unique PINs can be used with a seed to come up with the same key using just the Algo.
2001 S60, B5244S, AW55-50SN, FWD (Sold)
Cancer/Illness/Caregiver Support Thread

vtl
Posts: 4724
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 603 times

Post by vtl »

Also because Volvo's hash function is sort of lame, it makes the same set of PINs valid despite of different SEEDs. It is easy enough to modify the hash function slightly in order to define a unique set of matching PINs for the SEED. Brute force would become impossible, at least not in a way like it is done today.

User avatar
gnalan
Posts: 968
Joined: 21 July 2020
Year and Model: 2001 S60
Location: Ohio
Has thanked: 557 times
Been thanked: 135 times

Post by gnalan »

On the CEM-B that uses a 6 byte BCD pin, do they also use an Algo or does the actual pin need to be read from flash?
2001 S60, B5244S, AW55-50SN, FWD (Sold)
Cancer/Illness/Caregiver Support Thread

vtl
Posts: 4724
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 603 times

Post by vtl »

gnalan wrote: 28 Apr 2022, 08:52 On the CEM-B that uses a 6 byte BCD pin, do they also use an Algo or does the actual pin need to be read from flash?
Straight from flash. Some newer P1 CEMs have it encrypted, but the routine is still the "compare 6 bytes from CAN with the ones in FLASH".

Best CEM protection is in brick shaped ones, from P2 -04. It is the dumbest code, which is resistant to timing attacks because of how dumb is it ;)

User avatar
gnalan
Posts: 968
Joined: 21 July 2020
Year and Model: 2001 S60
Location: Ohio
Has thanked: 557 times
Been thanked: 135 times

Post by gnalan »

vtl wrote: 28 Apr 2022, 09:35 Best CEM protection is in brick shaped ones, from P2 -04. It is the dumbest code, which is resistant to timing attacks because of how dumb is it ;)
Mine is a 2001. In a way I'm glad the security is resistant to a timing attack since there's less chance of an outside attack on it. However, with it being so secure it makes modifications harder to accomplish.

I'm good with math, and having an Algo to work with makes things easier. It also makes newer models easier to hack.

Do you mind if I fork your code and do my own tweaks on it? (I have a working theory in my mind and I want to see if it works for the models that use the Algo I've been working with. P3, P5, and P6? Please correct me if I'm wrong.)
2001 S60, B5244S, AW55-50SN, FWD (Sold)
Cancer/Illness/Caregiver Support Thread

Post Reply
  • Similar Topics
    Replies
    Views
    Last post