Vulnerabilities > CVE-2013-4800 - Remote Code Execution vulnerability in HP LoadRunner

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

Summary

Unspecified vulnerability in HP LoadRunner before 11.52 allows remote attackers to execute arbitrary code via unknown vectors, aka ZDI-CAN-1735.

Exploit-Db

descriptionHP LoadRunner magentproc.exe Overflow. CVE-2013-4800. Remote exploit for windows platform
idEDB-ID:28809
last seen2016-02-03
modified2013-10-08
published2013-10-08
reportermetasploit
sourcehttps://www.exploit-db.com/download/28809/
titleHP LoadRunner magentproc.exe Overflow

Metasploit

descriptionThis module exploits a stack buffer overflow in HP LoadRunner before 11.52. The vulnerability exists on the LoadRunner Agent Process magentproc.exe. By sending a specially crafted packet, an attacker may be able to execute arbitrary code.
idMSF:EXPLOIT/WINDOWS/MISC/HP_LOADRUNNER_MAGENTPROC
last seen2020-06-08
modified2017-07-24
published2013-10-03
referenceshttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4800
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/windows/misc/hp_loadrunner_magentproc.rb
titleHP LoadRunner magentproc.exe Overflow

Nessus

NASL familyGain a shell remotely
NASL idLOADRUNNER_AGENT_SERVER_IP_NAME_OVERFLOW.NASL
descriptionThe version of the LoadRunner Agent installed on the remote host contains a buffer overflow in
last seen2020-06-01
modified2020-06-02
plugin id24327
published2007-02-13
reporterThis script is Copyright (C) 2007-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/24327
titleMercury LoadRunner Agent server_ip_name Field Remote Buffer Overflow
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(24327);
  script_version("1.20");
 script_cvs_date("Date: 2018/11/15 20:50:22");

  script_cve_id("CVE-2007-0446");
  script_bugtraq_id(22487);

  script_name(english:"Mercury LoadRunner Agent server_ip_name Field Remote Buffer Overflow");
  script_summary(english:"Sends an invalid request to a LoadRunner agent");

  script_set_attribute(attribute:"synopsis", value:"The remote server is affected by a buffer overflow vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of the LoadRunner Agent installed on the remote host
contains a buffer overflow in 'mchan.dll' that can be exploited by an
unauthenticated, remote attacker using a request with a long
'server_ip_name' field to crash the affected service or execute
arbitrary code subject to the permissions of the user id under which the
agent runs.");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-07-007/");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2007/Feb/176");
  script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/459496");
  script_set_attribute(attribute:"solution", value:
"HP no longer supports version 8.x of this product and patches may
no longer be available. HP recommends all users upgrade to latest
available version of 9.x.");
  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:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:'D2ExploitPack');

 script_set_attribute(attribute:"vuln_publication_date", value:"2007/02/08");
 script_set_attribute(attribute:"plugin_publication_date", value:"2007/02/13");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:hp:loadrunner");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"Gain a shell remotely");
  script_copyright(english:"This script is Copyright (C) 2007-2018 Tenable Network Security, Inc.");

  script_dependencies("hp_loadrunner_cve-2013-4800.nbin");
  script_require_ports("Services/loadrunner_agent");

  exit(0);
}

include("audit.inc");
include("byte_func.inc");
include("global_settings.inc");
include("misc_func.inc");

port = get_service(svc: "loadrunner_agent", default: 54345, exit_on_fail: TRUE);

# Check port state before sending probes
if (!get_port_state(port)) audit(AUDIT_PORT_CLOSED, port, "TCP");

# Establish a connection.
soc = open_sock_tcp(port);
if (!soc) audit(AUDIT_SOCK_FAIL, port, "TCP");


function mk_padded_string(str)
{
  return mkdword(strlen(str)) + str + crap(data:mkbyte(0), length:4-(strlen(str) % 4));
}

# Define some constants.
guid = base64(str:rand_str(length:17));
pid = rand() % 0xffff;
tid = rand() % 0xffff;
rand16 = crap(16);
# nb: don't change these!!!
server_name = "nessus";
server_full_name = server_name;
server_ip = server_name;
server_port = 12345;


# Send an invalid request.
#
# - first part.
req1 = mkdword(0x19);
send(socket:soc, data:req1);

# - second part.
req2_1 = guid + "0";

req2_2 =
      mkdword(7) +
      mk_padded_string(
        str:server_name + ";" + pid + ";" + tid
      ) +
      mk_padded_string(
        str:string(
          "(-server_type=8)",
          "(-server_name=", server_name, ")",
          "(-server_full_name=", server_name, ")",
          "(-server_ip_name=", server_ip, ")",
          "(-server_port=", server_port, ")",
          "(-server_fd_secondary=4)",
          "(-guid_identifier=", guid, ")",
          # nb: crap length is chosen so that the length of the subpacket
          #     is 0x400, which in a patched version will cause the
          #     thread to just close.
          "(-crap=", crap(data:"A", length:0x34a), ")"
        )
      ) +
      mkdword(0x7530);
req2_2 = mkdword(4 + strlen(req2_2)) + req2_2;
req2_2 =
    mkdword(0x1c) +
    mkdword(0x05) +
    mkdword(0x01) +
    rand16 +
    req2_2;
req2_2 = mkdword(strlen(req2_2)) + req2_2;
req2 = req2_1 + req2_2;

send(socket:soc, data:req2);


# There's a problem if we see a response.
res = recv(socket:soc, length:4);
close(soc);
if (strlen(res) == 4 && getdword(blob:res, pos:0) == 0x1c) security_hole(port);
else audit(AUDIT_LISTEN_NOT_VULN, "service", port);

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/123533/hp_loadrunner_magentproc.rb.txt
idPACKETSTORM:123533
last seen2016-12-05
published2013-10-07
reporterjuan vazquez
sourcehttps://packetstormsecurity.com/files/123533/HP-LoadRunner-magentproc.exe-Overflow.html
titleHP LoadRunner magentproc.exe Overflow