SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
Introduction   GSM background             Passive Listening           Work In Progress   Conclusion




                        Abusing Calypso phones

                                    Sylvain Munaut



                           PHDays, May 30/31, 2012




                                Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion



About the speaker



               Linux and free software ”geek” since 1999
               M.Sc. in C.S. + some E.E.
               General orientation towards low level
                   Embedded, Kernel, Drivers and such.
                   Hardware (Digital stuff, FPGA, RF, ...)
               Interest in GSM projects for about 3 years
                   OpenBTS, OpenBSC, Airprobe, Osmocom-BB, ...
                   27C3 GSM Intercept demo
                   Mostly in my spare time




                                      Sylvain Munaut      Abusing Calypso phones
Introduction          GSM background             Passive Listening           Work In Progress   Conclusion



Outline


        1      Introduction

        2      GSM background

        3      Passive Listening

        4      Work In Progress

        5      Conclusion




                                       Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion



Motivation


       Modify a phone to make it do what we want rather than what it
       was designed to.

       Why ?
               Gain access to lower layers of the communication stack
                   Other projects paved the way for GSM (OpenBTS, OpenBSC,
                   Osmocom-BB, ...)
                   However they don’t all allow to go down to L1 and some
                   depend on expensive hardware
               Create the tool allowing security research
               Just for fun: Usefulness is overrated anyway



                                      Sylvain Munaut      Abusing Calypso phones
Introduction       GSM background             Passive Listening           Work In Progress   Conclusion



Today’s target



   Target hardware: Motorola C123
           Supported by Osmocom-BB
           Classic TI Calypso design
               Lots of alternative platforms if needed
               Some leaked sources and documentation
               available
           Cheap (20 EUR new, down to 1 EUR on ebay)
           Readily available




                                    Sylvain Munaut      Abusing Calypso phones
Introduction   GSM background             Passive Listening           Work In Progress   Conclusion




                    GSM background




                                Sylvain Munaut      Abusing Calypso phones
Introduction       GSM background             Passive Listening           Work In Progress   Conclusion


GSM
Network overview




               We’ll be focusing on the GSM Air Interface: Um.
                                    Sylvain Munaut      Abusing Calypso phones
Introduction        GSM background             Passive Listening           Work In Progress   Conclusion


GSM Um: Layer 1
Frequencies




               Several bands
                   GSM-850, EGSM-900, DCS1800, PCS1900, ...
                   http://en.wikipedia.org/wiki/GSM_frequency_bands
               Each band has two frequency range (FDD)
                   Downlink, from Network to MS (e.g. DCS1800: 1710.2 to
                   1784.8 MHz)
                   Uplink, from MS to Network (e.g. DCS1800: 1805.2 to 1879.8
                   MHz)
               ARFCN = Absolute Radio-Frequency Channel Number
                   maps to a given frequency pair (UL/DL)
                   200 kHz spacing




                                     Sylvain Munaut      Abusing Calypso phones
Introduction        GSM background             Passive Listening           Work In Progress   Conclusion


GSM Um: Layer 1
TDMA

               Fully synchronous
               Described as a TDMA nightmare




               Each frame in multi-frame has a specific purpose



               1 frame = 8 timeslots (bursts)
               Physical channel = 1 timeslot on 1 ARFCN
                                     Sylvain Munaut      Abusing Calypso phones
Introduction     GSM background             Passive Listening           Work In Progress   Conclusion


GSM Um: Layer 1
Bursts

       4 types of bursts :
            Normal burst: Used to carry ”real” data traffic.
            Frequency correction burst: (FCCH) Allow MS to sync its
            clock and coarse TDMA
            Synchronization burst: (SCH) Allow MS to preicsely sync to
            TDMA
            Access burst: (RACH) Used by the MS to request a dedicated
            channel




                                  Sylvain Munaut      Abusing Calypso phones
Introduction   GSM background             Passive Listening           Work In Progress   Conclusion




                     Passive Listening




                                Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion



A bit of history


       Osmocom-BB is an Free Software GSM Baseband implementation.

               Early timeline (2010):
                   Early February: Osmocom-BB is initiated
                   Late February: Osmocom-BB is announced publicly
                         BCCH reception mostly
                   March-July: Progressive work to get TX, SDCCH, LUR, ...
                   August: First phone call
               Already a big advance
                   Full L2 & L3 control on the MS side
               But I wanted more ;)



                                      Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion



