mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-07-07 12:12:24 +02:00
18 lines
777 B
Ruby
18 lines
777 B
Ruby
control "enable-rdp" do
|
|
title "Enable RDP"
|
|
desc "Enables RDP by modifying Registry and adding a Firewall rule. Configuration script available at /scripts/configs/enable-rdp.bat"
|
|
|
|
describe command('netsh advfirewall firewall show rule name="Open Port 3389"') do
|
|
its('stdout') { should match ("Enabled: Yes") }
|
|
end
|
|
|
|
describe command('reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections') do
|
|
its('stdout') { should match ("fDenyTSConnections REG_DWORD 0x0") }
|
|
end
|
|
|
|
# As port('3389') doesnt work on windows, we use netstat command to know if the port is listening
|
|
describe command('netstat -aob | findstr :3389') do
|
|
its('stdout') { should match ("LISTENING") }
|
|
end
|
|
end
|