|
h大的su.ini中的内容:
//// 切换到Administrator及回切SYSTEM ////
`首次登录Admin
_SUB Admin1
//必须首先加入工作组,否则Administrator不能登录
TIPS 切换到管理员,设置工作组......,,1,#1
EXEC != startnet.exe -wg WORKGROUP
`CALL $Netapi32.dll,NetJoinDomain,,WORKGROUP,,,,1
//记忆钩子以方便用tscon切回
EXEC !WinXShell.exe -code app:call('UserLogonInit')
//设定自动以Administrator用户登录
TIPS 切换到管理员,设置自动登录......,,1,#1
REGI #HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon=1
REGI $HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName=Administrator
REGI $HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword=
//设定Administrator自动执行脚本
`ENVI LDUSER=PECMD.EXE MAIN %SystemRoot%\System32\admin.ini
ENVI LDUSER=PECMD.EXE MAIN -user %SystemRoot%\System32\admin.ini
`REGI HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\Init=%LDUSER%
`REGI HKEY_USERS\S-1-5-19\Software\Microsoft\Windows\CurrentVersion\Run\Init=%LDUSER%
`REGI HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RUN\Init=%LDUSER%
REGI $HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit=userinit.exe,%LDUSER%
//登陆界面不需要显示GUEST用户 ,禁止 sihost.exe加快登陆速度
REGI #HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList\Guest=0
REGI #HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList\H3=0
REGI #HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\EnableSIHostIntegration=0
REGI #HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{2C7339CF-2B09-4501-B3F3-F3508C9228ED}\IsInstalled=0
REGI HKCU\SOFTWARE\Microsoft\Active Setup\Installed Components\{2C7339CF-2B09-4501-B3F3-F3508C9228ED}\!
TIPS 切换到管理员,启动服务......,,1,#1
//禁用网卡可以加快登录速度
PCIP ,,,,0,0
PCIP ,,,,1,0
//启动相关服务
SERV -wait gpsvc
SERV -wait ProfSvc
SERV -wait seclogon
`WAIT 500
//挂载复制注册表到NTUSER.DAT
EXEC =!reg.exe LOAD HKEY_LOCAL_MACHINE\PE_DEF "X:\Users\Default\NTUSER.DAT"
EXEC =!reg copy "HKEY_CURRENT_USER\Software" "HKEY_LOCAL_MACHINE\PE_DEF\Software" /s /f
EXEC =!reg copy "HKEY_CURRENT_USER\Environment" "HKEY_LOCAL_MACHINE\PE_DEF\Environment" /s /f
EXEC =!reg copy "HKEY_CURRENT_USER\Control Panel" "HKEY_LOCAL_MACHINE\PE_DEF\Control Panel" /s /f
//卸载NTUSER.DAT,也可以省略
EXEC =!reg.exe UNLOAD HKEY_LOCAL_MACHINE\PE_DEF
//退出现有用户
TIPS 切换到管理员,断开当前用户......,,1,#1
FILE %desktop%\以管理员登录.*
`KILL -force -explorer EXPLORER.EXE
EXEC !tsdiscon.exe
_END
`再次登录Admin
_SUB Admin2
`FIND explorer.exe,KILL -force -explorer EXPLORER.EXE
`EXEC SHUTDOWN /l
`SHUT L
`KILL WINLOGON.EXE
EXEC !TSCON 2
EXEC !TSCON 3 //注销后再进入的为编号3
_END
`切回到System
_SUB SystemBack
`清除user shell设置
SHEL -user
EXEC !TSCON 1
`用TASKKILL和NSudoC配合提权回到system
`FIND explorer.exe,KILL -force -explorer EXPLORER.EXE
`EXEC !CMD /C TASKKILL /F /FI "USERNAME eq Administrator" /IM pecmd.exe &NSudoC.exe -U:S -P:E %Windir%\explorer.exe &NSudoC.exe -U:S -P:E PECMD.EXE MAIN* --user %Windir%\System32\Admin.ini
_END
/////////////主程序////////////////
THRD ENVI
WAIT 100
FIND $%USERNAME%=SYSTEM,
{
IFEX X:\Users\Administrator\NTUSER.DAT,CALL Admin2!CALL Admin1
}!
{
FIND $%USERNAME%=Administrator,CALL SystemBack
}
|
|