{"id":3091,"date":"2020-05-03T16:18:54","date_gmt":"2020-05-03T08:18:54","guid":{"rendered":"https:\/\/www.aoisnow.net\/blog\/?p=3091"},"modified":"2020-05-03T16:18:54","modified_gmt":"2020-05-03T08:18:54","slug":"tont-35713-%e5%bd%93%e4%ba%ba%e4%bb%ac%e8%a6%81%e5%b0%86%e5%ae%89%e5%85%a8%e6%bc%8f%e6%b4%9e%e4%bd%9c%e4%b8%ba%e5%8a%9f%e8%83%bd%e7%9a%84%e6%97%b6%e5%80%99%ef%bc%9a%e7%aa%83%e5%8f%96%e5%af%86%e7%a0%81","status":"publish","type":"post","link":"https:\/\/www.aoisnow.net\/blog\/archives\/3091","title":{"rendered":"TONT 35713 \u5f53\u4eba\u4eec\u8981\u5c06\u5b89\u5168\u6f0f\u6d1e\u4f5c\u4e3a\u529f\u80fd\u7684\u65f6\u5019\uff1a\u7a83\u53d6\u5bc6\u7801"},"content":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20050504-52\/?p=35713\" target=\"_blank\" rel=\"noopener\">https:\/\/devblogs.microsoft.com\/oldnewthing\/20050504-52\/?p=35713<\/a><\/p>\n<p>Sometimes people ask for features that are such blatant security holes I don\u2019t know what they were thinking.<\/p>\n<p>\u6709\u4e9b\u65f6\u5019\uff0c\u6709\u4e9b\u4eba\u63d0\u51fa\u7684\u529f\u80fd\u9700\u6c42\u5b8c\u5168\u5c31\u662f\u5b89\u5168\u6f0f\u6d1e\uff0c\u771f\u4e0d\u77e5\u9053\u8fd9\u4e9b\u4eba\u8111\u5b50\u91cc\u90fd\u5728\u60f3\u4ec0\u4e48\u3002<\/p>\n<blockquote><p>Is there a way to get the current user\u2019s password? I have a program that does some stuff, then reboots the system, and I want to have the current user\u2019s password so I can log that user back in when I\u2019m done, then my program can resume its operation.<\/p>\n<p>\u6709\u6ca1\u6709\u529e\u6cd5\u83b7\u53d6\u5f53\u524d\u7528\u6237\u7684\u5bc6\u7801\u5462\uff1f\u6211\u7684\u7a0b\u5e8f\u4f1a\u8fdb\u884c\u4e00\u4e9b\u64cd\u4f5c\uff0c\u7136\u540e\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf\uff0c\u8fd9\u65f6\u5019\u6211\u5e0c\u671b\u80fd\u83b7\u5f97\u7528\u6237\u7684\u5bc6\u7801\uff0c\u8fd9\u6837\u91cd\u542f\u5b8c\u6210\u540e\u5c31\u80fd\u66ff\u7528\u6237\u8fdb\u884c\u767b\u5f55\uff0c\u7136\u540e\u6211\u7684\u7a0b\u5e8f\u5c31\u80fd\u7ee7\u7eed\u6267\u884c\u5269\u4e0b\u7684\u64cd\u4f5c\u4e86\u3002<\/p><\/blockquote>\n<p>(Sometimes they don\u2019t bother explaining why they need the user\u2019s password; <a href=\"https:\/\/groups.google.com\/forum\/#!msg\/comp.os.ms-windows.programmer.misc\/4-yahDC0OLQ\/PqYdqqSpk-4J\" target=\"_blank\" rel=\"noopener\">they just ask for it.<\/a>)<\/p>\n<p>\uff08\u6709\u65f6\u5019\u8fd9\u4e9b\u4eba\u8fde\u4e3a\u4ec0\u4e48\u9700\u8981\u7528\u6237\u7684\u5bc6\u7801\u90fd\u61d2\u5f97\u89e3\u91ca\uff0c<a href=\"https:\/\/groups.google.com\/forum\/#!msg\/comp.os.ms-windows.programmer.misc\/4-yahDC0OLQ\/PqYdqqSpk-4J\" target=\"_blank\" rel=\"noopener\">\u5c31\u53ea\u662f\u8981\u800c\u5df2<\/a>\u3002\uff09<\/p>\n<p>Imagine the fantastic security hole if this were possible. Anybody could write a program that steals your password without even having to trick you into typing it. They would just call the imaginary GetPasswordOfCurrentUser function and bingo! they have your password.<\/p>\n<p>\u60f3\u8c61\u4e00\u4e0b\u5982\u679c\u8fd9\u4ef6\u4e8b\u6210\u4e3a\u53ef\u80fd\u7684\u8bdd\uff0c\u4f1a\u4ea7\u751f\u4e00\u4e2a\u591a\u4e48\u7f8e\u5999\u7684\u5b89\u5168\u6f0f\u6d1e\u3002\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u5199\u4e00\u6bb5\u7a0b\u5e8f\u6765\u7a83\u53d6\u4f60\u7684\u5bc6\u7801\uff0c\u751a\u81f3\u4e0d\u9700\u8981\u6b3a\u9a97\u4f60\u628a\u5bc6\u7801\u8f93\u8fdb\u53bb\uff0c\u53ea\u9700\u8981\u8c03\u7528\u90a3\u4e2a\u865a\u6784\u7684\u00a0GetPasswordOfCurrentUser \u65b9\u6cd5\u5c31\u597d\u4e86\uff0c\u4e00\u8f6c\u773c\uff0c\u4ed6\u4eec\u5c31\u62e5\u6709\u4e86\u4f60\u7684\u5bc6\u7801\u3002<\/p>\n<p>For another angle on credential-stealing, read Larry Osterman\u2018s discussion of <a href=\"http:\/\/blogs.msdn.com\/larryosterman\/archive\/2004\/06\/29\/169085.aspx\" target=\"_blank\" rel=\"noopener\">why delegation doesn\u2019t work over the network<\/a>.<\/p>\n<p>\u6216\u8005\u4e5f\u53ef\u4ee5\u6362\u4e2a\u89d2\u5ea6\u6765\u89c2\u5bdf\u51ed\u636e\u7a83\u53d6\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u8bfb\u4e00\u8bfb\u00a0 Larry Osterman \u5173\u4e8e<a href=\"https:\/\/docs.microsoft.com\/zh-cn\/archive\/blogs\/larryosterman\/why-doesnt-delegation-work-over-the-network\" target=\"_blank\" rel=\"noopener\">\u4e3a\u4ec0\u4e48\u4ee3\u7406\u8ba4\u8bc1\u5728\uff08\u5185\u90e8\uff09\u7f51\u7edc\u4e0a\u884c\u4e0d\u901a<\/a>\u7684\u6587\u7ae0\u3002<\/p>\n<p>Even if you didn\u2019t want the password itself but merely some sort of \u201ccookie\u201d that could be used to log the user on later, you still have a security hole. Let\u2019s call this imaginary function GetPasswordCookieOfCurrentUser; it returns a \u201ccookie\u201d that can be used to log the user on instead of using their password.<\/p>\n<p>\u5373\u4fbf\u4f60\u4e0d\u662f\u60f3\u8981\u5bc6\u7801\u672c\u8eab\uff0c\u53ea\u662f\u60f3\u8981\u4e2a\u67d0\u79cd\u5f62\u5f0f\u7684\u300eCookie\u300f\u7528\u4e8e\u7a0d\u540e\u66ff\u7528\u6237\u767b\u5f55\uff0c\u8fd9\u6837\u64cd\u4f5c\u540c\u6837\u4e5f\u662f\u4e00\u4e2a\u5b89\u5168\u6f0f\u6d1e\u3002\u59d1\u4e14\u5c06\u8fd9\u4e2a\u60f3\u8c61\u4e2d\u7684\u65b9\u6cd5\u53eb\u505a\u00a0GetPasswordCookieOfCurrentUser\uff0c\u8c03\u7528\u4e4b\u4f1a\u8fd4\u56de\u4e00\u4e2a\u300eCookie\u300f\u53ef\u4ee5\u5728\u7a0d\u540e\u7528\u4e8e\u66ff\u7528\u6237\u767b\u5f55\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u8fd4\u56de\u7528\u6237\u7684\u5bc6\u7801\u3002<\/p>\n<p>This is just a thinly-disguised GetPasswordOfCurrentUser because that \u201ccookie\u201d is equivalent to a password. Log on with the cookie and you are now that person.<\/p>\n<p>\u8fd9\u4e0d\u8fc7\u662f\u524d\u8ff0\u7684\u00a0GetPasswordOfCurrentUser \u7a0d\u7a0d\u6539\u5934\u6362\u9762\u4e86\u4e00\u4e0b\u800c\u5df2\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u300eCookie\u300f\u7b49\u540c\u4e8e\u5bc6\u7801\uff0c\u7528\u8fd9\u4e2a\u300eCookie\u300f\u767b\u5f55\u4e4b\u540e\u4f60\u5c31\u662f\u7528\u6237\u672c\u4eba\u4e86\u3002<\/p>\n<p>\uff08\u8bd1\u6ce8\uff1aWindows 10 \u770b\u4e0a\u53bb\u5df2\u7ecf\u6709\u4e86\u8fd9\u7bc715\u5e74\u524d\u7684\u6587\u7ae0\u63cf\u8ff0\u7684\u529f\u80fd\u4e86\u2014\u2014\u8bbe\u7f6e\u2014\u8d26\u6237\u2014\u767b\u5f55\u9009\u9879\u2014\u300e\u66f4\u65b0\u6216\u91cd\u542f\u540e\uff0c\u4f7f\u7528\u6211\u7684\u767b\u5f55\u4fe1\u606f\u81ea\u52a8\u5b8c\u6210\u8bbe\u5907\u8bbe\u7f6e\u5e76\u91cd\u65b0\u6253\u5f00\u6211\u7684\u5e94\u7528\u300f\uff0c\u4f46\u4ec5\u9650\u4e8e\u7cfb\u7edf\u66f4\u65b0\u6216\u7531\u7cfb\u7edf\u53d1\u8d77\u7684\u8bbe\u5907\u914d\u7f6e\uff0c\u800c\u4e0d\u662f\u50cf\u8fd9\u7bc7\u6587\u7ae0\u8bf4\u7684\u90a3\u6837\u53ef\u4ee5\u7531\u7b2c\u4e09\u65b9\u7a0b\u5e8f\u4f7f\u7528\uff0c\u4e14\u5982\u679c\u672c\u673a\u52a0\u5165\u4e86\u57df\u6216\u5e94\u7528\u4e86\u7ec4\u7b56\u7565\uff0c\u5219\u8be5\u529f\u80fd\u4e0d\u53ef\u7528\u3002<a href=\"https:\/\/support.microsoft.com\/zh-cn\/help\/4027599\/windows-10-automatically-finish-setting-up-pc-after-update-restart\" target=\"_blank\" rel=\"noopener\">\u70b9\u51fb\u8fd9\u91cc\u67e5\u770b\u5b98\u65b9\u8bf4\u660e<\/a>\u3002\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/devblogs.microsoft.com\/oldnewthing\/2005050 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-3091","post","type-post","status-publish","format-standard","hentry","category-tont_history"],"_links":{"self":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/comments?post=3091"}],"version-history":[{"count":0,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3091\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/media?parent=3091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/categories?post=3091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/tags?post=3091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}