07 2012 档案

摘要:1.模块内部调用或跳转对于现代的系统来讲,模块内部的跳转、函数调用都可以是相对地址调用,或者是基于寄存器的相对调用,所以对于这种指令是不需要重定位的。即无论模块被装载到哪个位置,指令都有效。2.模块内部数据访问任何一条指令与它需要访问的模块内部数据之间的相对位置是固定的,那么只需要相对于当前指令加上固定的偏移量就可以访问模块内部数据了。数据的相对寻址往往没有相对于当前指令地址(PC)的寻址方式,ELF采用了一个很巧妙的办法来得到当前的PC值,然后再加上一个偏移量就可以达到访问相应变量的目的了。3.模块间数据访问在数据段里面建立一个指向这些变量的指针数组,被称为全局偏移表(GOT)4.模块间调用 阅读全文
posted @ 2012-07-29 22:18 yarpee 编辑
摘要:在内存映射过程中,页是映射的最小单位,对于x86系列处理器来说,默认的页大小为4096字节段地址对齐保证页映射机制,但是对其方式也造成了内部会存在内部碎片,浪费空间有些unix系统采用了一个很取巧的办法,就是让那些各个段接壤部分共享一个物理页面,然后将该物理页面分别映射两次。这样做的好处是进程中的某一段区域就是整个ELF文件的映像。同时物理页面数量也减少 阅读全文
posted @ 2012-07-29 20:36 yarpee 编辑
摘要:People using VPN software indeed face this issue. See :http://ubuntuforums.org/showthread.php?t=1459559&highlight=module+tun+aventail&page=3This link mentions a work-around :sudo apt-get install build-essential linux-headers-`uname -r`mkdir faketuncd faketunecho -e "#include <linux/m 阅读全文
posted @ 2012-07-24 09:10 yarpee 编辑
摘要:http://extreme.0ginr.com/blog/2012/05/0x0%E7%8E%A9%E7%8E%A9%E6%B7%B1%E4%BF%A1%E6%9C%8D%E7%BD%91%E7%9B%91/http://extreme.0ginr.com/blog/2012/05/0x1%E7%8E%A9%E7%8E%A9%E6%B7%B1%E4%BF%A1%E6%9C%8D%E7%BD%91%E7%9B%91/http://extreme.0ginr.com/blog/2012/05/0x2%E7%8E%A9%E7%8E%A9%E6%B7%B1%E4%BF%A1%E6%9C%8D%E7% 阅读全文
posted @ 2012-07-22 20:47 yarpee 编辑
摘要:#define page_to_pfn(page) (((page) - mem_map) + PHYS_PFN_OFFSET) //(page) - mem_map得到是有几个页,在加上物理页帧偏移#define pfn_to_page(pfn) ((mem_map + (pfn)) - PHYS_PFN_OFFSET) //物理页帧到页page两个同类型的结构体指针进行"-"运算,结果为两个单元地址空间之间一共距离多少个这种结构体http://bbs.chinaunix.net/thread-2055304-1-1.htmlhttp://hi.baidu.com/cle 阅读全文
posted @ 2012-07-20 15:47 yarpee 编辑
摘要:add esp,8call sub_401000mov esp,ebppop ebpretn将调用函数sub_40100的返回值作为调用函数的返回值传递在调用sub_40100函数前,这个栈实际移动了8个字节。esp增加了8,这个移动使两个函数的返回值的栈位置重合了。所以这个值被传递了 阅读全文
posted @ 2012-07-16 10:36 yarpee 编辑
摘要:7月份挣扎了一下要不要留在nsfocus,最后还是坚持留下来,毕竟还有很多需要学习的地方7月份的读书计划: IDA两本书再详细读一遍,具体实例分析 逆向工程揭秘7月份多练 阅读全文
posted @ 2012-07-15 19:25 yarpee 编辑
摘要:Opcode CALLCPU: 8086+Type of Instruction: UserInstruction: CALL procadrPhysical form:| Near call - withing the same segment| Far call - call to another segmentE8 cw CALL rel16 ; Near call, operand specifies relative displacement to next instructionE8 cd CALL rel32 ; Near call, operand specifies rela 阅读全文
posted @ 2012-07-10 22:06 yarpee 编辑
摘要:http://blog.xen.org/index.php/2012/06/13/the-intel-sysret-privilege-escalation/ http://weibo.com/2093186395/yr9aR6RjU?type=reposthttp://pastebin.com/n0rNbfVVhttp://hi.baidu.com/yuange1975/blog/item/003e3a00f69a03a6e950cdf7.htmlIntel的x64位芯片的sysret内部实现伪码如下——if (Not in 64-Bit Mode or Syscall/Sysret not 阅读全文
posted @ 2012-07-10 13:52 yarpee 编辑