diff --git a/apiary.toml b/apiary.toml index a565fba..82e01fb 100644 --- a/apiary.toml +++ b/apiary.toml @@ -21,7 +21,7 @@ HostKeyPath = "" # Log level for SSH Honeypot # Must be either "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "NONE" # Default: "INFO" -LogLevel = "INFO" +LogLevel = "DEBUG" # Address and port to listen to # Default: ":2222" ListenAddr = ":2222" diff --git a/honeypot/ssh/server.go b/honeypot/ssh/server.go index d948645..d537b6f 100644 --- a/honeypot/ssh/server.go +++ b/honeypot/ssh/server.go @@ -60,6 +60,8 @@ func NewHoneypotServer(cfg config.HoneypotConfig, store store.LoginAttemptStore) hs.sshServer.AddHostKey(signer) } + hs.throttleSpeed = 1024 * 1024 + return &hs, nil } @@ -116,7 +118,6 @@ func (hs *HoneypotServer) passwordHandler(ctx sshlib.Context, password string) b func (s *HoneypotServer) connCallback(ctx sshlib.Context, conn net.Conn) net.Conn { s.Logger.Debugw("Connection received.", "remote_addr", conn.RemoteAddr()) - conn.RemoteAddr() throttledConn := newThrottledConn(conn) throttledConn.SetSpeed(s.throttleSpeed)