Kevin Simons (@XStreamke) profile picture

mainframe development certified threat hunter and pentester digital forensics

Hamme
Joined November 2011
Ik wist dat er vandaag iets speciaals was. Al 15 jaar doe ik niet zo bijster veel. Gepost op 01:05. Weet jij nog wanneer je je hebt geregistreerd bij X? Ik wel! #MyXAnniversary
8
The . now encrypts without changes to S. Towards UKW we end up at W. This is linked to V...So we end with W → R → S. So now we change W and E. Let’s rephrase the setting...
1
7
off by one...Now I have created a mismatch in my code, because the ETW no longer has the N… So what really happened is that the rotor was fine, but not progressed if we encountered a letter that was not in it. So the code flaw set this was our setting:
1
9
So if I change this setting: int pin = "ABCDEFGHIJKLM.OPQRSTUVWXYZ".indexOf(input); What will I get? So we need to have the Q in position 23... So this is our rotor position set:
1
1
7
And now we see that indeed some went fine, but others like the first letter are in trouble. So if we don’t swap Q and R we have FTEBC...If we do we have VTRBC... For now we leave it as it is…
1
10
the middle rotor. So we need to swap A and F? A and W? Or something else? So we land on the T in our permutation alphabet of the third rotor. Middle rotor: T → K → L. Left rotor: L → D → F. So what we are actually saying is, we need to swap L and the D of the middle rotor.
1
8
OK. So we have our R back, but...This time our O became an S in WSSEAAOSIR. And that happened after we changed our L with T. So the N flow was: N → E → A → S → S → F → F → L → T → S. Which letters did we swap on the third rotor? Exactly L and T. So
1
8
We now have: (change font to consolas to have it aligned) DITISDEZELFDEENCRYPTIE. VZEBCVPFSRRNWSOEAOSIRA FTRBCHXTSCOUWSSEAOSIRXQ
1
5
Basically the forward flow used to be O and mapping to M. What if we change the UKW now. J maps to the M flow. So let’s look at how that works. As you can see M map to O and O maps to M. Now we want J to M (which was now the X flow). So we change it.
1
6
So we said the flow has to be I → F → X → M → O. So we enter as I enter third rotor then as F. We exit as L. So we enter in the middle as L → X. We exit as V. Enter left rotor as V → M. And we exit as O. Now we take our converted alphabet...
1
18
we land on the G and thus we got the V. So let’s find out how this comes. First we take the old situation. In the old situation we moved all the way to the I and notice that in the meantime the middle rotor performed a notch as well.
1
15
They came back as the I in the third rotor. So they exit at the Q and enter as K. The exact spot of our switch S.
1
5
was the K but we got the R. Yes because the way towards the UKW is the same but the way backwards has also the same small twist…
1
1
5
Now if we look at what we did, with our new alphabet and we do the mapping. Now we type the I, not the S. So I enters as O, exit as Y → A → S → S. Now in the simulator, you can do this easy trick as well. What easy?
1
7
So when we type the S it says Y. And the exit letter is the Q. All combined for the way towards the UKW we have S → Y → S → R → U
1
10