Goal



               Turn a phone into a passive listener
                   Raw bursts data
                   Uplink and Downlink
                   Frequency Hopping
               Timeline
                   Work started almost directly after Osmocom-BB was initiated
                   First prototype in Q3 2010
                          Shown at Deepsec 2010 & 27C3




                                      Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion



Typical RX path




               Antenna: not an issue, can be replaced if needed
               RX filter: not an issue for lab tests, can be removed if needed
               RF mixer: tests shows it works just fine tuning at UL/DL
               Analog baseband: not an issue
               DSP core: ROM based and limited. Need a solution.
               ARM core: firmware under our control thanks to osmocom-bb
               Host interface: serial can be made fast enough
                                      Sylvain Munaut      Abusing Calypso phones
Introduction        GSM background             Passive Listening           Work In Progress   Conclusion


DSP
The problem




               ROM based firmware
                   But supports executing code from RAM
                   Official firmwares load ’patches’ somehow (fix bugs, ...)
               The ARM schedules ”tasks” to be executed by the DSP
               No existing tasks does what we want
                   DSP converts from L2 packets to L1 bursts internally
               Need to patch it
                   Dump ROM
                   Analyze it and figure how patching works
                   Write custom ”tasks” to do what we want




                                     Sylvain Munaut      Abusing Calypso phones
Introduction        GSM background             Passive Listening           Work In Progress   Conclusion


DSP
Dumping (1)


               Architecture
                   Distinct program, data & IO address space
                        Different instructions to access them
                        Some zones mapped in both program and data space
                   Communicates with the ARM by shared memory zone
                        Called API RAM
                        Mapped in both program and data address space
               ROM Bootloader
                   Leaked TSM30 sources hinted at ROM bootloader
                   TI documention for similar DSP provided the details
                   Allows to download custom code/data and jump to it
               Reading ROM
                   Upload custom stub to copy chunk of ROM to API RAM
                   But it didn’t work ... only read 0xffff
                   Security feature: code executing from RAM can’t read ROM

                                     Sylvain Munaut      Abusing Calypso phones
Introduction          GSM background             Passive Listening           Work In Progress   Conclusion


DSP
Dumping (2)

       If we can’t read the ROM from code executing from RAM, we’ll
       have to read it from code executing from ROM ...
               There has to be a memcpy equivalent somewhere
                     Look at known DSP code for this architecture
                     Often inlined, so only part will be usable
               Looking for:
                     mvdd *AR?, *AR? for data space
                     reada *AR? for program space
               Bruteforce it
                 1   Use bootloader to launch stub
                 2   Setup registers with a ’guess’
                 3   Jump to a location
                 4   Halt the DSP from the ARM a bit later
                 5   Check for result in API RAM
                 6   Retry ...
                                       Sylvain Munaut      Abusing Calypso phones
Introduction     GSM background             Passive Listening           Work In Progress   Conclusion


DSP
Dumping (3)




       Program space




       Data space



       The ret instructions are added bonuses



                                  Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion


DSP
Analyzing (1)



               CPU supported by IDA Pro Advanced
                    Added support for IO port definitions and memory mappings
                    Now in mainline
               Entry point is known
               Mix of C and hand-crafted assembly
                    No clear conventions
               Lots of indirect calls
                    Using function pointers in RAM copied from ROM at startup
                         We can replace those by our own !
                         This is how to add custom tasks, extend the DSP, ...
                    Screws a bit with IDA autoanalysis
                    Several different tables and call mechanisms


                                      Sylvain Munaut      Abusing Calypso phones
Introduction        GSM background             Passive Listening           Work In Progress   Conclusion


DSP
Analyzing (2)




       Use interrupts and IO access to trace important functions

               Frame interrupt: Tasks
               DMA interrupt: IQ samples buffer and demodulation
               A5 unit IO: Cipher setup
               DMA unit IO: Burst RX setup
               RIF unit IO: Burst TX buffer

       And finally write custom task to do what we want ...




                                     Sylvain Munaut      Abusing Calypso phones
Introduction   GSM background             Passive Listening           Work In Progress   Conclusion




                    Work In Progress




                                Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion


Phone as a BTS
Goal



               Attempt to convert a phone into a working BTS
                   Not full featured, not compliant with specs, ...
                   Provide minimal service
               Motivation
                   Another cheap tool for GSM research
                   Fuzz cell phones
                   Portable fake BTS
                   Just prove it’s doable
               First post on the mailing list about this about 2 years ago
                   Only the base idea, not real work done
                   First very rough work at CCCamp 11
                   Idea popped up again at OsmoDevCon 2012



                                      Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion


