Subversion < 1.0.3 apr_time_t data Conversion Remote Overflow - Nessus

High   Plugin ID: 12261

This page contains detailed information about the Subversion < 1.0.3 apr_time_t data Conversion Remote Overflow Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 12261
Name: Subversion < 1.0.3 apr_time_t data Conversion Remote Overflow
Filename: subversion_1_0_4.nasl
Vulnerability Published: 2004-05-19
This Plugin Published: 2004-06-08
Last Modification Time: 2018-11-15
Plugin Version: 1.19
Plugin Type: remote
Plugin Family: Misc.
Dependencies: subversion_detection.nasl

Vulnerability Information


Severity: High
Vulnerability Published: 2004-05-19
Patch Published: N/A
CVE [?]: CVE-2004-0397
CPE [?]: N/A

Synopsis

The remote service is vulnerable to a buffer overflow.

Description

The remote host is vulnerable to a remote stack-based overflow. An attacker, exploiting this hole, would be given full access to the target machine. Versions of Subversion less than 1.0.3 are vulnerable to this attack. This vulnerability was discovered by Stefan Esser and posted to public mailing lists.

Solution

Upgrade to version 1.0.3 or higher

Public Exploits


Target Network Port(s): N/A
Target Asset(s): Services/subversion
Exploit Available: True (Metasploit Framework, Exploit-DB, Immunity Canvas)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Subversion < 1.0.3 apr_time_t data Conversion Remote Overflow vulnerability:

  1. Metasploit: exploit/multi/svn/svnserve_date
    [Subversion Date Svnserve]
  2. Exploit-DB: exploits/unix/dos/16284.rb
    [EDB-16284: Subversion - Date Svnserve (Metasploit)]
  3. Exploit-DB: exploits/multiple/remote/9935.rb
    [EDB-9935: Subversion 1.0.2 - Date Overflow (Metasploit)]
  4. Immunity Canvas: CANVAS

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)

Go back to menu.

Plugin Source


This is the subversion_1_0_4.nasl nessus plugin source code. This script is Copyright (C) 2004-2018 Tenable Network Security, Inc.

#
# (C) Tenable Network Security, Inc.
#

include( 'compat.inc' );

if(description)
{
  script_id(12261);
  script_version ("1.19");
  script_cve_id("CVE-2004-0397");
  script_bugtraq_id(10386);

  script_name(english:"Subversion < 1.0.3 apr_time_t data Conversion Remote Overflow");
  script_summary(english:"Subversion remote Buffer Overflow");

  script_set_attribute(
    attribute:'synopsis',
    value:'The remote service is vulnerable to a buffer overflow.'
  );

  script_set_attribute(
    attribute:'description',
    value:'The remote host is vulnerable to a remote stack-based
overflow.  An attacker, exploiting this hole, would be
given full access to the target machine.  Versions of
Subversion less than 1.0.3 are vulnerable to this attack.
This vulnerability was discovered by Stefan Esser and posted
to public mailing lists.'
  );

  script_set_attribute(
    attribute:'solution',
    value:'Upgrade to version 1.0.3 or higher'
  );
  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:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Subversion Date Svnserve');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:'CANVAS');

  script_set_attribute(
    attribute:'see_also',
    value:'https://seclists.org/bugtraq/2004/May/216'
  );

  script_set_attribute(
    attribute:'see_also',
    value:'http://subversion.tigris.org/svn-sscanf-advisory.txt'
  );

 script_set_attribute(attribute:"plugin_publication_date", value: "2004/06/08");
 script_set_attribute(attribute:"vuln_publication_date", value: "2004/05/19");
 script_cvs_date("Date: 2018/11/15 20:50:24");
  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_end_attributes();
  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2004-2018 Tenable Network Security, Inc.");
  script_family(english:"Misc.");
  script_dependencie("subversion_detection.nasl");
  script_require_ports("Services/subversion");
  exit(0);
}



# start check
# mostly horked from MetaSploit Framework subversion overflow check

port = get_kb_item("Services/subversion");
if ( ! port ) port = 3690;

if (! get_tcp_port_state(port))
	exit(0);

dat = string("( 2 ( edit-pipeline ) 24:svn://host/svn/nessusr0x ) ");

