Vulnerabilities > CVE-2012-2516 - OS Command Injection vulnerability in GE products

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
ge
CWE-78
critical
nessus
exploit available
metasploit

Summary

An ActiveX control in KeyHelp.ocx in KeyWorks KeyHelp Module (aka the HTML Help component), as used in GE Intelligent Platforms Proficy Historian 3.1, 3.5, 4.0, and 4.5; Proficy HMI/SCADA iFIX 5.0 and 5.1; Proficy Pulse 1.0; Proficy Batch Execution 5.6; SI7 I/O Driver 7.20 through 7.42; and other products, allows remote attackers to execute arbitrary commands via crafted input, related to a "command injection vulnerability."

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
  • Command Delimiters
    An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
  • Exploiting Multiple Input Interpretation Layers
    An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
  • Argument Injection
    An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
  • OS Command Injection
    In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.

Exploit-Db

descriptionKeyHelp ActiveX LaunchTriPane Remote Code Execution Vulnerability. CVE-2012-2516. Remote exploit for windows platform
idEDB-ID:21888
last seen2016-02-02
modified2012-10-11
published2012-10-11
reportermetasploit
sourcehttps://www.exploit-db.com/download/21888/
titleKeyHelp ActiveX LaunchTriPane Remote Code Execution Vulnerability

Metasploit

descriptionThis module exploits a code execution vulnerability in the KeyScript ActiveX control from keyhelp.ocx. It is packaged in several products or GE, such as Proficy Historian 4.5, 4.0, 3.5, and 3.1, Proficy HMI/SCADA 5.1 and 5.0, Proficy Pulse 1.0, Proficy Batch Execution 5.6, and SI7 I/O Driver between 7.20 and 7.42. When the control is installed with these products, the function "LaunchTriPane" will use ShellExecute to launch "hh.exe", with user controlled data as parameters. Because of this, the "-decompile" option can be abused to write arbitrary files on the remote system. Code execution can be achieved by first uploading the payload to the remote machine, and then upload another mof file, which enables Windows Management Instrumentation service to execute it. Please note that this module currently only works for Windows before Vista. On the other hand, the target host must have the WebClient service (WebDAV Mini-Redirector) enabled. It is enabled and automatically started by default on Windows XP SP3
idMSF:EXPLOIT/WINDOWS/BROWSER/KEYHELP_LAUNCHTRIPANE_EXEC
last seen2020-06-10
modified2019-08-02
published2012-10-10
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/windows/browser/keyhelp_launchtripane_exec.rb
titleKeyHelp ActiveX LaunchTriPane Remote Code Execution Vulnerability

Nessus

