Giter Club home page Giter Club logo

dyldcheck-ios's Introduction

DyldCheck

This application tries to detect external loaded libraries by whitelisting legit preloaded libraries. However in a real case would be better to implement a blacklist of banned libraries like Substrate, Substitute an so on due to the false positives that the whitelisting approach could have with each major iOS update and library updates.

Screenshot of the application

It is recommended to check for external injected libraries when some important method is called, for instance, when generating a RSA key. A dyld could not be loaded at the beginning of the application's execution while being injected some time later.

Obtaining loaded libraries

The code to obtain runtime loaded libraries is pretty simple as it only has to iterate calling _dyld_get_image_name

import MachO

func getLibs() -> [String]{
    let nlibs = _dyld_image_count();

    var array = [String]()
    for n in 0...(nlibs-1) {
        let name = String(validatingUTF8: _dyld_get_image_name(n)!)!
        array.append(name)
    }
    return array
}

Whitelisting

In order to whitelist libraries it is required to run the application in all different kinds of non-compromised devices to see wether new libraries appear and lower the chance of running into false positives that could be fatal.

TODO:

  1. Dump all the libraries in multiple devices to add to the whitelist

dyldcheck-ios's People

Contributors

snooze6 avatar

Stargazers

Oleksandr Bretsko avatar

Watchers

James Cloos avatar  avatar

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.