soc = open_sock_tcp(port);
if (!soc)
        exit(0);

r = recv_line(socket:soc, length:1024);

if (! r)
	exit(0);

send(socket:soc, data:dat);
r = recv_line(socket:soc, length:256);

if (! r)
	exit(0);

#display(r);

if (egrep(string:r, pattern:".*subversion-1\.0\.[0-2][^0-9].*"))
{
	security_hole(port);
}

close(soc);
exit(0);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/subversion_1_0_4.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\subversion_1_0_4.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/subversion_1_0_4.nasl

Go back to menu.

How to Run


Here is how to run the Subversion < 1.0.3 apr_time_t data Conversion Remote Overflow as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Misc. plugin family.
  6. On the right side table select Subversion < 1.0.3 apr_time_t data Conversion Remote Overflow plugin ID 12261.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl subversion_1_0_4.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a subversion_1_0_4.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - subversion_1_0_4.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state subversion_1_0_4.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 13702 - Fedora Core 1 : subversion-0.32.1-2 (2004-127)
  • 13703 - Fedora Core 2 : subversion-1.0.2-2.1 (2004-128)
  • 36673 - FreeBSD : subversion date parsing vulnerability (5d36ef32-a9cf-11d8-9c6d-0020ed76ef5a)
  • 14500 - GLSA-200405-14 : Buffer overflow in Subversion
  • 71566 - Apache Subversion 1.6.x / 1.7.x / 1.8.x < 1.6.23 / 1.7.11 / 1.8.1 Multiple Vulnerabilities
  • 50988 - Adobe Illustrator Path Subversion Arbitrary DLL Injection Code Execution (APSB10-29)
  • 97024 - Amazon Linux AMI : subversion / mod_dav_svn (ALAS-2017-794)
  • 102372 - Debian DSA-3932-1 : subversion - security update
  • 131657 - EulerOS 2.0 SP2 : subversion (EulerOS-SA-2019-2504)
  • 131824 - EulerOS 2.0 SP5 : subversion (EulerOS-SA-2019-2550)
  • 132204 - EulerOS 2.0 SP3 : subversion (EulerOS-SA-2019-2669)
  • 69355 - Fedora 18 : subversion-1.7.11-1.fc18.1 (2013-13672)
  • 96360 - Fedora 25 : subversion (2017-c629f16f6c)
  • 135730 - FreeBSD : ansible - subversion password leak from PID (67dbeeb6-80f4-11ea-bafd-815569f3852d)
  • 66736 - FreeBSD : devel/subversion -- contrib hook-scripts can allow arbitrary code execution (6d0bf320-ca39-11e2-9673-001e8c75030d)
  • 95409 - FreeBSD : subversion -- Unrestricted XML entity expansion in mod_dontdothat and Subversionclients using http(s) (ac256985-b6a9-11e6-a3bf-206a8a720317)
  • 70084 - GLSA-201309-11 : Subversion: Multiple vulnerabilities
  • 75035 - openSUSE Security Update : subversion (openSUSE-SU-2013:1006-1)
  • 95707 - openSUSE Security Update : subversion (openSUSE-2016-1435)
  • 49174 - Opera < 10.62 Path Subversion Arbitrary DLL Injection Code Execution
  • 111847 - Photon OS 1.0: Dhcp / Libtasn1 / Subversion / Unzip PHSA-2016-0013 (deprecated)
  • 111903 - Photon OS 1.0: Apr / Krb5 / Linux / Ncurses / Subversion PHSA-2017-1.0-0093 (deprecated)
  • 121782 - Photon OS 1.0: Subversion PHSA-2017-1.0-0093
  • 49176 - TeamViewer Path Subversion Arbitrary DLL Injection Code Execution
  • 102424 - Ubuntu 14.04 LTS / 16.04 LTS / 17.04 : subversion vulnerabilities (USN-3388-1)
  • 48906 - VLC Media Player < 1.1.4 Path Subversion Arbitrary DLL Injection Code Execution
  • 48943 - Wireshark / Ethereal < 1.2.11 / 1.0.16 Path Subversion Arbitrary DLL Injection Code Execution

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file subversion_1_0_4.nasl version 1.19. For more plugins, visit the Nessus Plugin Library.

Go back to menu.