AT-TFTP Server Filename Handling Remote Overflow - Nessus

Critical   Plugin ID: 23736

This page contains detailed information about the AT-TFTP Server Filename Handling 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: 23736
Name: AT-TFTP Server Filename Handling Remote Overflow
Filename: at_tftpd_long_filename_overflow.nasl
Vulnerability Published: 2006-11-26
This Plugin Published: 2006-11-28
Last Modification Time: 2019-03-06
Plugin Version: 1.17
Plugin Type: remote
Plugin Family: Gain a shell remotely
Dependencies: tftpd_detect.nasl
Required KB Items [?]: Services/udp/tftp, Settings/ParanoidReport

Vulnerability Information


Severity: Critical
Vulnerability Published: 2006-11-26
Patch Published: N/A
CVE [?]: CVE-2006-6184
CPE [?]: N/A

Synopsis

The remote tftp server is affected by a buffer overflow vulnerability.

Description

The remote host appears to be running AT-TFTP Server, a tftpd server for Windows.

The version of AT-TFTP Server installed on the remote host appears to be affected by a buffer overflow vulnerability involving a long filenames when getting or putting files. By leveraging this flaw, a remote attacker may be able to crash the remote service or to execute code on the affected host subject to the privileges under which the server operates.

Solution

Unknown at this time.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the AT-TFTP Server Filename Handling Remote Overflow vulnerability:

  1. Metasploit: exploit/windows/tftp/attftp_long_filename
    [Allied Telesyn TFTP Server 1.9 Long Filename Overflow]
  2. Exploit-DB: exploits/windows/remote/16350.rb
    [EDB-16350: Allied Telesyn TFTP (AT-TFTP) Server/Daemon 1.9 - Long Filename Overflow (Metasploit)]
  3. GitHub: https://github.com/shauntdergrigorian/cve-2006-6184
    [CVE-2006-6184: This is a python-based standalone exploit for CVE-2006-6184. This exploit triggers a ...]
  4. GitHub: https://github.com/b03902043/CVE-2006-6184
    [CVE-2006-6184: Simplified version of https://github.com/shauntdergrigorian/cve-2006-6184]

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:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)

Go back to menu.

Plugin Source


This is the at_tftpd_long_filename_overflow.nasl nessus plugin source code. This script is Copyright (C) 2006-2019 Tenable Network Security, Inc.

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


include("compat.inc");

if (description)
{
  script_id(23736);
  script_version("1.17");

  script_cve_id("CVE-2006-6184");
  script_bugtraq_id(21320);

  script_name(english:"AT-TFTP Server Filename Handling Remote Overflow");
  script_summary(english:"Checks for a buffer overflow vulnerability in AT-TFTP Server");

 script_set_attribute(attribute:"synopsis", value:
"The remote tftp server is affected by a buffer overflow vulnerability." );
 script_set_attribute(attribute:"description", value:
"The remote host appears to be running AT-TFTP Server, a tftpd server
for Windows. 

The version of AT-TFTP Server installed on the remote host appears to
be affected by a buffer overflow vulnerability involving a long
filenames when getting or putting files.  By leveraging this flaw, a
remote attacker may be able to crash the remote service or to execute
code on the affected host subject to the privileges under which the
server operates." );
 script_set_attribute(attribute:"see_also", value:"http://aluigi.altervista.org/adv/attftp-adv.txt" );
 script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/452743/30/0/threaded" );
 script_set_attribute(attribute:"solution", value:
"Unknown at this time." );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
 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:"exploit_framework_core", value:"true");
 script_set_attribute(attribute:"metasploit_name", value:'Allied Telesyn TFTP Server 1.9 Long Filename Overflow');
 script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
 script_set_attribute(attribute:"plugin_publication_date", value: "2006/11/28");
 script_set_attribute(attribute:"vuln_publication_date", value: "2006/11/26");
 script_cvs_date("Date: 2019/03/06 18:38:55");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_end_attributes();


  script_category(ACT_DENIAL);
  script_family(english:"Gain a shell remotely");
  script_copyright(english:"This script is Copyright (C) 2006-2019 Tenable Network Security, Inc.");
  script_dependencies("tftpd_detect.nasl");
  script_require_keys("Services/udp/tftp", "Settings/ParanoidReport");
  exit(0);
}


include("misc_func.inc");
include("global_settings.inc");


if (report_paranoia < 2)
  exit(0, "This script only runs in 'paranoid' mode.");


port = get_kb_item("Services/udp/tftp");
if (!port) port = 69;


