Skip to content

Instantly share code, notes, and snippets.

@huhuang03
Last active March 28, 2017 02:15
Show Gist options
  • Select an option

  • Save huhuang03/8ae769a3d50ad9386f234ec97b4fb2ac to your computer and use it in GitHub Desktop.

Select an option

Save huhuang03/8ae769a3d50ad9386f234ec97b4fb2ac to your computer and use it in GitHub Desktop.
可执行文件格式:
1. windows 可编译可执行(Portable Executable, PE)格式
2. Unix 可执行和链接格式(Executable and linking format, ELF)
反汇编算法:
1. 线性扫描。GNU调试器(gdb)、微软公司的winDbg调试器和objjump实用工具的反汇编引擎均采用这种扫描方法。
2. 递归下降反编译器。IDA Pro
IDA Pro全称为Interactive Disassembler Professional
编译的时候可以选择静态链接或者动态链接,静态链接会将需要用的的共享库一起打包到发行文件中,而动态链接会动态的链接运行环境中的库。
函数调用约定:
1. _cdecl: 通过栈传递参数,调用方负责平衡栈。
2. _stdcall: 通过栈传递参数,被调用方负责平衡堆栈。所以被调用放要确切知道参数个数,不能使用可变参数。使用rtn x来平衡堆栈
3. x86 fastcall: 通过ecx,edx配合堆栈传递参数。ecx存储最左边的参数,多余参数通过堆栈传递
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment