RE: WMI to SNMP problems



Hi Thomee,

Our WMI specialist suggest you may need to check the the SNMP write
community first, in order to make sure it's given to WMI so the SNMP WMI
provider uses the write community. Please refer to the qualifier
AgentWriteCommunityName of the SNMP provider:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/
qualifiers_specific_to_the_snmp_provider.asp

And the following is some example C# code to do this:.

ManagementScope s = new ManagementScope("root\\snmp\\localhost");

SelectQuery query = new
SelectQuery("SNMP_RFC1213_MIB_system",null,DesiredProperties);

EnumerationOptions Enum_opts = new EnumerationOptions();
Enum_opts.Context.Add("AgentAddress",AgentAddress.ToString());
Enum_opts.Context.Add("AgentReadCommunityName",AgentReadCommunity);
Enum_opts.Context.Add("Correlate",false);

ManagementObjectSearcher search = new
ManagementObjectSearcher(s,query,Enum_opts);

foreach (ManagementBaseObject objSys in search.Get())
{
foreach (PropertyData Prop in objSys.Properties)
{

Console.WriteLine(Prop.Name + "\n-----------------\n" +
Prop.Value.ToString() + "\n");
}

Console.WriteLine();
}


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================

.



Relevant Pages

  • [NEWS] D-Link DWL-1000AP can be Compromised Due to Insecure SNMP Configuration
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... allows an attacker to gain the administrative password using a simple SNMP ... A MIB walk using the read-only SNMP community of 'public' (default ... read-only community for most devices) can allow an attacker access to the ...
    (Securiteam)
  • D-Link DWL-1000AP can be compromised because of SNMP configuration
    ... used SNMP, I performed a MIB walk to obtain the ... default read-only community for most devices). ... accessing the HTTP configuration page of the ...
    (Bugtraq)
  • RE: Determine Handle Count associated with a running process.
    ... Thank you for posting in the community! ... Instrumentation (WMI) to implement the corresponding function. ... I have created a test project in VB codes on my site, ... This posting is provided "AS IS" with no warranties and confers no rights. ...
    (microsoft.public.vb.winapi)
  • RE: SNMP configuration
    ... > Hi, i need to configure SNMP, i noticied that snmpd daemon is ... Notice the second com2sec line matches my internal ... LAN address space. ... use the community of MyROComm and can be v1 or v2c based. ...
    (Fedora)
  • RE: How to exploit snmp
    ... The great thing about SNMP is the fact that it allow you to query the remote ... host and get tons of information about that host. ... What you wish to do now is to use a tool such as SNMPwalk or solarwinds SNMP ... It also sends the community string in clear ...
    (Security-Basics)