Vulnerabilities > CVE-2015-6531 - Code Injection vulnerability in Paloaltonetworks Pan-Os

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
paloaltonetworks
CWE-94
critical
nessus

Summary

Palo Alto Networks Panorama VM Appliance with PAN-OS before 6.0.1 might allow remote attackers to execute arbitrary Python code via a crafted firmware image file.

Vulnerable Configurations

Part Description Count
OS
Paloaltonetworks
76

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Manipulating User-Controlled Variables
    This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An attacker can override environment variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the attacker can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.

Nessus

NASL familyPalo Alto Local Security Checks
NASL idPALO_ALTO_PANORAMA_CVE_2015_6531.NASL
descriptionThe remote Panorama appliance is running a version of Palo Alto Networks PAN-OS prior to 6.0.1. It is, therefore, affected by a firmware signature bypass vulnerability due to a flaw in signature verification process that allows an attacker to execute arbitrary Python code within an image file before the signature is verified. Exploitation of this issue requires convincing an administrator to install a file from a malicious source (e.g. social engineering, hosting on a phishing site, or a man-in-the-middle attack on a legitimate download).
last seen2020-06-01
modified2020-06-02
plugin id86186
published2015-09-28
reporterThis script is Copyright (C) 2015-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/86186
titlePalo Alto Networks Panorama PAN-OS < 6.0.1 Firmware Signature Verification Bypass Arbitrary Code Execution
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(86186);
  script_version("1.6");
  script_cvs_date("Date: 2018/07/24 18:56:13");

  script_cve_id("CVE-2015-6531");
  script_xref(name:"TRA", value:"TRA-2015-02");

  script_name(english:"Palo Alto Networks Panorama PAN-OS < 6.0.1 Firmware Signature Verification Bypass Arbitrary Code Execution");
  script_summary(english:"Checks the PAN-OS version.");

  script_set_attribute(attribute:"synopsis", value:
"The remote host is affected by a firmware signature bypass
vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote Panorama appliance is running a version of Palo Alto
Networks PAN-OS prior to 6.0.1. It is, therefore, affected by a
firmware signature bypass vulnerability due to a flaw in signature
verification process that allows an attacker to execute arbitrary
Python code within an image file before the signature is verified.
Exploitation of this issue requires convincing an administrator to
install a file from a malicious source (e.g. social engineering,
hosting on a phishing site, or a man-in-the-middle attack on a
legitimate download). ");
  script_set_attribute(attribute:"see_also", value:"https://www.tenable.com/security/research/tra-2015-02");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Palo Alto Networks PAN-OS version 6.0.1 or later.");
  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:U/RL:OF/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"false");

  script_set_attribute(attribute:"vuln_publication_date", value:"2015/09/15");
  script_set_attribute(attribute:"patch_publication_date", value:"2014/12/18");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/09/28");

  script_set_attribute(attribute:"plugin_type", value:"combined");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:paloaltonetworks:pan-os");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Palo Alto Local Security Checks");

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

  script_dependencies("palo_alto_version.nbin");
  script_require_keys("Host/local_checks_enabled", "Host/Palo_Alto/Firewall/Version", "Host/Palo_Alto/Firewall/Full_Version");

  exit(0);
}

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

if (!get_kb_item("Host/local_checks_enabled"))
  audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);

app_name = "Palo Alto Networks Panorama";
version = get_kb_item_or_exit("Host/Palo_Alto/Firewall/Version");
model = get_kb_item_or_exit("Host/Palo_Alto/Firewall/Model");
fix = FALSE;

if(model != "Panorama")
  audit(AUDIT_HOST_NOT, "a Palo Alto Panorama model");

item = eregmatch(pattern:"^([\d.]+)([^\d.]|$)", string:version);
if(isnull(item[1]))
  exit(1, "Unable to parse version string " + version + ".");
  
version = item[1];

fix = "6.0.1";
if(ver_compare(fix:fix, ver:version, strict:FALSE) >= 0)
  audit(AUDIT_INST_VER_NOT_VULN, app_name, version);

if (report_verbosity > 0)
{
  report =
    '\n  Installed version : ' + version +
    '\n  Fixed versions    : ' + fix +
    '\n';
  security_hole(extra:report, port:0);
}
else security_hole(0);