经过半年多断断续续的开发,最近终于发布一个测试版本。
...
AppleTrace搭配MonkeyDev可实现Trace任意App
(关联文章:https://everettjf.github.io/2017/09/21/appletrace/ )
结果演示:
...
(关联文章:https://everettjf.github.io/2017/10/12/appletrace-dancewith-monkeydev/ )
背景
一般情况下使用Instruments(主要是Time Profiler)进行iOS App的性能分析就足够了,但是Time Profiler 把调用方法都合并了起来,失去了时序的表现。直到有一天看到Android开发的同事使用 systrace 分析性能,systrace生成一个html文件,把函数(方法)的调用耗时按照先后顺序表现出来。心里想:要是iOS也有这样的工具就好了。了解到这个html文件是 catapult 生成的。
一天看到iosre论坛一篇hook objc_msgSend的帖子。突然想到,可以结合catapult来生成Objective C方法的性能分析图(暂且这么叫吧)。(虽然一直也有hook objc_msgSend的方法,但这次煮好的佳肴终于忍不住下手了)。
说搞就开始搞,暂停几天开发MachOExplorer。近期一直利用少之又少的业余时间蜗牛般开发MachOExplorer,但现在看来生成性能分析图更是重要,回想过去的一些苦力加班,如果能生成这个性能分析图,当时岂不是很快就解决问题了。
...
In book : Hacking iOS Applications
https://web.securityinnovation.com/hubfs/iOS%20Hacking%20Guide.pdf
补充:
既然lldb支持python script,那么可以通过脚本更加自动一些。
有了这个想法,但一直没投入时间去写。
后来,0xbbc实现了这个功能。 传送门
...
Devices
iPhone5S
iOS10.2
Jailbreak
Step 1. yalu
https://yalu.qwertyoruiop.com/
http://www.cydiaimpactor.com/
Step 2. Fix cydia error
http://www.iblogapple.com/2016/12/31/fix-cydia-error-could-not-open-file-varlibdpkgstatus-ios-10-jailbreak/
...
This article almost copy part of the official article, but fix many bugs that may impede newbees on the way to develop a clang plugin.
Environment : macOS
Step 0 : Obtain Clang
mkdir ~/clang-llvm && cd ~/clang-llvm
git clone <http://llvm.org/git/llvm.git>
cd llvm/tools
git clone <http://llvm.org/git/clang.git>
cd clang/tools
git clone <http://llvm.org/git/clang-tools-extra.git> extra
...
根据podspec生成framework的依赖关系graph
代码:
https://github.com/everettjf/Yolo/tree/master/PodspecDependencyGraph
...
背景
官网:http://spacemacs.org/
安装
第零步:
安装最新的emacs。
brew install emacs --with-cocoa
...
下面三种方法可以让代码在main函数之前执行:
All +load methods
All C++ static initializers
All C/C++ attribute(constructor) functions
main函数之前执行的问题
无法Patch
不能审计耗时
调用UIKit相关方法会导致部分类提早初始化
主线程执行,完全阻塞式执行
...
先补充:标题中 static initializers 其实应该叫做 C++ static initializers and C/C++ __attribute__(constructor) functions。
使用 MachOView 打开一个MachO文件,多数情况下会看到这个section __mod_init_func 。
...