SlideShare a Scribd company logo
Android
By Collin Donaldson
With Strong Contributions From:
Anthony Kopczyk
Architecture
Activity Life Cycle
Activity Life Cycle - onCreate
• Set the Activity's content View; Event Listeners
• Find references to any needed Views
• Passed-in Bundle allows a programmer to restore
the Activity to its previous status
Activity Life Cycle - onStart
• Called when the Activity becomes visible
• Initialize any properties requiring information
from the Window and contained Views
Activity Life Cycle - onResume
• Called when the Activity is visible and in the
foreground
• Initialize ability for user to interact with the
Activity
Activity Life Cycle - onPause
• Called when the Activity is no longer the
foreground
• Release system resources
Activity Life Cycle - onStop
• Called when Activity is no longer visible
• Perform larger operations like writing to a database
• Save Activity's state for onStart
Activity Life Cycle - onDestroy
• Called when the system is in need of
resources
• Last chance to free resources and avoid
memory leaks
Activity Life Cycle
Views
• A building block for
UI components
• Responsible for
drawing and event
handling
• Each View has an id
• findViewById(int)
Text box, check box,
radio button, time
picker, and image
view
XML
• Eclipse IDE
• Uses XML files to
set up the mobile
application
Android Layout File
XML - Android Manifest
• Contains properties
of the application
• Permissions, SDK,
Icon, Activities
Android Manifest File
XML - Layout
• Defines the layout of
the Activity
• Set View id values
• Could achieve the
same results
through java code
Android Layout File
XML – Other Files
• Menu – Defines the
Menu to bring up
• Dimens – Defines
dimensions with names
and values
• Strings – Defines
strings with names and
values
• Lint – Defines exclusion
or customization of lint
checks
• Styles – Defines the
style to use in the
Activity
• Attrs – Defines custom
attributes that may be
used in XML Layout
files
Input Events
• OnClickListener
• OnLongClickListener
• OnFocusChangeListener
• OnKeyListener
• OnTouchListener
• OnCreateContextMenuListener
Input Events
Pre-Click Post-Click
Intents
• Starts an activity or
service
• Service – operates in
the background without
a UI
• Intents can be sent to
other Apps
• sendBroadcast()
• sendOrderedBroadcast(
)
• sendStickyBroadcast()
Intents – Explicit vs. Implicit
• Explicit Intents
specify a
component to start.
• Implicit Intents give
a general action to
perform.
Intents - Intent-Filter
• Specified in the Manifest
file
• Contains the types of
Intents the app wants to
receive
• Allows one app to send
an Intent to another
• If no intent filters are
specified the activity
may only be started with
an explicit Intent
• To ensure security,
always use explicit
intents when starting a
Service
• Users can not see when
a Service starts
Permission
• Allows developers
to use security
features
• Provides additional
capabilities to
consumers that
otherwise would be
impossible
“A central design point of
the Android security
architecture is that no
application, by default,
has permission to
perform any operations
that would adversely
impact other
applications, the
operating system, or the
user”
Permission
• When an
Application is
installed the
consumer must
accept the
permissions
requested by an
application
• Permissions are
defined in the
Manifest file
Permission
 Facebook Messenger
 Identity
 Contacts/Calendar
 Location
 SMS
 Phone
 Photos/Media/Files
 Camera/Microphone
 Wi-Fi Connection Information
 Device ID & Call Information
• Angry Birds
•Identity
•In-app purchases
•Location
•Photos/Media/Files
•Wi-Fi Connection Information
•Device ID & Call Information
Permission
• Camera/Microphone
• Allows consumers to use video chat
• Photos/Media/Files
• Allows consumers to send pictures they have
previously taken
• In order to give access, one must become
more vulnerable – like opening ports on your
router
Permission
• Using Intents and Permissions a developer
can make his/her app call a phone number.
Permission
Activity Class
Permission
Manifest File
Rooting/JailBreaking
• Rooting is the process of gaining root (a.k.a.
administrator or super user) to a smartphone.
• By default, all smartphones only give user’s
“guest” privileges.
• This is for both safety reasons and to prevent
users from doing things developers/carriers
don’t like (i.e. getting rid of their bloatware).
Pros and Cons to Root
Pros
• Download more apps and use
existing apps to fullest
potential
• Flash custom ROMs
• Access locked
hardware/software features
• Tune performance
• No more bloatware
• Wi-Fi/Bluetooth Tethering
• Use apps designed for other
phones/carriers
• Install apps to an SD card
Cons
• If done incorrectly, can
possibly brick phone
• Voids any warranties you
have (even if you reverse
the root)
• Less stable/more bugs
General Security Vulnerabilities
• Flaws in Android OS itself
• Flaws in phone software/firmware
• Conventional browser based virus
• Vulnerabilities within downloaded apps
• Unconventional attacks (injecting code into
accelerometers i.e.)
Specific Vulnerabilities
• Backdoor.AndroidOS.Obad.a does not have an interface and works
in background mode, making it difficult to analyze, but that was
only part of the challenge, according to Unuchek. The application
exploits an error in the DEX2JAR software – generally used by
researchers to convert APK files into the Java Archive (JAR) format)
– that disrupts the conversion of Dalvik bytecode into Java bytecode
and makes it difficult to run a statistical analysis of the Trojan.
• Obad.a also targets an error in Android’s processing of the
AndroidManifest.xml file, which exists in every Android application
to describe the application’s structure, define its launch parameters
and more. Although Obad.a modifies AndroidManifest.xml so that it
doesn’t comply with Google standards, the vulnerability enables it
to still be processed correctly, complicating any attempt to run
dynamic analysis on the application.
Next Time
• We will use a Metasploit (with a specific
module) to attack an android device.
• The “android device” will be a virtual android
machine running on an emulator
• We may also write a virus and Python and
deploy it to a device.

