[Plugins-writers] MailGust Plugin

From: Ferdy Riphagen (f.riphagen@private)
Date: Mon Oct 03 2005 - 10:28:08 PDT


Attached a simple plugin for the recently discovered vulnerability in
MailGust.
For testing and review

Tested on mailgust 1.9 and 2.0_pre_4b

Regards,

Ferdy


#
# Script Written By Ferdy Riphagen (GPL)
# <f.riphagen@private>
#

if (description) {
script_id(200001);
script_version("$Revision: 1.2 $");

script_cve_id("CAN-2005-3063");
script_bugtraq_id(14933);

name["english"] = "MailGust SQL Injection Vulnerability";
script_name(english:name["english"]);

desc["english"] = "
Description :
The remote host appears to be running MailGust.
MailGust is a Mailing List Manager, Newsletter Distribution Tool and a Message Board.

A vulnerability was identified in MailGust, which may be exploited by remote attackers to execute arbitrary SQL commands.

See also :
http://www.securityfocus.com/archive/1/411586
http://rgod.altervista.org/maildisgust.html

Solution :
No patch available this time.

Risk factor :
High";
script_description(english:desc["english"]);

summary["english"] = "Check if MailGust is vulnerable to SQL Injection.";
script_summary(english:summary["english"]);

script_category(ACT_ATTACK);
script_family(english:"CGI abuses");

script_copyright(english:"This script is Copyright (C) 2005 Ferdy Riphagen");

script_dependencie("find_service.nes", "no404.nasl");
script_require_ports("Services/www", 80);

exit(0);
}

include("http_func.inc");
include("http_keepalive.inc");

port = get_http_port(default:80);
if (!get_port_state(port)) exit(0);
if (!can_host_php(port:port)) exit(0);

url = make_list("/mailgust","/mailgust_1_9","/","/forum","/maillist","/gust");

foreach dir (url)
{
 req = string(
 "POST ",dir,"/index.php HTTP/1.0\r\n",
 "Content-Length: 64\r\n",
 "Content-Type: application/x-www-form-urlencoded\r\n\r\n",
 "method=remind_password&list=maillistuser&email='&showAvatar=\r\n\r\n");

 recv = http_keepalive_send_recv(port:port, data:req, bodyonly:1);
 if(recv == NULL)exit(0);
 display(recv);

 if(egrep(pattern: "SELECT.*FROM.*WHERE", string:recv))
 {
  security_hole(port);
  exit(0);
 }
}

_______________________________________________
Plugins-writers mailing list
Plugins-writers@private
http://mail.nessus.org/mailman/listinfo/plugins-writers



This archive was generated by hypermail 2.1.3 : Mon Oct 03 2005 - 11:11:54 PDT