https://docs.microsoft.com/ko-kr/windows-server/remote/remote-desktop-services/troubleshoot/rdp-error-general-troubleshooting
https://docs.microsoft.com/ko-kr/troubleshoot/azure/virtual-machines/troubleshoot-rdp-general-error
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Winstations\RDP-Tcp" /v fEnableWinStation /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Winstations\RDP-Tcp" /v fLogonDisabled /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Winstations\RDP-Tcp" /v "fDisableExe" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Winstations\RDP-Tcp" /v "fDisableCam" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Winstations\RDP-Tcp" /v "fDisableAutoReconnect" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Winstations\RDP-Tcp" /v "fDisablePNPRedir" /t REG_DWORD /d 1 /f
원격 연결 원하지 않을때.
https://stackoverflow.com/questions/34382523/deny-all-folders-permission-from-all-users-administrators-via-cmd-batch-in-windo
icacls "%windir%\System32\mstsc.exe"
takeown /F "%windir%\System32\mstsc.exe" /A
icacls "%windir%\System32\mstsc.exe" /grant Administrators:F
icacls "%windir%\System32\mstsc.exe" /setintegritylevel H
icacls "%windir%\System32\mstsc.exe" /deny *S-1-1-0:F
icacls "%windir%\System32\mstsc.exe" /setowner "NT SERVICE\TrustedInstaller" 안된다
icacls "%windir%\System32\mstsc.exe" /grant:r Administrators:RX
icacls "%windir%\System32\mstsc.exe" /inheritance:r /deny "*S-1-1-0:(OI)(CI)(F)" "*S-1-5-7:(OI)(CI)(F)"
이렇게 하면 문제는 sfc 무결성에 걸려 버린다
https://soohyunet.com/%EC%B5%9C%EA%B3%A0-%EA%B4%80%EB%A6%AC%EC%9E%90-%EA%B6%8C%ED%95%9C%EC%9C%BC%EB%A1%9C-%EC%8B%A4%ED%96%89-%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95-3%EA%B0%80%EC%A7%80/
https://github.com/M2Team/NSudo
https://m2team.github.io/NSudo/en-us/
https://github.com/M2Team/NSudo/releases/latest
https://github.com/M2Team/NSudo/tags 여기서 받으면 되네요.
NSudoLG.exe 실행 해서
%windir%\system32\cmd.exe 입력 하고 체크 한다음에 실행 하고
icacls "%windir%\System32\mstsc.exe" /deny *S-1-5-7:F
icacls "%windir%\System32\mstsc.exe" /deny *S-1-1-0:F
입력 하면 한방에 끝나는군요.
icacls "%windir%\System32\mstsc.exe" /remove *S-1-5-7
icacls "%windir%\System32\mstsc.exe" /remove *S-1-1-0
(다시 지우기) 이것도 극복을 하지 못한다. ㅋㅋ sfc 무결성에 걸려 버리는 ㅎㅎ..
echo 원격실행 안되게 하기 레지스트 https://www.technipages.com/prevent-users-from-running-certain-programs
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v DisallowRun /t REG_DWORD /d 1 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun" /v 1 /t REG_SZ /d mstsc.exe /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v DisallowRun /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun" /v 1 /t REG_SZ /d mstsc.exe /f
echo 게스트 차단 등록
icacls "%windir%\System32\mstsc.exe"
takeown /F "%windir%\System32\mstsc.exe" /A
icacls "%windir%\System32\mstsc.exe" /grant Administrators:F
icacls "%windir%\System32\mstsc.exe" /setintegritylevel H
icacls "%windir%\System32\mstsc.exe" /deny "Guest:F" "*S-1-5-32-546:F" "*S-1-0-0:F" "*S-1-5-7:F"
icacls "%windir%\System32\mstsc.exe" /setowner "NT SERVICE\TrustedInstaller"
icacls "%windir%\System32\mstsc.exe" /grant:r Administrators:RX
echo 삭제
icacls "%windir%\System32\mstsc.exe"
takeown /F "%windir%\System32\mstsc.exe" /A
icacls "%windir%\System32\mstsc.exe" /grant Administrators:F
icacls "%windir%\System32\mstsc.exe" /remove "Guest" "*S-1-5-32-546" "*S-1-0-0" "*S-1-5-7"
icacls "%windir%\System32\mstsc.exe" /setowner "NT SERVICE\TrustedInstaller"
icacls "%windir%\System32\mstsc.exe" /grant:r Administrators:RX
첫댓글 https://soohyunet.com/%EC%B5%9C%EA%B3%A0-%EA%B4%80%EB%A6%AC%EC%9E%90-%EA%B6%8C%ED%95%9C%EC%9C%BC%EB%A1%9C-%EC%8B%A4%ED%96%89-%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95-3%EA%B0%80%EC%A7%80/
https://github.com/M2Team/NSudo
https://m2team.github.io/NSudo/en-us/
https://github.com/M2Team/NSudo/releases/latest
https://github.com/M2Team/NSudo/tags 여기서 받으면 되네요.