i have seen such a program inthis article. i didn't try it:

http://www.codeproject.com/dll/pwdspy.asp