English 中文(简体)
采用mfvenom
原标题:Generate shellcode by using msfvenom

http://youtu.be/aEZKGW_VTd4?t=464”rel=“nofollow noreferer”

he used msfpayload & msfencode to genarate shellcode for cmd command.

msfpayload windows/exec cmd=calc.exe R | msfencode -e x86/alpha_mixed -t c -v

But now, metasploit team change msfpayload & msfencode to msfvenom, so I convert the above code to msfvenom:

msfvenom -a x86 --platform windows -p windows/exec cmd=calc.exe -e x86/alpha_mixed -f c

shellcode has been generated but calculator was not started after excuted command on cmd. What s wrong with my msfvenom code? Thanks for reading.

update: In video, he used a short shellcode. He public the shellcode in description but didn t show how to generate it. I ve followed his instruction and get a long shellcode. When I use his short shellcode, it s worked but the same is not happen to my long shellcode.

问题回答

这个问题正在使用<条码>-f c,在ms中形成一种单体法,因为不能直接按指挥线执行的产出。 彩票编码需要一个包裹方案,使彩票编码得以保存和执行。 因此,该方案需要作为可起诉的汇编。

c. 写明的总结功能:

#include <stdio.h>

unsigned char code[] = "xYourShellCode";

int main(int argc, char **argv) {
  int foo_value = 0;

  int (*foo)() = (int(*)())code;
  foo_value = foo();

  printf("%d
", foo_value);
}

Instead if you just want an executable as output, you can try this:

(为X64窗户铺设一个标记)

msfvenom --platform windows --arch x64  -p windows/x64/exec CMD=calc.exe -b  x00x0Ax0D  -f exe -o a.exe

这为我工作:

msfvenom -p windows/exec cmd=notepad.exe -f c -e x86/alpha_mixed




相关问题
Modify Windows Command Prompt History from a Program?

Is there an API to add to the a windows command prompt history? I writing a console program and it would be handy to pop some commands into the history buffer under certain (limited) conditions.

How to send backspace using sendmessage(C#) to cmd.exe

I am trying to send keystrokes to cmd.exe that I launch from my app. In doing so, I am able to send all the keyboard characters, but if I try to send Backspace, it doesnt seem to take effect. The ...

Development Environment in Windows [closed]

What are your recommendations for setting up a development environment in Windows, especially when not using an IDE. I am attempting to familiarize myself with Windows, and I feel a bit lost. What ...

热门标签