Wyse Device Manager Buffer Overflow - Nessus

Critical   Plugin ID: 40333

This page contains detailed information about the Wyse Device Manager Buffer Overflow Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 40333
Name: Wyse Device Manager Buffer Overflow
Filename: wyse_wdm_buffer_overflow.nasl
Vulnerability Published: 2009-07-10
This Plugin Published: 2009-07-21
Last Modification Time: 2018-11-15
Plugin Version: 1.16
Plugin Type: local
Plugin Family: Windows
Dependencies: http_version.nasl, smb_enum_services.nasl, smb_hotfixes.nasl
Required KB Items [?]: SMB/Registry/Enumerated

Vulnerability Information


Severity: Critical
Vulnerability Published: 2009-07-10
Patch Published: 2009-07-10
CVE [?]: CVE-2009-0693, CVE-2009-0695
CPE [?]: cpe:/a:dell:wyse_device_manager

Synopsis

The remote Windows host contains an application that is affected by a buffer overflow vulnerability.

Description

Wyse Device Manager is installed on the remote system. The installed version is affected by a buffer overflow vulnerability. By sending a specially crafted request to the server, it may be possible for an unauthorized attacker to crash the server or execute arbitrary commands on the remote system with system level privileges.

Solution

Apply vendor-supplied patches.

Public Exploits


Target Network Port(s): 80, 139, 445
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Wyse Device Manager Buffer Overflow vulnerability:

  1. Metasploit: exploit/multi/wyse/hagent_untrusted_hsdata
    [Wyse Rapport Hagent Fake Hserver Command Execution]
  2. Exploit-DB: exploits/hardware/dos/19137.rb
    [EDB-19137: Wyse - Machine Remote Power Off (Denial of Service) (Metasploit)]
  3. Exploit-DB: exploits/multiple/remote/9934.rb
    [EDB-9934: Wyse Rapport Hagent Fake Hserver - Command Execution (Metasploit)]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)

Go back to menu.

Plugin Source


This is the wyse_wdm_buffer_overflow.nasl nessus plugin source code. This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.

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

include("compat.inc");