Phone as a BTS
Differences between MS & BTS




       What does a BTS do that a phone doesn’t ?

               Layer 1:
                   Uplink / Downlink frequencies
                   Simultaneous RX & TX
                          Continuous C0 beacon to allow phone to ’find’ the cell
                          MS usually TX 3 timeslots after RX
                   Transmit FCCH / SCH
                   Receive RACH
                   Clock master
               Layer 2 & 3: Role swapped




                                      Sylvain Munaut      Abusing Calypso phones
Introduction   GSM background             Passive Listening           Work In Progress   Conclusion


Phone as a BTS
Typical TX & RX path




                                Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion


Phone as a BTS
Proof of concept



               DSP patch
                   FCCH, SCH, NB & Dummy TX
                   Multi slot TX
                   RACH detection (detect with power and send IQ samples to
                   host)
               Use OpenBTS
                   Already split between main OpenBTS and actual radio
                   interface
                   Replace the transceiver
               Attempt half duplex operation
                   Timeslot layout: Tt R ttt
               Use commercial cell as timing reference


                                      Sylvain Munaut      Abusing Calypso phones
Introduction    GSM background             Passive Listening           Work In Progress   Conclusion


Phone as a BTS
Spectrum view


       Multiframe




       Zoom




                                 Sylvain Munaut      Abusing Calypso phones
Introduction         GSM background             Passive Listening           Work In Progress   Conclusion


Phone as a BTS
Demonstration




       Hopefully, it’ll work ...

       Keep in mind :
               Just a proof of concept
               Long time to go to clean up and make it usable and reliable




                                      Sylvain Munaut      Abusing Calypso phones
Introduction        GSM background             Passive Listening           Work In Progress   Conclusion



Thanks


       Thanks to anyone contributing to the various Open Source GSM /
       GSM security projects. Most notably here :
               Harald ”LaF0rge” Welte
               Dieter Spaar
               David Burgess and his team at KestrelSP
               Andreas ”jolly” Eversberg
               Steve ”steve-m” Markgraf
       And of course, thanks to the PHDays team for having me here.




                                     Sylvain Munaut      Abusing Calypso phones
Introduction        GSM background             Passive Listening           Work In Progress   Conclusion



Further reading




               Airprobe http://airprobe.org/
       OsmocomBB http://bb.osmocom.org/
           OpenBSC http://openbsc.osmocom.org/
           OpenBTS http://openbts.sourceforge.net/
        GSM Specs http://webapp.etsi.org/key/queryform.asp




                                     Sylvain Munaut      Abusing Calypso phones

Weitere ähnliche Inhalte

Was ist angesagt?

240243228 huawei-bts-3900-training
240243228 huawei-bts-3900-training240243228 huawei-bts-3900-training
240243228 huawei-bts-3900-training
Shelton Siziba
 
140556299 huawei-node b-data-configuration
140556299 huawei-node b-data-configuration140556299 huawei-node b-data-configuration
140556299 huawei-node b-data-configuration
Shelton Siziba
 
Opti x rtn 910950980 hardware description wind
Opti x rtn 910950980 hardware description windOpti x rtn 910950980 hardware description wind
Opti x rtn 910950980 hardware description wind
nctgayaranga
 
Huaweiumtsnodebconfigurationprinciple 161222082051
Huaweiumtsnodebconfigurationprinciple 161222082051Huaweiumtsnodebconfigurationprinciple 161222082051
Huaweiumtsnodebconfigurationprinciple 161222082051
moussaCoulibaly22
 
IOT in 5G Training and Certification by TELCOMA Global
IOT in 5G Training and Certification by TELCOMA GlobalIOT in 5G Training and Certification by TELCOMA Global
IOT in 5G Training and Certification by TELCOMA Global
Gaganpreet Singh Walia
 

Was ist angesagt? (20)

01 owa200001 3 g overview
01 owa200001 3 g overview01 owa200001 3 g overview
01 owa200001 3 g overview
 
OFDM
OFDMOFDM
OFDM
 
01 tdm voice introduction
01 tdm voice introduction01 tdm voice introduction
01 tdm voice introduction
 
240243228 huawei-bts-3900-training
240243228 huawei-bts-3900-training240243228 huawei-bts-3900-training
240243228 huawei-bts-3900-training
 
