Bugtraq mailing list archives

Re: recovering ssh passwords from memory


From: Scott Long <scott () swiftview com>
Date: Mon, 14 Aug 2000 08:30:53 -0700

Note that this is not portable. If you wanted to use a similar
approach on other systems, you might need to use f->_IO_read_base
rather than f->_base. Also, you could instead modify the code so that
read(2) is used for password input, avoiding stdio completely.

Correct portable solution is setvbuf(). This is ANSI and allows you
to select where you want to place the stdio buffer. Just clear it after
you're finished with it.

Scott


Current thread: