Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subaru SSM4 CMD_SecurityAccess #26

Open
jglim opened this issue Jun 14, 2023 · 3 comments
Open

Subaru SSM4 CMD_SecurityAccess #26

jglim opened this issue Jun 14, 2023 · 3 comments

Comments

@jglim
Copy link
Owner

jglim commented Jun 14, 2023

ECU Name
Subaru ECUs that depend on SSM4 CMD_SecurityAccess

Source file
SSM4, CMD_FhiCan.dll

Additional context
Subaru ECU key material can now be extracted from SSM4 as the XML keys are now known. In their API definitions, there are typically two types of keys

  • 16-byte AES key, used by CMD_SecurityAccess2018CY1, already addressed here
  • 16 × u16, likely used by CMD_SecurityAccess, 4 input bytes, 4 output bytes. This is the target algo

I've ripped and tidied up the raw x86 instructions, and stuck them into a keygen template. As of right now, I am unable to test if it is working correctly as I do not have a known seed/key pair with an associated ECU ID/variant.

Help wanted!
I would appreciate having seed/key pairs with the ECU variant (e.g. 12002/2EE2)


Here's the tool if you'd like to test the algo on your own: sandbox.zip. Windows-only, requires XP and above.

image

@jnewb1
Copy link

jnewb1 commented Jul 3, 2023

Here's some seed/key pairs from a 2021 Crosstrek eyesight module. ECU ID appears to be 12425. Tried your tool but couldn't get it to work for this ecu. Perhaps an endianness issue?

ca5616c0
3adfc8e0

ce0baaff
4bdfdae0

1f5e4b83
94dfd2e0

8a598591
0edfaae0

d121cfea
dadfbfe0

9c11699b
9cdfb3e0

2714cb65
74df8ae0

47e5e9fe
b0df95e0

@jglim
Copy link
Owner Author

jglim commented Jul 5, 2023

Thanks! I've tried swapping the endianness of the inputs and variant keys and couldn't find a match too.

Are those seed/keys generated through SSM4? I'm curious if it is using the same algo as the rip (CMD_SecurityAccess in CMD_FhiCan.dll)

@jnewb1
Copy link

jnewb1 commented Jul 5, 2023

Thanks! I've tried swapping the endianness of the inputs and variant keys and couldn't find a match too.

Are those seed/keys generated through SSM4? I'm curious if it is using the same algo as the rip (CMD_SecurityAccess in CMD_FhiCan.dll)

Yes they are generated by ssm4. I'll try putting a breakpoint at CMD_SecurityAccess to verify

@jglim jglim mentioned this issue Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants