Giter VIP home page Giter VIP logo

intrude's Introduction

intrude

什么是intrude

由于各种原因,iOS越狱现状越来越满足不了实际需求。但有时候我们又想研究某第三方App的实现,因此如何在一个非越狱iOS设备上实现这个目的就变成了一个需要解决的需求。intrude的设计初衷就是用来做这个事情的。

intrude是一个小巧的工具,其作用是在未越狱机器上给一个iOS App嵌入一个或多个dylib

如何使用

  1. 首先该工具只能运行在Mac OS X系统上,因此你得准备一台Mac

  2. 将目标App从目标设备上导出,成ipa文件。

  3. 使用如下命令将/path/to/bar.dylib嵌入到/path/to/foo.ipa

     ./intrude --ipa       "/path/to/foo.ipa" \
               --dylib     "/path/to/bar.dylib" \
               --bundle    "li.oldman.test"
               --sign      "iPhone Developer: Oldman Li (QNRMA23W53)" \
               --provision "/path/to/li.oldman.test.mobileprovision"
    

    其中,bundle, sign, privision 为嵌入过程所必须的重签名参数,这三者必须互相对应

  4. 上步骤会生成一个ipa文件/path/to/foo.ipa.modified.ipa,此ipa文件即包含了bar.dylib, 将其重新导入设备即可。

已知问题

  1. 注意,原始ipa中可执行二进制文件必须为无加密版本(即俗称的砸壳版本)。

  2. 简易起见,目前本工具重新生成ipa文件时未将Plugins目录包含在内。

实现原理

如果你对实现原理感兴趣,这里的简短说明可以作为参考。

本质上,一个二进制文件需要依赖哪些dylib,这些信息是记录在Mach O结构中的。而intrude便是改写了Mach O结构,增加了一条加载dylib的指令,使之能够在运行时即加载它。这部分实现可参阅这里

intrude's People

Contributors

imoldman 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

Watchers

 avatar  avatar  avatar  avatar

intrude's Issues

执行到ACTION 7: modify executable file时报错

/Users/fanlining/Documents/toolchain/insert_dylib_to_binary --file /Users/fanlining/Documents/temp/Payload/ddd.app/ddd
Traceback (most recent call last):
File "/Users/fanlining/Documents/intrude", line 197, in
main()
File "/Users/fanlining/Documents/intrude", line 194, in main
run(context, config)
File "/Users/fanlining/Documents/intrude", line 177, in run
method(context)
File "/Users/fanlining/Documents/intrude", line 78, in do_insert_load_dylib_command_to_excutable_file
filename = subprocess.check_output(command).strip()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, _popenargs, *_kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

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.