running shellcode + vs2010

前端 未结 4 1181
春和景丽
春和景丽 2020-12-21 20:34

I just tried the following code snippet for shellcode testing purposes:-

#include

using namespace std;

char sc[] = \"\"; #i\'ve removed the         


        
4条回答
  •  离开以前
    2020-12-21 20:47

    To execute a shellcode in your C/C++ program with VS, the simplest way is embedding an Assembly code like this example below:

    char* buffer="blah blah blah";
    int main() {
        __asm{
            lea eax, buffer
            call    eax
        }
    }
    

    Hope this help!

提交回复
热议问题