NASL familyWindows
NASL idKEYWORKS_KEYHELP_ACTIVEX.NASL
descriptionThe remote host has KeyWorks KeyHelp ActiveX control installed, which is affected by multiple vulnerabilities : - Multiple stack-based buffer overflows exist that could allow an attacker to execute arbitrary code. (CVE-2012-2515) - An unspecified command injection vulnerability. (CVE-2012-2516)
last seen2020-06-01
modified2020-06-02
plugin id62311
published2012-09-26
reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/62311
titleKeyWorks KeyHelp ActiveX Control Multiple Vulnerabilities
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(62311);
  script_version("1.11");
  script_cvs_date("Date: 2019/12/04");

  script_cve_id("CVE-2012-2515", "CVE-2012-2516");
  script_bugtraq_id(36546, 40969, 55265);
  script_xref(name:"EDB-ID", value:"9803");
  script_xref(name:"ICSA", value:"12-131-02");

  script_name(english:"KeyWorks KeyHelp ActiveX Control Multiple Vulnerabilities");
  script_summary(english:"Checks for kill bits");

  script_set_attribute(attribute:"synopsis", value:
"The remote host has an ActiveX control installed that has multiple
vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote host has KeyWorks KeyHelp ActiveX control installed, which
is affected by multiple vulnerabilities :

  - Multiple stack-based buffer overflows exist that could 
    allow an attacker to execute arbitrary code. 
    (CVE-2012-2515)

  - An unspecified command injection vulnerability. 
    (CVE-2012-2516)");
  # https://web.archive.org/web/20091003131709/http://retrogod.altervista.org/9sg_emc_keyhelp.html
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?8facea87");
  script_set_attribute(attribute:"see_also", value:"http://sotiriu.de/adv/NSOADV-2010-008.txt");
  script_set_attribute(attribute:"solution", value:
"Remove or disable the control as it is no longer supported.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/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:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"exploited_by_malware", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'KeyHelp ActiveX LaunchTriPane Remote Code Execution Vulnerability');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2009/09/30");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/09/26");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"x-cpe:/a:keyworks:keyhelp");
  script_end_attributes();

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

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

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

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("smb_func.inc");
include("smb_activex_func.inc");
include("misc_func.inc");

get_kb_item_or_exit('SMB/Registry/Enumerated');
if (activex_init() != ACK_OK) audit(AUDIT_FN_FAIL, 'activex_init');

info = "";
installs = 0;

clsids = make_list(
  '{1E57C6C4-B069-11D3-8D43-00104B138C8C}',
  '{45E66957-2932-432A-A156-31503DF0A681}',
  '{B7ECFD41-BE62-11D2-B9A8-00104B138C8C}'
);

info = '';
foreach clsid (clsids)
{
  file = activex_get_filename(clsid:clsid);
  if (isnull(file))
  {
    activex_end();
    exit(1, "activex_get_filename() returned NULL.");
  }

  if (!file) continue;

  installs++;

  # Get its version.
  version = activex_get_fileversion(clsid:clsid);
  if (isnull(version))
  {
    activex_end();
    audit(AUDIT_VER_FAIL, file);
  }

  if (version == '') version = 'unknown';

  # And check it.
  if (report_paranoia > 1 || activex_get_killbit(clsid:clsid) == 0)
  {
    info += 
      '\n  Class identifier  : ' + clsid +
      '\n  Filename          : ' + file +
      '\n  Installed version : ' + version + '\n';
  }
}
activex_end();
if (!installs) exit(0, 'None of the affected CLSIDs were found on the remote host.');


# Report findings.
if (info)
{
  # At this point, we want to know how many *vulnerable* installs there are.
  installs = max_index(split(info)) / 4;

  if (report_paranoia > 1)
  {
    if (installs == 1)
      report = info +
        '\n' +
        '\nNote, though, that Nessus did not check whether the kill bit was set' +
        '\nfor the control\'s CLSID because of the Report Paranoia setting in' +
        '\neffect when this scan was run.\n';
    else
      report = info +
        '\n' +
        '\nNote, though, that Nessus did not check whether the kill bits were set' +
        '\nfor the controls\' CLSIDs because of the Report Paranoia setting in' +
        '\neffect when this scan was run.\n';
  }
  else
  {
    if (installs == 1)
      report = info +
        '\n' +
        '\nMoreover, its kill bit is not set so it is accessible via Internet' +
        '\nExplorer.\n';
    else
      report = info +
        '\n' +
        '\nMoreover, their kill bits are not set so they are accessible via' +
        '\nInternet Explorer.\n';
  }

  if (report_verbosity > 0) security_hole(port:kb_smb_transport(), extra:report);
  else security_hole(kb_smb_transport());
  exit(0);
}
else 
{
  if (installs == 1) exit(0, 'One of the controls is installed but its kill bit is set.');
  else exit(0, 'The controls are installed but their kill bits are set.');
}

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/117293/keyhelp_launchtripane_exec.rb.txt
idPACKETSTORM:117293
last seen2016-12-05
published2012-10-11
reporterrgod
sourcehttps://packetstormsecurity.com/files/117293/KeyHelp-ActiveX-LaunchTriPane-Remote-Code-Execution.html
titleKeyHelp ActiveX LaunchTriPane Remote Code Execution

Saint

bid54215
descriptionGE Proficy Historian KeyHelp ActiveX LaunchTriPane Vulnerability
osvdb83311
titlege_proficy_historian_keyhelp_activex_launchtripane
typeclient

Seebug

bulletinFamilyexploit
descriptionNo description provided by source.
idSSV:75706
last seen2017-11-19
modified2014-07-01
published2014-07-01
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-75706
titleKeyHelp ActiveX LaunchTriPane Remote Code Execution Vulnerability