metasploitable3/chef/cookbooks/metasploitable/test/windows/enable_rdp.rb
2017-07-19 18:22:41 +05:30

17 lines
573 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 registry_key('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server') do
its('fDenyTSConnections') { should eq 0 }
end
describe port('3389') do
it { should be_listening }
end
end