Your SlideShare is downloading. ×
  • Like
Building secure android apps
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Building secure android apps



Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Building Secure Android Apps Kaushal Bhavsar
  • 2. Who am I?• Kaushal Bhavsar• Founder & CEO, Pratikar Technologies• Visiting Faculty, Dept. of Computer Science, (Rollwala) – Network Security in MCA V• Pursuing PhD from CHARUSAT – Computer Security
  • 3. Know this App??
  • 4. Similar Apps Super Guitar Super HistoryFalling Down Solo Eraser Super RingtonePhoto Editor Chess Maker Falling Ball 下坠滚球 Dodge _Falldown
  • 5. Basics VulnerabilityRisk Threat
  • 6. Basics - II Attack Defense-in-Surface depth Least Privilege
  • 7. Android Architecture Your AppsApplication Framework Native Libraries Linux Kernel
  • 8. Android Security Model Application Isolation Application Signing Filesystem Isolation
  • 9. Application Isolation• When an app is installed, it gets a new UID.• All data stored by that application is assigned that same UID• All resources for that app are given full permissions for the app’s UID.• Different UIDs can not access each other’s data.
  • 10. Filesystem Isolation• All data for the app is stored in /data/data/app_package_name• Only UID for specific app can access it• Apps with same UIDs can access each other’s data• Root UID can access all apps’ data!• SD Card data is not protected!• Files created using apps MUST be have appropriate permissions
  • 11. Data SecurityStored Data Mobile Data
  • 12. Protecting Stored Data CryptographyHashing Encryption Symmetric Asymmetric
  • 13. Protecting Mobile Data Figure from
  • 14. Input Validation Accept RejectKnown Good Known Bad
  • 15. Command InjectionSQLiteDatabase db = dbHelper.getWriteableDatabase();String userQuery = "SELECT lastName FROMuseraccounts WHERE userID = " + request.getParameter("userID");SQLiteStatement prepStatement =db.compileStatement(userQuery);String userLastname =prepStatement.simpleQueryForString();
  • 16. SQLiteDatabase db = dbHelper.getWriteableDatabase();String userQuery = "SELECT lastName FROMuseraccounts WHERE userID = ?";SQLiteStatement prepStatement =db.compileStatement(userQuery);prepStatement.bindString(1,request.getParameter("userID"));String userLastname =prepStatement.simpleQueryForString();
  • 17. Thank you!