3 g signaling_trace_and_analysis
3 g signaling_trace_and_analysis3 g signaling_trace_and_analysis
3 g signaling_trace_and_analysis
 
Huawei GSM Principles
Huawei GSM PrinciplesHuawei GSM Principles
Huawei GSM Principles
 
ALU 7360 5520_gpon_basic_configuration
ALU  7360 5520_gpon_basic_configurationALU  7360 5520_gpon_basic_configuration
ALU 7360 5520_gpon_basic_configuration
 
Accelerating MIPI Interface Development and Validation - Introspect Technology
Accelerating MIPI Interface Development and Validation - Introspect TechnologyAccelerating MIPI Interface Development and Validation - Introspect Technology
Accelerating MIPI Interface Development and Validation - Introspect Technology
 
SDH/SONET alarms & performance monitoring
SDH/SONET alarms & performance monitoringSDH/SONET alarms & performance monitoring
SDH/SONET alarms & performance monitoring
 
140556299 huawei-node b-data-configuration
140556299 huawei-node b-data-configuration140556299 huawei-node b-data-configuration
140556299 huawei-node b-data-configuration
 
1. oeb006910 e nodeb lte v100r008c10 product description issue 1.00
1. oeb006910 e nodeb lte v100r008c10 product description issue 1.001. oeb006910 e nodeb lte v100r008c10 product description issue 1.00
1. oeb006910 e nodeb lte v100r008c10 product description issue 1.00
 
Project Presentation Midyear
Project Presentation MidyearProject Presentation Midyear
Project Presentation Midyear
 
Huawei White Spaces E & V Band Technology
Huawei White Spaces E & V Band TechnologyHuawei White Spaces E & V Band Technology
Huawei White Spaces E & V Band Technology
 
lteLte
lteLtelteLte
lteLte
 
Opti x rtn 910950980 hardware description wind
Opti x rtn 910950980 hardware description windOpti x rtn 910950980 hardware description wind
Opti x rtn 910950980 hardware description wind
 
Codan 8800 Presentation Overview
Codan 8800 Presentation OverviewCodan 8800 Presentation Overview
Codan 8800 Presentation Overview
 
Huaweiumtsnodebconfigurationprinciple 161222082051
Huaweiumtsnodebconfigurationprinciple 161222082051Huaweiumtsnodebconfigurationprinciple 161222082051
Huaweiumtsnodebconfigurationprinciple 161222082051
 
SDH Principle - Huawei
SDH Principle - HuaweiSDH Principle - Huawei
SDH Principle - Huawei
 
IOT in 5G Training and Certification by TELCOMA Global
IOT in 5G Training and Certification by TELCOMA GlobalIOT in 5G Training and Certification by TELCOMA Global
IOT in 5G Training and Certification by TELCOMA Global
 
Huawei GPON Fundamentals
Huawei GPON FundamentalsHuawei GPON Fundamentals
Huawei GPON Fundamentals
 

Andere mochten auch

Александр Чемерис - Открытая реализация GSM
Александр Чемерис - Открытая реализация GSMАлександр Чемерис - Открытая реализация GSM
Александр Чемерис - Открытая реализация GSM
Oksana Kurysheva
 
Mobile Network Attack Evolution
Mobile Network Attack EvolutionMobile Network Attack Evolution
Mobile Network Attack Evolution
Positive Hack Days
 

Andere mochten auch (8)

Александр Чемерис - Открытая реализация GSM
Александр Чемерис - Открытая реализация GSMАлександр Чемерис - Открытая реализация GSM
Александр Чемерис - Открытая реализация GSM
 
Android.глазами хакера
Android.глазами хакераAndroid.глазами хакера
Android.глазами хакера
 
Mobile Network Attack Evolution
Mobile Network Attack EvolutionMobile Network Attack Evolution
Mobile Network Attack Evolution
 
Estandard de comunicaciones LTE (Long term evolution)
Estandard de comunicaciones LTE (Long term evolution)Estandard de comunicaciones LTE (Long term evolution)
Estandard de comunicaciones LTE (Long term evolution)
 
29c3 OpenBTS workshop - Hardware and sotware
29c3 OpenBTS workshop - Hardware and sotware29c3 OpenBTS workshop - Hardware and sotware
29c3 OpenBTS workshop - Hardware and sotware
 
