Re: make ssh log massword entered?

From: Darren Tucker (dtucker_at_gate.dodgy.net.au)
Date: 11/23/05


Date: 23 Nov 2005 13:36:50 GMT

On 2005-11-23, ash@fakedomainxx.com <ash@fakedomainxx.com> wrote:
> Recently there has been dozens of ssh cracking on my site. They were not
> real hackers because they simply tried to guess the passwords using all
> kind of imaginable usernames, admin, webmaster, oracle. . . you name it,
> but they were very patient, the log shows they worked on it for over an
> hour.
>
> While no harm is done, I'm interested in knowing what kind of passwords
> they would guess. Is there a way to make ssh log the password entered?

Depends on what SSH software you're using. For OpenSSH, no, there's no
way to make it log passwords unless you modify the code (although such a
modification is trivial, see auth-passwd.c:auth_password()).

Also be aware that even if you only log failures, there's a good chance
that someone's real password (eg for another service) or an almost-right
password will end up in that log. That log would be another potential
problem if the box hosting it compromised (or if it's sent to a syslog
host, or...)

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


Relevant Pages

  • UPDATE Re: rlogin - security question [expanded to smartcard technology]
    ... explinations of ssh etc. ... 0-13-100092-6) with the words "The Official Sun Microsystems Resource ... place root / users cannot set/change passwords. ... > we are required to allow rlogin access to all by means of .rhosts files. ...
    (SunManagers)
  • Re: S: ssh worms FAQ
    ... > There is many ssh worms in the Internet since this summer. ... weak passwords with BS accounts like "test" and "guest". ... and had larger lists of passwords. ... frequently loaded with copies of Linux viruses RST (the Remote Shell ...
    (comp.os.linux.security)
  • Re: how to react on ssh attacks?
    ... >>I recently checked my log files of my ssh service (so far as I ... >passwords, and then common user names with a bunch of passwords. ... >It's not really something to worry about - if you have root login ... >requires a key on the connecting machine that has been signed by your ...
    (Fedora)
  • Re: Is ssh not safe?
    ... I use my server PC for web ... > that they can log in and change their passwords if need be. ... As long as you are using ssh version 2 (normally an option on the server ... added benefit that you will only need to have port 22 open for ssh since ...
    (Fedora)
  • Re: how to react on ssh attacks?
    ... > I recently checked my log files of my ssh service (so far as I ... passwords, and then common user names with a bunch of passwords. ... It's not really something to worry about - if you have root login ... requires a key on the connecting machine that has been signed by your ...
    (Fedora)