Backdooring Practical
Backdooring Practical
Intro:
metasploitable linux https://sourceforge.net/projects/metasploitable/files/Metasploitable2/
Metasploitable 2 : Login information : msfadmin//msfadmin
Kali Linux: Login information: root//toor
1. Do ifconfig:msfadmin@metasploitable:~$ ifconfig
4. Choose an exploit for that service you chose, then exploit it:
- Windows 7 vm (IEUser//Passw0rd!)
- Kali Linux (root//toor)
- Netcat https://joncraton.org/blog/46/netcat-for-windows/
- Process Explorer https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx
- TCPview https://technet.microsoft.com/en-us/sysinternals/tcpview.aspx
- Put nc.exe in “C:\windows\system32” folder. (This is done to hide the nc.exe program)
NOTE: Steps 2-4 must be done on cmd using admin privilege and must be typed in manually.
Copy/pasting does not work even when the line is identical.
- netsh advfirewall firewall add rule name=”Nc 449” dir=in action=allow protocol=UDP
localport=449
Everything is now setup, but we don’t want to wait for the user to restart the computer before netcat
starts, thus we create a visual basic script to run netcat right away
Step 5: Creating vbs script to run netcat instantly.
- Open notepad and write the following code, then save it as a .vbs file
You can now use process explorer to verify that netcat is running. The process is called nc.exe.
- Use the command ipconfig to view the ip address of the machine (IPv4 Address in this case).
If everything worked properly, you should be connected to the target computer and have a cmd prompt
open on kali for the target computer.
If somebody was to view process manager while netcat was connected, they would see cmd.exe running
under the nc.exe process.
In addition, TCPview can be used to find additional information about the netcat instance and what ip
the target is connected to.
If the netcat process was killed manually killed by the user, or crashed for some reason it does not
automatically restart. It only restarts when the computer reboots. As such, trying to connect while the
nc.exe is not running on the target throws an error.