باتش انلوك العملاق ديجانbb5 ودة الجزء الثانى والاخير لفك الشفرة
Part 2:
Once you have code, next step is to find what and where to patch code.
Well, that is very complicated procedure and requires knowelage,experiance,
lots of work,etc.
But again, Nokia made another big hole or maybe NOT?!
One of critical rutines can be EASELY find by looking for ASCII string!!!,
belived or not.
Magic string is "012345678901234" and it is default SP pass for test phones or
what. Probably they have problem to put string somethin like "FOR ******* HERE IS CRITICAL CODE!"
Anyway....
Use "LISTER" from ******s to view "mcusw" file.
In options, select "HEX"
Press key "F7"
Enter 012345678901234 and hit enter to start looking for that string.
All other data have to look like some garbage with only that ASCII string!
Note: If you do not find that string in "mcusw" try in second file that is
created by "fls2bin.exe"
Once you find string, look in lister HEX address of that string.
Substract that address by 1000h (200h to 2000h).
This is address from which tou will start to dissasemble code!!!
So....
Load file in some ARM dissasembler use LITLE ENDIAN and THUMB mode
Set dissasembling address previos defined, and start to dissasemble code.
In that proces you have to look for instruction that points to string
"012345678901234"
Something like this:
00A0C9BC: FE A4 LEA R4,[PC+#03F8] ;[00A0CDB8]=33323130 '012345678901234'
And you have found ONE of many SP rutines that can be patched.
In this example full rutines looks like this:
(From: V 05.00 27-04-07 RM-174)
00A0C9B6: F0 B5 PUSH (R4,R5,R6,R7,LR)
00A0C9B8: 06 1C ADD R6,R0,#0
00A0C9BA: 0F 1C ADD R7,R1,#0
00A0C9BC: FE A4 LEA R4,[PC+#03F8] ;[00A0CDB8]=33323130 '012345678901234'
00A0C9BE: 85 B0 SUB SP,#0014
00A0C9C0: 2E CC LDM [R4],(R1,R2,R3,R5)
00A0C9C2: 01 A8 LEA R0,[SP+#0004]
00A0C9C4: 2E C0 STM [R0],(R1,R2,R3,R5)
00A0C9C6: 02 25 MOV R5,#02
00A0C9C8: 00 24 MOV R4,#00
00A0C9CA: FF F7 07 F9 CALL 00A0BBDC
00A0C9CE: 00 28 CMP R0,#00
00A0C9D0: 02 D0 BEQ 00A0C9D8
00A0C9D2: 02 28 CMP R0,#02
00A0C9D4: 2D D0 BEQ 00A0CA32
00A0C9D6: 0A E0 JMP 00A0C9EE
00A0C9D8: 0F 22 MOV R2,#0F
00A0C9DA: 31 1C ADD R1,R6,#0
00A0C9DC: 01 A8 LEA R0,[SP+#0004]
00A0C9DE: 50 F6 6C E8 CALLX 0085CABA
00A0C9E2: 00 28 CMP R0,#00
00A0C9E4: 01 D1 BNE 00A0C9EA
00A0C9E6: 00 25 MOV R5,#00
00A0C9E8: 23 E0 JMP 00A0CA32
00A0C9EA: 08 25 MOV R5,#08
00A0C9EC: 21 E0 JMP 00A0CA32
00A0C9EE: 30 5D LDRB R0,[R6+R4]
00A0C9F0: 30 38 SUB R0,#30
00A0C9F2: 0A 28 CMP R0,#0A
00A0C9F4: 02 D3 BCC 00A0C9FC
00A0C9F6: 08 20 MOV R0,#08
00A0C9F8: 05 B0 ADD SP,#0014
00A0C9FA: F0 BD RET (R4,R5,R6,R7)
00A0C9FC: 01 34 ADD R4,#01
00A0C9FE: 24 06 LSL R4,R4,24
00A0CA00: 24 0E LSR R4,R4,24
00A0CA02: 0E 2C CMP R4,#0E
00A0CA04: F3 D9 BLS 00A0C9EE
00A0CA06: 08 20 MOV R0,#08
00A0CA08: 40 F6 3C E9 CALLX 0084CC84
00A0CA0C: 04 1C ADD R4,R0,#0
00A0CA0E: 02 1C ADD R2,R0,#0
00A0CA10: 39 1C ADD R1,R7,#0
00A0CA12: 30 1C ADD R0,R6,#0
00A0CA14: 43 F7 9E F9 CALL 0094FD54
00A0CA18: 01 28 CMP R0,#01
00A0CA1A: 01 D1 BNE 00A0CA20
00A0CA1C: 00 25 MOV R5,#00
00A0CA1E: 05 E0 JMP 00A0CA2C
00A0CA20: 60 68 LDR R0,[R4+#04]
00A0CA22: 23 28 CMP R0,#23
00A0CA24: 01 D1 BNE 00A0CA2A
00A0CA26: 08 25 MOV R5,#08
00A0CA28: 00 E0 JMP 00A0CA2C
00A0CA2A: 02 25 MOV R5,#02
00A0CA2C: 20 1C ADD R0,R4,#0
00A0CA2E: 50 F6 34 E8 CALLX 0085CA9A
00A0CA32: 28 1C ADD R0,R5,#0
00A0CA34: E0 E7 JMP 00A0C9F8
On address 00A0CA14: is most important call function that test PSW!!!
On return from that function if R0=1 pass is corect and phone will be unlocked!
So we can to patch data on addr:
00A0CA18: 01 28 CMP R0,#01 to
00 28 that is CMP R0,#00
or on addr:
00A0CA1A: 01 D1 BNE 00A0CA20 to
01 D0 that is BNE 00A0CA20
And phone will be unlocked!!!
As you can see in first case we togle bit 0 (ad0) and in second
we togle bit 8 (ad8). This method is used for N73.
Anyway there is a lots of ways to patch code by fly, togling only ONE bit!!!,
since Nokia left so BIG security hole in their design!
End of Part 2
وانشاء اللة انا شغال على ترجمة الموضوع للعربية والشرح لكى تعم الفائدة
الملفات المرفقة
Sp.txt (2.5 كيلوبايت, المشاهدات 47)
المفضلات