Here are several other methods to create a Backdoor, but here we have a simple way to create backdoor by using
Metasploit Framework. Metaspolit is an open source platform that helps you in finding vulnerabilities, exploit development and in creation of executable files. In this method we will create a strong form of Backdoor which would be undetectable. First we will create executable payloads to use it as backdoor and later we will check its effectiveness. As we have to create an executable file, so we will use
windows/meterpreter/reverse_tcp payload. With
–S we can see the summary of the payload.
As you can see the only option that it requires is to configure the LHOST address. To convert our payload in an
.exe file we will use the command shown in below image.
Do remember in LHOST we will put our own local IP address, and then X parameter will ultimately convert this payload in .exe file. We will give this file any name. Now we will open Metasploit Framework and will use following command module exploit/multi/handler.
In order to create an undetectable backdoor we will create self customized backdoor. So, we are going to create a new file with any random name, which will be encoded with shikata_ga_nai 1 time and it will avoid the characters \x00\x0a\x0d.
Now we are going to open a file with a hex editor to review if it files containing any characters. Here is the sample code shown in below image that we have used for backdoor.
After sending backdoor to our victim and he/she executed our malicious file, the expected result will be look like this:
The execution of the backdoor will generate HTTP request to the malicious web server where our file is located. A Meterpreter session like this will return to us. Your backdoor is ready. Don't get worried about anti viruses, our backdoor doesn’t contain any known signatures and have been encoded with the shikata_ga_nai which is a polymorphic encoder so it will easily bypass most of the well-known antivirus.