Sign in to follow this  
Followers 0
Gigglestick

Unlocking Windows using a script

23 posts in this topic

I know there have been numerous conversations on the forum about unlocking Windows with a script and as far as I know no one has figured out a way to do it with AutoIt yet.

Splinterware's System Scheduler claims to be able to do it, and I use LogMeIn.com at home, which presents a dialog on the login screen with an "Unlock" button that unlocks the computer so I know it can be done.

My company enforces a 15+ character (LMHash turned off) complex passphrase with no dictionary words and a 10-minute screen saver limit forced to lock the computer, all of which is audited randomly each month. I would love to create a program that "listens" for a set of keys like ctrl+alt+shift+win+break that unlocks the computer.

Any ideas?


My UDFs: ExitCodes

Share this post


Link to post
Share on other sites



I know there have been numerous conversations on the forum about unlocking Windows with a script and as far as I know no one has figured out a way to do it with AutoIt yet.

Splinterware's System Scheduler claims to be able to do it, and I use LogMeIn.com at home, which presents a dialog on the login screen with an "Unlock" button that unlocks the computer so I know it can be done.

My company enforces a 15+ character (LMHash turned off) complex passphrase with no dictionary words and a 10-minute screen saver limit forced to lock the computer, all of which is audited randomly each month. I would love to create a program that "listens" for a set of keys like ctrl+alt+shift+win+break that unlocks the computer.

Any ideas?

i think it could be accomplished using DLLCall()'s, but there are enough ways to avoid the auto lock that i don't think it's even worth researching.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I want and need the computer to lock when I'm away. I just want a simpler way to unlock it than remembering and entering such a pain-in-the-arse password several times a day.

*EDIT* Basically I'm lazy. i.e. My sig.

Edited by c0deWorm

My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

I want and need the computer to lock when I'm away. I just want a simpler way to unlock it than remembering and entering such a pain-in-the-arse password several times a day.

*EDIT* Basically I'm lazy. i.e. My sig.

And soon unemployed!

You sure you want to violate company policy? You may wish to contact the security people and point out to them that human nature being what it is, security policies that are too onerous actually force users to work around them, causing even greater security problems in the long term.

If in doubt, do the usual thing - write down the password, put in in the top drawer of your desk, lock the drawer and put the key in the second drawer. Don't forget a post-it note on the monitor reminding you where you hid the password. :P

Share this post


Link to post
Share on other sites

Easyway is to move the move using autoit never locks then.

while 1
    MouseMove ( 0,0 )
    sleep(60000);one minute
    MouseMove ( 400,300 );differend location otherwise mouse would not move
    sleep(60000);another minute
wend

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

@MrSpacely

Again, I don't want to prevent Windows from locking. I want to be able to unlock the computer using a key combination instead of my password.

Thank you for the effort though.

Edited by c0deWorm

My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

Okay, forget work. Assume I want to keep a secure password on my home computer, but be able to unlock it using a keystroke that can't be sent when accessing it with remote control software.


My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I don't think there is a way to do it in the way you describe, but you could use a biometric device that stores your password, and that way, all you need is your fingerprint. Remember seeing the ad for thinkpads and it had the Lee Major cameo?

Edited by vollyman

Share this post


Link to post
Share on other sites

trying to understand...

1

how about a script that runs ( or you set to run when you know you are going to leave your computer

2

i understand autoit ( hopefully other remote software ) cannot duplicate

ctrl+alt+del

3

this a script like

example


while 1
if winexists("Windows Task Manager") then
; read my password
;send my password where needed
exit
endif
wend
[code=auto:0]

?

8)


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
            




  
  
    


  


        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
MrSpacely   

    
        
    
             1
    
        
    

        
            
                Polymath
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             1
    
        
    

                209 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #10 · 
            Posted 
            
            
            
        
    

    


            
        
            Actually there are cheap hardware devices wich read fingerprint and can be installed in windows and wich log in on fingerprint.

I going to buy one on usb for 19 euros (wich would be about 22 dollars)
works easy cannot be used from remote control and is really difficult to gues your finger


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
Valuater   

    
        
    
             84
    
        
    

        
            
                Universalist
            
            

            
                

    
        
    

            
            MVPs
            
                
            
            
                

    
        
    
             84
    
        
    

                11,084 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #11 · 
            Posted 
            
            
            
        
    

    


            
        
            when the task manager is displayed you could hit

file > run> a program to Unlock???

8)


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
            




  
  
    


  


        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
MrSpacely   

    
        
    
             1
    
        
    

        
            
                Polymath
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             1
    
        
    

                209 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #12 · 
            Posted 
            
                (edited)
            
            
            
        
    

    


            
        
            when the task manager is displayed you could hitfile > run> a program to Unlock???8)How do you display the taskmgr when the pc is locked it doesn't show up here.


            
                


    Edited  by MrSpacely
    
    

            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
Gigglestick   

    
        
    
             1
    
        
    

        
            
                Universalist
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             1
    
        
    

                489 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #13 · 
            Posted 
            
                (edited)
            
            
            
        
    

    


            
        
            There is software that does what I'm looking for.  One is the LogMeIn.com client.  Once you authenticate to their website and to the target computer, there is a simple "Login" button displayed below the Windows dialog so you can click on that instead of sending a ctrl-alt-del and typing your password.  I just want to listen for a key combo like ctrl-alt-win-shift-pause or something and then simulate this action of simply unlocking the PC.

I don't want to use ctrl-alt-del, or attempt to override it.

I can't use a fingerprint device at work because of security measures that detect unauthorized hardware and the long, involved process of clearing new devices.  This will probably happen eventually anyway, but it won't be for a few years because of the lengths to which my company goes overboard with evaluations of new products.  Of course, I could use this at home and might consider it.

This is really more of a challenge since I've seen other software do it than me being intent on breaking Windows' security.


            
                


    Edited  by c0deWorm
    
    

            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
            




  
  
    My UDFs: ExitCodes
  


        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
Valuater   

    
        
    
             84
    
        
    

        
            
                Universalist
            
            

            
                

    
        
    

            
            MVPs
            
                
            
            
                

    
        
    
             84
    
        
    

                11,084 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #14 · 
            Posted 
            
            
            
        
    

    


            
        
            How do you display the taskmgr when the pc is locked it doesn't show up here.gotcha.. i have never used a lock it was just a thought8)


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
            




  
  
    


  


        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
gamerman2360   

    
        
    
             0
    
        
    

        
            
                Universalist
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             0
    
        
    

                497 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #15 · 
            Posted 
            
            
            
        
    

    


            
        
            Ive heard things like the windows lock diologue box running on a different desktop or something.  At least I read it in another topic.  Anyway if you want, I guess you could do something like have lock your computer and stuff.  It wouldn't be as safe tho.  you could have it hide all the windows, and make sure the taskmanager couldnt do anything.


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
gamerman2360   

    
        
    
             0
    
        
    

        
            
                Universalist
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             0
    
        
    

                497 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #16 · 
            Posted 
            
            
            
        
    

    


            
        
            Wow. I just tried renaming taskmgr.exe to something else to  try to get it to not run... It ended up installing it again, lol.  Microsoft is tricky...


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
gamerman2360   

    
        
    
             0
    
        
    

        
            
                Universalist
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             0
    
        
    

                497 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #17 · 
            Posted 
            
                (edited)
            
            
            
        
    

    


            
        
            This:; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0.92
; Author:        Steve B
;
; Script Function:
;   Locks Windows.
;
; ----------------------------------------------------------------------------

#NoTrayIcon
Opt("WinTitleMatchMode", 2)
Opt("WinWaitDelay", 0)
Global $desktop_nr = 0, $exitready = 0
HotKeySet("{PAUSE}", "Hide")
AdlibEnable("Adlib")
Hide()

While True
  WinWaitActive("Run")
  WinKill("Run")
WEnd

Func Hide()
    HotKeySet(@HotKeyPressed)
    $list = WinList()
    If $desktop_nr = 0 Then
        For $n = 1 To $list[0][0]
            If Not BitAND(WinGetState($list[$n][1]), 2) Then ContinueLoop
            $desktop_nr = $desktop_nr + 1
            Assign("desktop" & $desktop_nr, $list[$n][1], 2)
            WinSetState($list[$n][1], "", @SW_HIDE)
        Next
    Else
        For $n = 1 To $desktop_nr
            WinSetState(Eval("desktop" & $n), "", @SW_SHOW)
        Next
        $desktop_nr = 0
        Exit
    EndIf
    HotKeySet(@HotKeyPressed, "Hide")
EndFunc ;==>Switch

Func OnAutoItExit()
    If @ExitMethod = 3 Or @ExitMethod = 4 Then Return
    For $n = 1 To $desktop_nr
        WinSetState(Eval("desktop" & $n), "", @SW_SHOW)
    Next
EndFunc

Func Adlib()
    If WinExists("Windows Task Manager") Then WinKill("Windows Task Manager")
EndFunc
will lock all windows and keep "Windows Task Manager" and "Run" from running. If you can setup a Scheduled Task to activate it every time the computer goes idle, you will be set.

[edit]

I've tried using "^!+#{PAUSE}" as the hotkey but it dosn't work... Be careful if you try it.

Edited by gamerman2360

Share this post


Link to post
Share on other sites

Understanding your problem, for I'm somewhat in the same boat. You cound do the following, and help everyone in your company. It involves some work, but it will make you look good.

1. Find out how many calls are made to the help desk reguarding password issues.

2. Figure out how long the call takes to resolve, and put that into a dollar amount.

3. price out what what it would cost to install fingerprint devices for all clients - one time cost

4. do a comparison on the one time cost to the running cost of maintaining the password standard currently used.

5. Put this in a document to prove your point.

You can show how to save a bunch of money, and it would fix your problem.

Share this post


Link to post
Share on other sites

Thank you all for your efforts, but once again, I am not looking to make Windows lock or prevent it from locking, but to make it easier to unlock Windows once it's already locked (either manually or by the screen saver with the "lock screen" check box enabled).

@volleyman

Thanks, but that's way too involved a process. I'll just continue typing my password, which, to be honest, is what I will end up doing at work even if I can figure out the solution to this problem because of the possibility of being fired for circumventing security measures. I would like to use this at home though where I do keep my computers locked when I'm away.


My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

No biggie. I just know management LOVES to be able to save money. Its even better when a employee submits a idea and lets the manager, as well as everyone in the local department get some of the credit. No, it isn't brown nosing, it making everyone on the team look good. This way, more people are behind it, and it is more likely to get done.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0