control "Arbitrary rule name for your compliance sets" do
title "Look for netbios enabled Network Adapters"
desc "
CHeck for adapters with netbios enabled in their settings.
"
impact 1.0
script = <<-EOH
$interfaces = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Property *
foreach ($interface in $interfaces) {
If ($interface.TcpipNetbiosOptions -eq 1)
{echo $interface.ServiceName}
}
EOH
describe powershell(script)do
its('stdout') { should cmp '' }
end
end
control "Arbitrary rule name for your compliance sets" do
title "Look for netbios enabled Network Adapters"
desc "
CHeck for adapters with netbios enabled in their settings.
"
impact 1.0
describe wmi(
class: 'niconfig',
query: 'wmic nicconfig get Description,index,TcpipNetbiosOptions'
) do
its('TcpipNetbiosOptions') { should_not eq '1' }
end
end