Sunday, September 12, 2010

Using Netcat and a symmetric algo (AES or 3DES) for secure commnuications

I was messing with netcat (again) transfering files back and forth from computer A to B. I know that the file transfer are indeed not secure and are transfered in plaintext and wanted to have netcat remedy this. Although there are secure alternatives to netcat (cryptcat and sbd), i love netcat, after all, netcat fathered most of these other tools. Plus i wanted a challenge. I wanted to use openssl's symmetric cyphers to encrypt data transfered through netcats client/server nodes.
Simple enough, it didn't take me long to put things together

# openssl enc -aes128 -nosalt -pass pass:mypass -in file.txt| nc -q 1 80

# nc -lvp 80 | openssl enc -aes128 -d -nosalt -pass pass:mypass -out file.txt


  1. You might wanna check out cryptcat:

  2. BAH ignore me, I only read the title..... :(

  3. lol no worries. Thanks for the comment anyways.