DESCRIPTION
-----------

Ncovert2 is a program designed to function as a TCP covert channel for file
transfer. It is based in part on Ncovert, which is based in part on Chris
Rouland's covert_tcp program. By using a shared passphrase and a session key,
a file can be covertly transmitted from host to host. The traffic resembles
a port scan, which is fairly common and easily ignored as port scans occur
almost constantly on the Internet. The first packet contains the session key
and the file size, and subsequent packets contain the file's data. While the
data is obfuscated, it is not encrypted, therefore it is highly recommended
that the file be encrypted before transmission.


INSTALLATION
------------

$ tar xvzf ncovert2-x.x.tgz
$ cd ncovert2-x.x
$ ./configure
$ make
# make install


HOW IT WORKS
------------

Both the client and the server run ncovert2 and enter a password (the passwords
on both ends must match). The client and the server convert the plaintext
password to a SHA-1 hash. The client generates a session key, and by using part
of the SHA-1 hash, creates a unique IP ID and source port for the first packet.
Additionally, the client creates a unique ISN for the first packet with the
size of the file and the session key. The destination port for the first
packet is port 80, typical of a TCP ping.

When the server receives the TCP ping packet, the server's SHA-1 hash of the
password is used to extract the session key from the IP ID and source port.
The file size is extracted from the ISN using the newly extracted session key.

Both the client and the server generate a unique session hash using the
session key and the SHA-1 password hash. This is used to create unique source
ports which will be predictable on each end, allowing the server to more
easily spot the packet. The IP ID is randomly generated for each subsequent
packet, and the data is XOR'd with the session key and the old ISN from the
previous packet into the new ISN. By using the file size, the server knows how 
many packets to look for, and with the 'tagged' source port the server can 
easily spot the packets for saving.

To help mask the network traffic, the destination ports are random, and will
not repeat until all 65535 ports have been used (or until data transfer is
finished). This makes the entire transmission look like a TCP ping followed
by a port scan. Optionally, you can use random source addresses after the first
packet if you wish.


WHERE IT FAILS
--------------

There are a few areas where ncovert2 will 'fail'. As stated previously, it is
recommended you encrypt your data before sending it.

 - Session key recovery. By counting the packets and guessing the filesize
based upon the number of packets, it should be possible to recover the session
key, as the first packet's ISN is key XOR'd with filesize. This has been
obfuscated by randomly sending 'decoy' packets, however it is not beyond
possibility to determine the filesize. The random chance of a decoy packet is
one in two, counting packets and dividing by two gives you the starting point
for attempting to brute force the filesize. While this isn't a huge deal,
recovery of the session key makes a brute force attack against the SHA-1 hash
of the passphrase possible.

 - Passphrase SHA-1 hash recovery is possible if the session key is recovered.
In theory an attacker could brute force your passphrase to determine what
plaintext password generated the SHA-1 hash. If your passphrase is strong, this
isn't as big of an issue, however if you reuse passphrases with different
applications and on different systems, it could lead to additional compromise.

 - Known plaintext attack. Since we are not using the encryption, a known
plaintext attack is greatly simplified if the file being transferred is a text
file or is a known file type AND it is unencrypted.

 - Firewalls, NAT, and other network appliances may break the functionality.
Since the source port of the packet is used in the transfer scheme, any
firewall, NAT router, proxy, or network appliance (such as a home broadband
router) that rewrites the source address will break the functionality and
data transfer will not work.


TODO LIST
---------

Here are a few of the areas where ncovert2 will be tweaked and prodded in the
near future:

 - Replace sleep(1) with something a little more "port scannish" for a delay
between packets being sent.

 - A method of 'signing' packets to further obfuscate where the data is.

 - Eventually I will probably add an encryption option, but only after the
previous items (and any additional issues they create) on the TODO list are
implemented.


Simple Nomad - thegnome@nmrc.org
Sun Nov 23 09:24:30 CST 2003

$Id: README,v 1.1.1.1 2004/03/17 16:55:32 s-nomad Exp $
