iOS 反反注入 修改__RESTRICT,__restrict工具
通过在 Xcode 里的 Other Linker Flags 设置参数,可以防止App被注入dylib(仅限于iOS 10 以下系统) 比如,某艺,XX音乐等
dylib无法注入,也就意味着没办法用cycript动态调试App,只能干瞪眼
Other Linker Flags 参数
-Wl,-sectcreate,__RESTRICT,__restrict,/dev/null
通过阅读dyld源代码,我们可以得知其大概原理
static ImageLoader* loadPhase3(const char* path, const char* orgPath, const LoadContext& context, std::vector<const char*>* exceptions)
{
ImageLoader* image = NULL;
if ( strncmp(path, "@executable_path/", ) == ) {
// executable_path cannot be in used in any binary in a setuid process rdar://problem/4589305
if ( sProcessIsRestricted )
throwf("unsafe use of @executable_path in %s with restricted binary", context.origin);
}
else if ( (strncmp(path, "@loader_path/", ) == ) && (context.origin != NULL) ) {
// @loader_path cannot be used from the main executable of a setuid process rdar://problem/4589305
if ( sProcessIsRestricted && (strcmp(context.origin, sExecPath) == ) )
throwf("unsafe use of @loader_path in %s with restricted binary", context.origin);
}
else if (sProcessIsRestricted && (path[] != '/' )) {
throwf("unsafe use of relative rpath %s in %s with restricted binary", path, context.origin);
} return loadPhase4(path, orgPath, context, exceptions);
}
当dylib加载路径是以 @executable_path、@loader_path 或者不是以 '/'开头,则会抛出异常使进程结束。
针对以上情况,分享一个修改__RESTRICT命令的工具,原理是将Mach-O文件中的 RESTRICT命令改为 SESTRICT,使该命令因为无法识别而失效。
使用
./AAntiCrack --replace-restrict <应用可执行文件mach-o>
此工具还有注入dylib功能,将dylib与mach-o放在同一目录下,然后执行
./AAntiCrack --replace-restrict -i dylib路径 <应用可执行文件mach-o>
即可实现动态库注入,与反反注入
相关链接:
http://bbs.iosre.com/t/tweak-app-app-tweak/438
iOS 反反注入 修改__RESTRICT,__restrict工具的更多相关文章
- 将JAR包反编译,修改后重新打包(转)
将JAR包反编译,修改后重新打包(转) 在学习和开发JAVA项目中,我们经常会用到第三方提供的一些jar.使用这些第三方工具包,可以提高我们开发的效率,缩短开发的时间.有的第三方工具,提供具体的 ...
- Atitit.项目修改补丁打包工具 使用说明
Atitit.项目修改补丁打包工具 使用说明 1.1. 打包工具已经在群里面.打包工具.bat1 1.2. 使用方法:放在项目主目录下,执行即可1 1.3. 打包工具的原理以及要打包的项目列表1 1. ...
- Referer反反盗链
0x00 前言 最近用Python非常多,确实感受到了Python的强大与便利.但同时我并没有相见恨晚的感觉,相反我很庆幸自己没有太早接触到Python,而是基本按着C→C++→Java→Python ...
- 反反爬虫 IP代理
0x01 前言 一般而言,抓取稍微正规一点的网站,都会有反爬虫的制约.反爬虫主要有以下几种方式: 通过UA判断.这是最低级的判断,一般反爬虫不会用这个做唯一判断,因为反反爬虫非常容易,直接随机UA即可 ...
- 爬虫(Spider),反爬虫(Anti-Spider),反反爬虫(Anti-Anti-Spider)
爬虫(Spider),反爬虫(Anti-Spider),反反爬虫(Anti-Anti-Spider),这之间的斗争恢宏壮阔... Day 1小莫想要某站上所有的电影,写了标准的爬虫(基于HttpCli ...
- selenium + chrome 被检测,反反爬小记
selenium + chrome 很多难以采集的网站都使用selenium爬取,但是后来发现selenium有特征值,会被检测出来,今天来小结一下反反爬方案 测试网站 全绿好像代表没被检测出 中间人 ...
- python爬虫---详解爬虫分类,HTTP和HTTPS的区别,证书加密,反爬机制和反反爬策略,requests模块的使用,常见的问题
python爬虫---详解爬虫分类,HTTP和HTTPS的区别,证书加密,反爬机制和反反爬策略,requests模块的使用,常见的问题 一丶爬虫概述 通过编写程序'模拟浏览器'上网,然后通 ...
- scrapy反反爬虫
反反爬虫相关机制 Some websites implement certain measures to prevent bots from crawling them, with varying d ...
- scrapy反反爬虫策略和settings配置解析
反反爬虫相关机制 Some websites implement certain measures to prevent bots from crawling them, with varying d ...
随机推荐
- 搭建linux+nginx+mysql+php环境
yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpn ...
- 64_o1
OCE-devel-0.18.1-1.fc26.i686.rpm 15-May-2017 18:37 5634474 OCE-devel-0.18.1-1.fc26.x86_64.rpm 15-May ...
- caffe Python API 之图片预处理
# 设定图片的shape格式为网络data层格式 transformer = caffe.io.Transformer({'data': net.blobs['data'].data.shape}) ...
- 001使用smokeping监控idc机房网络质量情况
最近工作比较忙,也没有时间写博客,看到好友芮峰云最近一直在写博客,所以也手痒了,就先把之前的一些积累下来的文章分享给大家. 本文是介绍如何的使用smokeping来监控idc机房的网络质量情况,从监控 ...
- linux/centos定时任务cron
https://www.cnblogs.com/p0st/p/9482167.html cron: crond进程 crontab修改命令 * * * * * command parameter & ...
- 简约而不简单的Django
本文面向:有python基础,刚接触web框架的初学者. 环境:windows7 python3.5.1 pycharm专业版 Django 1.10版 pip3 一.Django简介 百度百 ...
- Java-悲观锁和乐观锁
Java中的乐观锁与悲观锁: 1. Java中典型的synchronized就是一种悲观锁,也就是独占锁,不过JDK1.6之后对synchronized已经做了许多优化,也不能说是完全的悲观锁了: 2 ...
- jekyll简单使用
jekyll build # => 当前文件夹中的内容将会生成到 ./site 文件夹中. jekyll build –destination <destination> # =&g ...
- 【前端笔记】浅谈js继承
我们先想想我们用js最后要怎样实现面向对象的编程.事实上我们必须用上原型链这种东西. 我们的父类superType有属性和方法,并且一些能被子类subType继承,一些能被覆盖,但是丝毫不会影响到父类 ...
- CentOS7.6安装AMD显卡驱动
1.检查自己的显卡类型[root@localhost amdgpu-pro-18.50-708488-rhel-7.6]# lspci | grep -i vga03:00.0 VGA compati ...