Lucene search
K

Memory Information (via DMI)

🗓️ 06 Apr 2010 00:00:00Reported by TenableType 
nessus
 nessus
🔗 www.tenable.com👁 41 Views

Extract memory information from SMBIOS (DMI) interface to retrieve installed memory total size

Code
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");

if(description)
{
 script_id(45433);
 script_version ("1.3");
 script_cvs_date("Date: 2018/03/29 18:00:11");

 script_name(english: "Memory Information (via DMI)");
 script_summary(english: "Extract memory information from dmidecode");
 
 script_set_attribute(attribute:"synopsis", value:
"Information about the remote system's memory devices can be read." );
 script_set_attribute(attribute:"description", value:
"Using the SMBIOS (aka DMI) interface, it was possible to retrieve
information about the remote system's memory devices, such as the
total amount of installed memory." );
 script_set_attribute(attribute:"solution", value:"n/a" );
 script_set_attribute(attribute:"risk_factor", value:"None" );

 script_set_attribute(attribute:"plugin_publication_date", value: "2010/04/06");

 script_set_attribute(attribute:"plugin_type", value:"local");
 script_set_attribute(attribute:"agent", value:"unix");
 script_end_attributes();

 script_category(ACT_GATHER_INFO);
 script_copyright(english:"This script is Copyright (C) 2010-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
 script_family(english: "General");
 script_dependencies("bios_get_info_ssh.nasl");
 script_require_keys("Host/dmidecode");
 exit(0);
}


buf = get_kb_item("Host/dmidecode");
if (isnull(buf)) exit(1, "The 'Host/dmidecode' KB setting is missing.");
if ("Memory Device" >!< buf) exit(0, "No DMI memory device information.");

values = make_list();
found = 0;

lines = split(buf, keep: 0);
drop_flag = 1;

total_sz = 0;
foreach l (lines)
{
  if (ereg(string: l, pattern: '^Memory Device'))
  {
   drop_flag = 0;
   continue;
  }
  else if (ereg(string: l, pattern: '^[A-Z]')) drop_flag = 1; 
  if (drop_flag) continue;
  pat = strcat('^[ \t]+Size[ \t]*:[  \t]*([0-9]+)[ \t]+(MB|GB)');
  v = eregmatch(string: l, pattern: pat);
  if (! isnull(v))
  {
    sz = int(v[1]);
    if (v[2] == 'GB') sz *= 1024;
    total_sz += sz;
    found ++;
  }
} 

if (! found) exit(1, "Empty DMI memory module information.");

security_note(port: 0, extra: 
  strcat('\nTotal memory : ', total_sz, ' MB'));

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

29 Mar 2018 18:00Current
5.5Medium risk
Vulners AI Score5.5
41