咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
将下面代码复制到文本文档中保存后设置车.BAT的批处理文件后运行:
MD C:WINDOWSPDPLOG
echo date /t ^>^>RDPlog.txt >>C:WINDOWSPDPLOGPdPLOG.CMD
echo time /t ^>^>RDPlog.txt >>C:WINDOWSPDPLOGPdPLOG.CMD
echo netstat -n -p tcp ^| find ":3389"^>^>RDPlog.txt >>C:WINDOWSPDPLOGPdPLOG.CMD
echo start Explorer >>C:WINDOWSPDPLOGPdPLOG.CMD
:: 添加用户每次进入远程桌面时自动记录下来所用IP,可用来发现黑客踪迹!
REG ADD "HKEY_LOCAL_MACHINESYSTEMControlSet001ControlTerminal ServerWinStationsRDP-Tcp" /v fInheritInitialProgram /t REG_DWORD /d "00000000" /f
REG ADD "HKEY_LOCAL_MACHINESYSTEMControlSet001ControlTerminal ServerWinStationsRDP-Tcp" /v WorkDirectory /t REG_SZ /d C:WINDOWSPDPLOG /f
REG ADD "HKEY_LOCAL_MACHINESYSTEMControlSet001ControlTerminal ServerWinStationsRDP-Tcp" /v InitialProgram /t REG_SZ /d "C:WINDOWSPDPLOGPdPLOG.CMD" /f
REG ADD "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp" /v fInheritInitialProgram /t REG_DWORD /d "00000000" /f
REG ADD "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp" /v WorkDirectory /t REG_SZ /d C:WINDOWSPDPLOG /f
REG ADD "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp" /v InitialProgram /t REG_SZ /d "C:WINDOWSPDPLOGPdPLOG.CMD" /f
Echo 记录远程桌面IP策略添加完毕! 请按任意键退出!
PAUSE >nul
——————————————————————————————————————————————————————————————
利用这个代码我们的服务器当被人远程登录时候,就会自动生成一个日志文件并且留下登陆者的IP信息。
打开日志文件就可以看到我们的登录信息文件位置在C:WINDOWSPDPLOG