I'm currently fascinated by strace
so, being new to it, I decided to play around a little. As suggested by the question title, I tried both strace su
and strace ssh
. Both commands displayed the password I typed in the strace output. su
kept complaining of an incorrect password while ssh
managed to log in normally.
My questions:
- Is this a security flaw or am I missing something?
- Is
su
reporting an incorrect password as a security measure because it detected it was being run throughstrace
? If so how can it tell that it's being invoked throughstrace
? Does it check/proc/self/cmdline
maybe? - How much damage can be caused by something like
alias su="strace -o /tmp/output.log su"
alias su="/foo/myscript_that_just_captures_passwords"
– jordanm Nov 07 '12 at 18:14