Vulnerabilities > CVE-2015-0640 - Improper Input Validation vulnerability in Cisco IOS XE

047910
CVSS 7.8 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
COMPLETE
network
low complexity
cisco
CWE-20
nessus

Summary

The high-speed logging (HSL) feature in Cisco IOS XE 2.x and 3.x before 3.10.4S, 3.11 before 3.11.3S, 3.12 before 3.12.1S, 3.13 before 3.13.0S, 3.14 before 3.14.0S, and 3.15 before 3.15.0S allows remote attackers to cause a denial of service (device reload) via large IP packets that require NAT and HSL processing after fragmentation, aka Bug ID CSCuo25741.

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • 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.

Nessus

  • NASL familyCISCO
    NASL idCISCO-SN-CSCUO25741-IOSXE.NASL
    descriptionThe Cisco IOS XE software running on the remote device is affected by a denial of service vulnerability in the high-speed logging (HSL) feature due to improper processing of fragmented IP packets. An unauthenticated, remote attacker, by sending a large number of oversized packets, can exploit this to cause a device reload.
    last seen2020-06-01
    modified2020-06-02
    plugin id82588
    published2015-04-06
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/82588
    titleCisco IOS XE Fragmented Packet DoS
    code
    #TRUSTED 674ce80078145ef0f7173b631c7fea93d04b334459b92404d7794c98e32d89f29cbd1b8ca1382f186c3d2e48c54e8ba42179a1f5fe427e4cb0f77efd9a73db28676779fdfe677cdaa4fb4821c5361648d8349464cf6546ccb03cd279dd1f7982d1d1c9ae24e25f95c817475e778cebe6b3de7fbfe89735eb2e0d1253ca0bbf1344ce8c7bca9eb7aff7af4f10355fe531473650bc633910aff4f123d5a8ce87703bb86b20779baebb417a9d27af5d2991243d4fc439a352d41c29e7495081b409c77de56c2790838b5ade4683c35812174afa5e0987aad24834edf294d78bad12146eed34eac3717d4acef41823269b62217dc97b0ee66ba5a3cc8861d3e478513bd52df1aa60143118bfdd39c76efa346a7ff00b14223b5099f28d1c50e98b96b88cee495d3d168628d9e39d70a6b23a17f2d2a757179d28bc7deac8fa6cc209c4396c7868997bf2dd835ddfef61d3527ca9791dbddb8a8cbe37019651d866ba683c122d3972463f154d5d3a5e493f11a1a5ef7a37e3191e3077aa08af8f7a4d45a69ef185f3040fc015c4a16bb42a808b0f490a29ad5f818d284e19562acb764c1d9d5b1977b3aff63968a79338c64c4338fb6e54986b87eb9b34a0a9b7c859421505c28bb1a484966633f27a8a735db33102de34b529722d22c2c5d5777e9bbb1c234241bb5812e4f9d20c890fd45f43ea92ef41f08cc8300a21f3635fe6de
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(82588);
      script_version("1.11");
      script_cvs_date("Date: 2019/11/22");
    
      script_cve_id("CVE-2015-0640");
      script_bugtraq_id(73337);
      script_xref(name:"CISCO-BUG-ID", value:"CSCuo25741");
    
      script_name(english:"Cisco IOS XE Fragmented Packet DoS");
      script_summary(english:"Checks the IOS XE version.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote device is affected by a denial of service vulnerability.");
      script_set_attribute(attribute:"description", value:
    "The Cisco IOS XE software running on the remote device is affected by
    a denial of service vulnerability in the high-speed logging (HSL)
    feature due to improper processing of fragmented IP packets. An
    unauthenticated, remote attacker, by sending a large number of
    oversized packets, can exploit this to cause a device reload.");
      # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20150325-iosxe#@ID
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?d4cbb5bb");
      script_set_attribute(attribute:"see_also", value:"https://tools.cisco.com/bugsearch/bug/CSCuo25741");
      script_set_attribute(attribute:"solution", value:
    "Apply the relevant patch referenced in the Cisco Security Advisory.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/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:"vuln_publication_date", value:"2015/03/25");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/03/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/04/06");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios_xe");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CISCO");
    
      script_copyright(english:"This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("cisco_ios_xe_version.nasl");
      script_require_keys("Host/Cisco/IOS-XE/Version");
    
      exit(0);
    }
    
    include("audit.inc");
    include("cisco_func.inc");
    include("cisco_kb_cmd_func.inc");
    
    flag = 0;
    
    version = get_kb_item_or_exit("Host/Cisco/IOS-XE/Version");
    model   = get_kb_item_or_exit("Host/Cisco/IOS-XE/Model");
    
    # Per Bug CSCuo25741
    if (
      !(
        "ASR1k"    >< model ||
        "ISR4400"  >< model ||
        "CSR1000V" >< model
      )
    ) audit(AUDIT_HOST_NOT, "an affected model");
    
    # Bug (converted) and CVRF
    if (version == "3.10.0S") flag++;
    if (version == "3.11.0S") flag++;
    
    # CVRF
    if (version == "3.10.0Sa") flag++;
    if (version == "3.10.1S")  flag++;
    if (version == "3.10.2S")  flag++;
    if (version == "3.10.3S")  flag++;
    if (version == "3.11.1S")  flag++;
    if (version == "3.11.2S")  flag++;
    if (version == "3.12.0S")  flag++;
    if (version == "3.12.1S")  flag++;
    if (version == "3.1.0S")   flag++;
    if (version == "3.1.1S")   flag++;
    if (version == "3.1.2S")   flag++;
    if (version == "3.1.3S")   flag++;
    if (version == "3.1.4S")   flag++;
    if (version == "3.1.5S")   flag++;
    if (version == "3.1.6S")   flag++;
    if (version == "3.2.0S")   flag++;
    if (version == "3.2.1S")   flag++;
    if (version == "3.2.2S")   flag++;
    if (version == "3.2.3S")   flag++;
    if (version == "3.3.0S")   flag++;
    if (version == "3.3.1S")   flag++;
    if (version == "3.3.2S")   flag++;
    if (version == "3.5.0S")   flag++;
    if (version == "3.5.1S")   flag++;
    if (version == "3.5.2S")   flag++;
    if (version == "3.6.0S")   flag++;
    if (version == "3.6.1S")   flag++;
    if (version == "3.6.2S")   flag++;
    if (version == "3.7.0S")   flag++;
    if (version == "3.7.1S")   flag++;
    if (version == "3.7.2S")   flag++;
    if (version == "3.7.3S")   flag++;
    if (version == "3.7.4S")   flag++;
    if (version == "3.7.5S")   flag++;
    if (version == "3.7.6S")   flag++;
    if (version == "3.7.7S")   flag++;
    if (version == "3.8.0S")   flag++;
    if (version == "3.8.1S")   flag++;
    if (version == "3.8.2S")   flag++;
    if (version == "3.9.0S")   flag++;
    if (version == "3.9.1S")   flag++;
    if (version == "3.9.2S")   flag++;
    
    # From SA (and not covered by Bug or CVRF)
    if (version =~ "^2\.") flag++;
    if (version =~ "^3\.4($|[^0-9])") flag++;
    
    # Check NAT config
    if (flag > 0)
    {
      flag = 0;
      buf = cisco_command_kb_item("Host/Cisco/Config/show_running-config", "show running-config");
      if (check_cisco_result(buf))
      {
        if (
          (preg(multiline:TRUE, pattern:"^ip nat inside$", string:buf)) &&
          (preg(multiline:TRUE, pattern:"^ip nat outside$", string:buf)) &&
          (preg(multiline:TRUE, pattern:"^ip nat (inside|outside) source ", string:buf)) &&
          !(preg(multiline:TRUE, pattern:"^no ip nat ", string:buf))
        ) flag = 1;
      } else if (cisco_needs_enable(buf)) { flag = 1; override = 1; }
    }
    
    if (flag)
    {
      if (report_verbosity > 0)
      {
        report =
        '\n  Cisco bug ID      : CSCuo25741' +
        '\n  Installed release : ' + version;
        security_hole(port:0, extra:report);
      }
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyCISCO
    NASL idCISCO-SA-20150325-CIP-IOS.NASL
    descriptionAccording to its self-reported version, the Cisco IOS software running on the remote device is affected by multiple flaws in the Common Industrial Protocol (CIP) implementation that allow a remote, unauthenticated attacker to cause a denial of service (DoS) condition, as follows: - A denial of service (device reload) may be triggered via malformed CIP UDP packets. (CVE-2015-0647) - A denial of service (memory consumption) may be triggered via crafted CIP TCP packets. (CVE-2015-0648) - A denial of service (device reload) may be triggered via malformed CIP TCP packets. (CVE-2015-0640) Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-06-01
    modified2020-06-02
    plugin id82571
    published2015-04-03
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/82571
    titleCisco IOS Software TCP CIP DoS
    code
    #TRUSTED 944c94266949197eba877a93bdc2c71c9b9ead9e5a12632e7faa19fc37e416835a4c51d3ec5ab3c5523433e842f66ff190d7c5af80d7eddac90d0a33e0f3cf66b8a171b61f98caf6becdd236fef512e06a4596b9ade7e6188063ec3db417382380807bfd8c2b0b66ebac7c207a84648ee7ae599fc2254b409f84a30b08e71e3c3c7fa431d2d85915179ef636a9134ddaee6e900ea8696f9055ecbb4679943e4c42dba6ca79202a2bd1f61b2999608d2def742d4ab9552f55b06cdacb1203e40e49ad56f9b03b29b5a2ac5cc83513e80931fc463d228c99b6e03e8fb74182ba3286fd19d9044c1eb353968e139bfd7e0d56500e228e6dfb89bfb0673b1fead37d44bdd2c73cff974e9e027b4fa35968a143349f0901322948639e9d0fb0dccad91dd39bc2d242318467fac2e89b55673c343b206bc681c8a2fa3b4531060f7e127be78934988cf84e2397aa1fde0fff17c3433f0bd4d67ac58e3e59dc226882ba49ff0bcf6493cd88127058414607fec1766ff65a6361a544767c574fb809ed974c021adec8647c34209553752cd435f4076fed809b4518a049c11384e3063f34d3b11ae7a60e5dc5eceeac61d10c05f42f3179eaa2cba89832926f7aef44ec8f852a5185e159d683c499f9894c0c382c8fd17646d1e13a8738e65a5af12f26c4051dd3446bc15cb394cd0d0fec7eacef34394bdcb813708d954e919e8c4cb553
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(82571);
      script_version("1.19");
      script_cvs_date("Date: 2019/11/22");
    
      script_cve_id("CVE-2015-0647", "CVE-2015-0648", "CVE-2015-0649");
      script_bugtraq_id(73334);
      script_xref(name:"CISCO-BUG-ID", value:"CSCum98371");
      script_xref(name:"CISCO-BUG-ID", value:"CSCun49658");
      script_xref(name:"CISCO-BUG-ID", value:"CSCun63514");
      script_xref(name:"CISCO-SA", value:"cisco-sa-20150325-cip");
    
      script_name(english:"Cisco IOS Software TCP CIP DoS");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote device is missing a vendor-supplied security patch.");
      script_set_attribute(attribute:"description", value:
    "According to its self-reported version, the Cisco IOS software running on the remote device is affected by multiple
    flaws in the Common Industrial Protocol (CIP) implementation that allow a remote, unauthenticated attacker to cause a
    denial of service (DoS) condition, as follows:
    
      - A denial of service (device reload) may be triggered via malformed CIP UDP packets. (CVE-2015-0647)
    
      - A denial of service (memory consumption) may be triggered via crafted CIP TCP packets. (CVE-2015-0648)
    
      - A denial of service (device reload) may be triggered via malformed CIP TCP packets. (CVE-2015-0640)
    
    Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
    number.");
      # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20150325-cip
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?8dadcf82");
      script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCum98371");
      script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCun49658");
      script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCun63514");
      script_set_attribute(attribute:"solution", value:
    "Apply the relevant patch referenced in the vendor advisory.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2015-0649");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2015/03/25");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/04/02");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/04/03");
    
      script_set_attribute(attribute:"plugin_type", value:"combined");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CISCO");
    
      script_copyright(english:"This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("cisco_ios_version.nasl");
      script_require_keys("Host/Cisco/IOS/Version");
    
      exit(0);
    }
    
    include('audit.inc');
    include('cisco_workarounds.inc');
    include('ccf.inc');
    
    product_info = cisco::get_product_info(name:'Cisco IOS');
    
    version_list = make_list(
      '12.2(44)EX',
      '12.2(44)EX1',
      '12.2(46)SE1',
      '12.2(46)SE2',
      '12.2(50)SE',
      '12.2(50)SE1',
      '12.2(50)SE2',
      '12.2(50)SE3',
      '12.2(50)SE4',
      '12.2(50)SE5',
      '12.2(52)SE',
      '12.2(52)SE1',
      '12.2(55)SE',
      '12.2(55)SE10',
      '12.2(55)SE13',
      '12.2(55)SE3',
      '12.2(55)SE4',
      '12.2(55)SE5',
      '12.2(55)SE6',
      '12.2(55)SE7',
      '12.2(55)SE8',
      '12.2(55)SE9',
      '12.2(58)SE',
      '12.2(58)SE1',
      '12.2(58)SE2',
      '12.4(25e)JAP1m',
      '15.0(1)EY',
      '15.0(1)EY1',
      '15.0(1)EY2',
      '15.0(2)EX2',
      '15.0(2)EX8',
      '15.0(2)EY',
      '15.0(2)EY1',
      '15.0(2)EY2',
      '15.0(2)EY3',
      '15.0(2)SE',
      '15.0(2)SE1',
      '15.0(2)SE10',
      '15.0(2)SE10a',
      '15.0(2)SE11',
      '15.0(2)SE12',
      '15.0(2)SE13',
      '15.0(2)SE2',
      '15.0(2)SE3',
      '15.0(2)SE4',
      '15.0(2)SE5',
      '15.0(2)SE6',
      '15.0(2)SE7',
      '15.0(2)SE8',
      '15.0(2)SE9',
      '15.2(1)EY',
      '15.2(2)E',
      '15.2(2)E1',
      '15.2(2)EA',
      '15.2(2)JB1',
      '15.2(2b)E',
      '15.2(3)EA',
      '15.2(4)JAZ',
      '15.2(4)JAZ1',
      '15.3(2)S2',
      '15.3(3)JA',
      '15.3(3)JA1',
      '15.3(3)JA1m',
      '15.3(3)JA1n',
      '15.3(3)JA2',
      '15.3(3)JAA',
      '15.3(3)JAB',
      '15.3(3)JN',
      '15.3(3)JNB',
      '15.6(2)SP3b'
    );
    
    workarounds = make_list(CISCO_WORKAROUNDS['cip_enabled']);
    workaround_params = make_list();
    
    reporting = make_array(
    'port'     , 0,
    'severity' , SECURITY_HOLE,
    'version'  , product_info['version'],
    'bug_id'   , 'CSCun63514, CSCun49658, CSCum98371',
    'cmds'     , make_list('show running-config')
    );
    
    cisco::check_and_report(product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_versions:version_list);