Tlemcen Car electronics

Tlemcen Car electronics (https://www.tlemcen-electronic.com/forum/)
-   Renault clip, DDT2000, Nissan consult (https://www.tlemcen-electronic.com/forum/forum96/)
-   -   [Theorie] Calcul du ISK vers PIN pour Megane 2 (https://www.tlemcen-electronic.com/forum/renault-clip-ddt2000-nissan-consult/66622-theorie-calcul-du-isk-vers-pin-pour-megane-2-a.html)

MrRorry 09/05/2017 03h14

[Theorie] Calcul du ISK vers PIN pour Megane 2
 
Algorithme ISK vers PIN (pour Megane 2 / Scenic 2)

A savoir, l'algo utilisé consiste en general pour ce constructeur a decaler, repositionner, inverser quelques bits, xor avec clef predefinie...
nous allons voir en particulier celui de la Megane 2 / Scenic 2

Les 6 octets de l'isk pour notre exemple,
ISK = FF 82 5E A0 8C 2E

on represente ces 6 octets sous leur forme binaire:

----FF-------82--------5E--------A0-------8C-------2E----
11111111 10000010 01011110 10100000 10001100 00101110


qui nous donne cette chaine binaire de 48 bits: 111111111000001001011110101000001000110000101110

position du bit 0 -> 111111111000001001011110101000001000110000101110 <- position du bit 47 | (0<->47) = 48 bits

nous allons creer virtuellement une nouvelle chaine binaire qui sera notre resultat (en gros la chaine binaire de notre pin)
notre chaine binaire de notre isk sera appelée ISKbitsArray et pour notre pin PINbitsArray par exemple,

PINbitsArray[0] = ISKbitsArray[19]
PINbitsArray[1] = ISKbitsArray[29]
PINbitsArray[2] = ISKbitsArray[39]
PINbitsArray[3] = ISKbitsArray[4] avec inversion de bit pour celui la (1 deviendra 0 et vice-versa)
PINbitsArray[4] = ISKbitsArray[24]
PINbitsArray[5] = ISKbitsArray[46]
PINbitsArray[6] = ISKbitsArray[31]
PINbitsArray[7] = ISKbitsArray[12]
PINbitsArray[8] = ISKbitsArray[16]
PINbitsArray[9] = ISKbitsArray[28]
PINbitsArray[10] = ISKbitsArray[7] avec inversion de bit pour celui la (1 deviendra 0 et vice-versa)
PINbitsArray[11] = ISKbitsArray[10]
PINbitsArray[12] = ISKbitsArray[15]
PINbitsArray[13] = ISKbitsArray[0]
PINbitsArray[14] = ISKbitsArray[40]
Etc... jusqu'au 48eme bit

qui nous donne 100011000000010101010101100011100110101001101100

une fois terminé on redivise notre chaine binaire en 6 octets (8 bits x 6 octets = 48 bits)

---8C--------05--------55-------8E--------6A-------6C---
10001100 00000101 01010101 10001110 01101010 01101100

voila notre pin. PIN = 8C 05 55 8E 6A 6C

Tres simple, on devrait meme plutot appeler ca un encodage qu'un algorithme.

jah83 09/05/2017 06h54

Merci Rorry, très instructif

soustourou 09/05/2017 07h27

merci MRORRY toujours au top et au service des autres

subzero 09/05/2017 10h22

en un mot ; merci !

KEVINOX46 15/05/2017 21h08

bravo c'est clair net est precis

VroumVroum 26/05/2017 22h05

Citation:

Envoyé par MrRorry (Message 525558)
Algorithme ISK vers PIN (pour Megane 2 / Scenic 2)

A savoir, l'algo utilisé consiste en general pour ce constructeur a decaler, repositionner, inverser quelques bits, xor avec clef predefinie...
nous allons voir en particulier celui de la Megane 2 / Scenic 2

Les 6 octets de l'isk pour notre exemple,
ISK = FF 82 5E A0 8C 2E

on represente ces 6 octets sous leur forme binaire:

----FF-------82--------5E--------A0-------8C-------2E----
11111111 10000010 01011110 10100000 10001100 00101110


qui nous donne cette chaine binaire de 48 bits: 111111111000001001011110101000001000110000101110

position du bit 0 -> 111111111000001001011110101000001000110000101110 <- position du bit 47 | (0<->47) = 48 bits

nous allons creer virtuellement une nouvelle chaine binaire qui sera notre resultat (en gros la chaine binaire de notre pin)
notre chaine binaire de notre isk sera appelée ISKbitsArray et pour notre pin PINbitsArray par exemple,

PINbitsArray[0] = ISKbitsArray[19]
PINbitsArray[1] = ISKbitsArray[29]
PINbitsArray[2] = ISKbitsArray[39]
PINbitsArray[3] = ISKbitsArray[4] avec inversion de bit pour celui la (1 deviendra 0 et vice-versa)
PINbitsArray[4] = ISKbitsArray[24]
PINbitsArray[5] = ISKbitsArray[46]
PINbitsArray[6] = ISKbitsArray[31]
PINbitsArray[7] = ISKbitsArray[12]
PINbitsArray[8] = ISKbitsArray[16]
PINbitsArray[9] = ISKbitsArray[28]
PINbitsArray[10] = ISKbitsArray[7] avec inversion de bit pour celui la (1 deviendra 0 et vice-versa)
PINbitsArray[11] = ISKbitsArray[10]
PINbitsArray[12] = ISKbitsArray[15]
PINbitsArray[13] = ISKbitsArray[0]
PINbitsArray[14] = ISKbitsArray[40]
Etc... jusqu'au 48eme bit

qui nous donne 100011000000010101010101100011100110101001101100

une fois terminé on redivise notre chaine binaire en 6 octets (8 bits x 6 octets = 48 bits)

---8C--------05--------55-------8E--------6A-------6C---
10001100 00000101 01010101 10001110 01101010 01101100

voila notre pin. PIN = 8C 05 55 8E 6A 6C

Tres simple, on devrait meme plutot appeler ca un encodage qu'un algorithme.

Bonsoir,
bravo si tu as trouver ceci tous seul , c'est effectivement + un encodage , je fais de même de temps en temps pour obfuscer certaine chose , çà ralenti la rétro .
A+

samigravano 26/05/2017 22h43

Salut,

Merci beaucoup, comment fait tu pour trouver le 19 de :

PINbitsArray[0] = ISKbitsArray[19] ?

Et ainsi de suite

sharediag 27/05/2017 04h12

par la methode d observation et generalisation

MrRorry 27/05/2017 04h49

Citation:

Envoyé par samigravano (Message 529424)
Salut,

Merci beaucoup, comment fait tu pour trouver le 19 de :

PINbitsArray[0] = ISKbitsArray[19] ?

Et ainsi de suite

en comparant les 2 chaines binaires de isk et pin, puis en testant avec plusieurs valeurs connues pour m'assurer que l'algo est bon...

ebt255 05/06/2017 14h16

Following the MrRorry I decided to do the same for Laguna 2ph2.

eg.1
So, we have ISK: FA2B6C787800

In binary it looks:
11111010 00101011 01101100 01111000 01111000 00000000
------FA-- -----2B--- -----6C--- -----78--- -----78--- -----00---

Now we have to count the ones (number 1 in binary): 22
Next circular shift 22 (count value) bits in right.

----------------------11111010001010110110110001 >> 1110000111100000000000
111000011110000000000011111010001010110110110001

after that bianry is: 111000011110000000000011111010001010110110110001
Next if count value (22) is even then we must xor evry bits by 1.

11100001 11100000 00000011 11101000 10101101 10110001
11111111 11111111 11111111 11111111 11111111 11111111 XOR

00011110 00011111 11111100 00010111 01010010 01001110 Result OK.
------1E-- -----1F--- -----FC--- -----17--- -----52--- -----4E--- PIN


I thought that was all but..
eg.2

ISK: FF825EA08C2E

111111111000001001011110101000001000110000101110

count value: 24
so, circular shift 24

------------------------111111111000001001011110 >> 101000001000110000101110
101000001000110000101110111111111000001001011110

then XOR

10100000 10001100 00101110 11111111 10000010 01011110
11111111 11111111 11111111 11111111 11111111 11111111 XOR

01011111 01110011 11010001 00000000 01111101 10100001 Result - WRONG!
------5F-- -----73--- -----D1--- -----00--- -----7D--- -----A1---

When count value is 24 and only then you must change it to 17.

circular shift 17
-----------------1111111110000010010111101010000 >> 01000110000101110
010001100001011101111111110000010010111101010000

Not XOR because 17 is not even.


01000110 00010111 01111111 11000001 00101111 01010000 Result OK.
------46-- -----17--- -----7F--- -----C1--- -----2F--- -----50--- PIN


I hope that is all.

ebt255 22/06/2017 12h34

Citation:

Envoyé par MrRorry (Message 525558)
Algorithme ISK vers PIN (pour Megane 2 / Scenic 2)

I have one question to you MrRorry.

PINbitsArray[3] != ISKbitsArray[4]
PINbitsArray[28] = ISKbitsArray[4]
PINbitsArray[40] != ISKbitsArray[4]
PINbitsArray[42] = ISKbitsArray[4]

Am I right?

MrRorry 22/06/2017 21h39

Citation:

Envoyé par ebt255 (Message 534810)
I have one question to you MrRorry.

PINbitsArray[3] != ISKbitsArray[4]
PINbitsArray[28] = ISKbitsArray[4]
PINbitsArray[40] != ISKbitsArray[4]
PINbitsArray[42] = ISKbitsArray[4]

Am I right?

Hi ebt255,
nope, every "bit" is used just once.

j-sky 22/06/2017 22h05

Salut Mister !
toujours au top pour ce genre de hack et bravo pour ton explication sur l'ISK to PIN

ebt255 23/06/2017 12h23

Citation:

Envoyé par MrRorry (Message 534891)
Hi ebt255,
nope, every "bit" is used just once.

it's weird, i tried:

ISK: 00 00 00 00 00 00
PIN: 10 20 20 10 81 88

in binary
ISK: 00000000 00000000 00000000 00000000 00000000 00000000
PIN: 00010000 00100000 00100000 00010000 10000001 10001000

next i tried:
ISK: 08 00 00 00 00 00
PIN: 00 20 20 18 81 28

in binary
ISK: 00001000 00000000 00000000 00000000 00000000 00000000
PIN: 00000000 00100000 00100000 00011000 10000001 00101000

MrRorry 24/06/2017 15h21

Citation:

Envoyé par ebt255 (Message 534998)
it's weird, i tried:

ISK: 00 00 00 00 00 00
PIN: 10 20 20 10 81 88

in binary
ISK: 00000000 00000000 00000000 00000000 00000000 00000000
PIN: 00010000 00100000 00100000 00010000 10000001 10001000

next i tried:
ISK: 08 00 00 00 00 00
PIN: 00 20 20 18 81 28

in binary
ISK: 00001000 00000000 00000000 00000000 00000000 00000000
PIN: 00000000 00100000 00100000 00011000 10000001 00101000

Hi ebt,

keep in mind
- Every model is different
- bits can be scrambled,shifted,ignored...

And by the way,
few specific bits can be cleared/ignored in the way Isk->pin, it means that if you want to reverse the coding steps, you will have to guess the missing bits (by brute-forcing them) but its a piece of cake because you already know the pin.
for example in my tool "Pin to Isk", a thread is launched to guess them, and it takes just few seconds to find them, every candidate (isk) is compared the known result (pin) and its found when they match... its that simple!

Keep this work up, its good to see that some guys are still interrested in research :wink_ancien:


Fuseau horaire GMT +1. Il est actuellement 01h29.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Version française #23 par l'association vBulletin francophone
Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Tlemcen-electronic © All right reserved