08 2012 档案

摘要:__attribute__((alias)): 为一个symbol声明一个别名 return-type newname([arguments-list]) __attribute__((alias("oldname"))) oldname: 原始函数名 newname: 原始函数的别名#include <stdio.h>#include <stdlib.h> void foo(){ printf("\nInside %s\n",__FUNCTION__);} void _foo() __attribute__((alias(&qu 阅读全文
posted @ 2012-08-14 13:34 yarpee 编辑
摘要:sizeof i,我还是第一次看到的用法sizeof有三种语法形式,如下: 1) sizeof( object ); // sizeof( 对象 ); 2) sizeof( type_name ); // sizeof( 类型 ); 3) sizeof object; // sizeof 对象; 所以, int i; sizeof( i ); // ok sizeof i; // ok sizeof( int ); // ok sizeof int; // error得到一个数值类型所对应的字符串缓冲大小 #define _TYPE_BUF_SIZE(type) size... 阅读全文
posted @ 2012-08-13 17:26 yarpee 编辑
摘要:ELF里面重定位项的结构struct elf32_rel { Elf32_Addr r_offset; Elf32_Word r_info; //SYMBOL=r_info>>8 TYPE=r_info&0xff. } ;r_offset是需要进行重定位的地址;SYMBOL是重定位以后需要指向的符号;TYPE是重定位的类型。绝对地址指令 c7 44 24 04 00 00 00 00 movl $0x0,0x4(%esp)相对地址指令 e8 fc ff ff ff call 27<main+0x27>编译器把这两个地址部分暂时用0x0000000... 阅读全文
posted @ 2012-08-04 22:11 yarpee 编辑
摘要:Linux Kernel ELF Binary Loader Local Proof of Concepthttp://forum.eviloctal.com/thread-4414-1-1.htmlhttp://www.sudu.cn/info/html/edu/20050104/198595.html/***binfmt_elf executable file read vulnerability**gcc -O3 -fomit-frame-pointer elfdump.c -o elfdump**Copyright (c) 2004iSEC Security Research. All 阅读全文
posted @ 2012-08-04 16:36 yarpee 编辑
摘要:http://bbs.sucop.com/forum.php?mod=viewthread&tid=18431&extra=page%3D1&page=1对抗启发式代码仿真检测技术分析创建时间:2008-05-06文章属性:原创文章提交:nEINEI (neineit_at_gmail.com)作者 : nEINEI 邮箱 : neineit@gmail.com 完成于 :08-05-06 最近在研究病毒的检测技术,虽然在这个木马、流氓件猖獗的年代,检测技术(除了考虑效率因素外)已经变得不是十分重要了。但俺仍然出于兴趣想从这里面寻找些思路。或许对抗技术的本身并不在于谁彻 阅读全文
posted @ 2012-08-03 09:22 yarpee 编辑
摘要:1.noreturn A few standard library functions, such as abort and exit, cannot return. GCC knows this automatically. Some programs define their own functions that never return. You can declare them noreturn to tell the compiler this fact. For example,void fatal () __attribute__ ((noreturn));voidfata... 阅读全文
posted @ 2012-08-02 18:38 yarpee 编辑