<TestAuthor> WebTrends Corporation </TestAuthor>
<TestCopyright> Copyright 1998, WebTrends Corporation, All Rights Reserved. </TestCopyright>
<TestVersion> 2.0 </TestVersion>
====================================================================
<TestDependency>estabvc</TestDependency>
<TestCategory>inventory</TestCategory>
====================================================================
<TestTitle>Query OS Type via Netbios</TestTitle>
<TestVulnerabilityDescription>
This test attempts to determine the operating system type and version running on
the specified hosts.
</TestVulnerabilityDescription>
====================================================================
<Test>
# osdetectnt.pl
# attempt to detect OS using a netbios over tcp/ip call
require "crowbar.pl";
$theTargetNetbiosName = GetStringParam($crowbar::WTDB_NetbiosName);
crowbar::WTDebugOutput("OSDetect -- the target netbios name is $theTargetNetbiosName");
if($theTargetNetbiosName){
$a = crowbar::WTGetNTOSInfo($theTargetNetbiosName);
if($a){
$a =~ /^OSTYPE (.*):VERSION (.*)/;
$type = $1;
$version = $2;
crowbar::WTDebugOutput("Type is $type, version is $version\n");
if($version =~ m/OSVersion_Unknown/){
crowbar::WTAddRecord( $crowbar::WTDB_OSVersion, length("Unknown") + 1, "Unknown", -1);
}
elsif($version =~ m/OSVersion_WindowsNT_3_5_0/){
crowbar::WTAddRecord( $crowbar::WTDB_OSVersion, length("Version 3.5") + 1, "Version 3.5", -1);
}
elsif($version =~ m/OSVersion_WindowsNT_3_5_1/){
crowbar::WTAddRecord( $crowbar::WTDB_OSVersion, length("Version 3.51") + 1, "Version 3.51", -1);
}
elsif($version =~ m/OSVersion_WindowsNT_4_0/){
crowbar::WTAddRecord( $crowbar::WTDB_OSVersion, length("Version 4.0") + 1, "Version 4.0", -1);
}
elsif($version =~ m/OSVersion_WindowsNT_5_0/){