网站大量收购独家精品文档,联系QQ:2885784924

android逆向手册android脱壳unpaking.pdf

  1. 1、本文档共152页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
关键技术点 4: 只是以前实验了一下,觉得原理可行,但是尚未深究... 附件有个例子,里面包含两个程序,一个是 android 应用,一个是命令行的注入程序,里面实现了 so 注入和拦截 socket 的 send recv 函数,但是没有是实现直接向地址里面写入自己的汇编代码的功能... Android 脱壳(unpaking) 壳的入口(OEP) android so 壳入口浅析 三 13 八月 2014 Write By #123 前言 开年来开始接触一些加固样本,基本都对了 so 进行了处理,拖入 ida 一看,要么没有 JNI_OnLoad ,要么 JNI_OnLoad 汇编 代码羞涩难懂,让人无法下手。 JNI_OnLoad 是真正入口么? 先看看几个文档 1 摘自属性服务一节(《深入理解 Android 卷 1》) 利用 gcc 的 constructor 属性,这个属性指明了一个__libc_prenit 函数(这个函数内部就将完成共享内存到本地进程的映射 工作)。用法:当bionic libc 库被加载时,将自动调用__libc_prenit 函数。这样在 bionic libc 动态库被装载时,系统属性缓 冲区地址就被确定了,后续的 API 调用就能找对位置了。 /* We flag the __libc_preinit function as a constructor to ensure * tha s address is listed in libc.sos .init_array section. * This ensures that the function is called by the dynamic linker * as soon as the shared library is loaded. */ //constructor 属性指示加载器加载该库之后,首先调用__libc_prenit 函数。这一点和windows 上的动态库的 DllMain 函数类似 void __attribute__((constructor)) __libc_prenit (void); 从英文说明里面提到到.init_array section,我们可以搜索一下这一节的说明 2 .init_array section .init_array contains pointers to blocks of code that need to be executed when an application is being initialized (before main() is called). It is used for a number of things, but the primary use is ++ for running static constructors; a secondary use that is sometimes used is to initialize IO systems in the C library. If you are not using C++ you may (depending on your C library) be able to live withou entirely; but you’d need to hack your startup code to deal with this. .init_array probably ends up in ram because its marked read/write — that happens because in a dynamic linking environment the dynamic linker has to fix up all the pointers it contains before it can be used. In a static environment you might be able to get away with forcing it into a read-only section. 来源: 3 摘自 dlopen 小结( 《程序员的自我修养》) 动态连接器在加载模块时,会执行.init段的代码,用以完成模块的初始化工作,dlopen 的加载过程基本跟动态连接器一致,在 完成装载、映射和重定向以

文档评论(0)

kay5620 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8001056127000014

1亿VIP精品文档

相关文档