home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows NT Super Tune-Up Kit
/
PIE-WindowsNTSuperTuneUpKit-1997.iso
/
SECURITY
/
DLOCK
/
README.NT
< prev
next >
Wrap
Text File
|
1995-04-20
|
4KB
|
142 lines
This is a device locking service written by L. Kahn
This service allows you to lock all drives as well as com ports on your system.
I use it in conjunction with telnet deamons to make sure that users that
can telnet to my system cannot access certain fat drives and com ports...
This is like the lock drive facility for the built in ftp server...
There was a big hole in NT security that would not allow you to keep telnet
users off of your fat partitions... this program closes that hole.
Source for the floppy locking service in the res. kit was used as a
starting point.
This service is different in that messages about what is locked and unlocked
gets logged to the application log and also the devices are not limited
to floppies or hardcoded in the program, but specified in a file.
You must copy the devlock.exe and chglock.exe programs into your winnt\system32
directory.
then you must run the instdsrv program..
ie
instdsrv i:\winnt\system32\devlock.exe
then you must go into the control panel services applet and set the account
and password you want the service to run under. You should also make sure
startup is left on automatic otherwise users can still get in.
the chglock program communicates with the service and either queries or
locks and unlocks all devices that were specified in your devlist.dat file.
you must create this file in your winnt\system32 directory before the service
is started. Once started the service reads this file into memory and if you
make changes to it you must stop and restart the service for them to take
affect. Its contents should be a single device name with the ending colon
one to a line.
here is a sample file:
A:
b:
c:
d:
COM1:
COM2:
NOTE: this program still allows power users and adminstrators to get into any
devices you have locked so make sure that users for telnet/rexec etc. accounts
do not have these attributes if you want to keep them from your devices.
There is also a chglock program that allows you to query the state of the
devices or lock/unlock the devices in the current set:
ie
chglock \\machinename /q
\\ambra-tp60vl2 Devicelock status:
Device Status
-------------------
A: LOCKED
B: LOCKED
C: LOCKED
D: LOCKED
E: LOCKED
F: LOCKED
G: LOCKED
H: LOCKED
I: LOCKED
L: LOCKED
N: LOCKED
O: LOCKED
COM1: LOCKED
COM3: LOCKED
COM4: LOCKED
I:\WINNT\System32>
to unlock devices
I:\WINNT\System32>chglock \\ambra-tp60vl2 /u
\\ambra-tp60vl2
Device A: is now UNLOCKED!
Device B: is now UNLOCKED!
Device C: is now UNLOCKED!
Device D: is now UNLOCKED!
Device E: is now UNLOCKED!
Device F: is now UNLOCKED!
Device G: is now UNLOCKED!
Device H: is now UNLOCKED!
Device I: is now UNLOCKED!
Device L: is now UNLOCKED!
Device N: is now UNLOCKED!
Device O: is now UNLOCKED!
Device COM1: is now UNLOCKED!
Device COM3: is now UNLOCKED!
Device COM4: is now UNLOCKED!
I:\WINNT\System32>
similiarly to lock devices give the \l command:
\\ambra-tp60vl2
Device A: is now LOCKED!
Device B: is now LOCKED!
Device C: is now LOCKED!
Device D: is now LOCKED!
Device E: is now LOCKED!
Device F: is now LOCKED!
Device G: is now LOCKED!
Device H: is now LOCKED!
Device I: is now LOCKED!
Device L: is now LOCKED!
Device N: is now LOCKED!
Device O: is now LOCKED!
Device COM1: is now LOCKED!
Device COM3: is now LOCKED!
Device COM4: is now LOCKED!
Good luck ...
I can be reached at kahn@drcoffsite.com
Source is avail. upon special request for porting to other platforms.