by nothrabannosir · 11y ago · 0 comments
Try this:
$ mkfifo /tmp/tlspipe
$ nc -l -p 40001 </tmp/tlspipe | tee /tmp/tlsconvo | nc ownme.ipredator.se 10000 > /tmp/tlspipe
Then visit http://ownme.ipredator.se:10001 from that same host (curl or firefox or whatever). Now look at /tmp/tlspipe.Disclaimer: I'm completely unfamiliar with named pipes or tls, but I think this is what they mean.
EDIT: This should also work:
$ mkfifo /tmp/tlspipe
$ nc ownme.ipredator.se 10002 </tmp/tlspipe | tee /tmp/tlsconvo2 | nc ownme.ipredator.se 10000 >/tmp/tlspipe
EDIT2: Just realized that the above only captures one part of the convo. Try this: $ nc ownme.ipredator.se 10002 </tmp/tlspipe | tee /tmp/client-to-server | nc ownme.ipredator.se 10000 | tee /tmp/server-to-client >/tmp/tlspipe
Now you have the full back and forth. E.g.: $ strings /tmp/server-to-client
sYcdI*
Cambridge1
BTC Pinata Team1 0
ocaml-tls@h3q.com0
150207183718Z
150329183718Z0$1
tls services0
...http://www.felipemartins.info/2013/03/netcat-the-it-swiss-kn...
FWIW you can also do it with a single socat invocation, but I'll leave the exact command as an exercise for the reader.
$ cat /tmp/tlsconvo2|xxd|less
But I'm not into crypto, even that I don't know what it means or if it's the way to go. I liked the initiative though :-)