if (description)
{
  script_id(40333);
  script_version("1.16");
  script_cvs_date("Date: 2018/11/15 20:50:29");

  script_cve_id("CVE-2009-0693", "CVE-2009-0695");  
  script_bugtraq_id(35649, 54028);
  script_xref(name:"CERT", value:"654545");
  script_xref(name:"Secunia", value:"35794");

  script_name(english:"Wyse Device Manager Buffer Overflow");
  script_summary(english:"Checks if hotpatch is installed");
 
  script_set_attribute(attribute:"synopsis", value:
"The remote Windows host contains an application that is affected by a
buffer overflow vulnerability.");

  script_set_attribute(attribute:"description", value:
"Wyse Device Manager is installed on the remote system.  The installed
version is affected by a buffer overflow vulnerability.  By sending a
specially crafted request to the server, it may be possible for an
unauthorized attacker to crash the server or execute arbitrary
commands on the remote system with system level privileges.");

  script_set_attribute(attribute:"see_also", value:"https://www.theregister.co.uk/2009/07/10/wyse_remote_exploit_bugs/");
  # http://web.archive.org/web/20110726030311/http://www.wyse.com/serviceandsupport/Wyse%20Security%20Bulletin%20WSB09-01.pdf
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?27941b3b");
  script_set_attribute(attribute:"solution", value:"Apply vendor-supplied patches.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
 script_set_attribute(attribute:"metasploit_name", value:'Wyse Rapport Hagent Fake Hserver Command Execution');
 script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date",  value:"2009/07/10");
  script_set_attribute(attribute:"patch_publication_date",  value:"2009/07/10");
  script_set_attribute(attribute:"plugin_publication_date",  value:"2009/07/21");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe",value:"cpe:/a:dell:wyse_device_manager");
  script_end_attributes();
 
  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows");

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

  script_dependencies("smb_enum_services.nasl", "smb_hotfixes.nasl","http_version.nasl");
  script_require_keys("SMB/Registry/Enumerated");
  script_require_ports(139, 445,80);

  exit(0);
}


include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("smb_func.inc");


if (report_paranoia < 2)
{
 port = get_http_port(default:80);
 banner = get_http_banner(port:port); 
 if(!banner || "Microsoft-IIS" >!< banner) exit(0, "The web server does not appear to be Microsoft IIS.");

 res = http_send_recv3(method:"GET", item:"/hserver.dll?&V94",port:port, exit_on_fail: 1 );
 
 # If we don't see a response, then we are not looking at WDM.
 # For e.g. 
 # Please append |Tsk=0 to the V94 command for more options 

 if(!ereg(pattern:"Please append |Tsk=0 to the V94 command for more options",string:res[2]))
 exit(0, "Wyse WDM Service was not detected.");
}

if (!get_kb_item("SMB/Registry/Enumerated")) exit(0, "SMB/Registry/Enumerated does not exist in KB.");

# Connect to the appropriate share.
name    =  kb_smb_name();
port    =  kb_smb_transport();
if (!get_port_state(port)) exit(1, "Port "+port+" is closed.");
login   =  kb_smb_login();
pass    =  kb_smb_password();
domain  =  kb_smb_domain();

soc = open_sock_tcp(port);
if (!soc) exit(1, "Connection refused on port "+port+".");

session_init(socket:soc, hostname:name);
rc = NetUseAdd(login:login, password:pass, domain:domain, share:"IPC$");
if (rc != 1) {
  NetUseDel();
  exit(1, "Can't connect to IPC$ share.");
}

# Connect to remote registry.
hklm = RegConnectRegistry(hkey:HKEY_LOCAL_MACHINE);
if (isnull(hklm))
{
  NetUseDel();
  exit(1, "Can't connect to remote registry.");
}

# Find where it's installed.
path = NULL;
release_ver = NULL;
patch = NULL;

key = "SOFTWARE\Rapport";
key_h = RegOpenKey(handle:hklm, key:key, mode:MAXIMUM_ALLOWED);
if (!isnull(key_h))
{
  value = RegQueryValue(handle:key_h, item:"ReleaseVersion");
  if (!isnull(value)) release_ver = value[1];

  RegCloseKey(handle:key_h);
}

key = "SOFTWARE\Rapport\Install";
key_h = RegOpenKey(handle:hklm, key:key, mode:MAXIMUM_ALLOWED);
if (!isnull(key_h))
{
  value = RegQueryValue(handle:key_h, item:"BaseDir");
  if (!isnull(value)) path = value[1];
 
  value = RegQueryValue(handle:key_h, item:"RptInstalled");
  if (!isnull(value)) patch = value[1];

  RegCloseKey(handle:key_h);
}
RegCloseKey(handle:hklm);

if (isnull(path))
{
  NetUseDel();
  exit(0, "Wyse WDM is not installed.");
}

if (isnull(release_ver))
{
  NetUseDel();
  exit(0, "Wyse WDM release_ver is NULL.");
}
NetUseDel(close:FALSE);


known_format = 0;
if(ereg(pattern:"^0*HF0*40720[0-9]+",string:patch))
{
  # Get rid of starting 0's and HF
  # For e.g. 00HF040720324   (unpatched default v4.7.2 install)
  #            HF04072019009 (patched)

  patch = ereg_replace(pattern:"^0*HF0*40720([0-9]+)$",string:patch,replace:"\1");
  patch = int(patch);
  known_format = 1;
}

# Grab the file version of file HServerInit.exe, just to make sure the 
# file exists. But rely on the version found in the registry since it
# is accurate.

share = ereg_replace(pattern:"^([A-Za-z]):.*", replace:"\1$", string:path);
exe =  ereg_replace(pattern:"^[A-Za-z]:(.*)", replace:"\1\HServerInit.exe", string:path);

rc = NetUseAdd(login:login, password:pass, domain:domain, share:share);
if (rc != 1)
{
  NetUseDel();
  exit(1, "Can't connect to "+share+" share.");
}

fh = CreateFile(
  file:exe,
  desired_access:GENERIC_READ,
  file_attributes:FILE_ATTRIBUTE_NORMAL,
  share_mode:FILE_SHARE_READ,
  create_disposition:OPEN_EXISTING
);
if (!isnull(fh))
{
  ver = GetFileVersion(handle:fh);
  CloseFile(handle:fh);
}
NetUseDel();

if (!isnull(ver))
{
  v = split(release_ver,sep:'.',keep:FALSE);
  for (i=0; i<max_index(v); i++)
    v[i] = int(v[i]);

  if (
    (v[0]  < 4 ) ||
    (v[0] == 4 && v[1]  < 7) || 
    (v[0] == 4 && v[1] == 7 && v[2]  < 2) ||
    (v[0] == 4 && v[1] == 7 && v[2] == 2 && isnull(patch)) ||
    (v[0] == 4 && v[1] == 7 && v[2] == 2 && !isnull(patch) && known_format && patch < 19009)
  ) 
  {
    if (report_verbosity > 0)
    {
      report = string(
        "\n",
        "  Version : ", release_ver, "\n",
        "  Path    : ", path, "\n"
      );
      security_hole(port:port, extra:report);
    }
    else security_hole(port);
    exit(0);
  }
  else exit(0, "Wyse WDM version "+release_ver+" is installed and not vulnerable.");
}
else exit(1, "Couldn't get file version of '"+exe+"'.");

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/wyse_wdm_buffer_overflow.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\wyse_wdm_buffer_overflow.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/wyse_wdm_buffer_overflow.nasl

Go back to menu.

How to Run


Here is how to run the Wyse Device Manager Buffer Overflow as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Windows plugin family.
  6. On the right side table select Wyse Device Manager Buffer Overflow plugin ID 40333.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl wyse_wdm_buffer_overflow.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a wyse_wdm_buffer_overflow.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - wyse_wdm_buffer_overflow.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state wyse_wdm_buffer_overflow.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CERT | Computer Emergency Response Team: Secunia Advisory: See also: Similar and related Nessus plugins:
  • 40862 - Wyse Thin Client hagent.exe Unspecified Buffer Overflow
  • 33859 - WebEx Meeting Manager WebexUCFObject ActiveX Control Buffer Overflow
  • 34021 - Anzio Web Print Object (WePO) ActiveX mainurl Parameter Buffer Overflow
  • 34412 - MS08-059: Microsoft Host Integration Server (HIS) SNA RPC Request Remote Overflow (956695) (uncredentialed check)
  • 34471 - mIRC PRIVMSG Handling Remote Buffer Overflow
  • 34472 - LPViewer ActiveX Control Multiple Buffer Overflow Vulnerabilities
  • 34490 - Trend Micro OfficeScan HTTP Request Remote Buffer Overflow
  • 34730 - VLC Media Player 0.5.0 to 0.9.5 Stack-Based Buffer Overflows
  • 35608 - UltraVNC Viewer < 1.0.5.4 Multiple Integer Overflows
  • 35702 - TightVNC Viewer < 1.3.10 Multiple Integer Overflows
  • 35788 - Winamp < 5.55 AIFF File Handling Overflow
  • 38734 - Microsoft Whale Client Components ActiveX (WhlMgr.dll) Multiple Method Overflows
  • 38858 - Winamp < 5.552 Modern Skins Support Module (gen_ff.dll) MAKI File Handling Overflow
  • 38951 - ImageMagick < 6.5.2-9 magick/xwindow.c XMakeImage() Function TIFF File Handling Overflow
  • 38977 - IBM Access Support ActiveX Control GetXMLValue Method Overflow
  • 38985 - Apple iTunes < 8.2 itms: URI Handling Overflow (credentialed check)
  • 39563 - Timbuktu Pro < 8.6.7 PlughNTCommand Named Pipe Remote Stack Buffer Overflow
  • 39809 - eEye Retina Wireless Scanner .rws Handling Buffer Overflow
  • 40617 - SAP SAPgui MDrmSap ActiveX (mdrmsap.dll) Buffer Overflow
  • 41060 - Apple iTunes < 9.0.1 PLS File Buffer Overflow (credentialed check)
  • 41958 - Google Chrome < 3.0.195.24 dtoa Implementation Remote Overflow
  • 42372 - Altiris ConsoleUtilities 'BrowseAndSaveFile()' ActiveX Control Buffer Overflow
  • 42977 - Altiris ConsoleUtilities ActiveX RunCmd Method Overflow
  • 43060 - Novell iPrint Client < 5.32 Multiple Overflows
  • 44338 - Wireshark / Ethereal Dissector LWRES Multiple Buffer Overflows
  • 45593 - HP Operations Manager SourceView ActiveX LoadFile / SaveFile Stack Overflows
  • 46733 - SyncBack Profile File Remote Buffer Overflow
  • 47701 - Xftp < 3.0 Build 242 LIST Response Buffer Overflow
  • 48323 - QuickTime < 7.6.7 QuickTimeStreaming.qtx SMIL File Debug Logging Overflow (Windows)
  • 50382 - Firefox < 3.5.15 Buffer Overflow
  • 50383 - Firefox 3.6 < 3.6.12 Buffer Overflow
  • 50384 - Mozilla Thunderbird < 3.0.10 Buffer Overflow
  • 50385 - Mozilla Thunderbird 3.1 < 3.1.6 Buffer Overflow
  • 50386 - SeaMonkey < 2.0.10 Buffer Overflow
  • 51091 - Winamp < 5.601 MIDI Timestamp Stack-based Buffer Overflow

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file wyse_wdm_buffer_overflow.nasl version 1.16. For more plugins, visit the Nessus Plugin Library.

Go back to menu.