mailing list archives
Re: Your favorite Ncat/nc/Netcat trick?
From: Brandon Enright <bmenrigh () ucsd edu>
Date: Fri, 13 Feb 2009 00:09:53 +0000
-----BEGIN PGP SIGNED MESSAGE-----
On Thu, 12 Feb 2009 17:00:09 -0700
David Fifield <david () bamsoftware com> wrote:
I'd like to have some more examples of fun, useful, or unusual things
to do with Ncat. I have a few of them, based on my own limited
What's your favorite Ncat trick? Did it (or nc, etc.) ever get you out
of a jam? Do you have any experiences that would make good examples
for the users' guide?
Here are a few web pages that might give you ideas:
My personal favorite trick is the parser-breaking DNS server I used to
test NSE in http://seclists.org/nmap-dev/2008/q4/0526.html and
http://seclists.org/nmap-dev/2009/q1/0317.html. I almost included
that, but then I thought it would require too much explanation.
I often use socat+netcat+perl to unwrap a SSL service and/or modify the
traffic. For example, to turn IMAPS into IMAP, save the results, and
even mess with what is being sent via a perl script you'd do something
$ mkfifo backpipe
$ while [ 1 == 1 ]; do socat OPENSSL:popmaster.ucsd.edu:993,verify=0 \
STDIO 0<backpipe | nc -l -p 143 | ./filter.pl | tee -a out 1>backpipe; done
Now, I suspect ncat could replace socat for this job. It certainly
could replace nc. It could also probably replace the while loop.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
-----END PGP SIGNATURE-----
Sent through the nmap-dev mailing list
Archived at http://SecLists.Org