HTTPTunnel Package Description

HTTPTunnel is a tunneling software that can tunnel network connections through restrictive HTTP proxies over pure HTTP “GET” and “POST” requests. HTTPTunnel consists of two components:

  • The client that resides behind the firewall and accepts network connections on ports that will either be mapped to a specific remote target server/port (portmapping) or will act as a SOCKS (v4 and v5) proxy. The SOCKS authentication source can be a fixed user list, an LDAP or MySQL directory. The client is available as platform-independent Perl script or as Win32 binary.
  • The server that resides on the internet and accepts HTTP requests from the client which will be translated and forwarded to network connections to the remote servers.

Two different servers are available:

  • The hosted server, which is basically a PHP script that must be put on a PHP enabled web server. Putting the PHP script on a webserver enables the webserver to act as your HTTP tunnel server.
  • The standalone server, which is available as platform-independent Perl script or as Win32 binary. This server can be used if you have a box on the internet where you can run your own programs (e.g. your box at home). Using the standalone server (as opposed to the hosted server) is recommended as it does not suffer from many restrictions that the webserver may impose on the PHP script, e.g. maximum script runtime (which will limit the duration of your connections), load-balanced server environments, provider policies etc.

Configuration of all components is done over a web-based GUI. SOCKS proxy cascading is supported.

HTTPTunnel Homepage | Kali HTTPTunnel Repo

  • Author: Lars Brinkhoff
  • License: GPLv2

Tools included in the httptunnel package

hts – httptunnel server component
[email protected]:~# hts -h
Usage: hts [OPTION]... [HOST:][PORT]
Listen for incoming httptunnel connections at PORT (default port is 8888).
When a connection is made, I/O is redirected to the destination specified
by the --device, --forward-port or --stdin-stdout switch.

  -c, --content-length BYTES     use HTTP PUT requests of BYTES size
                                 (k, M, and G postfixes recognized)
  -d, --device DEVICE            use DEVICE for input and output
  -F, --forward-port HOST:PORT   connect to PORT at HOST and use it for
                                 input and output
  -h, --help                     display this help and exit
  -k, --keep-alive SECONDS       send keepalive bytes every SECONDS seconds
                                 (default is 5)
  -M, --max-connection-age SEC   maximum time a connection will stay
                                 open is SEC seconds (default is 300)
  -s, --stdin-stdout             use stdin/stdout for communication
                                 (implies --no-daemon)
  -S, --strict-content-length    always write Content-Length bytes in requests
  -V, --version                  output version information and exit
  -w, --no-daemon                don't fork into the background
  -p, --pid-file LOCATION        write a PID file to LOCATION

Report bugs to [email protected]

htc – httptunnel client component

[email protected]:~# htc -h
Usage: htc [OPTION]... HOST[:PORT]
Set up a httptunnel connection to PORT at HOST (default port is 8888).
When a connection is made, I/O is redirected from the source specified
by the --device, --forward-port or --stdin-stdout switch to the tunnel.

  -A, --proxy-authorization USER:PASSWORD  proxy authorization
  -z, --proxy-authorization-file FILE      proxy authorization file
  -B, --proxy-buffer-size BYTES  assume a proxy buffer size of BYTES bytes
                                 (k, M, and G postfixes recognized)
  -c, --content-length BYTES     use HTTP PUT requests of BYTES size
                                 (k, M, and G postfixes recognized)
  -d, --device DEVICE            use DEVICE for input and output
  -F, --forward-port PORT        use TCP port PORT for input and output
  -h, --help                     display this help and exit
  -k, --keep-alive SECONDS       send keepalive bytes every SECONDS seconds
                                 (default is 5)
  -M, --max-connection-age SEC   maximum time a connection will stay
                                 open is SEC seconds (default is 300)
  -P, --proxy HOSTNAME[:PORT]    use a HTTP proxy (default port is 8080)
  -s, --stdin-stdout             use stdin/stdout for communication
                                 (implies --no-daemon)
  -S, --strict-content-length    always write Content-Length bytes in requests
  -T, --timeout TIME             timeout, in milliseconds, before sending
                                 padding to a buffering proxy
  -U, --user-agent STRING        specify User-Agent value in HTTP requests
  -V, --version                  output version information and exit
  -w, --no-daemon                don't fork into the background

Report bugs to [email protected]

hts Usage Example

Start hts (on kali-srv) and forward (-F) incoming connections on port 2130 to localhost:22.

[email protected]:~# hts -F localhost:22 2139

htc Usage Example

Start htc (on kali-htc) and forward (-F) incoming connections on port 8090 to 192.168.1.15:2139. Afterward connect to kali-srv via ssh through HTTPTunnel.

[email protected]:~# htc -F 8090 192.168.1.15:2139
[email protected]:~# ssh localhost -p 8090
[email protected]'s password:
Linux kali-srv 3.12-kali1-amd64 #1 SMP Debian 3.12.6-2kali1 (2014-01-06) x86_64

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Aug  1 02:13:32 2014 from localhost
[email protected]:~#