No description or website provided.
C Shell Other
Permalink
Failed to load latest commit information.
contrib Pristine OpenSSH 5.2 portable sources Jun 29, 2009
openbsd-compat Pristine OpenSSH 5.2 portable sources Jun 29, 2009
regress
scard Pristine OpenSSH 5.2 portable sources Jun 29, 2009
.gitignore
CREDITS Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ChangeLog
INSTALL Pristine OpenSSH 5.2 portable sources Jun 29, 2009
LICENCE Pristine OpenSSH 5.2 portable sources Jun 29, 2009
Makefile.in Obfuscated handshake implementation Jun 29, 2009
OVERVIEW
PROTOCOL Pristine OpenSSH 5.2 portable sources Jun 29, 2009
PROTOCOL.agent Pristine OpenSSH 5.2 portable sources Jun 29, 2009
README
README.dns
README.obfuscation Some documentation improvements Jul 1, 2009
README.platform
README.privsep
README.smartcard
README.tun
TODO
WARNING.RNG
aclocal.m4
acss.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
acss.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
addrmatch.c
atomicio.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
atomicio.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
audit-bsm.c
audit.c
audit.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth-bsdauth.c
auth-chall.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth-krb5.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth-options.c
auth-options.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth-pam.c
auth-pam.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth-passwd.c
auth-rh-rsa.c
auth-rhosts.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth-rsa.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth-shadow.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth-sia.c
auth-sia.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth-skey.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth1.c
auth2-chall.c
auth2-gss.c
auth2-hostbased.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
auth2-jpake.c
auth2-kbdint.c
auth2-none.c
auth2-passwd.c
auth2-pubkey.c
auth2.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
authfd.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
authfd.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
authfile.c
authfile.h
bufaux.c
bufbn.c
buffer.c
buffer.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
buildpkg.sh.in Pristine OpenSSH 5.2 portable sources Jun 29, 2009
canohost.c
canohost.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
channels.c
channels.h
cipher-3des1.c
cipher-acss.c
cipher-aes.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
cipher-bf1.c
cipher-ctr.c
cipher.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
cipher.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
cleanup.c
clientloop.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
clientloop.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
compat.c
compat.h
compress.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
compress.h
config.guess
config.h.in
config.sub Pristine OpenSSH 5.2 portable sources Jun 29, 2009
configure Pristine OpenSSH 5.2 portable sources Jun 29, 2009
configure.ac
crc32.c
crc32.h
deattack.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
deattack.h
defines.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
dh.c
dh.h
dispatch.c
dispatch.h
dns.c
dns.h
entropy.c
entropy.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
fatal.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
fixpaths Pristine OpenSSH 5.2 portable sources Jun 29, 2009
fixprogs
groupaccess.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
groupaccess.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
gss-genr.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
gss-serv-krb5.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
gss-serv.c
hostfile.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
hostfile.h
includes.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
install-sh
jpake.c
jpake.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
kex.c
kex.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
kexdh.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
kexdhc.c
kexdhs.c
kexgex.c
kexgexc.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
kexgexs.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
key.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
key.h
log.c
log.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
loginrec.c
loginrec.h
logintest.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
mac.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
mac.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
match.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
match.h
md-sha256.c
md5crypt.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
md5crypt.h
mdoc2man.awk
misc.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
misc.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
mkinstalldirs
moduli
moduli.0
moduli.5
moduli.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
monitor.c
monitor.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
monitor_fdpass.c
monitor_fdpass.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
monitor_mm.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
monitor_mm.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
monitor_wrap.c
monitor_wrap.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
msg.c
msg.h
mux.c
myproposal.h
nchan.c
nchan.ms
nchan2.ms Pristine OpenSSH 5.2 portable sources Jun 29, 2009
obfuscate.c
obfuscate.h
openssh.xml.in Pristine OpenSSH 5.2 portable sources Jun 29, 2009
opensshd.init.in
packet.c
packet.h
pathnames.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
platform.c
platform.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
progressmeter.c
progressmeter.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
readconf.c Obfuscated handshake implementation Jun 29, 2009
readconf.h
readpass.c
rijndael.c
rijndael.h
rsa.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
rsa.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
scard-opensc.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
scard.c
scard.h
schnorr.c
scp.0
scp.1 Pristine OpenSSH 5.2 portable sources Jun 29, 2009
scp.c
servconf.c
servconf.h Obfuscated handshake implementation Jun 29, 2009
serverloop.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
serverloop.h
session.c
session.h
sftp-client.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
sftp-client.h
sftp-common.c
sftp-common.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
sftp-glob.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
sftp-server-main.c
sftp-server.0
sftp-server.8
sftp-server.c
sftp.0 Pristine OpenSSH 5.2 portable sources Jun 29, 2009
sftp.1
sftp.c
sftp.h
ssh-add.0
ssh-add.1 Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh-add.c
ssh-agent.0 Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh-agent.1 Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh-agent.c
ssh-dss.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh-gss.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh-keygen.0
ssh-keygen.1
ssh-keygen.c
ssh-keyscan.0
ssh-keyscan.1 Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh-keyscan.c
ssh-keysign.0 Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh-keysign.8
ssh-keysign.c
ssh-rand-helper.0
ssh-rand-helper.8
ssh-rand-helper.c
ssh-rsa.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh.0 Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh.1
ssh.c Obfuscated handshake implementation Jun 29, 2009
ssh.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh1.h
ssh2.h
ssh_config Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh_config.0 Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ssh_config.5
ssh_prng_cmds.in
sshconnect.c
sshconnect.h
sshconnect1.c
sshconnect2.c
sshd.0
sshd.8
sshd.c
sshd_config Pristine OpenSSH 5.2 portable sources Jun 29, 2009
sshd_config.0
sshd_config.5
sshlogin.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
sshlogin.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
sshpty.c
sshpty.h
sshtty.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
survey.sh.in
ttymodes.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
ttymodes.h
uidswap.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
uidswap.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009
umac.c
umac.h
uuencode.c
uuencode.h
version.h
xmalloc.c Pristine OpenSSH 5.2 portable sources Jun 29, 2009
xmalloc.h Pristine OpenSSH 5.2 portable sources Jun 29, 2009

