能力值:
(RANK:10 )
|
-
-
26 楼
他的二进制码的基址是 0x00408000. 你需要添加一个连接选项 /base:0x00408000, 他的代码明显用到没有重定位的数据
.data:0040800C 68 26 80 40 00 push offset aHelloWorld ; "Hello world!\n" .data:00408011 6A F5 push 0FFFFFFF5h .data:00408013 FF 15 34 80 40 00 call dword_408034
这样加载的地址不同肯定会xx不能read, 其实就是写shellcode, 加上对编译的理解.
|
能力值:
( LV3,RANK:30 )
|
-
-
38 楼
固定printf函数地址写法! 38字节搞定
<00402000>
push ebp
mov ebp, esp
sub esp, 0x8
and esp, -0x10
mov eax, 0xFFBFDFE5//字符串指针 not 0040201A
not eax
mov dword ptr [esp], eax
call 7599C5B9 //WIN7 printf 函数指针
leave
retn
55 89 E5 83 EC 08 83 E4 F0 B8 E5 DF BF FF F7 D0 89 04 24 E8 A1 A5 59 75 C9 C3 48 65 6C 6C 6F 57 6F 72 6C 64 0A 00
char main=0x55,main1=0x89,main2=0xe5,main3=0x83,main4=0xec,main5=0x08,main6=0x83,main7=0xe4,main8=0xf0,main9=0xb8,main10=0xe5,main11=0xdf,main12=0xbf,main13=0xff,main14=0xf7,main15=0xd0,main16=0x89,main17=0x04,main18=0x24,main19=0xe8,main20=0xa1,main21=0xa5,main22=0x59,main23=0x75,main24=0xc9,main25=0xc3,main26=0x48,main27=0x65,main28=0x6c,main29=0x6c,main30=0x6f,main31=0x57,main32=0x6f,main33=0x72,main34=0x6c,main35=0x64,main36=0x0a,main37=0x00;
<00402000>
push ebp
mov ebp, esp
sub esp, 0x8
and esp, -0x10
mov eax, 0xFFBFDFE5 //字符串指针 not 0040201A
not eax
mov dword ptr [esp], eax
call 77C1186A //WINXP printf 函数指针
leave
retn
55 89 E5 83 EC 08 83 E4 F0 B8 E5 DF BF FF F7 D0 89 04 24 E8 52 F8 80 77 C9 C3 48 65 6C 6C 6F 57 6F 72 6C 64 0A 00
char main=0x55,main1=0x89,main2=0xe5,main3=0x83,main4=0xec,main5=0x08,main6=0x83,main7=0xe4,main8=0xf0,main9=0xb8,main10=0xe5,main11=0xdf,main12=0xbf,main13=0xff,main14=0xf7,main15=0xd0,main16=0x89,main17=0x04,main18=0x24,main19=0xe8,main20=0x52,main21=0xf8,main22=0x80,main23=0x77,main24=0xc9,main25=0xc3,main26=0x48,main27=0x65,main28=0x6c,main29=0x6c,main30=0x6f,main31=0x57,main32=0x6f,main33=0x72,main34=0x6c,main35=0x64,main36=0x0a,main37=0x00;
GCC命令
gcc.exe "D:\codes\hello.c" -lm -w -o "hello"
|