Lucene search
K

SNMP Supported Protocols Detection

🗓️ 31 Jul 2009 00:00:00Reported by TenableType 
nessus
 nessus
🔗 www.tenable.com👁 44 Views

SNMP Supported Protocols Detection. Reports all supported SNMP versions, including SNMPv3 existence and negotiation with the remote SNMP agent

Code
#TRUSTED 4e9a7dfcdde2a0ab45617ba6525426be6be5b27f9225a69d4b399506935be3a8948e1f27d9c2fe0111cdceaae71183e2f2fe08db8149cdc26642379cd415a547a9e0b1c2afc7b077bde98aadc2561769698e126c34cf5239080e440c9f6e0da0c880e8e9f6fa292f4ae47ee6b8efa728b8b971111ccfaf0545e7fdd60db3d9881cb48c5df86bd2d156197aa7ee5bd46ba04a74a92b0fe3ae16c0e2b0aede117968a5c1eca03726a3bb894f713a1d05366a9171f6afab3b08bec955980f73b5897394b16b09acd8cbc7edb2951b49071bbfd01124b026f600e968377a82aee21e62f25236c1bcf64c88f70d12a1992905077140b144debd2102cff6c24eefb76ca88bc359a031791ae11440ea96370a4f4c9f3e819fff961e17461932123f813c3e20b2049da9482c937078d5f457845a63474010d8dbb4531746a168d054b0c3ccbbd6f6dd722bbc623a974b820c802bd2cb6ea7bd371189fd2322364c1d98b0ae9f474c56805f349b8e9dfa02d1bf83713745eafeea234a8919832ddff8e9c20494c0a5af970980911889bcbc93df37ad1da28d009694ca5f8246c69c47aed5caebe50839b23e15feaaac588cd332e105ce8a66ec36d91abdb99cf703b32a065d89248ca9893621bad8700aaab6ed9580fc1acf1af75b27ec281f3ab8bc808f6747085ebb6bff656e4f94186923fdf4f3bd290da69e40e5fdaca547c754f4b5
#TRUST-RSA-SHA256 9584cd253ef549d48f8445f9c547f19344aafde14aa3a5fcf34b9230bc3cdf274e64cc3e6b62ffcc219e821c426c9ed7007d656dc5fe03b15a24efbdd59854b0bcfb0b2e39339622313e558b6912f2dc2b1e4e2231e0c06343e1f89e9b3156b5baa2e6cdb0aa2cc66f4582c3bec71ed45229351f66e146f5b1988f2673af3382f56f63793181c76dbb554b0d4f578ad7fa917499d134b91632b7d261ba9fdc9073b586d67929b7347729efbc63192cde70189dac61eff2b675909a221d1b7e08ef0130ac970ad54a548af003cd25f1b90f059b0c2143e95708e4cbefb1b1d3dba1c26ed839dae8b65343c8cac145335974f7deb294d7ea3f071960e020a161a7a55c674c1df7693374f57d3436d83368ba4e62ddc6fbcc81c2c6ff0bec2d693c4664dae6fbac2d97041666ce40f520fb09952012cc1473edd164fe199870122579315f2065527036b62fb2be38722c8aded87fc704f940e84d211ee4567c12be487ed0e52c9c0a09272eea1912a0dc9c34fd2613bb11d65b9c195259742d73582bfe8806bc7b33d196d668dd5e87f0d9ece54363b60fc417dd3f772598ba2c8cb8d4a9e268a84657d279e42f80f5cb84f5ee228704e32c8a943742b5f65a442be3ccf5e7b01031508aed6c5cd4c9d4c3a74e16fda70c2000cf8b9a817a45faba4c2f999e611a6f7f4daec0eb45ba3dc1b11659bbbb21d0bae8eed3eaabf0fea8
#
# (C) Tenable Network Security, Inc.
#

include( 'compat.inc' );

if (description)
{
  script_id(40448);
  script_version("1.10");
  script_set_attribute(attribute:"plugin_modification_date", value:"2026/02/17");

  script_name(english:"SNMP Supported Protocols Detection");
  script_summary(english:"Reports all supported SNMP versions.");

  script_set_attribute( attribute:'synopsis', value:
"This plugin reports all the protocol versions successfully negotiated
with the remote SNMP agent."  );
  script_set_attribute( attribute:'description', value:
"Extend the SNMP settings data already gathered by testing for\
SNMP versions other than the highest negotiated."  );
  script_set_attribute(attribute:"solution", value:"n/a");
  script_set_attribute(attribute:"risk_factor", value:"None");
  script_set_attribute( attribute:'plugin_publication_date', value:'2009/07/31' );
  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_end_attributes();

  script_category( ACT_GATHER_INFO );
  script_family( english:'SNMP' );

  script_copyright(english:"This script is Copyright (C) 2009-2026 Tenable Network Security, Inc.");

  script_dependencies("snmp_server.nasl");
  script_require_keys("snmp_all_versions_data_present");
  exit(0);
}

include ('misc_func.inc');
include ('snmp_func.inc');

get_kb_item_or_exit('snmp_all_versions_data_present');

var kb_base = 'SNMP/list_of_versions_supported_on_port';
var detected_snmp_versions_kb_items = get_kb_list(kb_base + '/*');

if (empty_or_null(detected_snmp_versions_kb_items))
  audit(AUDIT_KB_MISSING, kb_base + '/*');

# KB format :
#   <kb_base>/<proto>/<port>/<snmp_version>
var pieces, proto, port, version, temp_list;
var the_report_data = {};

var entry;
for (entry in detected_snmp_versions_kb_items)
{
  pieces = split(entry, sep:'/', keep:FALSE);
  proto = pieces[2];
  port = pieces[3];
  version = pieces[4];

  if (empty_or_null(the_report_data[proto]))
    the_report_data[proto] = {};

  if (empty_or_null(the_report_data[proto][port]))
    the_report_data[proto][port] = [];

  temp_list = the_report_data[proto][port];
  collib::push(version, list:temp_list);
  the_report_data[proto][port] = temp_list;
}

# report from data
# make_nested_array(
#  'protoX', make_nested_array(
#    'portX, make_nested_list(
#      'verX',...,'verZ'
#    )
#  )
#)
var report = NULL;
proto = NULL;
port = NULL;

for (proto in the_report_data)
{
  for (port in the_report_data[proto])
  {
    if (
      empty_or_null(the_report_data[proto][port]) ||
      maxlen(the_report_data[proto][port]) < 1
    )
      continue;

    report = 'Nessus detected the following SNMP versions:\n';
    
    foreach version (the_report_data[proto][port])
      report += '  - SNMPv' + version + '\n';

    security_note(port:port, proto:proto, extra:report);
  }
}

if (empty_or_null(report)) audit(AUDIT_HOST_NOT);

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

17 Feb 2026 00:00Current
5.4Medium risk
Vulners AI Score5.4
44