{"id":35713,"date":"2005-05-04T09:03:52","date_gmt":"2005-05-04T09:03:52","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2005\/05\/04\/when-people-ask-for-security-holes-as-features-stealing-passwords\/"},"modified":"2005-05-04T09:03:52","modified_gmt":"2005-05-04T09:03:52","slug":"when-people-ask-for-security-holes-as-features-stealing-passwords","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20050504-52\/?p=35713","title":{"rendered":"When people ask for security holes as features: Stealing passwords"},"content":{"rendered":"<p>Sometimes people ask for features that are such blatant security holes I don&#8217;t know what they were thinking.<\/p>\n<blockquote class=\"m\"><p> Is there a way to get the current user&#8217;s password? I have a program that does some stuff, then reboots the system, and I want to have the current user&#8217;s password so I can log that user back in when I&#8217;m done, then my program can resume its operation. <\/p><\/blockquote>\n<p> (Sometimes they don&#8217;t bother explaining why they need the user&#8217;s password; <a href=\"http:\/\/groups-beta.google.com\/group\/comp.os.ms-windows.programmer.misc\/msg\/ee93a9a4aa1da63e\"> they just ask for it<\/a>.)\n Imagine the fantastic security hole if this were possible. Anybody could write a program that steals your password <strong>without even having to trick you into typing it<\/strong>. They would just call the imaginary <code>GetPasswordOfCurrentUser<\/code> function and bingo! they have your password.\n For another angle on credential-stealing, read <a href=\"http:\/\/blogs.msdn.com\/larryosterman\/\">Larry Osterman<\/a>&#8216;s discussion of <a href=\"http:\/\/blogs.msdn.com\/larryosterman\/archive\/2004\/06\/29\/169085.aspx\"> why delegation doesn&#8217;t work over the network<\/a>.\n Even if you didn&#8217;t want the password itself but merely some sort of &#8220;cookie&#8221; that could be used to log the user on later, you still have a security hole. Let&#8217;s call this imaginary function <code>GetPasswordCookieOfCurrentUser<\/code>; it returns a &#8220;cookie&#8221; that can be used to log the user on instead of using their password.<\/p>\n<p> This is just a thinly-disguised <code>GetPasswordOfCurrentUser<\/code> because that &#8220;cookie&#8221; is <strong>equivalent to a password<\/strong>. Log on with the cookie and you are now that person. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes people ask for features that are such blatant security holes I don&#8217;t know what they were thinking. Is there a way to get the current user&#8217;s password? I have a program that does some stuff, then reboots the system, and I want to have the current user&#8217;s password so I can log that user [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2,141],"class_list":["post-35713","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history","tag-when-people-ask-for-security-holes-as-features"],"acf":[],"blog_post_summary":"<p>Sometimes people ask for features that are such blatant security holes I don&#8217;t know what they were thinking. Is there a way to get the current user&#8217;s password? I have a program that does some stuff, then reboots the system, and I want to have the current user&#8217;s password so I can log that user [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/35713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=35713"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/35713\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=35713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=35713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=35713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}