HomePortalGalleryRegisterLog in

Share | 

 BB5 SP unlocking, theory...

View previous topic View next topic Go down 
mela suparer 1955
juniour member
juniour member

Number of posts : 14
Age : 28
Location : uk
Registration date : 2007-08-29

PostSubject: BB5 SP unlocking, theory...   9/16/2007, 5:40 am

It seems that everybody know how it works, but not Nokia, since they didn't
change anything in they SW to prevent that.

Then again, maybe not!
Why they left BIG hole in SP security...?..

BB5 using RSA and AES algorithm that is running from secure ROM and RAM.
Main SP rutines are stored in FLASH in block "PA_SL" and those rutines are
loaded in secure RAM and if RSA signature correct, CPU will run it.

BUT "SP SERVER" are part of MCUSW that is running DIRECTLY from
FLASH is not protected?!!! Well it is tested only once when phone starts!
After that you can patch code from flash in fly.

ARM CPU reads data from flash in bursts, in this case it is burst of 32 bytes
and it start on 32 aligned address.

So, first step is to know where is code that have to be patched in FLASH.
You can find that by desoldering FLASH from phone and to read by some
programming device.
Or you can use my software to extract mcusw from Nokia update SW files.
Find bigest file in dir and rename to "infile". Run "fls2bin.exe" wait, and two
files will be created. One of them are "mcusw".

NOTE: fls2bin may not work with all cpu flash files!

End of Part 1

Do not post stupid comments in this thread, or even better, do not post ANY comment!!!

Attached Files

[You must be registered and logged in to see this image.]
Fls2bin.rar (2.1 KB, 0 views)

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 HACKERS HERE IS CRITICAL CODE!"

Use "LISTER" from windows 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!!!


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

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

Do not post stupid comments in this thread, or even better, do not post ANY comment!!!

Attached Files

[You must be registered and logged in to see this image.]
Sp.txt (2.5 KB, 0 views)
Back to top Go down
juniour member
juniour member

Number of posts : 16
Age : 47
Location : barren
Registration date : 2007-08-11

PostSubject: Re: BB5 SP unlocking, theory...   2/2/2008, 2:24 am

brother n73 unknown provider any solution pls
Back to top Go down
waqas ahmed

Number of posts : 109
Age : 37
Registration date : 2007-06-21

PostSubject: Re: BB5 SP unlocking, theory...   2/2/2008, 7:01 am

nice sharing daer


waqas mmz
Back to top Go down
Sponsored content

PostSubject: Re: BB5 SP unlocking, theory...   

Back to top Go down
BB5 SP unlocking, theory...
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
» My Face of Boe Theory
» Insane theory
» MY new theory about the valeyard
» Just read an almost two decades old fan theory that recently came true
» [Theory] How did Luna know there was a Sailor Moon?

Permissions in this forum:You cannot reply to topics in this forum
sawgsm-forumpakistan :: BB5-
Jump to: