NETCAT - The Hacker's Swiss Army Knife 04-18-2012, 07:23 PM
#1
hi i am back! 
Today I will tell ya guys some great uses of the tool called netcat. it's a quick guide so no long stories and all
Scan a range of ports with netcat
Netcat can be used to scan a port or a range of ports by mentioning ports with a hyphen ('-') in between them
Here the -v parameter means to be "verbose", the more "-v -v -v -v" you have the more in-detail results you will get. The -n means that you are straight writing down the IP address instead of a web address like www.site.com. -z option tells nc to NOT make any connections to the target. this gives you somewhat stealth while scanning. but dont depend on it you CAN be detected yet! :whistle:
Connect to an IP with netcat
You can connect to a webserver or any other open port with nc like a webserver!
The -w2 param means timeout in 2 seconds
it will not scan port 80 (as in above sample). instead it will connect to it! run this command and if the opposite port is open and ready and type and enter this:
This will get a reply from the opposite web server (or an angry reply like "go away you jerk!"
if the guy on the other side has some so-called "hack-catcher" or something).
"listen" on a local port with netcat
Yes you can you use it like a "cute" little webserver too
run this command:
It will listen to the port 80 on your localhost (127.0.0.1)
ofcourse you can use any other unused port too!
to test it open another terminal (or command prompt on windoze) and type:
now type something on terminal.. like "hello dumb netcat!" voila! it appears in the terminal/prompt where netcat is listening! :dance:
rest you can google and find out. nc is a very handy tool to do a lot more... like maybe you can set up a backdoor on a victim hacked system!
but that's a tutorial for some other time 
hope you like this little post. cheers and ba bye :bye:

Today I will tell ya guys some great uses of the tool called netcat. it's a quick guide so no long stories and all

Scan a range of ports with netcat
Netcat can be used to scan a port or a range of ports by mentioning ports with a hyphen ('-') in between them
Code:
nc -v -z -n 127.0.0.1 20-80Here the -v parameter means to be "verbose", the more "-v -v -v -v" you have the more in-detail results you will get. The -n means that you are straight writing down the IP address instead of a web address like www.site.com. -z option tells nc to NOT make any connections to the target. this gives you somewhat stealth while scanning. but dont depend on it you CAN be detected yet! :whistle:
Connect to an IP with netcat
You can connect to a webserver or any other open port with nc like a webserver!
Code:
nc -v -w2 -n 12.0.0.1 80The -w2 param means timeout in 2 seconds
it will not scan port 80 (as in above sample). instead it will connect to it! run this command and if the opposite port is open and ready and type and enter this:Code:
GET HTTP/1.1This will get a reply from the opposite web server (or an angry reply like "go away you jerk!"
if the guy on the other side has some so-called "hack-catcher" or something)."listen" on a local port with netcat
Yes you can you use it like a "cute" little webserver too
run this command:Code:
nc -l -p 80It will listen to the port 80 on your localhost (127.0.0.1)
ofcourse you can use any other unused port too!to test it open another terminal (or command prompt on windoze) and type:
Code:
nc -v -n 127.0.0.1 80now type something on terminal.. like "hello dumb netcat!" voila! it appears in the terminal/prompt where netcat is listening! :dance:
rest you can google and find out. nc is a very handy tool to do a lot more... like maybe you can set up a backdoor on a victim hacked system!
but that's a tutorial for some other time 
hope you like this little post. cheers and ba bye :bye:
~ # INDIAN ROGUE MERCENARY HACKER # ~


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)

