diff --git a/chef/cookbooks/metasploitable/test/windows/iis.rb b/chef/cookbooks/metasploitable/test/windows/iis.rb new file mode 100644 index 0000000..4c167b4 --- /dev/null +++ b/chef/cookbooks/metasploitable/test/windows/iis.rb @@ -0,0 +1,8 @@ +control "iis" do + title "IIS HTTP" + desc "Checks if the IIS server has started and listening on port 80. Setup script available at /scripts/installs/setup_iis.bat" + + describe command('netstat -aob | findstr :3389') do + its('stdout') { should match ("LISTENING") } + end +end diff --git a/chef/cookbooks/metasploitable/test/windows/psexec.rb b/chef/cookbooks/metasploitable/test/windows/psexec.rb new file mode 100644 index 0000000..632c27e --- /dev/null +++ b/chef/cookbooks/metasploitable/test/windows/psexec.rb @@ -0,0 +1,14 @@ +control "psexec" do + title "PxExec" + desc "Checks if the ports 139 - NetBIOS and 445 - SMB are listening" + + describe command('netstat -aob | findstr :139') do + its('stdout') { should match ("LISTENING") } + end + + describe command('netstat -aob | findstr :445') do + its('stdout') { should match ("LISTENING") } + end + +end + diff --git a/chef/cookbooks/metasploitable/test/windows/winrm.rb b/chef/cookbooks/metasploitable/test/windows/winrm.rb new file mode 100644 index 0000000..bce3253 --- /dev/null +++ b/chef/cookbooks/metasploitable/test/windows/winrm.rb @@ -0,0 +1,9 @@ +control "winrm" do + title "WinRM" + desc "Checks if the port 5985 is listening" + + describe command('netstat -aob | findstr :5985') do + its('stdout') { should match ("LISTENING") } + end + +end