Steve21 Posted April 16, 2011 Posted April 16, 2011 (edited) Note: This is in test currently, Not for live deployment! Hey, As from the amount of posts in the scripts forum about getting help with disabling a computer once someone disconnects the network cable, I decided to go about writing a little free program designed to easily do this. The main idea of the program being able to totally lock the student out of the computer while it's disconnected from the network. Thus stopping any issues with GPOs not applying, games not being blocked, etc etc. Hopefully few people wouldn't mind testing it for any holes/bugs, I might have missed How's it look: The program "should" run unseeable during normal use, and like this during lock (aka disconnected network): Program Exe: EduLockv2.zip Features: Locks the computer screen on a disconnection from network. Relocks the screen if a teacher unlocks the program while it's still disconnected from network. Checks the network connection on program load, so even if it's already disconnected it will lock. Unlockable through simple password on lock screen. Records time of lock. Records attempted bypasses, and password entries. (In debug only currently) Status: Windows XP: FN-GM Tested (Didn't work, but think it's due to not having .NET framwork installed) Windows Vista: Tested (But would like more tests if possible) Windows 7: FN-GM Tested (But would like more tests if possible_ Wireless: Not Tested Wired: Tested (But would like more tests if possible) Known Issues: If you have any secondary network connections, e.g. hamachi it still classifies this as a network connection, so won't lock. As "officially" you're not disconnected (Trying to fix this, but I assume most school computers don't use multiple connections anyway, at least not that I've worked with) (If you're not getting locked, good idea to check this, and disable 2nd connection while testing program) Bypass attempts don't update during graphics update (but looking to sort this) Very dark/hard to see colours. Due to it being totally random in choosing colours currently, it will sometimes pick stupid colours. This will be sorted shortly! FAQ: Q: What can disable this? A: Obviously items like taskmanager, and/or WMI scripts "can" kill the program, but this shouldn't be available to students anyway. Q: Red Buttons on program? A: Aren't shown in proper release, just there for debugging. Kill switch (Incase i/you break something major and can't get out ) and Force Redraw just for testing. Q: What's the password?!?!?!?!? A: test Any and all testing on it would be appreciated, Would be nice to get a final live version up and sorted If you have ANY suggestions, feedback etc would all be greatly welcomed. (Also I've only tested this on a computer with Visual Studios on, so would be nice to know if it requests any installs to work) Many thanks, Steve Change log: v2 - Added secondary admin login, and enabled auto-unlock v1 - Original Edited April 16, 2011 by Steve21
FN-GM Posted April 16, 2011 Posted April 16, 2011 (edited) On Windows XP the program wont run at all i get the attached. Tested on Windows 7 32 bit seems ok. The fact it locks itself very soon after you have put the password in is a little annoying because if there is another problem like the wireless disconnecting it cant be fixed. If that can be stopped? Also would be good if the screen unlocked itself after the cable has been reconnected. Also how do you recommend the program is run from? One other comment i would say is improve the UI. Thanks Edited April 16, 2011 by FN-GM 1
Steve21 Posted April 16, 2011 Author Posted April 16, 2011 On Windows XP the program wont run at all i get the attached. Tested on Windows 7 32 bit seems ok. The fact it locks itself very soon after you have put the password in is a little annoying. If that can be stopped? Thanks Err, That was sort of supposed to be like that It relocks itself if a teacher unlocks it while network cable isn't plugged in. aka so they need to put cable in before it unlocks Or do you mean with it plugged in? Edit - NM saw your edit Steve
Steve21 Posted April 16, 2011 Author Posted April 16, 2011 (edited) On Windows XP the program wont run at all i get the attached. Do you have the .NET framework installed on that pc? (That error usually means you don't) Tested on Windows 7 32 bit seems ok. Good to know, Thanks The fact it locks itself very soon after you have put the password in is a little annoying because if there is another problem like the wireless disconnecting it cant be fined. If that can be stopped? Certainly can do, Two options I guess, make it longer but then how long is the issue, or simply don't relock it. But then random teachers who just type password in without checking cable, will allow access to games etc Also would be good if the screen unlocked after the cable has been reconnected. Could put it in as an option, as a few said in the scripts forum they wanted it locked until someone opens it Also how do you recommend the program is run from? As in? I'm assuming easiest way is copying it over to the computers, and doing it as a startup. Bearing in mind if they disconnect network it wouldn't be able to pull it from the servers etc. One other comment i would say is improve the UI. Aye, Only set for debugging currently Guess it needs an adminy side UI. What else would you like on it? Just config settings or? Out of curiosity, did you try on wireless or wired? Thanks Steve Edited April 16, 2011 by Steve21
FN-GM Posted April 16, 2011 Posted April 16, 2011 (edited) Certainly can do, Two options I guess, make it longer but then how long is the issue, or simply don't relock it. But then random teachers who just type password in without checking cable, will allow access to games etc Personally i wouldn't give teachers the password. If it automatically unlocks the screen after the cable is connected again there is no need for them to have it. I tried in a virtual machine. Edited April 16, 2011 by FN-GM 1
Gatt Posted April 16, 2011 Posted April 16, 2011 What about 2 types of passwords: an admin password that disables the program a teacher password that temporarily disables and re-locks if the network cable is still disconnected after say 5 mins Will test it out next week 1
Steve21 Posted April 16, 2011 Author Posted April 16, 2011 Aye both great ideas If in config there's 2 settings. One requires password on every unlock, then teacher has one, admin has one. Other option has auto unlock, and then an admin override. Many thanks, Steve
FN-GM Posted April 16, 2011 Posted April 16, 2011 if you you have the auto unlock, if a student unplugs the cable during logon. Onces its done the screen will lock. If you have the auto unlock on they could then just connect back up and get access to the full machine. If you did a auto gpupdate once the cable is back in it should stop that. 1
Gatt Posted April 16, 2011 Posted April 16, 2011 @FN-GM an auto-reboot would be better as it might not have applied any computer policies... 1
FN-GM Posted April 16, 2011 Posted April 16, 2011 @Gatt You would have to get the app to somehow know that the group polices have not been applied. Not sure if that can be done 1
cpjitservices Posted April 16, 2011 Posted April 16, 2011 Could of done with this when I was running an old CC2 network, some of the kids figured out that if the cable was pulled during logon it wouldn't pull down any scripts/GP Settings so they'd get a bit more freedom on the machines, I'm going to test this next week on VM. 1
Gatt Posted April 16, 2011 Posted April 16, 2011 Doesn't it generate an event log if it cannot run a GPO 1
FN-GM Posted April 16, 2011 Posted April 16, 2011 @Gatt I'm not sure to be honest. I will mess about later on and see. 1
Steve21 Posted April 16, 2011 Author Posted April 16, 2011 Ok, Added a second password login, So if an admin logs in (currently test2) it'll unlock the computer, and disable the relock timer. Also added auto-unlock on putting the cable back in. However as discussed above, this could cause issues with GPOs, so will need to look into this, or just don't allow auto unlock New version should be up in a minute Also FN-GM what bit of UI were you referring to? Know its pretty basic currently, but not sure what bit you actually mean Is it admin side? whole thing? or what Steve
FN-GM Posted April 16, 2011 Posted April 16, 2011 Ok, Added a second password login, So if an admin logs in (currently test2) it'll unlock the computer, and disable the relock timer. Also added auto-unlock on putting the cable back in. However as discussed above, this could cause issues with GPOs, so will need to look into this, or just don't allow auto unlock New version should be up in a minute Also FN-GM what bit of UI were you referring to? Know its pretty basic currently, but not sure what bit you actually mean Is it admin side? whole thing? or what Steve Admin side, whats that? not seen it. I am just not keen on the lock screen to be honest. Also it would be nice to be able to set your on Text on the lock screen. 1
Steve21 Posted April 16, 2011 Author Posted April 16, 2011 Admin side, whats that? not seen it. I am just not keen on the lock screen to be honest. Also it would be nice to be able to set your on Text on the lock screen. Aye, Any plans on what you'd like on lock screen? Originally was going to just be blank with writing, but seemed little boring And yes, can set it so you could set text, again though need to decide how it's laid out first Steve
FN-GM Posted April 16, 2011 Posted April 16, 2011 I would like to see something brighter. Maybe a picture of a padlock? Or a stop sign? an unplugged network cable? Something i would say is do not brand the lockscreen with EduLock. They will see this. They may google the software, find it and play around with it and find a way round it. Cheers 1
Steve21 Posted April 16, 2011 Author Posted April 16, 2011 Aye valid point. Think I'll end up making few options of screen etc. Already redone a large part this afternoon, Changed it so you can choose if you want teachers to unlock, auto unlock, choose passwords, and written text etc. Aswell as changing the bits so admin password disables the "relock if disconnected" part etc Just need to fix one thing I broke, and will make a few options for screens, and throw a new copy online tomorrow sometime. (Still not sure if there's an easy way to check if GPOs applied without making the admins input a list of GPOs, which isn't very good way ) Thanks Steve
oxide54 Posted April 17, 2011 Posted April 17, 2011 its a good idea, i like it, but you need to obfusicate your source so its not so easy to decompile string s = "You've been locked due to network cable disconnection!"; g.DrawString(s, font, brush, (float) ((((double) this.Width) / 2.0) - 10.0), (float) ((((double) this.Height) / 2.0) - 20.0), format); string str2 = "Please get a teacher/admin to unlock!"; g.DrawString(str2, font, brush, (float) ((((double) this.Width) / 2.0) - 10.0), (float) ((((double) this.Height) / 2.0) + 20.0), format); int num5 = width; for (int i = 0; i <= num5; i += 7) { g.DrawLine(pen, 0f, i * num3, (float) (width - i), 0f); this.BringToFront(); g.DrawLine(pen, 0f, (width - i) * num3, (float) (width - i), width * num3); this.BringToFront(); g.DrawLine(pen, (float) (width - i), 0f * num3, (float) width, (width - i) * num3); this.BringToFront(); g.DrawLine(pen, (float) (width - i), width * num3, (float) width, i * num3); this.BringToFront(); } this.TextBox1.Focus(); 1
Steve21 Posted April 17, 2011 Author Posted April 17, 2011 its a good idea, i like it, but you need to obfusicate your source so its not so easy to decompile The problem with all that sort of stuff, is it doesn't make it harder to decompile. Only to understand. I mean, take simple: int test as string test = "Hi" + test Sure you can make it stupidly long, hard to know what it does variables, int AIWOTNAIOWHTIOAWTHANW as string AIWOTNAIOWHTIOAWTHANW = "Hi" + AIWOTNAIOWHTIOAWTHANW But end of day it's still exact same code. Unless I'm missing something Steve
oxide54 Posted April 17, 2011 Posted April 17, 2011 personally i would write it with win32 / c and remove the .net framework requirement 1
Steve21 Posted April 17, 2011 Author Posted April 17, 2011 personally i would write it with win32 / c and remove the .net framework requirement Aye, but C can be decompiled too if you have the programs. As with everything, it's kind of, time vs worth But guess I'll see once I get more completed version Thanks, Steve
oxide54 Posted April 17, 2011 Posted April 17, 2011 i know what your saying mate, we actually encourage the use of .net decompiler for students to learn, c/c++ compilation is a whole different ball game, are they any that will actually spit c/c++ source back out or do they all give asm don't get me wrong, I wasn't trying to discourage you, I think its a great idea and will be looking at it monday, on seconds thoughts keep it .net and I can make my own moded versions 1
Steve21 Posted April 17, 2011 Author Posted April 17, 2011 (Anyone know why I can't edit my first post anymore? Is there a limit to edits or something silly? O.o) New version up: EduLockv3.zip Changes: Changed default lock screen to a "light" covering of their normal screen. By default the program has a notify Icon (bottom right taskbar), that can be used to access admin page Can choose wording to be shown, including multi-line Can change admin login, admin unlock and teacher passwords (Currently NOT saved between sessions) Can testLock the program from admin screen (Saves unplugging ) Should fix a few issues, "imo" a much cleaner lock screen. Three passwords currently are: Teacher Unlock: test Admin Unlock: test2 Admin Console: admin As mentioned, all changable currently, "but not" saved between sessions. Can choose if teachers can unlock, if you want autounlock, and if icon shows (Idea being you hide it once admin first sets options, Which "will" save) So yeah Any opinions on changes/If i missed something etc etc. Things to do still: Save settings between sessions Hide passwords "Once" complete, remove debug kill switches! Any other suggestions etc, Still gratefully accepting Many Thanks, Steve 1
Recommended Posts