Mobile Network Security: a tale of tracking, spoofing and owning mobile phone...
Mobile Network Security: a tale of tracking, spoofing and owning mobile phone...Mobile Network Security: a tale of tracking, spoofing and owning mobile phone...
Mobile Network Security: a tale of tracking, spoofing and owning mobile phone...
 
4G-LTE
4G-LTE4G-LTE
4G-LTE
 
Перехват беспроводных гаджетов — от квадрокоптеров до мышек
Перехват беспроводных гаджетов — от квадрокоптеров до мышекПерехват беспроводных гаджетов — от квадрокоптеров до мышек
Перехват беспроводных гаджетов — от квадрокоптеров до мышек
 

Ähnlich wie Abusing Calypso Phones

Open bts guide_en_v0.1
Open bts guide_en_v0.1Open bts guide_en_v0.1
Open bts guide_en_v0.1
Aziz Alaoui
 
Open bts guide_en_v0.1 (2)
Open bts guide_en_v0.1 (2)Open bts guide_en_v0.1 (2)
Open bts guide_en_v0.1 (2)
Mamoud Kamara
 
Exploring LTE security and protocol exploits with open source software and lo...
Exploring LTE security and protocol exploits with open source software and lo...Exploring LTE security and protocol exploits with open source software and lo...
Exploring LTE security and protocol exploits with open source software and lo...
EC-Council
 
Dean Bubley's Presentation at Emerging Communication Conference & Awards 2009...
Dean Bubley's Presentation at Emerging Communication Conference & Awards 2009...Dean Bubley's Presentation at Emerging Communication Conference & Awards 2009...
Dean Bubley's Presentation at Emerging Communication Conference & Awards 2009...
eCommConf
 
Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...
Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...
Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...
DefconRussia
 
Mobile Communications Sajay K R
Mobile Communications Sajay K RMobile Communications Sajay K R
Mobile Communications Sajay K R
PlusOrMinusZero
 
Introduction to gsm
Introduction to gsmIntroduction to gsm
Introduction to gsm
sivakumar D
 

Ähnlich wie Abusing Calypso Phones (20)

GSM - have we overslept the last wake-up call?
GSM - have we overslept the last wake-up call?GSM - have we overslept the last wake-up call?
GSM - have we overslept the last wake-up call?
 
Intro to Packet Radio - April 2022
Intro to Packet Radio - April 2022Intro to Packet Radio - April 2022
Intro to Packet Radio - April 2022
 
BLOSMM Technology Overview
BLOSMM Technology OverviewBLOSMM Technology Overview
BLOSMM Technology Overview
 
Nanoxx
NanoxxNanoxx
Nanoxx
 
Open bts guide_en_v0.1
Open bts guide_en_v0.1Open bts guide_en_v0.1
Open bts guide_en_v0.1
 
Open bts guide_en_v0.1 (2)
Open bts guide_en_v0.1 (2)Open bts guide_en_v0.1 (2)
Open bts guide_en_v0.1 (2)
 
Past, Present, and Future of Fiber-To-The-Home Solutions
Past, Present, and Future of Fiber-To-The-Home SolutionsPast, Present, and Future of Fiber-To-The-Home Solutions
Past, Present, and Future of Fiber-To-The-Home Solutions
 
Exploring LTE security and protocol exploits with open source software and lo...
Exploring LTE security and protocol exploits with open source software and lo...Exploring LTE security and protocol exploits with open source software and lo...
Exploring LTE security and protocol exploits with open source software and lo...
 
Dean Bubley's Presentation at Emerging Communication Conference & Awards 2009...
Dean Bubley's Presentation at Emerging Communication Conference & Awards 2009...Dean Bubley's Presentation at Emerging Communication Conference & Awards 2009...
Dean Bubley's Presentation at Emerging Communication Conference & Awards 2009...
 
Telecom security from ss7 to all ip all-open-v3-zeronights
Telecom security from ss7 to all ip all-open-v3-zeronightsTelecom security from ss7 to all ip all-open-v3-zeronights
Telecom security from ss7 to all ip all-open-v3-zeronights
 
Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...
Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...
Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...
 
Introduction To Cellular And Wireless Networks
Introduction To Cellular And Wireless NetworksIntroduction To Cellular And Wireless Networks
Introduction To Cellular And Wireless Networks
 
Mobile Communications Sajay K R
Mobile Communications Sajay K RMobile Communications Sajay K R
Mobile Communications Sajay K R
 
CRC MMB Projects and Tools
CRC MMB Projects and ToolsCRC MMB Projects and Tools
CRC MMB Projects and Tools
 
ClubHack Magazine – December 2011
ClubHack Magazine – December 2011ClubHack Magazine – December 2011
ClubHack Magazine – December 2011
 
Telecommunications Concentration
Telecommunications ConcentrationTelecommunications Concentration
Telecommunications Concentration
 
Abcom Enigma
Abcom EnigmaAbcom Enigma
Abcom Enigma
 
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
 
Introduction to gsm
Introduction to gsmIntroduction to gsm
Introduction to gsm
 
Intro to gsm
Intro to gsmIntro to gsm
Intro to gsm
 

Mehr von Positive Hack Days

Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
Positive Hack Days
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
Positive Hack Days
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Positive Hack Days
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
Positive Hack Days
 

Mehr von Positive Hack Days (20)

Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesИнструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerКак мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows Docker
 
Типовая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesТиповая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive Technologies
 
Аналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikАналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + Qlik
 
Использование анализатора кода SonarQube
Использование анализатора кода SonarQubeИспользование анализатора кода SonarQube
Использование анализатора кода SonarQube
 
Развитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityРазвитие сообщества Open DevOps Community
Развитие сообщества Open DevOps Community
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
 
Автоматизация построения правил для Approof
Автоматизация построения правил для ApproofАвтоматизация построения правил для Approof
Автоматизация построения правил для Approof
 
Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
 
Формальные методы защиты приложений
Формальные методы защиты приложенийФормальные методы защиты приложений
Формальные методы защиты приложений
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
 
Теоретические основы Application Security
Теоретические основы Application SecurityТеоретические основы Application Security
Теоретические основы Application Security
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летОт экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 лет
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
 
Требования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОТребования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПО
 
Формальная верификация кода на языке Си
Формальная верификация кода на языке СиФормальная верификация кода на языке Си
Формальная верификация кода на языке Си
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
 
SOC для КИИ: израильский опыт
SOC для КИИ: израильский опытSOC для КИИ: израильский опыт
SOC для КИИ: израильский опыт
 
Honeywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterHoneywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services Center
 
