Lucene search

K
nessusThis script is Copyright (C) 1999-2018 Tenable Network Security, Inc.CMAIL_OVERFLOW.NASL
HistoryOct 29, 1999 - 12:00 a.m.

CMail MAIL FROM Command Remote Overflow

1999-10-2900:00:00
This script is Copyright (C) 1999-2018 Tenable Network Security, Inc.
www.tenable.com
30

10 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

0.064 Low

EPSS

Percentile

93.7%

The remote host appears to be running a vulnerable version of CMail.
Issuing a long argument to the ‘MAIL FROM’ command can result in a buffer overflow. An attack would look something similar to :

MAIL FROM: AAA[…][email protected]

Where AAA[…]AAA contains more than 8000 'A’s.

A remote attacker could exploit this issue to crash the mail server, or possibly to execute arbitrary code.

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

include("compat.inc");

if (description)
{
 script_id(10047);
 script_version("1.46");
 script_cvs_date("Date: 2018/11/15 20:50:24");

 script_cve_id("CVE-1999-1521");
 script_bugtraq_id(633);

 script_name(english:"CMail MAIL FROM Command Remote Overflow");
 script_summary(english:"Overflows a buffer in the remote mail server");

 script_set_attribute(attribute:"synopsis", value:"The remote mail server has a buffer overflow vulnerability.");
 script_set_attribute(attribute:"description", value:
"The remote host appears to be running a vulnerable version of CMail.
Issuing a long argument to the 'MAIL FROM' command can result in a
buffer overflow. An attack would look something similar to :

 MAIL FROM: AAA[...][email protected]

Where AAA[...]AAA contains more than 8000 'A's.

A remote attacker could exploit this issue to crash the mail server,
or possibly to execute arbitrary code.");
 script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/1999/Oct/297");
 script_set_attribute(attribute:"see_also", value:"https://marc.info/?l=bugtraq&m=93720402717560&w=2");
 script_set_attribute(attribute:"solution", value:"Contact the vendor for a fix.");
 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:POC/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:"vuln_publication_date", value:"1999/05/26");
 script_set_attribute(attribute:"plugin_publication_date", value:"1999/10/29");

 script_set_attribute(attribute:"potential_vulnerability", value:"true");
 script_set_attribute(attribute:"plugin_type", value:"remote");
 script_end_attributes();

 script_category(ACT_MIXED_ATTACK); # mixed
 script_family(english:"SMTP problems");

 script_copyright(english:"This script is Copyright (C) 1999-2018 Tenable Network Security, Inc.");

 script_dependencie("find_service1.nasl", "smtpserver_detect.nasl", "tfs_smtp_overflow.nasl");
 script_require_keys("Settings/ParanoidReport");
 script_require_ports("Services/smtp", 25);

 exit(0);
}

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

if (report_paranoia < 2) audit(AUDIT_PARANOID);

port = get_service(svc:"smtp", default: 25, exit_on_fail: 1);
if (get_kb_item('SMTP/'+port+'/broken'))
  exit(1, "MTA on port "+port+" is broken.");

if(safe_checks())
{
 banner = get_smtp_banner(port:port);

  if(banner)
  {
  if(egrep(pattern:"CMail Server Version: 2\.[0-4]",
  	  string:banner))
	  {
	   alrt  =
"Nessus reports this vulnerability using only information that was
gathered. Use caution when testing without safe checks enabled.";

	  security_hole(port:port, extra:alrt);
	  }
  }
  exit(0);
 }



 key = get_kb_item(string("SMTP/", port, "/mail_from_overflow"));
 if(key)exit(0);
 soc = open_sock_tcp(port);
if (! soc) exit(1);

 data = smtp_recv_banner(socket:soc);
 crp = string("HELO example.com\r\n");
 send(socket:soc, data:crp);
 data = recv_line(socket:soc, length:1024);
 if("250 " >< data)
 {
 crp = string("MAIL FROM: ", crap(8000), "@", get_host_name(), "\r\n");
 send(socket:soc, data:crp);
 buf = recv_line(socket:soc, length:1024);
 if(!buf){
  close(soc);
  soc = open_sock_tcp(port);
  if(soc) s = smtp_recv_banner(socket:soc);
  else s = NULL;

  if(!s) security_hole(port);
  }
 }
 close(soc);

10 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

0.064 Low

EPSS

Percentile

93.7%

Related for CMAIL_OVERFLOW.NASL