function tftp_get(port, file, mode) {
  local_var data, filter, i, ip, req, res, sport, udp;

  if (isnull(port)) port = 69;
  if (isnull(mode)) mode = "netascii";
  if (isnull(file)) return NULL;

  req = raw_string(
    0x00, 0x01,                        # Get
    file, 0x00,                        # file
    mode, 0x00                         # as per specified mode
  );

  ip = forge_ip_packet(
    ip_hl:5, 
    ip_v:4, 
    ip_tos:0, 
    ip_len:20, 
    ip_id:rand(), 
    ip_off:0, 
    ip_ttl:64, 
    ip_p:IPPROTO_UDP,
    ip_src:compat::this_host()
  );
  sport = rand() % 64512 + 1024;		     
  udp = forge_udp_packet(
    ip:ip, 
    uh_sport:sport, 
    uh_dport:port, 
    uh_ulen:8 + strlen(req), 
    data:req
  );

  filter = 'udp and dst port ' + sport + ' and src host ' + get_host_ip() + ' and udp[8:1]=0x00';
  res = send_packet(
    udp, 
    pcap_active:TRUE, 
    pcap_filter:filter, 
    pcap_timeout:1
  );

  # If there's a result, return the data.
  if (res) {
    return get_udp_element(udp:res, element:"data");
  }
}


# If the server is up...
file = string(SCRIPT_NAME, "-", unixtime());
res = tftp_get(port:port, file:file);
if (!isnull(res)) {
  # Send the exploit.
  res = tftp_get(port:port, file:crap(227));

  # Test the server again.
  res = tftp_get(port:port, file:file);

  # There's a problem if we didn't get anything back.
  if (isnull(res)) security_hole(port:port, protocol:"udp");
}

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

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

Go back to menu.

How to Run


Here is how to run the AT-TFTP Server Filename Handling 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 Gain a shell remotely plugin family.
  6. On the right side table select AT-TFTP Server Filename Handling Remote Overflow plugin ID 23736.
  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 at_tftpd_long_filename_overflow.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - at_tftpd_long_filename_overflow.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 at_tftpd_long_filename_overflow.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 22122 - RHEL 4 : thunderbird (RHSA-2006:0611)
  • 22149 - RHEL 2.1 / 3 / 4 : libtiff (RHSA-2006:0603)
  • 22150 - RHEL 4 : seamonkey (RHSA-2006:0609)
  • 22151 - RHEL 2.1 / 3 / 4 : gnupg (RHSA-2006:0615)
  • 22202 - RHEL 2.1 : apache (RHSA-2006:0618)
  • 22213 - FreeBSD : mysql -- format string vulnerability (fcb90eb0-2ace-11db-a6e2-000e0c2e438a)
  • 22221 - RHEL 4 : kernel (RHSA-2006:0575)
  • 22224 - RHEL 3 / 4 : httpd (RHSA-2006:0619)
  • 22264 - RHEL 4 : kernel (RHSA-2006:0617)
  • 22291 - RHEL 2.1 : seamonkey (RHSA-2006:0594)
  • 22293 - RHEL 2.1 / 3 : kdegraphics (RHSA-2006:0648)
  • 22463 - RHEL 3 / 4 : squirrelmail (RHSA-2006:0668)
  • 22472 - RHEL 2.1 / 3 / 4 : openssl (RHSA-2006:0695)
  • 22524 - RHEL 2.1 : php (RHSA-2006:0708)
  • 22896 - RHEL 2.1 / 3 / 4 : kdelibs (RHSA-2006:0720)
  • 22940 - RHEL 2.1 / 3 / 4 : qt (RHSA-2006:0725)
  • 23631 - RHEL 2.1 / 3 / 4 : php (RHSA-2006:0730)
  • 23960 - RHEL 4 : firefox (RHSA-2006:0758)
  • 23966 - Ultimate PHP Board chat/login.php username Parameter Arbitrary Command Execution
  • 24315 - RHEL 4 : kernel (RHSA-2007:0014)
  • 24707 - RHEL 2.1 / 3 / 4 : seamonkey (RHSA-2007:0077)
  • 24708 - RHEL 4 : Firefox (RHSA-2007:0079)
  • 24774 - RHEL 4 : thunderbird (RHSA-2007:0078)
  • 24841 - GLSA-200703-16 : Apache JK Tomcat Connector: Remote execution of arbitrary code
  • 24897 - RHEL 4 / 5 : file (RHSA-2007:0124)
  • 24948 - RHEL 2.1 / 3 / 4 / 5 : krb5 (RHSA-2007:0095)
  • 24951 - RHEL 4 : mysql (RHSA-2007:0152)
  • 25067 - RHEL 2.1 : php (RHSA-2007:0154)
  • 25068 - RHEL 3 / 4 : php (RHSA-2007:0155)
  • 25133 - GLSA-200705-03 : Tomcat: Information disclosure
  • 25135 - RHEL 4 : unzip (RHSA-2007:0203)
  • 25143 - RHEL 4 : openssh (RHSA-2007:0257)
  • 25223 - CentOS 5 : tomcat (CESA-2007:0327)
  • 25239 - RHEL 2.1 / 3 / 4 / 5 : samba (RHSA-2007:0354)

Version


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

Go back to menu.