ssh

package
v0.0.0-...-a044d22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package ssh implements a SSH server honeypot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	SessionID      string
	SourceIP       string
	SourceHostName string
	UserName       string
	Password       string
	ClientVersion  string
	Payloads       []interface{}
}

Connection represents an SSH connection made by an attacker. It contains information about the origin of the attack and payloads attempted by the attacker.

type Server

type Server struct {
	// Address is the combination of host:port to listen on. If port is empty a random port
	// will be chosen.
	Address string
	// contains filtered or unexported fields
}

Server represents a honeypot SSH server. The server masquerades as an open SSH server and allows any username/password combination to login. Interesting activity is logged and sent back on a Go channel.

func NewServer

func NewServer(address string) (*Server, error)

NewServer creates an SSH honeypot server capable of serving connections.

func (Server) Serve

func (s Server) Serve() (chan *Connection, chan error, error)

Serve starts the honeypot SSH server. It returns a channel of Connection pointers, errors while processing the SSH connection and a error. If the server fails to start, the last error will contain the reason.

func (*Server) Stop

func (s *Server) Stop()

Stop signals the server to stop serving requests and shutdown.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL