Lucene search

K
nessusThis script is Copyright (C) 2022-2023 and is owned by Tenable, Inc. or an Affiliate thereof.SMB_NT_MS22_OCT_CVE-2013-3900_REG_CHECK.NASL
HistoryOct 26, 2022 - 12:00 a.m.

WinVerifyTrust Signature Validation CVE-2013-3900 Mitigation (EnableCertPaddingCheck)

2022-10-2600:00:00
This script is Copyright (C) 2022-2023 and is owned by Tenable, Inc. or an Affiliate thereof.
www.tenable.com
1430

9.8 High

AI Score

Confidence

High

The remote system may be in a vulnerable state to CVE-2013-3900 due to a missing or misconfigured registry keys:
- HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Wintrust\Config\EnableCertPaddingCheck
- HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Cryptography\Wintrust\Config\EnableCertPaddingCheck An unauthenticated, remote attacker could exploit this, by sending specially crafted requests, to execute arbitrary code on an affected host.

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

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

if (description)
{
  script_id(166555);
  script_version("1.7");
  script_set_attribute(attribute:"plugin_modification_date", value:"2023/12/26");

  script_cve_id("CVE-2013-3900");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/07/10");
  script_xref(name:"IAVA", value:"2013-A-0227");

  script_name(english:"WinVerifyTrust Signature Validation CVE-2013-3900 Mitigation (EnableCertPaddingCheck)");

  script_set_attribute(attribute:"synopsis", value:
"The remote Windows host is potentially missing a mitigation for a remote code execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote system may be in a vulnerable state to CVE-2013-3900 due to a missing or misconfigured registry keys:
    - HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Wintrust\Config\EnableCertPaddingCheck
    - HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Cryptography\Wintrust\Config\EnableCertPaddingCheck
    
An unauthenticated, remote attacker could exploit this, by sending specially crafted requests, to execute arbitrary
code on an affected host.");
  script_set_attribute(attribute:"see_also", value:"https://msrc.microsoft.com/update-guide/vulnerability/CVE-2013-3900");
  # https://community.tenable.com/s/article/WinVerifyTrust-Signature-Validation-Mitigation-CVE-2013-3900
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?9780b9d2");
  script_set_attribute(attribute:"solution", value:
"Add and enable registry value EnableCertPaddingCheck:
  - HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Wintrust\Config\EnableCertPaddingCheck

Additionally, on 64 Bit OS systems, Add and enable registry value EnableCertPaddingCheck:

  - HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Cryptography\Wintrust\Config\EnableCertPaddingCheck");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:H/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2013-3900");

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

  script_set_attribute(attribute:"vuln_publication_date", value:"2013/12/10");
  script_set_attribute(attribute:"plugin_publication_date", value:"2022/10/26");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:microsoft:windows");
  script_set_attribute(attribute:"stig_severity", value:"II");
  script_end_attributes();

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

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

  script_dependencies("smb_check_rollup.nasl", "smb_hotfixes.nasl");
  script_require_keys("SMB/Registry/Enumerated", "SMB/ARCH");
  script_require_ports(139, 445);

  exit(0);
}

include('smb_func.inc');
include('smb_hotfixes.inc');
include('smb_hotfixes_fcheck.inc');

get_kb_item_or_exit('SMB/Registry/Enumerated');

var share = hotfix_get_systemdrive(as_share:TRUE, exit_on_fail:TRUE);
if (!is_accessible_share(share:share)) 
  audit(AUDIT_SHARE_FAIL, share);

hotfix_check_fversion_init();

var arch = get_kb_item_or_exit("SMB/ARCH", exit_code:1);

registry_init();
var hklm = registry_hive_connect(hive:HKEY_LOCAL_MACHINE, exit_on_fail:TRUE);
var key = 'Software\\Microsoft\\Cryptography\\Wintrust\\Config\\EnableCertPaddingCheck';
var value = get_registry_value(handle:hklm, item:key);
var key64 = 'Software\\Wow6432Node\\Microsoft\\Cryptography\\Wintrust\\Config\\EnableCertPaddingCheck';
var value64 = NULL;
if (arch == 'x64')
  value64= get_registry_value(handle:hklm, item:key64);
RegCloseKey(handle:hklm);

var report = '';

# non-vuln state when == 1
if ((value == 1 && value64 == 1) || ( value == 1 && arch != 'x64'))
  audit(AUDIT_HOST_NOT, 'affected');

else
  report = '\n Nessus detected the following potentially insecure registry key configuration:\n';

if (empty_or_null(value))
{  report += '    - ' + key + ' is not present in the registry.\n'; }
else if (value != 1)
{  report += '    - ' + key + ' is present in the registry but contains the value of ' + value + '.\n'; }

if  (arch == 'x64')
{
  if (empty_or_null(value64))
  {  report += '    - ' + key64 + ' is not present in the registry.\n'; }
  else if (value64 != 1)
  {  report += '    - ' + key64 + ' is present in the registry but contains the value of ' + value + '.\n'; }
}

hotfix_add_report(report);

hotfix_security_hole();
hotfix_check_fversion_end();
exit(0);
VendorProductVersionCPE
microsoftwindowscpe:/o:microsoft:windows