Lucene search
K

.NET JIT Compiler Vulnerability

🗓️ 15 May 2008 00:00:00Reported by Copyright (C) 2008 Greenbone Networks GmbHType 
openvas
 openvas
🔗 plugins.openvas.org👁 28 Views

.NET JIT Compiler Vulnerability in Microsoft .NET Framewor

Related
Refs
Code
# OpenVAS Vulnerability Test
# $Id: win_CVE-2007-0043.nasl 5661 2017-03-21 11:39:13Z cfi $
# Description: .NET JIT Compiler Vulnerability
#
# Authors:
# Carsten Koch-Mauthe <c.koch-mauthe at dn-systems.de>
# Updated by: Antu Sanadi <[email protected]> on 16/09/22
#
# Copyright:
# Copyright (C) 2008 Greenbone Networks GmbH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2,
# as published by the Free Software Foundation
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#

tag_summary = "The remote host is affected by the vulnerabilitys described in
  CVE-2007-0043

  Checking if System.web.dll version is less than 2.0.50727.832";

tag_impact = "The Just In Time (JIT) Compiler service in Microsoft .NET Framework 1.0, 1.1,
  and 2.0 for Windows 2000, XP, Server 2003, and Vista allows user-assisted
  remote attackers to execute arbitrary code via unspecified vectors involving
  an unchecked buffer, probably a buffer overflow, aka .NET JIT Compiler
  Vulnerability. Checking if System.web.dll version is less than 2.0.50727.832";
tag_affected = "Microsoft .NET Framework 1.1 SP 1
  Microsoft .NET Framework 1.0 SP 3
  Microsoft .NET Framework 2.0 SP 1/SP 2";
tag_solution = "All Users should upgrade to the latest version.
  http://www.microsoft.com/technet/security/Bulletin/ms07-040.mspx";

# $Revision: 5661 $

if(description)
{
  script_id(90010);
  script_version("$Revision: 5661 $");
  script_tag(name:"last_modification", value:"$Date: 2017-03-21 12:39:13 +0100 (Tue, 21 Mar 2017) $");
  script_tag(name:"creation_date", value:"2008-05-15 23:18:24 +0200 (Thu, 15 May 2008)");
  script_tag(name:"cvss_base", value:"9.3");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:M/Au:N/C:C/I:C/A:C");
  script_cve_id("CVE-2007-0043");
  script_bugtraq_id(24811);
  script_name(".NET JIT Compiler Vulnerability");
  script_xref(name : "URL" , value : "http://secunia.com/advisories/26003");
  script_xref(name : "URL" , value : "http://securitytracker.com/alerts/2007/Jul/1018356.html");
  script_xref(name : "URL" , value : "http://www.microsoft.com/technet/security/Bulletin/ms07-040.mspx");

  script_category(ACT_GATHER_INFO);
  script_tag(name:"qod_type", value:"executable_version");
  script_copyright("Copyright (C) 2008 Greenbone Networks GmbH");
  script_family("Windows : Microsoft Bulletins");
  script_dependencies("secpod_reg_enum.nasl");
  script_mandatory_keys("SMB/WindowsVersion");
  script_require_ports(139, 445);
  script_tag(name : "impact" , value : tag_impact);
  script_tag(name : "affected" , value : tag_affected);
  script_tag(name : "solution" , value : tag_solution);
  script_tag(name : "summary" , value : tag_summary);
  exit(0);
}


include("smb_nt.inc");
include("secpod_reg.inc");
include("version_func.inc");
include("secpod_smb_func.inc");

if(hotfix_check_sp(xp:4, win2k:5, win2003:3, winVista:3, win2008:3) <= 0){
  exit(0);
}

# MS07-040 Hotfix check
if((hotfix_missing(name:"928367") == 0) || (hotfix_missing(name:"928366") == 0)||
   (hotfix_missing(name:"933854") == 0) || (hotfix_missing(name:"929729") == 0) ||
   (hotfix_missing(name:"929916") == 0)){
    exit(0);
}

key  = "SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls\";
foreach item (registry_enum_values(key:key))
{
  if("System.Web.dll" >< item)
  {
    path = item;
    break;
  }
}

if(!path){
  exit(0);
}

if("c:" >< path){
  path =  ereg_replace(pattern:"c:", replace:"C:", string:path);
}

share = ereg_replace(pattern:"([A-Z]):.*", replace:"\1$", string:path);
file =  ereg_replace(pattern:"[A-Z]:(.*)", replace:"\1", string:path);
dllVer = GetVer(file:file, share:share);

if(!dllVer){
  exit(0);
}

# Check for .Net Framework version 1.0 < 1.0.3705.6060, 1.1 < 1.1.4322.2407 and 2.0 < 2.0.50727.832
if(version_in_range(version:dllVer, test_version:"1.0", test_version2:"1.0.3705.6059")||
   version_in_range(version:dllVer, test_version:"1.1", test_version2:"1.1.4322.2406")||
   version_in_range(version:dllVer, test_version:"2.0", test_version2:"2.0.50727.831")){
   security_message(0);
}

key = "SOFTWARE\Microsoft\ASP.NET\";
if(!registry_key_exists(key:key)){
  exit(0);
}

foreach item (registry_enum_keys(key:key))
{
  path = registry_get_sz(key:key + item, item:"Path");
  if("\Microsoft.NET\Framework" >< path)
  {
    path =  path + "\system.web.dll";
    share = ereg_replace(pattern:"([a-zA-Z]):.*", replace:"\1$", string:path);
    file = ereg_replace(pattern:"[a-zA-Z]:(.*)", replace:"\1", string:path);

    # Get the version of system.web.dll
    dllVer = GetVer(file:file, share:share);
    if(!dllVer){
      exit(0);
    }
  }
}

## Windows vista
if(hotfix_check_sp(winVista:3) > 0)
{
  # Check for System.web.dll version 1.0 < 1.0.3705.6060, 1.1 < 1.1.4322.2407, 2.0 < 2.0.50727.832
  if(version_in_range(version:dllVer, test_version:"1.0",test_version2:"1.0.3705.6059") ||
     version_in_range(version:dllVer, test_version:"1.1", test_version2:"1.1.4322.2406") ||
     version_in_range(version:dllVer, test_version:"2.0", test_version2:"2.0.50727.831"))
     {
       security_message(0);
        exit(0);
     }
}

## Windows 2008 Server
if(hotfix_check_sp(win2008:3) > 0)
{
  # Check for System.web.dll version 1.0 < 1.0.3705.6060, 1.1 < 1.1.4322.2407
  if(version_in_range(version:dllVer, test_version:"1.0",test_version2:"1.0.3705.6059") ||
     version_in_range(version:dllVer, test_version:"1.1", test_version2:"1.1.4322.2406"))
     {
       security_message(0);
        exit(0);
     }
}

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation