I'm researching an application that has password scrambling algorithm that I've not seen before. I generated a few passwords (the max. length allowed is 8 chars), and got the following results:
password: 0 0 0 0 0 0 0 3
scrambled: W1 U6 W1 U6 W1 U6 W1 X2
password: 0 0 0 0 0 0 0 2
scrambled: W1 U6 W1 U6 W1 U6 W1 M7
password: 0 0 0 0 0 0 0 1
scrambled: W1 U6 W1 U6 W1 U6 W1 F2
password: 0 0 0 0 0 0 0 0
scrambled: W1 U6 W1 U6 W1 U6 W1 U6
password: 1 2 3 4 5 6 7 8
scrambled: H9 G6 B5 G3 F8 Q7 X8 O9
The scrambling is clearly reversible. I'm thinking worse comes to worse I could generate a dictionary mapping but I'm thinking there'd be a cleverer way of going about this.
Has anyone encountered something like this before?
Update
More Values and noted:
0
behaves quite differently than other characters@
is also noteworthy (constant at every position)- algorithm can't or won't process passwords of less than 3 chars
4 4 4 4 4 4 4 4 A2 S5 K9 G3 Y6 U0 M4 E8 3 3 3 3 3 3 3 3 L4 Z5 B5 R1 R5 F7 H6 X2 2 2 2 2 2 2 2 2 W6 G6 S0 C0 K4 U3 C8 M7 1 1 1 1 1 1 1 1 H9 N6 F6 J8 D3 J0 B0 F2 1 0 0 0 0 0 0 3 H9 U6 W1 U6 W1 U6 W1 X2 a b a b a b a b H1 E3 B8 W6 Z4 S0 X1 K4 b b b b b b b b S8 E3 O2 W6 G6 S0 C0 K4 a a a a a a a a H1 L3 B8 H5 Z4 D7 X1 Z8 A B C N6 C0 L0 B B B B B B B B M7 Y1 I1 Q5 A5 I9 S8 E3 A B A B A B A B B0 Y1 V6 Q5 T3 I9 R0 E3 A A A A A A A A B0 F2 V6 B4 T3 X5 R0 T7 A A A A A A A J0 B0 F2 V6 B4 T3 X5 A A A A A A D3 J0 B0 F2 V6 B4 A A A A A J8 D3 J0 B0 F2 A A A A F6 J8 D3 J0 A A A N6 F6 J8 @ @ @ @ M2 M2 M2 M2 # # # # P2 B9 F3 T4 * * * * A9 A1 U7 Q9 ! ! ! ! Z4 D7 X1 Z8
General rule for a brute-force approach to un-scrambling these passwords:
In a string of length L, a given char at position N will always have the same value.
IE: In 8 character long passwords, if the first char is A, it will always be encoded the same way.
NB: I've figured out the "brute-force" way of unscrambling these, but I would love to know the algorithm used for scrambling the passwords. If anyone has experience on reversing these kind of things I would love some tips on how to proceed from here.
1 0 0 0 0 0 0 3
=H9 U6 W1 U6 W1 U6 W1 O9
?10000003
@
is exactly in the middle of the ASCII table, symbol number 64. Does the algorithm accept any character inputs? Is single-byte input above value 127 accepted? What about multi-byte characters?0
is 48,(48*n) mod 32
will oscillate between0
and16
.