Lucene search

K
nessusThis script is Copyright (C) 2017-2023 and is owned by Tenable, Inc. or an Affiliate thereof.TELERIK_UI_FOR_ASPNET_AJAX_CVE-2017-9248.NASL
HistoryJun 30, 2017 - 12:00 a.m.

Telerik UI for ASP.NET AJAX Cryptographic Weakness

2017-06-3000:00:00
This script is Copyright (C) 2017-2023 and is owned by Tenable, Inc. or an Affiliate thereof.
www.tenable.com
612

The version of Telerik UI for ASP.NET AJAX installed on the remote Windows host is affected by a cryptographic weakness in Telerik.Web.UI.dll. An unauthenticated, remote attacker can exploit this, via specially crafted data, to disclose encryption keys.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(101159);
  script_version("1.12");
  script_set_attribute(attribute:"plugin_modification_date", value:"2023/04/25");

  script_cve_id("CVE-2017-9248");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/03");

  script_name(english:"Telerik UI for ASP.NET AJAX Cryptographic Weakness");

  script_set_attribute(attribute:"synopsis", value:
"A web application development suite installed on the Windows remote
host is affected by a cryptographic weakness.");
  script_set_attribute(attribute:"description", value:
"The version of Telerik UI for ASP.NET AJAX installed on the remote
Windows host is affected by a cryptographic weakness in
Telerik.Web.UI.dll. An unauthenticated, remote attacker can exploit
this, via specially crafted data, to disclose encryption keys.");
  # https://www.telerik.com/support/kb/aspnet-ajax/details/cryptographic-weakness
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?4efdcfeb");
  # http://www.telerik.com/support/whats-new/aspnet-ajax/release-history/ui-for-asp-net-ajax-r2-2017-sp1-version-2017-2-621
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?3e5e7456");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Telerik UI for ASP.NET AJAX version R2 2017 SP1
(2017.2.621) or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2017-9248");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2017/06/26");
  script_set_attribute(attribute:"patch_publication_date", value:"2017/06/21");
  script_set_attribute(attribute:"plugin_publication_date", value:"2017/06/30");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:telerik:ui_for_asp.net_ajax");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows");

  script_copyright(english:"This script is Copyright (C) 2017-2023 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("telerik_ui_for_aspnet_ajax_installed.nbin");
  script_require_keys("installed_sw/Telerik UI for ASP.NET AJAX");
  script_require_ports(139, 445);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("install_func.inc");
include("smb_func.inc");
include("smb_hotfixes.inc");

function display_dword (dword, nox)
{
 local_var tmp;

 if (isnull(nox) || (nox == FALSE))
   tmp = "0x";
 else
   tmp = "";

 return string (tmp,
               toupper(
                  hexstr(
                    raw_string(
                               (dword >>> 24) & 0xFF,
                               (dword >>> 16) & 0xFF,
                               (dword >>> 8) & 0xFF,
                               dword & 0xFF
                              )
                        )
                      )
               );
}

app_name = "Telerik UI for ASP.NET AJAX";
install = get_single_install(app_name:app_name, exit_if_unknown_ver:TRUE);

version = install['version'];
path = install['path'];
web_ui_dll = install['web_ui_dll'];

# 2017.2.621 and later is patched
if (ver_compare(ver:version, fix:"2017.2.621", strict:FALSE) >= 0)
  audit(AUDIT_INST_PATH_NOT_VULN, app_name, version, path);

# 2013.1.220 to 2017.2.503 have patches
# 2011.1.315 to 2012.3.1308 might have patches
if (((ver_compare(ver:version, fix:"2013.1.220", strict:FALSE) >= 0) &&
    (ver_compare(ver:version, fix:"2017.2.503", strict:FALSE) <= 0))
    ||
    ((ver_compare(ver:version, fix:"2011.1.315", strict:FALSE) >= 0) &&
    (ver_compare(ver:version, fix:"2012.3.1308", strict:FALSE) <= 0)))
{
  # check for "Telerik.Web.UI.Patch" in the File Description

  # Connect to the appropriate share.
  port = kb_smb_transport();
  login = kb_smb_login();
  pass = kb_smb_password();
  domain = kb_smb_domain();

  if (!smb_session_init())
    audit(AUDIT_FN_FAIL, "smb_session_init");

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

  rc = NetUseAdd(login:login, password:pass, domain:domain, share:share);
  if (rc != 1)
  {
    NetUseDel();
    audit(AUDIT_SHARE_FAIL, share);
  }

  fh = CreateFile(
    file:dll,
    desired_access:GENERIC_READ,
    file_attributes:FILE_ATTRIBUTE_NORMAL,
    share_mode:FILE_SHARE_READ,
    create_disposition:OPEN_EXISTING
  );

  file_description = NULL;
  if (!isnull(fh))
  {
    ret = GetFileVersionEx(handle:fh);
    if (!isnull(ret)) children = ret['Children'];
    if (!isnull(children))
    {
      varfileinfo = children['VarFileInfo'];
      if (!isnull(varfileinfo))
      {
        translation =
          (get_word (blob:varfileinfo['Translation'], pos:0) << 16) +
          get_word (blob:varfileinfo['Translation'], pos:2);
        translation = tolower(display_dword(dword:translation, nox:TRUE));
      }
      stringfileinfo = children['StringFileInfo'];
      if (!isnull(stringfileinfo) && !isnull(translation))
      {
        data = stringfileinfo[translation];
        if (!isnull(data)) file_description = data['FileDescription'];
        else
        {
          data = stringfileinfo[toupper(translation)];
          if (!isnull(data)) file_description = data['FileDescription'];
        }
      }
    }
    CloseFile(handle:fh);
  }
  NetUseDel();

  if (empty_or_null(file_description))
    exit(1, "Failed to get the file description of " + web_ui_dll + ".");

  if (file_description == "Telerik.Web.UI.Patch")
    exit(0, app_name + " version " + version + ' has the vendor supplied patch installed that changes the file description to "Telerik.Web.UI.Patch".');
}

# if we get this far, we're vulnerable
port = get_kb_item("SMB/transport");
if (empty_or_null(port))
  port = 445;

report = report_items_str(
  report_items:make_array(
    "Path", path,
    "Installed version", version,
    "Fixed version", "2017.2.621.0 or vendor supplied patch"
  ),
  ordered_fields:make_list("Path", "Installed version", "Fixed version")
);
security_report_v4(port:port, severity:SECURITY_HOLE, extra:report);
VendorProductVersion
telerikui_for_asp.net_ajax