Application Security for the Android Platform

Book description

With the Android platform fast becoming a target of malicious hackers, application security is crucial. This concise book provides the knowledge you need to design and implement robust, rugged, and secure apps for any Android device. You’ll learn how to identify and manage the risks inherent in your design, and work to minimize a hacker’s opportunity to compromise your app and steal user data.

How is the Android platform structured to handle security? What services and tools are available to help you protect data? Up until now, no single resource has provided this vital information. With this guide, you’ll learn how to address real threats to your app, whether or not you have previous experience with security issues.

  • Examine Android’s architecture and security model, and how it isolates the filesystem and database
  • Learn how to use Android permissions and restricted system APIs
  • Explore Android component types, and learn how to secure communications in a multi-tier app
  • Use cryptographic tools to protect data stored on an Android device
  • Secure the data transmitted from the device to other parties, including the servers that interact with your app

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Organization of the Book
    2. Conventions Used in This Book
    3. Using Code Examples
    4. Safari® Books Online
    5. How to Contact Us
    6. Acknowledgments
  2. 1. Introduction
    1. Application Security: Why You Should Care
    2. The Current State of Mobile Application Security on Android
    3. Security: Risk = Vulnerability + Threat + Consequences
    4. Evolution of Information Security: Why Applications Matter the Most
    5. Your Role: Protect the Data
    6. Secure Software Development Techniques
    7. Unique Characteristics of Android
    8. Moving On
  3. 2. Android Architecture
    1. Introduction to the Android Architecture
    2. The Linux Security Model
    3. The Resulting Android Security Model
    4. Application Signing, Attribution, and Attestation
    5. Process Design
    6. Android Filesystem Isolation
    7. Android Preferences and Database Isolation
    8. Moving up the Layers to System API and Component Permissions
  4. 3. Application Permissions
    1. Android Permission Basics
    2. Using Restricted System APIs and the User Experience
    3. Custom Permissions
  5. 4. Component Security and Permissions
    1. The Types of Android Components
    2. Intercomponent Signaling Using Intents
    3. Public and Private Components
    4. Imposing Restrictions on Access to Components
      1. Securing Activities
      2. Securing Services
      3. Securing Content Providers
      4. Securing Broadcast Intents
    5. Putting It All Together: Securing Communications in a Multi-Tier App
  6. 5. Protecting Stored Data
    1. The Threats and Vulnerabilities Against Stored Data
      1. Vulnerabilities of Stored Data
      2. Threats to, and Mitigations for, Stored Data
    2. Protection Principles
    3. Cryptography Primer: Encryption
      1. Symmetric Encryption
      2. Asymmetric Key Encryption
    4. Cryptography Primer: Hashing
    5. Cryptographic Practicalities
      1. Computational Infeasibility
      2. Algorithm Choice and Key Size
      3. Cipher Operation Modes, Initialization Vectors, and Salt
      4. Public Keys and Their Management
    6. Key Derivation and Management
      1. Motivation
      2. Key Derivation
      3. Encryption Without User-Supplied Key Derivation
    7. Practical Cryptography: Applying a Technique Against a Threat
  7. 6. Securing Server Interactions
    1. Confidentiality and Authentication
    2. SSL/TLS: The Industry Standard
      1. Authentication of the Entities
      2. Encryption of Data
    3. Protecting Data En Route to Public Services
      1. Introducing the Android SSL/TLS Environment
      2. Server Verification
      3. Handling SSL/TLS Connection Errors
    4. Protecting Data En Route to Private Services
      1. Using Only Specific Certificates for SSL/TLS
      2. One Step Further: Using Client-Side Authentication SSL/TLS
    5. Threats Against Devices Using Data in Transit
    6. Input Validation: The Central Tenant of Application Security
      1. Reject-Known-Bad
      2. Accept-Known-Good
      3. Wrapping It Up: Input Validation
    7. Preventing Command Injection
  8. 7. Summary
    1. Key Themes
      1. It’s All About Risk
      2. The Principle of Least Privilege
      3. Use the Permissions System
      4. Android Is an Open Architecture
      5. Get the Cryptography Right
      6. Never Trust User Input
    2. Wrapping It Up
  9. About the Author
  10. Copyright

Product information

  • Title: Application Security for the Android Platform
  • Author(s): Jeff Six
  • Release date: December 2011
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781449315078