博客园 - _懒人uuid:24b78886-0ed1-41c2-8670-e3f31dcf42c4;id=728222017-01-16T06:12:20Z_懒人https://www.cnblogs.com/lanrenxinxin/feed.cnblogs.comhttps://www.cnblogs.com/lanrenxinxin/p/6289436.htmlHooking Android System Calls for Pleasure and Benefit - _懒人The Android kernel is a powerful ally to the reverse engineer. While regular Android apps are hopelessly restricted and sandboxed, you - the reverser 2017-01-16T06:12:00Z2017-01-16T06:12:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】The Android kernel is a powerful ally to the reverse engineer. While regular Android apps are hopelessly restricted and sandboxed, you - the reverser <a href="https://www.cnblogs.com/lanrenxinxin/p/6289436.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/6226047.htmlEffectively bypassing kptr_restrict on Android - _懒人墙外通道:http://bits-please.blogspot.com/2015/08/effectively-bypassing-kptrrestrict-on.html In this blog post, we'll take a look at a few ways that I've d2016-12-27T07:22:00Z2016-12-27T07:22:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】墙外通道:http://bits-please.blogspot.com/2015/08/effectively-bypassing-kptrrestrict-on.html In this blog post, we'll take a look at a few ways that I've d <a href="https://www.cnblogs.com/lanrenxinxin/p/6226047.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/6216903.htmlA brief introduction to per-cpu variables - _懒人墙外通道:http://thinkiii.blogspot.com/2014/05/a-brief-introduction-to-per-cpu.html per-cpu variables are widely used in Linux kernel such as per-cpu count2016-12-24T11:22:00Z2016-12-24T11:22:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】墙外通道:http://thinkiii.blogspot.com/2014/05/a-brief-introduction-to-per-cpu.html per-cpu variables are widely used in Linux kernel such as per-cpu count <a href="https://www.cnblogs.com/lanrenxinxin/p/6216903.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/6216925.htmlHow to translate virtual to physical addresses through /proc/pid/pagemap - _懒人墙外通道:http://fivelinesofcode.blogspot.com/2014/03/how-to-translate-virtual-to-physical.html I currently work on a project where I need to make translat2016-12-24T11:21:00Z2016-12-24T11:21:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】墙外通道:http://fivelinesofcode.blogspot.com/2014/03/how-to-translate-virtual-to-physical.html I currently work on a project where I need to make translat <a href="https://www.cnblogs.com/lanrenxinxin/p/6216925.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/6217257.htmlAn Exploration of ARM TrustZone Technology - _懒人墙外通道:https://genode.org/documentation/articles/trustzone ARM TrustZone technology has been around for almost a decade. It was introduced at a time whe2016-12-24T11:20:00Z2016-12-24T11:20:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】墙外通道:https://genode.org/documentation/articles/trustzone ARM TrustZone technology has been around for almost a decade. It was introduced at a time whe <a href="https://www.cnblogs.com/lanrenxinxin/p/6217257.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/6216877.htmlARM64 Linux kernel virtual address space - _懒人墙外通道:http://thinkiii.blogspot.com/2014/02/arm64-linux-kernel-virtual-address-space.html Now let's talk about the Linux kernel virtual address space on2016-12-24T11:18:00Z2016-12-24T11:18:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】墙外通道:http://thinkiii.blogspot.com/2014/02/arm64-linux-kernel-virtual-address-space.html Now let's talk about the Linux kernel virtual address space on <a href="https://www.cnblogs.com/lanrenxinxin/p/6216877.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/6217329.htmlAndroid privilege escalation to mediaserver from zero permissions (CVE-2014-7920 + CVE-2014-7921) - _懒人墙外通道:http://bits-please.blogspot.com/2016/01/android-privilege-escalation-to.html In this blog post we'll go over two vulnerabilities I discovered whi2016-12-24T11:14:00Z2016-12-24T11:14:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】墙外通道:http://bits-please.blogspot.com/2016/01/android-privilege-escalation-to.html In this blog post we'll go over two vulnerabilities I discovered whi <a href="https://www.cnblogs.com/lanrenxinxin/p/6217329.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/6133599.htmlida 调试 android fork - _懒人在使用ida 调试android native代码时经常会碰见fork子进程的情况出现,而运行一个 android_server只能对一个进程进行调试或者attach,而ida 默认端口是23946,可以通过指定 android_server 的端口来实现多开,同时调试多个进程。2016-12-05T05:29:00Z2016-12-05T05:29:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】在使用ida 调试android native代码时经常会碰见fork子进程的情况出现,而运行一个 android_server只能对一个进程进行调试或者attach,而ida 默认端口是23946,可以通过指定 android_server 的端口来实现多开,同时调试多个进程。 <a href="https://www.cnblogs.com/lanrenxinxin/p/6133599.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5924886.htmlprocess_begin: CreateProcess(NULL,......) make (e=87): 参数错误。 - _懒人在编译 trinity-android 的过程中,总是报 process_begin: CreateProcess(NULL,......) make (e=87): 参数错误 原因是.MK文件中包含的文件太多了,而windows对于函数参数个数有限制,解决办法:http://stackoverfl2016-09-30T12:52:00Z2016-09-30T12:52:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】在编译 trinity-android 的过程中,总是报 process_begin: CreateProcess(NULL,......) make (e=87): 参数错误 原因是.MK文件中包含的文件太多了,而windows对于函数参数个数有限制,解决办法:http://stackoverfl <a href="https://www.cnblogs.com/lanrenxinxin/p/5924886.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5572640.htmlAndroid root 原理 - _懒人欢迎转载,转载请注明出处:http://www.cnblogs.com/lanrenxinxin/p/5572640.html 0x00 关于root linux和类Unix系统的最初设计都是针对多用户的操作系统,对于用户权限的管理很非常严格的,而root用户(超级用户)就是整个系统的唯一管理员,拥2016-06-12T12:36:00Z2016-06-12T12:36:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】欢迎转载,转载请注明出处:http://www.cnblogs.com/lanrenxinxin/p/5572640.html 0x00 关于root linux和类Unix系统的最初设计都是针对多用户的操作系统,对于用户权限的管理很非常严格的,而root用户(超级用户)就是整个系统的唯一管理员,拥 <a href="https://www.cnblogs.com/lanrenxinxin/p/5572640.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5573018.htmlgot & plt - _懒人got plt类似与Windows PE文件中IAT(Import Address Table)。 要使的代码地址无关,基本思想就是把与地址相关的部分放到数据段里面。 ELF的做法是在数据段里面建立一个指向这些变量的指针数组,称为全局偏移表(Global Offset Table,GOT),当代码需2016-06-10T03:09:00Z2016-06-10T03:09:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】got plt类似与Windows PE文件中IAT(Import Address Table)。 要使的代码地址无关,基本思想就是把与地址相关的部分放到数据段里面。 ELF的做法是在数据段里面建立一个指向这些变量的指针数组,称为全局偏移表(Global Offset Table,GOT),当代码需 <a href="https://www.cnblogs.com/lanrenxinxin/p/5573018.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5536969.htmlAndroid FileObserver 实现原理(inotify) - _懒人[TOC] 0x0前言 之前在分析某个Android平台加固壳子的时候就碰到过inotify,被用来监控/proc 文件系统,防止gdb调试器的附加,以达到反调试的目的。inotify机制是从linux kernel 2.6.13开始引入,Android 1.5对应的linux内核已经是2.6.262016-05-28T03:55:00Z2016-05-28T03:55:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】[TOC] 0x0前言 之前在分析某个Android平台加固壳子的时候就碰到过inotify,被用来监控/proc 文件系统,防止gdb调试器的附加,以达到反调试的目的。inotify机制是从linux kernel 2.6.13开始引入,Android 1.5对应的linux内核已经是2.6.26 <a href="https://www.cnblogs.com/lanrenxinxin/p/5536969.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5424554.htmlUbuntu14.04 编译 Android 5.1.1源码(采用国内镜像) - _懒人欢迎转载,转载请注明出处: http://www.cnblogs.com/lanrenxinxin/p/5424554.html 之前就有编译android源码的想法,但是由于有GFW的存在,又没有梯子,连开发工具都是经过androiddevtools从百度云弄下来的,前两天发现了清华大学AOSP的2016-04-23T06:15:00Z2016-04-23T06:15:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】欢迎转载,转载请注明出处: http://www.cnblogs.com/lanrenxinxin/p/5424554.html 之前就有编译android源码的想法,但是由于有GFW的存在,又没有梯子,连开发工具都是经过androiddevtools从百度云弄下来的,前两天发现了清华大学AOSP的 <a href="https://www.cnblogs.com/lanrenxinxin/p/5424554.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5211262.htmlC/C++ 中嵌入 arm 汇编 - _懒人GCC编译器支持直接在C或者C++代码中,嵌入ARM汇编代码。其基本格式非常简单,大致如下: __asm__ [__volatile__] ( assembler template : [output operand list] /* optional */ : [input operand lis2016-02-24T09:50:00Z2016-02-24T09:50:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】GCC编译器支持直接在C或者C++代码中,嵌入ARM汇编代码。其基本格式非常简单,大致如下: __asm__ [__volatile__] ( assembler template : [output operand list] /* optional */ : [input operand lis <a href="https://www.cnblogs.com/lanrenxinxin/p/5211262.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5207174.htmlandroid ART hook - _懒人0x00 前言 之前一直都是在Dalvik 虚拟机上在折腾,从Android 4.4开始开始引入ART,到5.0已经成为默认选择。而且最近看到阿里开源的 Dexposed 框架,已经提供了对于android art 模式下的 hook 支持,所以对照着android art 部分的源码和之前 lia2016-02-23T06:42:00Z2016-02-23T06:42:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】0x00 前言 之前一直都是在Dalvik 虚拟机上在折腾,从Android 4.4开始开始引入ART,到5.0已经成为默认选择。而且最近看到阿里开源的 Dexposed 框架,已经提供了对于android art 模式下的 hook 支持,所以对照着android art 部分的源码和之前 lia <a href="https://www.cnblogs.com/lanrenxinxin/p/5207174.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5193920.htmlWindows 下常见的反调试方法 - _懒人稍稍总结一下在Crack或Rervese中比较常见的一些反调试方法,实现起来也比较简单,之后有写的Demo源码参考,没有太大的难度。 ①最简单也是最基础的,Windows提供的API接口:IsDebuggerPresent(),这API实际上就是访问PEB的BeingDebugged标志来判断是否处2016-02-16T13:54:00Z2016-02-16T13:54:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】稍稍总结一下在Crack或Rervese中比较常见的一些反调试方法,实现起来也比较简单,之后有写的Demo源码参考,没有太大的难度。 ①最简单也是最基础的,Windows提供的API接口:IsDebuggerPresent(),这API实际上就是访问PEB的BeingDebugged标志来判断是否处 <a href="https://www.cnblogs.com/lanrenxinxin/p/5193920.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5100136.html一次病毒分析之旅 - _懒人0x00 前言这个病毒应该是比较简单的,别人给我的样本,让我帮忙看看,看样子是很早的一个病毒,针对Windows XP系统的,行为分析很简单,但是想着不能就仅仅分析关键点,要不就把整个结构给逆向出来,弄了两天,搞的差不多了,简单的记录一下。0x01 基本介绍整个病毒是4个文件组成:27.exe,27...2016-01-04T12:58:00Z2016-01-04T12:58:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】0x00 前言这个病毒应该是比较简单的,别人给我的样本,让我帮忙看看,看样子是很早的一个病毒,针对Windows XP系统的,行为分析很简单,但是想着不能就仅仅分析关键点,要不就把整个结构给逆向出来,弄了两天,搞的差不多了,简单的记录一下。0x01 基本介绍整个病毒是4个文件组成:27.exe,27... <a href="https://www.cnblogs.com/lanrenxinxin/p/5100136.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5064671.htmlx64内核内存空间结构 - _懒人0x00 前言本文主要是讨论Windows 7 x64下的内核虚拟地址空间的结构,可以利用WiinDBG调试的扩展命令"!CMKD.kvas"来显示x64下的内核虚拟地址空间的整体布局。了解内核的地址布局在某些情况下是很有的,比如说在研究New Blue Pill的源码和虚拟化的时候。0x01 基本...2015-12-21T12:02:00Z2015-12-21T12:02:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】0x00 前言本文主要是讨论Windows 7 x64下的内核虚拟地址空间的结构,可以利用WiinDBG调试的扩展命令"!CMKD.kvas"来显示x64下的内核虚拟地址空间的整体布局。了解内核的地址布局在某些情况下是很有的,比如说在研究New Blue Pill的源码和虚拟化的时候。0x01 基本... <a href="https://www.cnblogs.com/lanrenxinxin/p/5064671.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5021641.html谈谈AsmJit - _懒人0x01 基本介绍 AsmJit是一个完整的JIT(just In Time, 运行时刻)的针对C++语言的汇编器,可以生成兼容x86和x64架构的原生代码,不仅支持整个x86/x64的指令集(包括传统的MMX和最新的AVX2指令集),而且提供了一套可以在编译时刻进行语义检查的API。AsmJit的2015-12-13T00:44:00Z2015-12-13T00:44:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】0x01 基本介绍 AsmJit是一个完整的JIT(just In Time, 运行时刻)的针对C++语言的汇编器,可以生成兼容x86和x64架构的原生代码,不仅支持整个x86/x64的指令集(包括传统的MMX和最新的AVX2指令集),而且提供了一套可以在编译时刻进行语义检查的API。AsmJit的 <a href="https://www.cnblogs.com/lanrenxinxin/p/5021641.html" target="_blank">阅读全文</a>https://www.cnblogs.com/lanrenxinxin/p/5006442.htmlIDA动态调试so文件出现SIGILL - _懒人用ida6.6 调试android的so文件时经常会报SIGILL的错误,意思是指令非法。而且这种错误基本都是发生在系统函数内部,像我遇到过的mmap,fopen,fgets等等。在这些函数内部如果用F8单步跟很容易某条指令就触发异常了,就得终止调试。但是如果在异常指令之后下断点,然后直接F9过去,...2015-11-30T02:21:00Z2015-11-30T02:21:00Z_懒人https://www.cnblogs.com/lanrenxinxin/【摘要】用ida6.6 调试android的so文件时经常会报SIGILL的错误,意思是指令非法。而且这种错误基本都是发生在系统函数内部,像我遇到过的mmap,fopen,fgets等等。在这些函数内部如果用F8单步跟很容易某条指令就触发异常了,就得终止调试。但是如果在异常指令之后下断点,然后直接F9过去,... <a href="https://www.cnblogs.com/lanrenxinxin/p/5006442.html" target="_blank">阅读全文</a>