README

Handshake Obfuscation
---------------------

Handshake obfuscation strengthens the initial SSH handshake against systems
that identify or classify various network protocols by examining data in 
transit for static signatures.  Such automatic classification of traffic is 
often used to provide different levels of network service for each protocol
and sometimes used to implement policies which prohibit certain uses of a
network.

When an SSH connection is initiated, the client and server exchange several
packets to configure the cryptographic parameters for the session.  Since
the encryption algorithms and keys have not yet been determined, this exchange
of messages is not encrypted and is vulnerable to analysis which can conclusively
identify the connection as SSH protocol traffic no matter what port the server
is listening on.  For most users this is of no concern, because merely being
able to identify a connection as an SSH session does not introduce any security
vulnerabilities in the protocol itself.

Some users may have special security needs where they would prefer not to 
disclose that they are using the SSH protocol to somebody who may be monitoring
the network.  Handshake obfuscation prevents automatic identification of SSH
protocol traffic by encrypting the entire handshake with a stream cipher, and 
is designed to make it difficult to implement an automated analysis tool even
understanding how the obfuscation protocol works. 

The obfuscation encryption key is generated in a way which is deliberately 
slow to make it difficult to implement on the type of high performance network
hardware which is usually used for classifying protocol traffic.  Additionally
an option is provided for the client and server to share a 'keyword' which is
a simple kind of password that is used only for securing the handshake.  No
connection can be initiated to a server which has keyword obfuscation enabled 
without knowing the keyword, and the obfuscation keyword is used to derive the
keys that encrypt the handshake in order prevent decrypting the handshake 
traffic without knowing the keyword.



Configuration
-------------

Server:

The server configuration for obufscated handshakes adds two new keywords which may
be used in a sshd_config file to enable obfuscation.

    ObfuscatedPort
           This option is similar to the Port option and specifies one or more ports
           on which to listen for obfuscated handshake connections.  Both this option
           and the Port option may be used in the same configuration file to create a
           configuration with both regular and obfuscated listening ports.

    ObfuscateKeyword
           Enables the keyword protected obfuscated handshake which prevents initiating
           a handshake to the server without knowing the keyword.

Client:

The OpenSSH client can be configured to use the obfuscated handshake protocol by passing
command line options as well as through configuration file options.

    -z             Initiate an obfuscated handshake to the remote server.
    -Z keyword     Initiate a keyword protected obfuscated handshake to the remote server.

Two new client configuration file options hve been added.

    ObfuscateHandshake
           Requests that the client use the obfuscated handshake protocol.  The default is 'no'

    ObfuscateKeyword
           Enables keyword protected obfuscated handshake.  The server and client must be
           configured with the same keyword in order to initiate a connection.

Protocol Description
--------------------

The first step in the obfuscation protocol is that the client connects to a port
running the protocol and sends a seed message which is used to derive the keys
for obfuscating the handshake.

#define OBFUSCATE_MAGIC_VALUE        0x0BF5CA7E
#define OBFUSCATE_SEED_LENGTH        16
#define OBFUSCATE_MAX_PADDING        8192


[     16 byte random seed           ][  magic  ][ plength ][ .. plength bytes of random padding ... ]
|___________________________________||______________________________________________________________|
                |                                                   |
            Plaintext                                Encrypted with key derived from seed 

To create the seed message the client first generates 16 pseudo random bytes from which
the handshake obfuscation keys will be derived.  The client also runs the key derivation algorithm
(described below) to initialize the obfuscation cipher.

The 'magic' field and the 'plength' field are 32 bit unsigned values transfered in network byte order (MSB first).

The magic field must contain the constant OBFUSCATE_MAGIC_VALUE and the 'plength' field must
contain a randomly selected value between 0 and OBFUSCATE_MAX_PADDING.  Then 'plength' bytes of
pseudo randomly generated data is appended after the length field.

The purpose of the padding is to prevent a trivial traffic analysis attack which allows the protocol
to be identified my merely observing the size of the first message.

Upon receiving the seed message from the client, the server must extract the seed bytes
and perform the key derivation algorithm (described below) before decrypting the rest of the
message.  Then the server must verify that the magic value is correct and also that the padding length
is below OBFUSCATE_MAX_PADDING.

If these checks fail the server will continue reading and discarding all data until
the client closes the connection without sending anything in response.

Key Derivation
--------------

The key derivation produces a pair of keys (one for each direction) by performing an iterated 
hash function over the random seed value concatenated with a constant value.

A different constant value is used for each direction to guarantee that the two stream ciphers
instances are initialized with unique keys.

#define OBFUSCATE_HASH_ITERATIONS     6000
#define OBFUSCATE_KEY_LENGTH          16

    h = SHA1(seed || constant)

    for(i = 0; i < OBFUSCATE_HASH_ITERATIONS; i++)
        h = SHA1(h);

    key = [first OBFUSCATE_KEY_LENGTH bytes of h]

For traffic from the client to the server the constant is the string "client_to_server"

For traffic from the server to the client the constant is the string "server_to_clint"

Passworded Key Derivation
-------------------------

A configuration option is provided which allows specification of a password which must be specified by a client in order
to initiate a handshake with the server.  This feature should not be considered as strong authentication as it is only
for preventing casual portscanning and fingerprinting of your ssh server.

    h = SHA1(seed || password || constant)