Top Banner
Apple iPhone SDK Programming Marius van Oers © 2008 McAfee, Inc. McAfee Avert
25

Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

May 30, 2019

Download

Documents

dangphuc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

Apple iPhone SDK Programming

Marius van Oers

© 2008 McAfee, Inc.

McAfee Avert

Page 2: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

2

• Initially no regular SDKS f i b b d W b 2 0 li ti Aj• Safari browser based Web 2.0 applications – Ajax

I t biliti i th bil b i l t ti• Instabilities in the mobile browser implementations, content attack exploits might be seen

L h f l• Less chance for malware• Harder to patch

N l l l k l h ki f AV/Fi ll• No low level kernel hooking for AV/Firewall

10/9/2008

Page 3: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

3

ZiPhone

10/9/2008

Page 4: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

4

10/9/2008

Page 5: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

5

Using “Jailbreak” like tools

• Possible to make a “disk” connection to the iPhone and h t fil t th tsee what files are onto the system.

• Change some background image or ringtone sounds but it was also possible to see and modify software on the iPhoneiPhone.

• Security risk: trusting the crack program !• Security risk: trusting the crack program !

10/9/2008

Page 6: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

6

Installing third party native applications

10/9/2008

Page 7: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

7

Third party native applications

10/9/2008

Page 8: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

8

iPhone SDK

• Early in 2008 beta versions of the SDK

• Native applications for the iPhone can now be build using the latest Xcode development environment.

10/9/2008

Page 9: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

9

Xcode

10/9/2008

Page 10: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

10

iPhone OS – New Xcode Project

10/9/2008

Page 11: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

11

Hello World

10/9/2008

Page 12: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

12

Device or Simulator

10/9/2008

Page 13: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

13

iPhone Simulator

10/9/2008

Page 14: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

14

Output Binary

C:\vb\conference\vb2008 ottawa\deC:\vb\conference\vb2008_ottawa\demo code\001\hello world\build\Debug-iphonesimulator\HelloWorld app\iphonesimulator\HelloWorld.app\HelloWorld (24.208 bytes)

10/9/2008

Page 15: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

15

AddressBook

• The Addressbook not only keeps records of a contact’s name and address information, its framework can be called by SMS and E-Mail and also by custom third party applications.

• http://developer.apple.com/iphone/program/

10/9/2008

Page 16: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

16

AddressBook access

• Possible to have direct access to the addressbook, so ith t h i d t b ild i t i t t ith thwithout having a need to build a gui to interact with the

user.

• It is possible to read but also write directly to addressbook records: Add/Replace/Removerecords: Add/Replace/Remove

• Very powerful functionality and could in theory open• Very powerful functionality and could – in theory – open the door for direct actions performed by adware/malware

10/9/2008

Page 17: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

17

AddressBook - Personal Information Properties

• const ABPropertyID kABPersonFirstNameProperty;• const ABPropertyID kABPersonLastNameProperty;• const ABPropertyID kABPersonMiddleNameProperty;• const ABPropertyID kABPersonMiddleNameProperty;• const ABPropertyID kABPersonPrefixProperty;• const ABPropertyID kABPersonSuffixProperty;• const ABPropertyID kABPersonNicknameProperty;• const ABPropertyID kABPersonFirstNamePhoneticProperty;• const ABPropertyID kABPersonLastNamePhoneticProperty;• const ABPropertyID kABPersonMiddleNamePhoneticProperty;• const ABPropertyID kABPersonOrganizationProperty;• const ABPropertyID kABPersonOrganizationProperty;• const ABPropertyID kABPersonJobTitleProperty;• const ABPropertyID kABPersonDepartmentProperty;• const ABPropertyID kABPersonEmailProperty;• const ABPropertyID kABPersonBirthdayProperty;• const ABPropertyID kABPersonNoteProperty;• const ABPropertyID kABPersonCreationDateProperty;• const ABPropertyID kABPersonModificationDateProperty;• const ABPropertyID kABPersonModificationDateProperty;

10/9/2008

Page 18: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

18

AddressBook - Getting Personal Information

10/9/2008

Page 19: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

19

AddressBook - Phone Number Property

• const ABPropertyID kABPersonPhoneProperty;• const CFStringRef kABPersonPhoneMobileLabel;• const CFStringRef kABPersonPhoneMainLabel;• const CFStringRef kABPersonPhoneHomeFAXLabel;

t CFSt i R f kABP Ph W kFAXL b l• const CFStringRef kABPersonPhoneWorkFAXLabel;• const CFStringRef kABPersonPhonePagerLabel;

• ABMultiValueAddValueAndLabel(multi, @"123-456-1000",kABPersonPhoneMobileLabel)

• ABMultiValueAddValueAndLabel(multi, @"123-456-1001",kABP Ph M i L b l)kABPersonPhoneMainLabel)

10/9/2008

Page 20: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

20

AddressBook - Instant Message Property

• const ABPropertyID kABPersonInstantMessageProperty;t CFSt i R f kABP I t tM S i K• const CFStringRef kABPersonInstantMessageServiceKey;

• const CFStringRef kABPersonInstantMessageServiceYahoo;• const CFStringRef kABPersonInstantMessageServiceJabber;const CFStringRef kABPersonInstantMessageServiceJabber;• const CFStringRef kABPersonInstantMessageServiceMSN;• const CFStringRef kABPersonInstantMessageServiceICQ;• const CFStringRef kABPersonInstantMessageServiceAIM;• const CFStringRef kABPersonInstantMessageUsernameKey;

10/9/2008

Page 21: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

21

AddressBook - URL Property

• const ABPropertyID kABPersonURLProperty;

• const CFStringRef kABPersonHomePageLabel;

10/9/2008

Page 22: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

22

Problems

• Build\Debug-iphoneos\ .app ,didn’t execute on “ t ” t t d thi hit t“computer”, not supported on this architecture

• API’s might not be equal OSX “computers” vs iPhone devices

10/9/2008

Page 23: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

23

iTunes App Store

10/9/2008

Page 24: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

24

Conclusion

Thi d t li ti di tl th Add b k•Third party applications can directly access the Addressbook

•Create or Change the contact information

•Retrieving E-mail addresses & Telephone numbers i ht b b dmight be abused

10/9/2008

Page 25: Apple iPhone SDK Programming · Apple iPhone SDK Programming ... \vb\conference\vb2008 ottawavb2008_ottawa\de mo code\001\hello world\build\Debug- ... AddressBook access

25

Th k f tt ti !Thanks for attention !

Q ti ?Questions?E-mail: [email protected]

10/9/2008