More Related Content

Similar to Android overview

CNIT 128 Ch 4: Android
CNIT 128 Ch 4: AndroidCNIT 128 Ch 4: Android
CNIT 128 Ch 4: Android
Sam Bowne
 
128-ch4.pptx
128-ch4.pptx128-ch4.pptx
128-ch4.pptx
SankalpKabra
 
Hacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OSHacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OS
EC-Council
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
Joe Jacob
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
Kelwin Yang
 
Basics 4
Basics   4Basics   4
Basics 4
Michael Shrove
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Owain Lewis
 
Android Mobile App Development basics PPT
Android Mobile App Development basics PPTAndroid Mobile App Development basics PPT
Android Mobile App Development basics PPT
nithya697634
 
Android development
Android developmentAndroid development
Android development
mkpartners
 
Android app devolopment
Android app devolopmentAndroid app devolopment
Android app devolopment
SitCom Solutions
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
Germán Bringas
 
Android OS
Android OSAndroid OS
Android OS
Nitin Ramchandani
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
Azfar Siddiqui
 
[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop
OWASP
 
Project a day 2 android application fundamentals
Project a day 2   android application fundamentalsProject a day 2   android application fundamentals
Project a day 2 android application fundamentals
Goran Djonovic
 
mobile development with androiddfdgdfhdgfdhf.pptx
mobile development with androiddfdgdfhdgfdhf.pptxmobile development with androiddfdgdfhdgfdhf.pptx
mobile development with androiddfdgdfhdgfdhf.pptx
NgLQun
 
Building a Mobile Security Program
Building a Mobile Security ProgramBuilding a Mobile Security Program
Building a Mobile Security Program
Denim Group
 
Yow connected developing secure i os applications
Yow connected   developing secure i os applicationsYow connected   developing secure i os applications
Yow connected developing secure i os applications
mgianarakis
 
Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
christoforosnalmpantis
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
Lars Vogel
 

Similar to Android overview (20)

CNIT 128 Ch 4: Android
CNIT 128 Ch 4: AndroidCNIT 128 Ch 4: Android
CNIT 128 Ch 4: Android
 
128-ch4.pptx
128-ch4.pptx128-ch4.pptx
128-ch4.pptx
 
Hacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OSHacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OS
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Basics 4
Basics   4Basics   4
Basics 4
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android Mobile App Development basics PPT
Android Mobile App Development basics PPTAndroid Mobile App Development basics PPT
Android Mobile App Development basics PPT
 
Android development
Android developmentAndroid development
Android development
 
Android app devolopment
Android app devolopmentAndroid app devolopment
Android app devolopment
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
 
Android OS
Android OSAndroid OS
Android OS
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop
 
Project a day 2 android application fundamentals
Project a day 2   android application fundamentalsProject a day 2   android application fundamentals
Project a day 2 android application fundamentals
 
mobile development with androiddfdgdfhdgfdhf.pptx
mobile development with androiddfdgdfhdgfdhf.pptxmobile development with androiddfdgdfhdgfdhf.pptx
mobile development with androiddfdgdfhdgfdhf.pptx
 
Building a Mobile Security Program
Building a Mobile Security ProgramBuilding a Mobile Security Program
Building a Mobile Security Program
 
Yow connected developing secure i os applications
Yow connected   developing secure i os applicationsYow connected   developing secure i os applications
Yow connected developing secure i os applications
 
Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 

Recently uploaded

How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
Celine George
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
heathfieldcps1
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 

Recently uploaded (20)

How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 

Android overview

  • 1. Android By Collin Donaldson With Strong Contributions From: Anthony Kopczyk
  • 4. Activity Life Cycle - onCreate • Set the Activity's content View; Event Listeners • Find references to any needed Views • Passed-in Bundle allows a programmer to restore the Activity to its previous status
  • 5. Activity Life Cycle - onStart • Called when the Activity becomes visible • Initialize any properties requiring information from the Window and contained Views
  • 6. Activity Life Cycle - onResume • Called when the Activity is visible and in the foreground • Initialize ability for user to interact with the Activity
  • 7. Activity Life Cycle - onPause • Called when the Activity is no longer the foreground • Release system resources
  • 8. Activity Life Cycle - onStop • Called when Activity is no longer visible • Perform larger operations like writing to a database • Save Activity's state for onStart
  • 9. Activity Life Cycle - onDestroy • Called when the system is in need of resources • Last chance to free resources and avoid memory leaks
  • 11. Views • A building block for UI components • Responsible for drawing and event handling • Each View has an id • findViewById(int) Text box, check box, radio button, time picker, and image view
  • 12. XML • Eclipse IDE • Uses XML files to set up the mobile application Android Layout File
  • 13. XML - Android Manifest • Contains properties of the application • Permissions, SDK, Icon, Activities Android Manifest File
  • 14. XML - Layout • Defines the layout of the Activity • Set View id values • Could achieve the same results through java code Android Layout File
  • 15. XML – Other Files • Menu – Defines the Menu to bring up • Dimens – Defines dimensions with names and values • Strings – Defines strings with names and values • Lint – Defines exclusion or customization of lint checks • Styles – Defines the style to use in the Activity • Attrs – Defines custom attributes that may be used in XML Layout files
  • 16. Input Events • OnClickListener • OnLongClickListener • OnFocusChangeListener • OnKeyListener • OnTouchListener • OnCreateContextMenuListener
  • 18. Intents • Starts an activity or service • Service – operates in the background without a UI • Intents can be sent to other Apps • sendBroadcast() • sendOrderedBroadcast( ) • sendStickyBroadcast()
  • 19. Intents – Explicit vs. Implicit • Explicit Intents specify a component to start. • Implicit Intents give a general action to perform.
  • 20. Intents - Intent-Filter • Specified in the Manifest file • Contains the types of Intents the app wants to receive • Allows one app to send an Intent to another • If no intent filters are specified the activity may only be started with an explicit Intent • To ensure security, always use explicit intents when starting a Service • Users can not see when a Service starts
  • 21. Permission • Allows developers to use security features • Provides additional capabilities to consumers that otherwise would be impossible “A central design point of the Android security architecture is that no application, by default, has permission to perform any operations that would adversely impact other applications, the operating system, or the user”
  • 22. Permission • When an Application is installed the consumer must accept the permissions requested by an application • Permissions are defined in the Manifest file
  • 23. Permission  Facebook Messenger  Identity  Contacts/Calendar  Location  SMS  Phone  Photos/Media/Files  Camera/Microphone  Wi-Fi Connection Information  Device ID & Call Information • Angry Birds •Identity •In-app purchases •Location •Photos/Media/Files •Wi-Fi Connection Information •Device ID & Call Information
  • 24. Permission • Camera/Microphone • Allows consumers to use video chat • Photos/Media/Files • Allows consumers to send pictures they have previously taken • In order to give access, one must become more vulnerable – like opening ports on your router
  • 25. Permission • Using Intents and Permissions a developer can make his/her app call a phone number.
  • 28. Rooting/JailBreaking • Rooting is the process of gaining root (a.k.a. administrator or super user) to a smartphone. • By default, all smartphones only give user’s “guest” privileges. • This is for both safety reasons and to prevent users from doing things developers/carriers don’t like (i.e. getting rid of their bloatware).
  • 29. Pros and Cons to Root Pros • Download more apps and use existing apps to fullest potential • Flash custom ROMs • Access locked hardware/software features • Tune performance • No more bloatware • Wi-Fi/Bluetooth Tethering • Use apps designed for other phones/carriers • Install apps to an SD card Cons • If done incorrectly, can possibly brick phone • Voids any warranties you have (even if you reverse the root) • Less stable/more bugs
  • 30. General Security Vulnerabilities • Flaws in Android OS itself • Flaws in phone software/firmware • Conventional browser based virus • Vulnerabilities within downloaded apps • Unconventional attacks (injecting code into accelerometers i.e.)
  • 31. Specific Vulnerabilities • Backdoor.AndroidOS.Obad.a does not have an interface and works in background mode, making it difficult to analyze, but that was only part of the challenge, according to Unuchek. The application exploits an error in the DEX2JAR software – generally used by researchers to convert APK files into the Java Archive (JAR) format) – that disrupts the conversion of Dalvik bytecode into Java bytecode and makes it difficult to run a statistical analysis of the Trojan. • Obad.a also targets an error in Android’s processing of the AndroidManifest.xml file, which exists in every Android application to describe the application’s structure, define its launch parameters and more. Although Obad.a modifies AndroidManifest.xml so that it doesn’t comply with Google standards, the vulnerability enables it to still be processed correctly, complicating any attempt to run dynamic analysis on the application.
  • 32. Next Time • We will use a Metasploit (with a specific module) to attack an android device. • The “android device” will be a virtual android machine running on an emulator • We may also write a virus and Python and deploy it to a device.