Netcat 101: Making Processes Talk To Each Other, HakTip 89

preview_player
Показать описание
Hak5 -- Cyber Security Education, Inspiration, News & Community since 2005:
____________________________________________
This week on HakTip Shannon is using Netcat to make two processes talk to each other on a network!

How to make Netcat talk to other processes:
We have learned how to use Netcat to chat with another computer, and how to push a file transfer. Today, I'm going to show you how to use Netcat to make two processes talk to each other on a network. I want to send all of my files in a directory to my Linux machine. My Windows machine (10.73.31.59) will send a directory to my Linux machine. So on the sender computer:
Type tar -cf - /foldername | nc -l -p 1337
On my W8 computer:
Type nc 10.73.31.145 1337 | tar -xf -
Now my new pictures and directory have been transferred!

I can also copy just one file, which we did similarly in a past HakTip (ep 83):

And to copy over and restore the whole freakin HDD:
sender: cat /dev/hdb | nc -l -p 1337
On my second comp, type nc 10.73.31.59 1337 "greater than" /dev/hdb

With that said, I wouldn't recommend using Netcat to transfer your entire disc. If there are any errors during transfer, it's not going to tell you. You can choose to use DD to duplicate your disc with Netcat (but even so, make sure you know what you are doing so it doesn't end up being standing for Destroyer of Discs).
After the break, I'll show you how to set up a quick proxy!

I'll be wrapping up my Netcat series in the next week or so, so if you have questions, send me a comment below or email us at TIPS.
And be sure to check out our sister show, Hak5 for more great stuff just like this. I'll be there, reminding you to trust your technolust.

-~-~~-~~~-~~-~-
Please watch: "Bash Bunny Primer - Hak5 2225"
-~-~~-~~~-~~-~-
____________________________________________
Founded in 2005, Hak5's mission is to advance the InfoSec industry. We do this through our award winning educational podcasts, leading pentest gear, and inclusive community – where all hackers belong.
Рекомендации по теме
Комментарии
Автор

Guys Isnt Snubs Amazing and Awesome, Teaching us all these cool trix lol :), Great way to go Shannon, Keep up the Awesomeness you do. Great Show again.

CyphrHaxPalm
Автор

Thanks as a developer this is really helpful :)

Wouwousoft
Автор

awesome vid again guys. what about rync in stead of dd. Do you guys have any great tips and tricks for rync ?

eamonnmccallum
Автор

My process would like to talk to Shannon's processes a bit more.

nacs
Автор

Where do you get netcat/cat/nc for Windows?  I'd like a trustworthy source.

LogosByLogos
Автор

cat afile | nc -l -p 1337 fails, informing me another nc version is available.
man page says  It is an error to use -l option in conjunction with the -p, -s, or -z
options.

maxpolaris
Автор

Now, you know you can make it list every file you're transferring so you have like a progress?

Try nc -l -p 1337 -vv > filename.tgz, now gives you like a status for your downloading file :).

lanceseidman
join shbcf.ru