Live data from Hacker News

Cool stuff you can do with netcat

en.wikipedia.org

21–30 of 44 posts

Re: Cool stuff you can do with netcat

#22

I actually got in trouble trying to use netcat for something quite legitimate in my former job at RandomBigCorp... Oops.

Please elaborate? At my current place of employment, "hacking tools" are banned. On that list is netcat. It is installed on every unix desktop and server, and I use it daily. I have decided to just not point out the stupidity of this -- they might do something that's even more stupid as a response.

I've always found that it's better to ask for forgiveness than permission in a large bureaucratic technically simplified corporation, otherwise I'd get nothing done. Ask, and they say "no".

Re: Cool stuff you can do with netcat

#23

Anyone want to give a few examples of cool things they actually do with netcat?

I spent a few summers at the National Institutes of Health building a DICOM (Digital Imaging and Communications in Medicine) suite for the storage and retrieval of Nuclear Medicine and CT images. It consisted of a client and a server and was built completely in IDL. It used Netcat both to listen/respond on the server side and to issue queries and retrieve (meta)data on the client side.

Like others in this thread, I too received a few bureaucratic slaps on the wrist for doing unauthorized port-scanning during the development process (we were trying to find a set of suitable unused ports for the package). Apparently it was worth the trouble, though--it was nearly 10 years ago that I built the package, and the software's still in use!

Re: Cool stuff you can do with netcat

#24

Earlier quoted context omitted.

Please elaborate? At my current place of employment, "hacking tools" are banned. On that list is netcat. It is installed on every unix desktop and server, and I use it daily. I have decided to just not point out the stupidity of this -- they might do something that's even more stupid as a response.

I've always found that it's better to ask for forgiveness than permission in a large bureaucratic technically simplified corporation, otherwise I'd get nothing done. Ask, and they say "no".

It's always wise to exercise discretion: http://db.tidbits.com/article/8886

Yes, that Randall Schwartz.

Re: Cool stuff you can do with netcat

#26
post #15

Anyone want to give a few examples of cool things they actually do with netcat?

A few days ago I was wondering if the link between two remote hosts was 100Mbps or 1Gbps, and didn't have root access to run ethtool (sidenote: is there an easier way for an unprivileged user to determine this?), so out came netcat and dd: host1$ dd if=/dev/zero | nc host2 5432 host2$ nc -l 5432 > /dev/null Let it run for a moment and then ctrl-C'd host1; the stats dd printed on exit gave a pretty clear answer to my…

For an easier way, consider ifconfig. You can run it as non-root, you know - you just won't be able to change anything.

Re: Cool stuff you can do with netcat

#27
post #17

Poor man's skype: sender arecord -f cd -c 2 | lame -b128 - - | netcat -u your-ip 6881 | mpg123 - receiver arecord -f cd -c 2 | lame -b128 - - | netcat -u -l 6881 | mpg123 -

If you're really poor, it would likely be useful to know that hooking headphones up to the microphone jack gives you a usable microphone. Just speak directly into one of the earpieces.

Re: Cool stuff you can do with netcat

#28
post #19

Earlier quoted context omitted.

Please elaborate? At my current place of employment, "hacking tools" are banned. On that list is netcat. It is installed on every unix desktop and server, and I use it daily. I have decided to just not point out the stupidity of this -- they might do something that's even more stupid as a response.

Yeah that is ridiculous. It's misleading for potential netcat users. And by banning it there can be no discussion about how to actually use it safely and responsibly. "hacking tools" are banned. If you are asked about it. The best way is to respond that you use it as a a diagnostic tool or analysis tool. As for arguing it's not a hacking tool - A person could take something as innocent as VBScript for Office and writ…

The whole thing plays out like banning sharp knives for chefs' safety. It's a useless, infuriating gesture, but it probably looked good for someone on paper. Politics is an ugly beast.

Re: Cool stuff you can do with netcat

#29
post #24

Earlier quoted context omitted.

I've always found that it's better to ask for forgiveness than permission in a large bureaucratic technically simplified corporation, otherwise I'd get nothing done. Ask, and they say "no".

It's always wise to exercise discretion: http://db.tidbits.com/article/8886 Yes, that Randall Schwartz.

It's too bad you can't expunge lawyers' fees. Yikes.

And no blame, but it's probably a good idea to say, "We're scanning for weak passwords" first. The sysadmin at the library I used to work at ran password crackers occasionally, and sent out an e-mail once saying that he suddenly knew a lot of staffs' boyfriends names. It's a delicate issue.

Re: Cool stuff you can do with netcat

#30

I actually got in trouble trying to use netcat for something quite legitimate in my former job at RandomBigCorp... Oops.

Please elaborate? At my current place of employment, "hacking tools" are banned. On that list is netcat. It is installed on every unix desktop and server, and I use it daily. I have decided to just not point out the stupidity of this -- they might do something that's even more stupid as a response.

This is exactly why I got in trouble... It's a stupid policy but there it is not worth fighting the bureaucracy. Also I was using it in a test environment.
Post reply on HN