Vulnerabilities > CVE-2007-1777 - Integer Overflow vulnerability in PHP Zip_Entry_Read()

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
php
nessus
exploit available

Summary

Integer overflow in the zip_read_entry function in PHP 4 before 4.4.5 allows remote attackers to execute arbitrary code via a ZIP archive that contains an entry with a length value of 0xffffffff, which is incremented before use in an emalloc call, triggering a heap overflow.

Exploit-Db

descriptionPHP 4.4.4 Zip_Entry_Read() Integer Overflow Vulnerability. CVE-2007-1777 . Remote exploit for php platform
idEDB-ID:29788
last seen2016-02-03
modified2007-03-27
published2007-03-27
reporterStefan Esser
sourcehttps://www.exploit-db.com/download/29788/
titlePHP <= 4.4.4 Zip_Entry_Read Integer Overflow Vulnerability

Nessus

  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1283.NASL
    descriptionSeveral remote vulnerabilities have been discovered in PHP, a server-side, HTML-embedded scripting language, which may lead to the execution of arbitrary code. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2007-1286 Stefan Esser discovered an overflow in the object reference handling code of the unserialize() function, which allows the execution of arbitrary code if malformed input is passed from an application. - CVE-2007-1375 Stefan Esser discovered that an integer overflow in the substr_compare() function allows information disclosure of heap memory. - CVE-2007-1376 Stefan Esser discovered that insufficient validation of shared memory functions allows the disclosure of heap memory. - CVE-2007-1380 Stefan Esser discovered that the session handler performs insufficient validation of variable name length values, which allows information disclosure through a heap information leak. - CVE-2007-1453 Stefan Esser discovered that the filtering framework performs insufficient input validation, which allows the execution of arbitrary code through a buffer underflow. - CVE-2007-1454 Stefan Esser discovered that the filtering framework can be bypassed with a special whitespace character. - CVE-2007-1521 Stefan Esser discovered a double free vulnerability in the session_regenerate_id() function, which allows the execution of arbitrary code. - CVE-2007-1583 Stefan Esser discovered that a programming error in the mb_parse_str() function allows the activation of
    last seen2020-06-01
    modified2020-06-02
    plugin id25100
    published2007-04-30
    reporterThis script is Copyright (C) 2007-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/25100
    titleDebian DSA-1283-1 : php5 - several vulnerabilities
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-1283. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(25100);
      script_version("1.21");
      script_cvs_date("Date: 2019/08/02 13:32:20");
    
      script_cve_id("CVE-2007-1286", "CVE-2007-1375", "CVE-2007-1376", "CVE-2007-1380", "CVE-2007-1453", "CVE-2007-1454", "CVE-2007-1521", "CVE-2007-1583", "CVE-2007-1700", "CVE-2007-1711", "CVE-2007-1718", "CVE-2007-1777", "CVE-2007-1824", "CVE-2007-1887", "CVE-2007-1889", "CVE-2007-1900");
      script_xref(name:"DSA", value:"1283");
    
      script_name(english:"Debian DSA-1283-1 : php5 - several vulnerabilities");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Several remote vulnerabilities have been discovered in PHP, a
    server-side, HTML-embedded scripting language, which may lead to the
    execution of arbitrary code. The Common Vulnerabilities and Exposures
    project identifies the following problems :
    
      - CVE-2007-1286
        Stefan Esser discovered an overflow in the object
        reference handling code of the unserialize() function,
        which allows the execution of arbitrary code if
        malformed input is passed from an application.
    
      - CVE-2007-1375
        Stefan Esser discovered that an integer overflow in the
        substr_compare() function allows information disclosure
        of heap memory.
    
      - CVE-2007-1376
        Stefan Esser discovered that insufficient validation of
        shared memory functions allows the disclosure of heap
        memory.
    
      - CVE-2007-1380
        Stefan Esser discovered that the session handler
        performs insufficient validation of variable name length
        values, which allows information disclosure through a
        heap information leak.
    
      - CVE-2007-1453
        Stefan Esser discovered that the filtering framework
        performs insufficient input validation, which allows the
        execution of arbitrary code through a buffer underflow.
    
      - CVE-2007-1454
        Stefan Esser discovered that the filtering framework can
        be bypassed with a special whitespace character.
    
      - CVE-2007-1521
        Stefan Esser discovered a double free vulnerability in
        the session_regenerate_id() function, which allows the
        execution of arbitrary code.
    
      - CVE-2007-1583
        Stefan Esser discovered that a programming error in the
        mb_parse_str() function allows the activation of
        'register_globals'.
    
      - CVE-2007-1700
        Stefan Esser discovered that the session extension
        incorrectly maintains the reference count of session
        variables, which allows the execution of arbitrary code.
    
      - CVE-2007-1711
        Stefan Esser discovered a double free vulnerability in
        the session management code, which allows the execution
        of arbitrary code.
    
      - CVE-2007-1718
        Stefan Esser discovered that the mail() function
        performs insufficient validation of folded mail headers,
        which allows mail header injection.
    
      - CVE-2007-1777
        Stefan Esser discovered that the extension to handle ZIP
        archives performs insufficient length checks, which
        allows the execution of arbitrary code.
    
      - CVE-2007-1824
        Stefan Esser discovered an off-by-one error in the
        filtering framework, which allows the execution of
        arbitrary code.
    
      - CVE-2007-1887
        Stefan Esser discovered that a buffer overflow in the
        sqlite extension allows the execution of arbitrary code.
    
      - CVE-2007-1889
        Stefan Esser discovered that the PHP memory manager
        performs an incorrect type cast, which allows the
        execution of arbitrary code through buffer overflows.
    
      - CVE-2007-1900
        Stefan Esser discovered that incorrect validation in the
        email filter extension allows the injection of mail
        headers.
    
    The oldstable distribution (sarge) doesn't include php5."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1286"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1375"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1376"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1380"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1453"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1454"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1521"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1583"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1700"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1711"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1718"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1777"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1824"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1887"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1889"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1900"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2007/dsa-1283"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the PHP packages. Packages for the arm, hppa, mips and mipsel
    architectures are not yet available. They will be provided later.
    
    For the stable distribution (etch) these problems have been fixed in
    version 5.2.0-8+etch3."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:C/A:N");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"metasploit_name", value:'PHP 4 unserialize() ZVAL Reference Counter Overflow (Cookie)');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:4.0");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/03/06");
      script_set_attribute(attribute:"patch_publication_date", value:"2007/04/29");
      script_set_attribute(attribute:"plugin_publication_date", value:"2007/04/30");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2007-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"4.0", prefix:"libapache-mod-php5", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"libapache2-mod-php5", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php-pear", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-cgi", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-cli", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-common", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-curl", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-dev", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-gd", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-imap", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-interbase", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-ldap", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-mcrypt", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-mhash", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-mysql", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-odbc", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-pgsql", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-pspell", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-recode", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-snmp", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-sqlite", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-sybase", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-tidy", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-xmlrpc", reference:"5.2.0-8+etch3")) flag++;
    if (deb_check(release:"4.0", prefix:"php5-xsl", reference:"5.2.0-8+etch3")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyCGI abuses
    NASL idPHP_4_4_5.NASL
    descriptionAccording to its banner, the version of PHP installed on the remote host is older than 4.4.5. Such versions may be affected by several issues, including buffer overflows, format string vulnerabilities, arbitrary code execution,
    last seen2020-06-01
    modified2020-06-02
    plugin id24906
    published2007-04-02
    reporterThis script is Copyright (C) 2007-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/24906
    titlePHP < 4.4.5 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    if (NASL_LEVEL < 3000) exit(0);
    
    include("compat.inc");
    
    if (description)
    {
      script_id(24906);
      script_version("1.25");
      script_cvs_date("Date: 2018/07/24 18:56:10");
    
      script_cve_id(
        "CVE-2006-4625",
        "CVE-2007-0905",
        "CVE-2007-0906",
        "CVE-2007-0907",
        "CVE-2007-0908",
        "CVE-2007-0909",
        "CVE-2007-0910",
        "CVE-2007-0988",
        "CVE-2007-1286",
        "CVE-2007-1376",
        "CVE-2007-1378",
        "CVE-2007-1379",
        "CVE-2007-1380",
        "CVE-2007-1700",
        "CVE-2007-1701",
        "CVE-2007-1777",
        "CVE-2007-1825",
        "CVE-2007-1835",
        "CVE-2007-1884",
        "CVE-2007-1885",
        "CVE-2007-1886",
        "CVE-2007-1887",
        "CVE-2007-1890"
      );
      script_bugtraq_id(
        22496, 
        22805, 
        22806, 
        22833, 
        22862,
        23119, 
        23120, 
        23169, 
        23219,
        23233, 
        23234, 
        23235,
        23236
      );
    
      script_name(english:"PHP < 4.4.5 Multiple Vulnerabilities");
      script_summary(english:"Checks version of PHP");
     
      script_set_attribute(
        attribute:"synopsis",
        value:
    "The remote web server uses a version of PHP that is affected by
    multiple flaws."
      );
      script_set_attribute(
        attribute:"description",
        value:
    "According to its banner, the version of PHP installed on the remote
    host is older than 4.4.5.  Such versions may be affected by several
    issues, including buffer overflows, format string vulnerabilities,
    arbitrary code execution, 'safe_mode' and 'open_basedir' bypasses, and
    clobbering of super-globals."
      );
      script_set_attribute(attribute:"see_also", value:"http://www.php.net/releases/4_4_5.php");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to PHP version 4.4.5 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:F/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
      script_set_attribute(attribute:"exploit_available", value:"false");
      script_set_attribute(attribute:"metasploit_name", value:'PHP 4 unserialize() ZVAL Reference Counter Overflow (Cookie)');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
      script_cwe_id(20, 399);
    
      script_set_attribute(attribute:"plugin_publication_date", value:"2007/04/02");
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/02/09");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:php:php");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CGI abuses");
    
      script_copyright(english:"This script is Copyright (C) 2007-2018 Tenable Network Security, Inc.");
    
      script_dependencies("php_version.nasl");
      script_require_ports("Services/www", 80);
      script_require_keys("www/PHP");
      exit(0);
    }
    
    
    include("global_settings.inc");
    include("misc_func.inc");
    include("http.inc");
    include("audit.inc");
    include("webapp_func.inc");
    
    port = get_http_port(default:80, php:TRUE);
    
    php = get_php_from_kb(
      port : port,
      exit_on_fail : TRUE
    );
    
    version = php["ver"];
    source = php["src"];
    
    backported = get_kb_item('www/php/'+port+'/'+version+'/backported');
    
    if (report_paranoia < 2 && backported)
      audit(AUDIT_BACKPORT_SERVICE, port, "PHP "+version+" install");
    
    if (version =~ "^3\." ||
        version =~ "^4\.[0-3]\." ||
        version =~ "^4\.4\.[0-4]($|[^0-9])"
    )
    {
      if (report_verbosity > 0)
      {
        report =
          '\n  Version source     : '+source +
          '\n  Installed version  : '+version+
          '\n  Fixed version      : 4.4.5\n';
        security_hole(port:port, extra:report);
      }
      else security_hole(port);
      exit(0);
    }
    else audit(AUDIT_LISTEN_NOT_VULN, "PHP", port, version);
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1282.NASL
    descriptionSeveral remote vulnerabilities have been discovered in PHP, a server-side, HTML-embedded scripting language, which may lead to the execution of arbitrary code. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2007-1286 Stefan Esser discovered an overflow in the object reference handling code of the unserialize() function, which allows the execution of arbitrary code if malformed input is passed from an application. - CVE-2007-1380 Stefan Esser discovered that the session handler performs insufficient validation of variable name length values, which allows information disclosure through a heap information leak. - CVE-2007-1521 Stefan Esser discovered a double free vulnerability in the session_regenerate_id() function, which allows the execution of arbitrary code. - CVE-2007-1711 Stefan Esser discovered a double free vulnerability in the session management code, which allows the execution of arbitrary code. - CVE-2007-1718 Stefan Esser discovered that the mail() function performs insufficient validation of folded mail headers, which allows mail header injection. - CVE-2007-1777 Stefan Esser discovered that the extension to handle ZIP archives performs insufficient length checks, which allows the execution of arbitrary code.
    last seen2020-06-01
    modified2020-06-02
    plugin id25099
    published2007-04-30
    reporterThis script is Copyright (C) 2007-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/25099
    titleDebian DSA-1282-1 : php4 - several vulnerabilities
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-1282. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(25099);
      script_version("1.20");
      script_cvs_date("Date: 2019/08/02 13:32:20");
    
      script_cve_id("CVE-2007-1286", "CVE-2007-1380", "CVE-2007-1521", "CVE-2007-1711", "CVE-2007-1718", "CVE-2007-1777");
      script_xref(name:"DSA", value:"1282");
    
      script_name(english:"Debian DSA-1282-1 : php4 - several vulnerabilities");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Several remote vulnerabilities have been discovered in PHP, a
    server-side, HTML-embedded scripting language, which may lead to the
    execution of arbitrary code. The Common Vulnerabilities and Exposures
    project identifies the following problems :
    
      - CVE-2007-1286
        Stefan Esser discovered an overflow in the object
        reference handling code of the unserialize() function,
        which allows the execution of arbitrary code if
        malformed input is passed from an application.
    
      - CVE-2007-1380
        Stefan Esser discovered that the session handler
        performs insufficient validation of variable name length
        values, which allows information disclosure through a
        heap information leak.
    
      - CVE-2007-1521
        Stefan Esser discovered a double free vulnerability in
        the session_regenerate_id() function, which allows the
        execution of arbitrary code.
    
      - CVE-2007-1711
        Stefan Esser discovered a double free vulnerability in
        the session management code, which allows the execution
        of arbitrary code.
    
      - CVE-2007-1718
        Stefan Esser discovered that the mail() function
        performs insufficient validation of folded mail headers,
        which allows mail header injection.
    
      - CVE-2007-1777
        Stefan Esser discovered that the extension to handle ZIP
        archives performs insufficient length checks, which
        allows the execution of arbitrary code."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1286"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1380"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1521"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1711"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1718"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2007-1777"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2007/dsa-1282"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the PHP packages. Packages for the arm, m68k, mips and mipsel
    architectures are not yet available. They will be provided later.
    
    For the oldstable distribution (sarge) these problems have been fixed
    in version 4.3.10-20.
    
    For the stable distribution (etch) these problems have been fixed in
    version 4.4.4-8+etch2."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:C/A:N");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"metasploit_name", value:'PHP 4 unserialize() ZVAL Reference Counter Overflow (Cookie)');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php4");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:3.1");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:4.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2007/04/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2007/04/30");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2007-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"3.1", prefix:"libapache-mod-php4", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"libapache2-mod-php4", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-cgi", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-cli", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-common", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-curl", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-dev", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-domxml", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-gd", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-imap", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-ldap", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-mcal", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-mhash", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-mysql", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-odbc", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-pear", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-recode", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-snmp", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-sybase", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"3.1", prefix:"php4-xslt", reference:"4.3.10-20")) flag++;
    if (deb_check(release:"4.0", prefix:"libapache-mod-php4", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"libapache2-mod-php4", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-cgi", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-cli", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-common", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-curl", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-dev", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-domxml", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-gd", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-imap", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-interbase", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-ldap", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-mcal", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-mcrypt", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-mhash", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-mysql", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-odbc", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-pear", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-pgsql", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-pspell", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-recode", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-snmp", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-sybase", reference:"4.4.4-8+etch2")) flag++;
    if (deb_check(release:"4.0", prefix:"php4-xslt", reference:"4.4.4-8+etch2")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    

Statements

contributorMark J Cox
lastmodified2007-04-16
organizationRed Hat
statementNot vulnerable. The zip extension was not distributed with PHP as shipped with Red Hat Enterprise Linux 2.1, 3, 4, 5, Stronghold 4.0, or Red Hat Application Stack 1.