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 ¶
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.