Vulnerabilities > CVE-2012-2203 - Permissions, Privileges, and Access Controls vulnerability in IBM products

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
ibm
CWE-264
nessus

Summary

IBM Global Security Kit (aka GSKit) before 8.0.14.22, as used in IBM Rational Directory Server, IBM Tivoli Directory Server, and other products, uses the PKCS #12 file format for certificate objects without enforcing file integrity, which makes it easier for remote attackers to spoof SSL servers via vectors involving insertion of an arbitrary root Certification Authority (CA) certificate.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • 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.
  • Blue Boxing
    This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
  • Target Programs with Elevated Privileges
    This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.

Nessus

  • NASL familyWindows
    NASL idIBM_RATIONAL_CLEARQUEST_7_1_2_8.NASL
    descriptionThe remote host has a version of IBM Rational ClearQuest 7.1.x prior to 7.1.2.8 / 8.0.0.x prior to 8.0.0.4 installed. It is, therefore, affected by a spoofing vulnerability related to the included Global Security Kit (GSKit) and certificate objects. The GSKit does not enforce file integrity of the PKCS #12 files it uses and is vulnerable to SSL server spoofing because the insertion of arbitrary CA certificates is possible. Note that deployments not using LDAP are not affected and that PKCS #12 is not the default format used by ClearQuest.
    last seen2020-06-01
    modified2020-06-02
    plugin id62786
    published2012-11-01
    reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/62786
    titleIBM Rational ClearQuest 7.1.x < 7.1.2.8 / 8.0.0.x < 8.0.0.4 GSKit Spoofing (credentialed check)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(62786);
      script_version("1.6");
      script_cvs_date("Date: 2019/12/04");
    
      script_cve_id("CVE-2012-2203");
      script_bugtraq_id(54743);
    
      script_name(english:"IBM Rational ClearQuest 7.1.x < 7.1.2.8 / 8.0.0.x < 8.0.0.4 GSKit Spoofing (credentialed check)");
      script_summary(english:"Checks the version of IBM Rational ClearQuest.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote host has software installed that is affected by a spoofing
    vulnerability.");
      script_set_attribute(attribute:"description", value:
    "The remote host has a version of IBM Rational ClearQuest 7.1.x prior
    to 7.1.2.8 / 8.0.0.x prior to 8.0.0.4 installed. It is, therefore,
    affected by a spoofing vulnerability related to the included Global
    Security Kit (GSKit) and certificate objects.
    
    The GSKit does not enforce file integrity of the PKCS #12 files it
    uses and is vulnerable to SSL server spoofing because the insertion
    of arbitrary CA certificates is possible.
    
    Note that deployments not using LDAP are not affected and that PKCS
    #12 is not the default format used by ClearQuest.");
      script_set_attribute(attribute:"see_also", value:"http://www-01.ibm.com/support/docview.wss?uid=swg21612036");
      script_set_attribute(attribute:"see_also", value:"http://www-01.ibm.com/support/docview.wss?uid=swg21612033");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to IBM Rational ClearQuest 7.1.2.8 / 8.0.0.4 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2012-2203");
    
      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:"2012/07/27");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/07/27");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/11/01");
    
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:ibm:rational_clearquest");
      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("ibm_rational_clearquest_installed.nasl");
      script_require_keys("installed_sw/IBM Rational ClearQuest", "Settings/ParanoidReport");
    
      exit(0);
    }
    
    include('ibm_rational_clearquest_version.inc');
    
    rational_clearquest_check_version(
      fixes:make_nested_list(
        make_array("Min", "7.1.0.0", "Fix UI", "7.1.2.8", "Fix", "7.1208.0.124"),
        make_array("Min", "8.0.0.0", "Fix UI", "8.0.0.4", "Fix", "8.4.0.681")),
      severity:SECURITY_HOLE,
      paranoid:TRUE #only affects CQ installs using LDAP and PKCS #12 must be used
    );
    
  • NASL familyWindows
    NASL idWEBSPHERE_MQ_7100_7102.NASL
    descriptionThe version of IBM WebSphere MQ server is version 7.1 without Fix Pack 7.1.0.2 or 7.5 without Fix Pack 7.5.0.1. It is, therefore, affected by the following vulnerabilities : - A flaw exists in Global Security Kit (GSkit) due to a failure to properly validate data when the
    last seen2020-06-01
    modified2020-06-02
    plugin id63099
    published2012-11-29
    reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/63099
    titleIBM WebSphere MQ 7.1 / 7.5 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(63099);
      script_version("1.8");
      script_cvs_date("Date: 2018/08/06 14:03:16");
    
      script_cve_id("CVE-2012-2191", "CVE-2012-2203", "CVE-2012-4863");
      script_bugtraq_id(54743, 56471);
    
      script_name(english:"IBM WebSphere MQ 7.1 / 7.5 Multiple Vulnerabilities");
      script_summary(english:"Checks the version of IBM WebSphere MQ.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote Windows host has a service installed that is affected by
    multiple vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "The version of IBM WebSphere MQ server is version 7.1 without Fix 
    Pack 7.1.0.2 or 7.5 without Fix Pack 7.5.0.1. It is, therefore, 
    affected by the following vulnerabilities :
    
      - A flaw exists in Global Security Kit (GSkit) due to a
        failure to properly validate data when the 'protection
        mechanism' is executed against an SSL CBC timing attack.
        A remote attacker, using crafted values in the TLS Record
        Layer, can exploit this to cause a denial of service.
        (CVE-2012-2191)
    
      - A flaw exists in Global Security Kit (GSkit) due to a
        failure to properly verify certificates, which can allow
        a remote attacker to conduct a man-in-the-middle attack.
        (CVE-2012-2203)
    
      - An application can potentially put a sequence of large
        messages into the queue, causing a buffer to overflow in
        the queue manager. This can lead to a denial of service.
        (CVE-2012-4863)");
      script_set_attribute(attribute:"see_also", value:"https://www-304.ibm.com/support/docview.wss?uid=swg21614483");
      script_set_attribute(attribute:"see_also", value:"http://www-01.ibm.com/support/docview.wss?uid=swg21617837");
      # https://www-304.ibm.com/connections/blogs/PSIRT/entry/websphere_mq_security_bulletin_multiple_vulnerabilities_in_gskit_component7?lang=en_us
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?be2ba65d");
      script_set_attribute(attribute:"solution", value:"Apply fix pack 7.1.0.2 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      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:"2012/07/30");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/11/09");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/11/29");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:ibm:websphere_mq");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows");
    
      script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc.");
    
      script_dependencies("websphere_mq_installed.nasl");
      script_require_keys("installed_sw/IBM WebSphere MQ");
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("install_func.inc");
    
    app_name = "IBM WebSphere MQ";
    install  = get_single_install(app_name:app_name, exit_if_unknown_ver:TRUE);
    version  = install['version'];
    path     = install['path'];
    type     = install['Type'];
    fix      = FALSE;
    fixes    = make_array(
      "^7\.1\.", "7.1.0.2",
      "^7\.5\.", "7.5.0.1"
    );
    
    # Only server
    if (tolower(type) != "server")
      audit(AUDIT_HOST_NOT,app_name+" Server");
    
    # Find the fix for our version
    foreach fixcheck (keys(fixes))
    {
      if(version =~ fixcheck)
      {
        fix = fixes[fixcheck];
        break;
      }
    }
    
    # Version not affected
    if(!fix)
      audit(AUDIT_INST_PATH_NOT_VULN, app_name, version, path);
    
    # Check affected version
    if(ver_compare(ver:version, fix:fix, strict:FALSE) == -1)
    {
      port = get_kb_item("SMB/transport");
      if (!port) port = 445;
      if (report_verbosity > 0)
      {
        report = 
          '\n  Path              : ' + path +
          '\n  Installed version : ' + version +
          '\n  Fixed version     : ' + fix +
          '\n';
        security_hole(extra:report, port:port);
      }
      else security_hole(port);
    }
    else audit(AUDIT_INST_PATH_NOT_VULN, app_name, version, path);
    
  • NASL familyDatabases
    NASL idDB2_97FP9.NASL
    descriptionAccording to its version, the installation of IBM DB2 9.7 running on the remote host is prior to Fix Pack 9. It is, therefore, affected by one or more of the following vulnerabilities : - The included software, GSKit, contains several errors related to SSL and TLS that can result in denial of service, information disclosures, or unauthorized insertion of an arbitrary root Certification Authority certificate. (CVE-2012-2190, CVE-2012-2191, CVE-2012-2203, CVE-2013-0169 / IC90395) - A stack-based buffer overflow exists related to
    last seen2020-06-01
    modified2020-06-02
    plugin id71519
    published2013-12-18
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/71519
    titleIBM DB2 9.7 < Fix Pack 9 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(71519);
      script_version("1.15");
      script_cvs_date("Date: 2019/11/27");
    
      script_cve_id(
        "CVE-2012-2190",
        "CVE-2012-2191",
        "CVE-2012-2203",
        "CVE-2013-3475",
        "CVE-2013-4033",
        "CVE-2013-5466",
        "CVE-2013-6717"
      );
      script_bugtraq_id(
        54743,
        55185,
        57778,
        60255,
        62018,
        64334,
        64336
      );
    
      script_name(english:"IBM DB2 9.7 < Fix Pack 9 Multiple Vulnerabilities");
      script_summary(english:"Checks the DB2 signature.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote database server is affected by multiple vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "According to its version, the installation of IBM DB2 9.7 running on
    the remote host is prior to Fix Pack 9. It is, therefore, affected by
    one or more of the following vulnerabilities :
    
      - The included software, GSKit, contains several errors
        related to SSL and TLS that can result in denial of
        service, information disclosures, or unauthorized
        insertion of an arbitrary root Certification Authority
        certificate. (CVE-2012-2190, CVE-2012-2191,
        CVE-2012-2203, CVE-2013-0169 / IC90395)
    
      - A stack-based buffer overflow exists related to
        'db2aud' and 'db2flacc' that allows a local attacker
        to elevate privileges to that of an instance owner. The
        'db2aud' issue does not affect installs on the Windows
        operating system. (CVE-2013-3475 / IC92495)
    
      - An unspecified error exists that allows an attacker to
        gain SELECT, INSERT, UPDATE, or DELETE permissions to
        database tables. Note that successful exploitation
        requires the rights EXPLAIN, SQLADM, or DBADM.
        (CVE-2013-4033 / IC94523)
    
      - An error exists related to the XSLT parser that allows
        a NULL pointer to be dereferenced. (CVE-2013-5466 /
        IC97470)
    
      - An error exists related to queries containing OLAP
        specifications that allows remote, authenticated
        attackers to close database connections and deactivate
        the database. (CVE-2013-6717 / IC95641)");
      script_set_attribute(attribute:"see_also", value:"http://www-01.ibm.com/support/docview.wss?uid=swg21450666#9");
      script_set_attribute(attribute:"see_also", value:"http://www-01.ibm.com/support/docview.wss?uid=swg24036646");
      script_set_attribute(attribute:"solution", value:
    "Apply IBM DB2 version 9.7 Fix Pack 9 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      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:H/I:H/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-2012-2203");
    
      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:"2012/07/30");
      script_set_attribute(attribute:"patch_publication_date", value:"2013/12/13");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/12/18");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:ibm:db2");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Databases");
    
      script_copyright(english:"This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("db2_das_detect.nasl");
      script_require_ports("Services/db2das", 523);
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("db2_report_func.inc");
    
    port = get_service(svc:"db2das", default:523, exit_on_fail:TRUE);
    
    level = get_kb_item_or_exit("DB2/" + port + "/Level");
    if (level !~ "^9\.7\.") exit(0, "The version of IBM DB2 listening on port "+port+" is not 9.7.");
    
    platform = get_kb_item_or_exit("DB2/"+port+"/Platform");
    platform_name = get_kb_item("DB2/"+port+"/Platform_Name");
    if (isnull(platform_name))
    {
      platform_name = platform;
      report_phrase = "platform " + platform;
    }
    else
      report_phrase = platform_name;
    
    
    vuln = FALSE;
    # Windows 32-bit/64-bit
    if (platform == 5 || platform == 23)
    {
      fixed_level = '9.7.900.250';
      if (ver_compare(ver:level, fix:fixed_level) == -1)
        vuln = TRUE;
    }
    # Others
    else if (
      # Linux, 2.6 kernel 32/64-bit
      platform == 18 ||
      platform == 30 ||
      # AIX
      platform == 20
    )
    {
      fixed_level = '9.7.0.9';
      if (ver_compare(ver:level, fix:fixed_level) == -1)
        vuln = TRUE;
    }
    else
    {
      info =
        'Nessus does not support version checks against ' + report_phrase + '.\n' +
        'To help us better identify vulnerable versions, please send the platform\n' +
        'number along with details about the platform, including the operating system\n' +
        'version, CPU architecture, and DB2 version to [email protected].\n';
      exit(1, info);
    }
    
    if (vuln)
    {
      report_db2(
          severity        : SECURITY_HOLE,
          port            : port,
          platform_name   : platform_name,
          installed_level : level,
          fixed_level     : fixed_level);
    }
    else audit(AUDIT_LISTEN_NOT_VULN, "DB2", port, level);
    
  • NASL familyWindows
    NASL idWEBSPHERE_MQ_7010_7019.NASL
    descriptionThe version of IBM WebSphere MQ server is version 7.0 without Fix Pack 7.0.1.9, 7.1 without Fix Pack 7.1.0.2 or 7.5 without Fix Pack 7.5.0.1. It is, therefore, affected by the following vulnerabilities : - A flaw exists in Global Security Kit (GSkit) due to a failure to properly validate data when the
    last seen2020-06-01
    modified2020-06-02
    plugin id63098
    published2012-11-29
    reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/63098
    titleIBM WebSphere MQ 7.0 / 7.1 / 7.5 Global Security Toolkit Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(63098);
      script_version("1.6");
      script_cvs_date("Date: 2018/08/06 14:03:16");
    
      script_cve_id("CVE-2012-2191", "CVE-2012-2203");
      script_bugtraq_id(54743);
    
      script_name(english:"IBM WebSphere MQ 7.0 / 7.1 / 7.5 Global Security Toolkit Vulnerabilities");
      script_summary(english:"Checks the version of IBM WebSphere MQ.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote Windows host has a service installed that has multiple
    vulnerabilities within the IBM Global Security Toolkit.");
      script_set_attribute(attribute:"description", value:
    "The version of IBM WebSphere MQ server is version 7.0 without Fix
    Pack 7.0.1.9, 7.1 without Fix Pack 7.1.0.2 or 7.5 without Fix Pack
    7.5.0.1. It is, therefore, affected by the following vulnerabilities :
    
      - A flaw exists in Global Security Kit (GSkit) due to a
        failure to properly validate data when the 'protection
        mechanism' is executed against an SSL CBC timing attack.
        A remote attacker, using crafted values in the TLS Record
        Layer, can exploit this to cause a denial of service.
        (CVE-2012-2191)
    
      - A flaw exists in Global Security Kit (GSkit) due to a
        failure to properly verify certificates, which can allow
        a remote attacker to conduct a man-in-the-middle attack.
        (CVE-2012-2203)");
      script_set_attribute(attribute:"see_also", value:"https://www-304.ibm.com/support/docview.wss?uid=swg21614483");
      # https://www-304.ibm.com/connections/blogs/PSIRT/entry/websphere_mq_security_bulletin_multiple_vulnerabilities_in_gskit_component7?lang=en_us
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?be2ba65d");
      script_set_attribute(attribute:"solution",value:"Apply fix pack 7.0.1.9 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      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:"2012/07/30");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/11/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/11/29");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:ibm:websphere_mq");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows");
    
      script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc.");
    
      script_dependencies("websphere_mq_installed.nasl");
      script_require_keys("installed_sw/IBM WebSphere MQ");
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("install_func.inc");
    
    app_name = "IBM WebSphere MQ";
    install  = get_single_install(app_name:app_name, exit_if_unknown_ver:TRUE);
    version  = install['version'];
    path     = install['path'];
    type     = install['Type'];
    fix      = FALSE;
    fixes    = make_array(
      "^7\.0\.1\.", "7.0.1.9",
      "^7\.1\.0\.", "7.1.0.2",
      "^7\.5\.0\.", "7.5.0.1"
    );
    
    # Only server
    if (tolower(type) != "server")
      audit(AUDIT_HOST_NOT,app_name+" Server");
    
    # Find the fix for our version
    foreach fixcheck (keys(fixes))
    {
      if(version =~ fixcheck)
      {
        fix = fixes[fixcheck];
        break;
      }
    }
    
    # Version not affected
    if(!fix)
      audit(AUDIT_INST_PATH_NOT_VULN, app_name, version, path);
    
    # Check affected version
    if(ver_compare(ver:version, fix:fix, strict:FALSE) == -1)
    {
      port = get_kb_item("SMB/transport");
      if (!port) port = 445;
      if (report_verbosity > 0)
      {
        report = 
          '\n  Path              : ' + path +
          '\n  Installed version : ' + version +
          '\n  Fixed version     : ' + fix +
          '\n';
        security_hole(extra:report, port:port);
      }
      else security_hole(port);
    }
    else audit(AUDIT_INST_PATH_NOT_VULN, app_name, version, path);