标签: 0day

5 篇文章

栈溢出:代码植入
0x01 代码植入原理: 通过栈溢出让程序执行输入数据中植入的代码,把返回地址覆盖为buffer的起始地址,植入的代码放到buffer中 实验验证:向password.txt文件中植入一个二进制机器码,这段机器码用来调用windows的一个api函数MessageBoxA,最终在桌面弹出一个消息框并显示"failwest"字样。   code /***************************************************************************** To be the apostrophe which changed "Impossible" into "I'm possible"! POC code of chapter 2.4 in book "Vulnerability Exploit and Analysis Technique" file name : stack_overflow_exec.c author : failwest date : 2006.10.1 description : demo show how to redirect EIP to executed extra binary code in buffer Noticed : should be complied with VC6.0 and build into debug version the address of MessageboxA and the start of machine code in buffer have to be make sure …
栈溢出:突破密码验证程序 – 控制程序执行流程
  0x01 淹没帧状态值控制程序执行原理 /***************************************************************************** To be the apostrophe which changed "Impossible" into "I'm possible"! POC code of chapter 2.2 in book "Vulnerability Exploit and Analysis Technique" file name : stack_overflow_var.c author : failwest date : 2006.9.20 description : demo show nearby var overrun in stack input 8 letters to bypass authentication Noticed : complied with VC6.0 and build into begug version version : 1.0 E-mail : failwest@gmail.com Only for educational purposes enjoy the fun from exploiting :) ******************************************************************************/ #include <stdio.h> #define PASSWORD "1234567" int …
栈溢出:突破密码验证程序 – 修改邻居变量
  0x01 修改邻里变量的原理 1.1 程序: /***************************************************************************** To be the apostrophe which changed "Impossible" into "I'm possible"! POC code of chapter 2.2 in book "Vulnerability Exploit and Analysis Technique" file name : stack_overflow_var.c author : failwest date : 2006.9.20 description : demo show nearby var overrun in stack input 8 letters to bypass authentication Noticed : complied with VC6.0 and build into begug version version : 1.0 E-mail : failwest@gmail.com Only for educational purposes enjoy the fun from exploiting :) ******************************************************************************/ #include <stdio.h> #define PASSWORD "1234567" i…
Ollydbg中寻找main函数入口
《C++反汇编与逆向分析技术》讲解如何查找main函数: OllyDbg默认情况下将程序中断在PE装载器开始处,不是在main函数开始处,因为需要手工识别main函数的位置。 识别main函数如同识别一个人。要识别一个人,首先观察外观,识别身体和外貌特征,把这些特征和自己认识的人匹配,从而判断这个人的身份。   main函数特征: 1、有3个参数,分别是argc、argv、环境变量信息,而且main函数是启动函数中唯一具有3个参数的函数。同理WinMain函数是启动函数中唯一具有4个参数的函数。 2、main函数返回需要调用exit函数,结束程序根据main函数调用特征,找到入口代码第一次调用exit函数处,离exit最近的且有3个参数的函数通常就是main函数。 老钱这里只讲到了识别main函数啊,没有讲怎么找到main函数。       F8大法好(借鉴下,这个比较容易) 文章参考:https://blog.csdn.net/qingshenxue/article/details/6209788 ===================== 先声明下:这个和脱壳没关系,不是找壳里面的程序入口哦,只是程序本身的入口,个别朋友不要误会哈。 一般用OllyDBG打开程序的时候,并不是直接定位到程序入口,而是还要先进行一系列的初始化工作,但做这些工作的反汇编代码我们是不需要的,所以我们要快速跳过,直接到程序入口。 我先把方法写出来,然后再简单分析一下初始化的时候都干了什么。 1. 一路F8下去,分别步过下列两个函数: call dword ptr ds:[<&KERNEL32.GetVersion>] ; kernel32.GetVersio…
Crack小实验
0x01 实验环境: 操作系统 windows10 编译器 visual C++6.0 编译选项 默认编译选项 build版本 release版本 release和debug都可以 0x02 release 用vc++6.0编译出来一个release版本; 改变可执行文件得执行流程,使输入任何字符都可以进入正确的执行流程; code /***************************************************************************** To be the apostrophe which changed "Impossible" into "I'm possible"! POC code of chapter 3.7 in book "Vulnerability Exploit and Analysis Technique" file name : crack_me.c author : failwest date : 2006.9.20 description : used as a simple demo to show how to crack a PE file Noticed : should be complied with VC6.0 and build into release version version : 1.0 E-mail : failwest@gmail.com Only for educational purposes enjoy the fun from exploiting :) *****************************…