Credential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиCredential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атаки
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Abusing Calypso Phones

  • 1. Introduction GSM background Passive Listening Work In Progress Conclusion Abusing Calypso phones Sylvain Munaut PHDays, May 30/31, 2012 Sylvain Munaut Abusing Calypso phones
  • 2. Introduction GSM background Passive Listening Work In Progress Conclusion About the speaker Linux and free software ”geek” since 1999 M.Sc. in C.S. + some E.E. General orientation towards low level Embedded, Kernel, Drivers and such. Hardware (Digital stuff, FPGA, RF, ...) Interest in GSM projects for about 3 years OpenBTS, OpenBSC, Airprobe, Osmocom-BB, ... 27C3 GSM Intercept demo Mostly in my spare time Sylvain Munaut Abusing Calypso phones
  • 3. Introduction GSM background Passive Listening Work In Progress Conclusion Outline 1 Introduction 2 GSM background 3 Passive Listening 4 Work In Progress 5 Conclusion Sylvain Munaut Abusing Calypso phones
  • 4. Introduction GSM background Passive Listening Work In Progress Conclusion Motivation Modify a phone to make it do what we want rather than what it was designed to. Why ? Gain access to lower layers of the communication stack Other projects paved the way for GSM (OpenBTS, OpenBSC, Osmocom-BB, ...) However they don’t all allow to go down to L1 and some depend on expensive hardware Create the tool allowing security research Just for fun: Usefulness is overrated anyway Sylvain Munaut Abusing Calypso phones
  • 5. Introduction GSM background Passive Listening Work In Progress Conclusion Today’s target Target hardware: Motorola C123 Supported by Osmocom-BB Classic TI Calypso design Lots of alternative platforms if needed Some leaked sources and documentation available Cheap (20 EUR new, down to 1 EUR on ebay) Readily available Sylvain Munaut Abusing Calypso phones
  • 6. Introduction GSM background Passive Listening Work In Progress Conclusion GSM background Sylvain Munaut Abusing Calypso phones
  • 7. Introduction GSM background Passive Listening Work In Progress Conclusion GSM Network overview We’ll be focusing on the GSM Air Interface: Um. Sylvain Munaut Abusing Calypso phones
  • 8. Introduction GSM background Passive Listening Work In Progress Conclusion GSM Um: Layer 1 Frequencies Several bands GSM-850, EGSM-900, DCS1800, PCS1900, ... http://en.wikipedia.org/wiki/GSM_frequency_bands Each band has two frequency range (FDD) Downlink, from Network to MS (e.g. DCS1800: 1710.2 to 1784.8 MHz) Uplink, from MS to Network (e.g. DCS1800: 1805.2 to 1879.8 MHz) ARFCN = Absolute Radio-Frequency Channel Number maps to a given frequency pair (UL/DL) 200 kHz spacing Sylvain Munaut Abusing Calypso phones
  • 9. Introduction GSM background Passive Listening Work In Progress Conclusion GSM Um: Layer 1 TDMA Fully synchronous Described as a TDMA nightmare Each frame in multi-frame has a specific purpose 1 frame = 8 timeslots (bursts) Physical channel = 1 timeslot on 1 ARFCN Sylvain Munaut Abusing Calypso phones
  • 10. Introduction GSM background Passive Listening Work In Progress Conclusion GSM Um: Layer 1 Bursts 4 types of bursts : Normal burst: Used to carry ”real” data traffic. Frequency correction burst: (FCCH) Allow MS to sync its clock and coarse TDMA Synchronization burst: (SCH) Allow MS to preicsely sync to TDMA Access burst: (RACH) Used by the MS to request a dedicated channel Sylvain Munaut Abusing Calypso phones
  • 11. Introduction GSM background Passive Listening Work In Progress Conclusion Passive Listening Sylvain Munaut Abusing Calypso phones
  • 12. Introduction GSM background Passive Listening Work In Progress Conclusion A bit of history Osmocom-BB is an Free Software GSM Baseband implementation. Early timeline (2010): Early February: Osmocom-BB is initiated Late February: Osmocom-BB is announced publicly BCCH reception mostly March-July: Progressive work to get TX, SDCCH, LUR, ... August: First phone call Already a big advance Full L2 & L3 control on the MS side But I wanted more ;) Sylvain Munaut Abusing Calypso phones
  • 13. Introduction GSM background Passive Listening Work In Progress Conclusion Goal Turn a phone into a passive listener Raw bursts data Uplink and Downlink Frequency Hopping Timeline Work started almost directly after Osmocom-BB was initiated First prototype in Q3 2010 Shown at Deepsec 2010 & 27C3 Sylvain Munaut Abusing Calypso phones
  • 14. Introduction GSM background Passive Listening Work In Progress Conclusion Typical RX path Antenna: not an issue, can be replaced if needed RX filter: not an issue for lab tests, can be removed if needed RF mixer: tests shows it works just fine tuning at UL/DL Analog baseband: not an issue DSP core: ROM based and limited. Need a solution. ARM core: firmware under our control thanks to osmocom-bb Host interface: serial can be made fast enough Sylvain Munaut Abusing Calypso phones
  • 15. Introduction GSM background Passive Listening Work In Progress Conclusion DSP The problem ROM based firmware But supports executing code from RAM Official firmwares load ’patches’ somehow (fix bugs, ...) The ARM schedules ”tasks” to be executed by the DSP No existing tasks does what we want DSP converts from L2 packets to L1 bursts internally Need to patch it Dump ROM Analyze it and figure how patching works Write custom ”tasks” to do what we want Sylvain Munaut Abusing Calypso phones
  • 16. Introduction GSM background Passive Listening Work In Progress Conclusion DSP Dumping (1) Architecture Distinct program, data & IO address space Different instructions to access them Some zones mapped in both program and data space Communicates with the ARM by shared memory zone Called API RAM Mapped in both program and data address space ROM Bootloader Leaked TSM30 sources hinted at ROM bootloader TI documention for similar DSP provided the details Allows to download custom code/data and jump to it Reading ROM Upload custom stub to copy chunk of ROM to API RAM But it didn’t work ... only read 0xffff Security feature: code executing from RAM can’t read ROM Sylvain Munaut Abusing Calypso phones
  • 17. Introduction GSM background Passive Listening Work In Progress Conclusion DSP Dumping (2) If we can’t read the ROM from code executing from RAM, we’ll have to read it from code executing from ROM ... There has to be a memcpy equivalent somewhere Look at known DSP code for this architecture Often inlined, so only part will be usable Looking for: mvdd *AR?, *AR? for data space reada *AR? for program space Bruteforce it 1 Use bootloader to launch stub 2 Setup registers with a ’guess’ 3 Jump to a location 4 Halt the DSP from the ARM a bit later 5 Check for result in API RAM 6 Retry ... Sylvain Munaut Abusing Calypso phones
  • 18. Introduction GSM background Passive Listening Work In Progress Conclusion DSP Dumping (3) Program space Data space The ret instructions are added bonuses Sylvain Munaut Abusing Calypso phones
  • 19. Introduction GSM background Passive Listening Work In Progress Conclusion DSP Analyzing (1) CPU supported by IDA Pro Advanced Added support for IO port definitions and memory mappings Now in mainline Entry point is known Mix of C and hand-crafted assembly No clear conventions Lots of indirect calls Using function pointers in RAM copied from ROM at startup We can replace those by our own ! This is how to add custom tasks, extend the DSP, ... Screws a bit with IDA autoanalysis Several different tables and call mechanisms Sylvain Munaut Abusing Calypso phones
  • 20. Introduction GSM background Passive Listening Work In Progress Conclusion DSP Analyzing (2) Use interrupts and IO access to trace important functions Frame interrupt: Tasks DMA interrupt: IQ samples buffer and demodulation A5 unit IO: Cipher setup DMA unit IO: Burst RX setup RIF unit IO: Burst TX buffer And finally write custom task to do what we want ... Sylvain Munaut Abusing Calypso phones
  • 21. Introduction GSM background Passive Listening Work In Progress Conclusion Work In Progress Sylvain Munaut Abusing Calypso phones
  • 22. Introduction GSM background Passive Listening Work In Progress Conclusion Phone as a BTS Goal Attempt to convert a phone into a working BTS Not full featured, not compliant with specs, ... Provide minimal service Motivation Another cheap tool for GSM research Fuzz cell phones Portable fake BTS Just prove it’s doable First post on the mailing list about this about 2 years ago Only the base idea, not real work done First very rough work at CCCamp 11 Idea popped up again at OsmoDevCon 2012 Sylvain Munaut Abusing Calypso phones
  • 23. Introduction GSM background Passive Listening Work In Progress Conclusion Phone as a BTS Differences between MS & BTS What does a BTS do that a phone doesn’t ? Layer 1: Uplink / Downlink frequencies Simultaneous RX & TX Continuous C0 beacon to allow phone to ’find’ the cell MS usually TX 3 timeslots after RX Transmit FCCH / SCH Receive RACH Clock master Layer 2 & 3: Role swapped Sylvain Munaut Abusing Calypso phones
  • 24. Introduction GSM background Passive Listening Work In Progress Conclusion Phone as a BTS Typical TX & RX path Sylvain Munaut Abusing Calypso phones
  • 25. Introduction GSM background Passive Listening Work In Progress Conclusion Phone as a BTS Proof of concept DSP patch FCCH, SCH, NB & Dummy TX Multi slot TX RACH detection (detect with power and send IQ samples to host) Use OpenBTS Already split between main OpenBTS and actual radio interface Replace the transceiver Attempt half duplex operation Timeslot layout: Tt R ttt Use commercial cell as timing reference Sylvain Munaut Abusing Calypso phones
  • 26. Introduction GSM background Passive Listening Work In Progress Conclusion Phone as a BTS Spectrum view Multiframe Zoom Sylvain Munaut Abusing Calypso phones
  • 27. Introduction GSM background Passive Listening Work In Progress Conclusion Phone as a BTS Demonstration Hopefully, it’ll work ... Keep in mind : Just a proof of concept Long time to go to clean up and make it usable and reliable Sylvain Munaut Abusing Calypso phones
  • 28. Introduction GSM background Passive Listening Work In Progress Conclusion Thanks Thanks to anyone contributing to the various Open Source GSM / GSM security projects. Most notably here : Harald ”LaF0rge” Welte Dieter Spaar David Burgess and his team at KestrelSP Andreas ”jolly” Eversberg Steve ”steve-m” Markgraf And of course, thanks to the PHDays team for having me here. Sylvain Munaut Abusing Calypso phones
  • 29. Introduction GSM background Passive Listening Work In Progress Conclusion Further reading Airprobe http://airprobe.org/ OsmocomBB http://bb.osmocom.org/ OpenBSC http://openbsc.osmocom.org/ OpenBTS http://openbts.sourceforge.net/ GSM Specs http://webapp.etsi.org/key/queryform.asp Sylvain Munaut Abusing Calypso phones