Well since this is the ID of the chip, maybe it can be spoofed now (really out of my knowledge scope).
In this FW chip id is stored in 0x200259c8 address:
Code:
0x100012c2 in ?? ()
(gdb) x/s 0x200259C8
0x200259c8: "\346aA\004\003y\247\071W\003"
(gdb) x/8x 0x200259C8
0x200259c8: 0xe6 0x61 0x41 0x04 0x03 0x79 0xa7 0x39
(gdb)
As you see thats my pico id. The address is always the same and this happens at boot process.
Later when get_unique_id() is called it justs reads that address.
Function is at 0x10002608, and its called "_retrieve_unique_id_on_boot".
It allocates that memory address and puts data from "flash_get_unique_id" function in it
You can compile unique_id from pico-examples and cross reference it (.dis file)
unique_id example - dissasembly file
Code:
100043c4 <_retrieve_unique_id_on_boot>:
100043c4: b510 push {r4, lr}
100043c6: 4802 ldr r0, [pc, #8] ; (100043d0 <_retrieve_unique_id_on_boot+0xc>)
100043c8: f000 f80c bl 100043e4 <flash_get_unique_id>
100043cc: bd10 pop {r4, pc}
100043ce: 46c0 nop ; (mov r8, r8)
100043d0: 20000628 .word 0x20000628
100043d4 <pico_get_unique_board_id>:
100043d4: b510 push {r4, lr}
100043d6: 2208 movs r2, #8
100043d8: 4901 ldr r1, [pc, #4] ; (100043e0 <pico_get_unique_board_id+0xc>)
100043da: f7ff fd43 bl 10003e64 <__wrap___aeabi_memcpy>
100043de: bd10 pop {r4, pc}
100043e0: 20000628 .word 0x20000628
Which is identical to function 0x10002608
Code:
undefined FUN_10002608() -- _retrieve_unique_id_on_boot
undefined r0:1 <RETURN>
FUN_10002608+1 XREF[0,1]: 10016b48(*)
FUN_10002608
10002608 10 b5 push {r4,lr}
1000260a 02 48 ldr r0,[DAT_10002614] = 200259C8h
1000260c 00 f0 0c f8 bl FUN_10002628 undefined FUN_10002628()
10002610 10 bd pop {r4,pc}
10002612 c0 46 mov r8,r8
DAT_10002614 XREF[1]: FUN_10002608:1000260a(R)
10002614 c8 59 02 20 undefined4 200259C8h <-- ID IS STORED HERE!
**************************************************************
* FUNCTION *
**************************************************************
undefined FUN_10002618() -- pico_get_unique_board_id
undefined r0:1 <RETURN>
FUN_10002618 XREF[1]: FUN_100169bc:10000714(c)
10002618 10 b5 push {r4,lr}
1000261a 08 22 movs r2,#0x8
1000261c 01 49 ldr r1,[DAT_10002624] = 200259C8h
1000261e ff f7 9f fe bl FUN_10002360 undefined FUN_10002360()
10002622 10 bd pop {r4,pc}
DAT_10002624 XREF[1]: FUN_10002618:1000261c(R)
10002624 c8 59 02 20 undefined4 200259C8h <-- ID IS READ HERE!
In GDB I examined "10002614 c8 59 02 20 undefined4 200259C8h"
address which spit out chip id
If its possible to inject this id into that address (someone with arm asm knowledge would need to do it) maybe it will run.