📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  Brainstorms - General  >>  GSM Cellphone Baseband

Topic created on: May 7, 2009 16:04 CDT by MohammadHosein .

hey ,
anybody ever heard of any successful attempt on reverse engineering a commercially available cellphone's Baseband ?what i need is simply some initial hints to start on an easy target and goal is being able to control the GSM Stack of the phone via software , e.g controlling signaling messages .

  itsme     May 8, 2009 05:42.17 CDT
if you choose a windowsmobile omap based phone, see pdadb, experimenting is very easy, the baseband and application processor share a 4M memory area, in which the code is loaded. and also contains some of the data sections of the baseband cpu.

so you can modify the baseband code while it is running.

if you search this area for a known cellid, you will also find stuff like the 6 nearest cells info. channel lists etc.

this buffer also contains the ipc buffers used for data and atcmd request/response queue's



model    | ---sharedmem---     |     ---ipc buf---   | gsmdata  |    ---gsmcode---    |
         | app virt | app phys | app virt | bb phys  |          | app virt | bb phys  |
typhoon  | 8f180000 | 11d80000 | 8f180000 | 01000000 | 8f18c000 | 8f200000 | 00000000 |
startrek | 8a100000 | 13c00000 | 8a400000 | 01000000 | 8a410000 | 8a100000 | 00000000 |
herald   | 8a000000 | 13c00000 | 8a300000 | 01000000 | 8a310000 | 8a000000 | 00000000 |


the htc viva is like the herald

app virt : the application virtual address
app phys : the application physical address
bb phys : the baseband physical address

when you load the gsmcode in ida, you first have to find the ram initialization code,
which relocates several chunks of the binary to higher addresses.

this is the idc script i used to do this for the startrek gsm version 4.1.13.28_02.67.30 rom:


auto l, d,ea; ea=0x2000;

        SegCreate(0X800000,0X880000,0X0,1,1,2);
        SegRename(0X800000,"RAM");
        SegCreate(0X1000000,0X1100000,0X0,1,1,2);
        SegRename(0X1000000,"RAM");
    
memset(0x800000, 0, 0x80e000-0x800000);
memset(0x1048000,0, 0x10d0000-0x1048000);
memcpy(0x811004, 0x281008, 0x8444C4-0x811004);
    
while (1) {
    l=Dword(ea);  d=Dword(ea+4);
    if (l==0) { break;}
    Message("%08lx: %08lx-%08lx -> %08lx-%08lx  l=%08lx\n",  ea, ea+8, ea+8+l, d, d+l, l);
    memcpy(d, ea+8, l);
    ea= ea+l+8;
    if (ea&3) { ea=ea+ 4-(ea&3); }
}
MakeDword(0x2000); OpNum(0x2000);
MakeArray(0x2000, (ea+8-0x2000)/4);
SegBounds(0, 0, 0x256A5C, 1);
//MakeDword(0x281008); OpNum(0x281008);
//MakeArray(0x281008,  (0x8444C4-0x811004)/4);



also helpful is the 'devenv iso' downloadable from http://sourceforge.net/projects/plabs, it contains source code for an older version of the baseband code running on the omap baseband cpu.

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit