Jump to content

Drive Lock


erifash
 Share

Recommended Posts

  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Else
                    ;this is a weak point, how to set this so that it will not exit this application?
                    ;for now it will do with:
                    Run(@ScriptFullPath)
                    Exit
                EndIf
            EndIf
        WEnd
    Else
        ;this is a weak point, how to set this so that it will not exit this application?
        ;for now it will do with:
        Run(@ScriptFullPath)
        Exit
    EndIf
EndFunc
oÝ÷ Øù^jÇ­jG$jÙ²r¦jwmêÞË-YZÁ椦§¶)â¶Ê&z'^zÏêº^"IèÂ0¶âÆØZ¶f¤zË«zØZ·*.ëm«i®+jg!yÉ"}«rݦº ­©jY^v$rÝ>º ­©¿ì^Êîx§8b²+-ç(u궬yÊ'v趦jëh×6While 1
If Not (ProcessExists("DriveLock.exe")) Then
  Run("DriveLock.exe")
EndIf
The only weak point is this: if you kill the process structure that is tied to DriveLock.exe, SecondProgram.exe gets killed too.

iPod + Online calendars = iPodCALsync

Link to comment
Share on other sites

hi,

i have tested the script on my external hdd and it worked!

Arjan

Link to comment
Share on other sites

Another idea to improve the security: tie it to explorer.exe. Warning: this is a bit dangerous if you don't know what you're doing.

Kill explorer.exe and move it to explorer_.exe using Task Manager (CTRL+SHIFT+ESC). Then, open SciTE using the Run function in Task Manager. Type in this code:

FileInstall("C:\Windows\explorer_.exe", "C:\Windows\explorer.unpacked.exe")
Run("explorer.unpacked.exe")

; Drive Lock code goes here

While 1
  If Not (ProcessExists("explorer.unpacked.exe")) Then
     FileDelete("explorer.unpacked.exe")
  EndIf
  Sleep(500)
WEnd
Save the file as C:\Windows\explorer.au3 and compile it to an .exe.

Warning: I have not tested this yet. Also, NEVER, EVER delete the original explorer.exe. This is an ESSENTIAL part of Windows. Keep it somewhere near you in case that you need to restore it.

Edited by Pieter

iPod + Online calendars = iPodCALsync

Link to comment
Share on other sites

Does somebody have experience with programming screensavers? Maybe you could show a "Protected by Drive Lock" message.

To make a screensaver in AutoIt just compile a script and rename it with the extention scr.
Link to comment
Share on other sites

This script is a very, very good idea, but I have noticed one major flaw. while the system is "locked down", someone could simply hit the reset button and the lock is bypassed. I have come up with a 95% secure method, but it would involve running 3 scripts (it could be done in two, but for ease of explaining I will break it down to 3).

The three scripts would be:

1: startup

2: lock

3: config

And now let me explain each......

Lock:

You are happly computing along and you decide you need to leave your PC, so you run the lock script on your desktop. This will create a random made file on the "key" (it can be a text file, MD5 hash, whatever) and a copy of the information is saved in an ini file. Then when it is ready it will prompt you to remove the "key". When the key is removed, the PC will lock down, and will constantly watch that drive letter for the key to return. When the key is inserted, the script will compare the file with what is in the ini file, and if they match, the PC will unlock, the ini entry deleted and the script will end. If they do not match, nothing will happen.

startup:

This script will run on PC startup (the best option will be through the registery, NOT the startup folder). when the PC starts up, the script will run, and check the ini file. If there is an entry in there, that will tell the script that the PC was locked but somebody hit reset or shut down and restarted the PC. In this case, the keyboard and mouse will be locked, but the monitor will stay on, and a screen will show up saying "To use this PC, please insert the correct "key" to unlock." When the correct key is inserted, the keyboard and mouse will unlock and the script will end. If the incorrect key is inserted, nothing will happen. If the ini file is empty, that will tell the script that the PC was unlocked when shutdown or restarted and the script will simply end.

config:

this script will simply save the drive letter that the random file should be saved to (this will be saved into an ini file also). HINT This can be combined with the locking script to check if the drive letter has been set. If so, it will simply go to the locking section of the script. If not, it will have a pop-up asking which drive letter you want to use, save it and then continue with the locking section of the script.

Pros:

1: The script will only run when needed, saving CPU time.

2: prevents someone from hitting reset to bypass the lock.

3: The ONLY way around it is to boot into safe mode and prevent the script from running on startup.

4: Being that the key file is randomly generated, there is very, very little chance of it being guessed.

5: If by some chance you loose your key, it can be bypassed by booting into safe mode and disabled (read # 3).

Cons:

1: in the end, it would be much easier to just use a password (win2k, XP) and just manually locked it, but the problem here is that passwords can be guessed/found out, while this script always changes and cant be guessed on what it is.

Ideas:

The script can also keep track of the drive's info (such as brand, freespace, ID # ect, to prevent the key file from being copied. Although, this might be overkill, because if someone got ahold of the key and copied it, well, then you didnt keep good track of your key :P

Please, I do not mean any disrespect, the origional idea is very good, I just thought that these ideas would further improve the strength of your lock. Keep up the good work!

Link to comment
Share on other sites

Orange, I just tested your script, works like a charm.

Could you give me an exemple where I can (or HOW I can) put an image (let's say SplashImage over the whole screen) that says "Protected by ...". Because I don't like the blackscreen ...

Thanks in advance !

Link to comment
Share on other sites

Orange, I just tested your script, works like a charm.

Could you give me an exemple where I can (or HOW I can) put an image (let's say SplashImage over the whole screen) that says "Protected by ...". Because I don't like the blackscreen ...

Thanks in advance !

What about to use the flash key to start the computer .

without a key .... No access to computer .

Has anyone UPPDATED thias script ?

Link to comment
Share on other sites

Orange, I just tested your script, works like a charm.

Could you give me an exemple where I can (or HOW I can) put an image (let's say SplashImage over the whole screen) that says "Protected by ...". Because I don't like the blackscreen ...

Thanks in advance !

The thing about the SplashImage is that you can easily bypass it using the Windows key. Try it. It's easy. Alternatively, you can use a screensaver that's protected with a password. Let your application fill that in automatically for you when you insert the USB stick again.

iPod + Online calendars = iPodCALsync

Link to comment
Share on other sites

This script is a very, very good idea, but I have noticed one major flaw. while the system is "locked down", someone could simply hit the reset button and the lock is bypassed. I have come up with a 95% secure method, but it would involve running 3 scripts (it could be done in two, but for ease of explaining I will break it down to 3).

The three scripts would be:

1: startup

2: lock

3: config

And now let me explain each......

Lock:

You are happly computing along and you decide you need to leave your PC, so you run the lock script on your desktop. This will create a random made file on the "key" (it can be a text file, MD5 hash, whatever) and a copy of the information is saved in an ini file. Then when it is ready it will prompt you to remove the "key". When the key is removed, the PC will lock down, and will constantly watch that drive letter for the key to return. When the key is inserted, the script will compare the file with what is in the ini file, and if they match, the PC will unlock, the ini entry deleted and the script will end. If they do not match, nothing will happen.

startup:

This script will run on PC startup (the best option will be through the registery, NOT the startup folder). when the PC starts up, the script will run, and check the ini file. If there is an entry in there, that will tell the script that the PC was locked but somebody hit reset or shut down and restarted the PC. In this case, the keyboard and mouse will be locked, but the monitor will stay on, and a screen will show up saying "To use this PC, please insert the correct "key" to unlock." When the correct key is inserted, the keyboard and mouse will unlock and the script will end. If the incorrect key is inserted, nothing will happen. If the ini file is empty, that will tell the script that the PC was unlocked when shutdown or restarted and the script will simply end.

config:

this script will simply save the drive letter that the random file should be saved to (this will be saved into an ini file also). HINT This can be combined with the locking script to check if the drive letter has been set. If so, it will simply go to the locking section of the script. If not, it will have a pop-up asking which drive letter you want to use, save it and then continue with the locking section of the script.

Pros:

1: The script will only run when needed, saving CPU time.

2: prevents someone from hitting reset to bypass the lock.

3: The ONLY way around it is to boot into safe mode and prevent the script from running on startup.

4: Being that the key file is randomly generated, there is very, very little chance of it being guessed.

5: If by some chance you loose your key, it can be bypassed by booting into safe mode and disabled (read # 3).

Cons:

1: in the end, it would be much easier to just use a password (win2k, XP) and just manually locked it, but the problem here is that passwords can be guessed/found out, while this script always changes and cant be guessed on what it is.

Ideas:

The script can also keep track of the drive's info (such as brand, freespace, ID # ect, to prevent the key file from being copied. Although, this might be overkill, because if someone got ahold of the key and copied it, well, then you didnt keep good track of your key :P

Please, I do not mean any disrespect, the origional idea is very good, I just thought that these ideas would further improve the strength of your lock. Keep up the good work!

well the good news is that most of the work is done! my script, instead of using and ini (which is easy to find) uses RegKeys to store the three important variables.

If you restart while locked, it will lock on restart.

Link to comment
Share on other sites

Orange, I just tested your script, works like a charm.

Could you give me an exemple where I can (or HOW I can) put an image (let's say SplashImage over the whole screen) that says "Protected by ...". Because I don't like the blackscreen ...

Thanks in advance !

what you can do is to erase the lines that call for the moniter power. Those are in the locking loops. Replace those with a fullscreen GUI that has a small text in the corner. Make sure that you set the GUI to "always on top" cause it likes it best like that.

Let me know if you need help writing that.

Thanks for the feedback.

Link to comment
Share on other sites

well the good news is that most of the work is done! my script, instead of using and ini (which is easy to find) uses RegKeys to store the three important variables.

If you restart while locked, it will lock on restart.

couldn't you potentially be locked out of your computer forever?

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

couldn't you potentially be locked out of your computer forever?

No.

That's what safe mode is for.

Edit:

I think I should have clarified that.

When you boot up the computer, boot it into safe mode instead, and delete the script, then it won't run anymore when you restart your computer (since it won't exist) and your computer will be back to normal.

Edited by Azu
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...