Sikkerhed04, Aften - PowerPoint PPT Presentation

About This Presentation
Title:

Sikkerhed04, Aften

Description:

0004 ret adr foo. 5608 b. a. 5610 z. 9/21/09. Sikkerhed04, Aften. Trusler. 16. Stack. Addr Data ... 0004 ret adr foo. 5608 b. a. 5610 z. 5611 12. Stack. Addr ... – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 20
Provided by: daim
Category:
Tags: aften | ret | sikkerhed04

less

Transcript and Presenter's Notes

Title: Sikkerhed04, Aften


1
GSM
  • Global System for Mobile Communications, 1992
  • Security in mobile phones
  • System used all over the world

2
GSM Threat Model
  • What
  • Cloning
  • Eavesdropping
  • Tracking
  • Who
  • Criminals
  • Secret Services
  • Why
  • Break Confidentiality
  • Free phone calls
  • Reveal whereabouts
  • How
  • Break Crypto
  • Exploit bad design

3
GSM Security Policy
  • Security Objectives
  • Authentication
  • No tracking
  • Confidential Calls
  • Strategy
  • Crypto
  • SIM PIN codes

4
GSM-system
  • SIM
  • PIN
  • IMSI
  • Ki
  • Base station
  • HLR
  • VLR

5
GSM mechanismsauthentication
PIN
VLR
SIM (phone)
Comp128
SRESKc EKi(RAND)
IMSI
IMSI
RANDSRESKc
IMSI
RAND
SRES
RANDSRESKc
Base station
HLR
6
GSM mechanismsNo tracking
  • When SIM registers on network
  • TMSI temporary/anonymous IMSI
  • But IMSI must still be sent initially

7
GSM mechanismsConfidentiality
  • All conversation encrypted
  • Key Kc
  • Algoritme among others, A5 (was secret, like
    Comp128)

8
GSM attack1 on authentication
VLR
SIM (phone)
SRESKc EKi(RAND)
cleartext!
IMSI
IMSI
RANDSRESKc
IMSI
RAND
SRES
RANDSRESKc
Base station
HLR
9
GSM attack2 on authentication
  • Access to SIM
  • 150.000 well chosen challenges
  • Exploit weaknesses in Comp128
  • Find Ki

10
GSM attack/tracking
  • When SIM registers on network
  • TMSI temporary/anonymous IMSI
  • But IMSI sent initially
  • IMSI-catcher
  • Strong signal
  • Pretend not to understand forstå TMSI
  • SIM sends IMSI

11
GSM attack on Confidentiality
  • All conversation encrypted
  • Key Kc
  • Algorithm A5 and others(originally secret, like
    Comp128)
  • A5 and the way it is used has weaknesses
  • Attack can be done within minutes

12
GSM what can we learn?
  • Krypto the weakest link?!
  • Kerchhoffs principle (Comp128 og A5 secret)
  • Misunderstanding of architecture
  • Transmission of keys in cleartext ?
  • Was GSM security a succes or a failure?
  • for who?

13
Buffer overflows
  • Very popular securitybreach
  • Microsoft estimates internal expense of 100.000
    pr. patch
  • Problem caused by bad code and languages that do
    not protect against it
  • C, C
  • Change to Java, C, ,? Doest always help, many
    OSs are written in C

14
Stack overruns
Compiled program Addr Code 0001 main 0002 push
argv0 0003 goto foo 0004 pop 0005 goto
exit 0006 foo 0007 allocate buf 0008 push
buf 0009 push input 0010 goto strcpy 0011
return 0012 bar 0013 push Gotcha! 0014 goto
printf 0015 pop 0016 return
  • void foo(char input)
  • char buf3
  • strcpy(buf, input)
  • void bar(void)
  • printf(Gotcha!)
  • int main(int argc, char argv)
  • foo(argv1)
  • return 0

15
Program.exe baz
Addr Code 0001 main 0002 push argv0 0003
goto foo 0004 pop 0005 goto exit 0006
foo 0007 allocate buf 0008 push buf 0009 push
input 0010 goto strcpy 0011 return 0012
bar 0013 push Gotcha! 0014 goto printf 0015
pop 0016 return
  • Stack
  • Addr Data
  • 5601
  • 5602
  • 5607
  • 5608
  • 5610
  • Stack
  • Addr Data
  • 5601
  • 5602 5610
  • 5604
  • - buf
  • -
  • -
  • 0004 ret adr foo
  • 5608 b
  • a
  • 5610 z
  • Stack
  • Addr Data
  • 5601
  • 5602 5610
  • 5604
  • b buf
  • a
  • z
  • 0004 ret adr foo
  • 5608 b
  • a
  • 5610 z

16
Program.exe baz12
Addr Code 0001 main 0002 push argv0 0003
goto foo 0004 pop 0005 goto exit 0006
foo 0007 allocate buf 0008 push buf 0009 push
input 0010 goto strcpy 0011 return 0012
bar 0013 push Gotcha! 0014 goto printf 0015
pop 0016 return
  • Stack
  • Addr Data
  • 5601
  • 5602
  • 5607
  • 5608
  • 5610
  • 5611
  • Stack
  • Addr Data
  • 5601
  • 5602 5610
  • 5604
  • - buf
  • -
  • -
  • 0004 ret adr foo
  • 5608 b
  • a
  • 5610 z
  • 5611 12
  • Stack
  • Addr Data
  • 5601
  • 5602 5610
  • 5604
  • b buf
  • a
  • z
  • 0012 ret adr foo
  • 5608 b
  • a
  • 5610 z
  • 5611 12

17
What was wrong?
  • We copied into buf and did not check if we had
    room
  • Values outside were changedgt program behavior
    changed!

18
Solution?
  • Change Language )
  • Not (always) an option (
  • Write better code!!!
  • Education
  • Secure libraries

19
Buffer overflows morale
  • Attacks that directly target the Trusted
    Computing Base
  • Serious!
  • Undermines most security policies
  • Solution primarily to write robust code.
Write a Comment
User Comments (0)
About PowerShow.com