Git Product home page Git Product logo

secure-mobile-development's Introduction

Secure Mobile Development

At NowSecure we spend a lot of time attacking mobile apps - hacking, breaking encryption, finding flaws, penetration testing, and looking for sensitive data stored insecurely. We do it for the right reasons - to help developers make their apps more secure. This document represents some of the knowledge we share with our clients and partners. We are driven to advance mobile app security worldwide.

Using this Guide

This guide gives specific recommendations to use during your development process. The descriptions of attacks and security recommendations in this report are not exhaustive or perfect, but you will get practical advice that you can use to make your apps more secure.

We revise our best practices periodically and invite contributions, and the updated guide is published here as changes are accepted into the main repository.

To learn about all the vectors that attackers might use on your app, read our Mobile Security Primer.

Categories

We categorize our Secure Mobile Development Best Practices under eight topics. You can find a complete table of contents here

Technology Stack

The book is written with GitBook.

Contributing

We revise our best practices periodically and invite contributions, and the updated guide is published here as changes are accepted into the main repository.

We welcome contributions from knowledgeable developers and security professionals. All contributors must read our Contributing page and accept the terms in their Pull Requests. Please follow the template and format provided if you do contribute.

We publish this guide under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

We will review contributions and periodically publish updated recommendations. If you have questions or feedback please let us know.

Instructions

First fork this repository, make your changes and submit them back to this repository as a Pull Request. If you are unfamiliar with this process, please read the GitHub User Documentation.

Adding a Best Practice

TBD

secure-mobile-development's People

Contributors

bengardiner-at-irdeto avatar chengminglu avatar dweinstein avatar ekristen avatar hexploitable avatar keylowe avatar lvdaqian avatar sbakken avatar testrockytesting avatar truist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

secure-mobile-development's Issues

Consider referencing other / newer obfuscation tools

In "Code Complexity and Obfuscation" you provide links to a few obfuscation tools. I work for PreEmptive Solutions and we have forked two of those products (iOS Class Guard and LLVM-Obfuscator), and we also provide tools for other platforms (Dotfuscator for .NET and DashO for Java).

In the specific case of iOS Class Guard, our fork (called PPiOS-Rename) is meant to provide support for newer versions of Xcode that they don't seem to be supporting - and we significantly improved the product overall. Our fork is open-source and free, so you might want to link to it instead of (or in addition to) iOS Class Guard.

Our fork of LLVM-Obfuscator (called PPiOS-ControlFlow) is not open-source (or free), but it also brings support up to date with the latest Xcode, and provides enhancements/improvements.

On the .NET platform, Dotfuscator has a Community Edition that is included "in the box" with Visual Studio, and is free. For someone looking for a free solution on that platform, you might want to link to it, also.

Finally, since you link to DexGuard, I thought you might also want to link to DashO.

If you're open to these changes, I'd be happy to create a pull request for them; I thought it best to check if you want them, first.

Thanks! (And thanks for the great guide!)

Touch ID policies via ACL

There is room for some additions to the Touch ID section for iOS.
There are ACL policies which can be used for example to delete the keychain entries if the fingerprint enrolment data on device changes. This can be ideal for example to delete data if another finger has been enrolled since the data was stored. Applications may wish to ask the user to re-authenticate via alternative means, before creating the keychain entry back up again.

If i find time i might submit a pull

Split antidebug/antitracing techniques from the code-complexity-and-obfuscation document

Explain various obfuscations in detail:

  • obfuscate code (antidisasm tricks)
  • obfuscate data (strings, files)
  • obfuscate metadata (objc, symbols)

Expose the decompilation information on every language (java, js, objc, swift, C, ..)

  • swift is not as introspectable as objc

Anti-debug techniques

  • restricting debuggers or making debugging complicate have nothing to do with code complexity or obfuscation
  • explain how to use the PT_DENY_ATTACH and android:debuggable=false with code

Control flow validation

  • flow integrity - verify the workflow is the expected on every function (where do i come from?)
  • white box security
  • I dont think compiler optimizations should be listed as a way to protect code logic

Anti-RE techniques:

  • renaming symbols with wrong or invalid names
  • depending on the compiler the final binary can have more than one symbol table
  • always verify the resulting binary with strings | grep... (at least)
  • i dont think the DRM applied by FairPlay can be in any way a security measure to care because there are several tools (appcake, clutch, r2, dumpdecrypted, ...) to automate this cracking into a single press-enter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.