网上逛街看到的文章,然后简单的写了一个小例子,记录下来!
// AsmDemo.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include
unsigned char *asm_code()
{
__asm
{
lea eax,__code
jmp __ret
}
//这里放shellcode的汇编代码
int address = 0x55D330;
__asm
{
__code:
mov eax,ebx
mov ebx,6
mov eax,3
call address;
int 3;
__ret:
}
}
void main()
{
unsigned char temp;
unsigned char *asm_p = asm_code();
while((temp = *asm_p) != 0xCC)
{
printf("%.2X",temp);
asm_p ++;
}
getchar();
}
随便写的汇编代码,效果图:

本文链接:https://it72.com/1641.htm