Giter Site home page Giter Site logo

ttyspy's Introduction

ttyspy

Originally written by Dustin Lundquist to provide secure terminal sessions for SSH Bastion servers at Blue Box. It is primarily used inside Cuttle where it helps provide a secure SRE platform for operating distributed systems in the DataCenter or in the Cloud.

Terminal sessions may include cryptographic secrets, personally identifiable information, or other information which should not be disclosed.

The client ttyspy acts like the script(1) command, except rather than writing a local file it sends the terminal session to (presumably secure) terminal session archive server. To protect the contents of the terminal session and ensure the session is sent to the correct server, TLS with mutual certificate validation is used to authenticate both the client and server.

See the extended documentation for detailed information about the architecture and configuration.

Client

The client functions as script(1) with the typescript output file piped to curl(1). Originally it was going to be implemented by wrapping these two utilities using a named pipe between the two, but the non-deterministic order in which these utilities would open the pipe prevented this method.

Dependencies

  • Autotools (autoconf, automake)
  • libcurl

Building

cd client
autoreconf --install
./configure
make

Server

The server is a simple Go webserver which authenticates client connections by the client's certificate and saves HTTP POSTs to /transcript path. The server expects a content-type of application/typescript, and X-Username, X-Hostname, X-Gecos headers to be present. Additionally if the X-Ssh-Client header is present it is preserved in the transcript file. Each transcript is saved into a directory structure by username, hostname, year, month and day. This allows archiving of old transcripts.

Building

cd src/session_receiver
go build

ttyspy's People

Contributors

dlundquist avatar jyotty avatar msambol avatar paulczar avatar sbalukoff avatar stevemart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ttyspy's Issues

transcript or transcripts?

Client is posting to server/transcript, and server appears to be listening on /transcript however session_receiver and test_sh both store to srv/transcripts and tmp/transcripts, respectively. Seems to still work, but different than described in documentation.

Also, documentation seems clear on the execution of ttyspy but vague on how ttyspyd and session_receiver are supposed to be called in a running system.

Keep up the great work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.