SHOUTcast Server Filename Handling Format String - Nessus

High   Plugin ID: 16064

This page contains detailed information about the SHOUTcast Server Filename Handling Format String Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 16064
Name: SHOUTcast Server Filename Handling Format String
Filename: shoutcast_fmt_string.nasl
Vulnerability Published: 2004-12-23
This Plugin Published: 2004-12-28
Last Modification Time: 2021-01-19
Plugin Version: 1.21
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: http_version.nasl

Vulnerability Information


Severity: High
Vulnerability Published: 2004-12-23
Patch Published: N/A
CVE [?]: CVE-2004-1373
CPE [?]: cpe:/a:nullsoft:shoutcast_server

Synopsis

The remote streaming audio server is vulnerable to a format string attack.

Description

According to its banner, the version of SHOUTcast Server installed on the remote host is earlier than 1.9.5. Such versions fail to validate requests containing format string specifiers before using them in a call to 'sprintf()'. An unauthenticated, remote attacker may be able to exploit this issue to execute arbitrary code on the remote host.

Solution

Upgrade to SHOUTcast 1.9.5 or later.

Public Exploits


Target Network Port(s): 8000
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, Immunity Canvas)
Exploit Ease: No exploit is required

Here's the list of publicly known exploits and PoCs for verifying the SHOUTcast Server Filename Handling Format String vulnerability:

  1. Metasploit: exploit/windows/http/shoutcast_format
    [SHOUTcast DNAS/win32 1.9.4 File Request Format String Overflow]
  2. Exploit-DB: exploits/windows_x86/remote/16751.rb
    [EDB-16751: SHOUTcast DNAS/Win32 1.9.4 - File Request Format String Overflow (Metasploit)]
  3. Immunity Canvas: CANVAS

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)

Go back to menu.

Plugin Source


This is the shoutcast_fmt_string.nasl nessus plugin source code. This script is Copyright (C) 2004-2021 Tenable Network Security, Inc.

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

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

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

 script_cve_id("CVE-2004-1373");
 script_bugtraq_id(12096);

 script_name(english:"SHOUTcast Server Filename Handling Format String");
 script_summary(english:"SHOUTcast version check");

 script_set_attribute(attribute:"synopsis", value:
"The remote streaming audio server is vulnerable to a format string
attack.");
 script_set_attribute(attribute:"description", value:
"According to its banner, the version of SHOUTcast Server installed on
the remote host is earlier than 1.9.5.  Such versions fail to validate
requests containing format string specifiers before using them in a call
to 'sprintf()'.  An unauthenticated, remote attacker may be able to
exploit this issue to execute arbitrary code on the remote host." );
 script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2004/Dec/363");
 script_set_attribute(attribute:"solution", value:"Upgrade to SHOUTcast 1.9.5 or later.");
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
 script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
 script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
 script_set_attribute(attribute:"exploit_available", value:"false");
 script_set_attribute(attribute:"metasploit_name", value:'SHOUTcast DNAS/win32 1.9.4 File Request Format String Overflow');
 script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
 script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
 script_set_attribute(attribute:"canvas_package", value:'CANVAS');

 script_set_attribute(attribute:"vuln_publication_date", value:"2004/12/23");
 script_set_attribute(attribute:"plugin_publication_date", value:"2004/12/28");

 script_set_attribute(attribute:"plugin_type", value:"remote");
 script_set_attribute(attribute:"cpe", value:"cpe:/a:nullsoft:shoutcast_server");
 script_end_attributes();

 script_category(ACT_GATHER_INFO);

 script_copyright(english:"This script is Copyright (C) 2004-2021 Tenable Network Security, Inc.");
 script_family(english:"CGI abuses");

 script_dependencie("http_version.nasl");
 script_require_ports("Services/www", 8000);
 exit(0);
}

#
# The script code starts here
#

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

req = 'GET /content/' + rand_str(length:10) + '.mp3 HTTP/1.0\r\n\r\n';

port = get_http_port(default: 8000);

w = http_send_recv_buf(port:port, data:req);
if (isnull(w)) exit(1, "The web server on port "+port+" did not answer");
banner = strcat(w[0], w[1], '\r\n', w[2]);

if (egrep(pattern:"SHOUTcast Distributed Network Audio Server.*v(0\.|1\.[0-8]\.|1\.9\.[0-4][^0-9])", string:banner) )
  {
   security_hole(port);
   exit(0);
  }

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/shoutcast_fmt_string.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\shoutcast_fmt_string.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/shoutcast_fmt_string.nasl

Go back to menu.

How to Run


Here is how to run the SHOUTcast Server Filename Handling Format String as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select SHOUTcast Server Filename Handling Format String plugin ID 16064.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl shoutcast_fmt_string.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a shoutcast_fmt_string.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - shoutcast_fmt_string.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state shoutcast_fmt_string.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 16395 - GLSA-200501-04 : Shoutcast Server: Remote code execution
  • 31732 - McAfee Common Management Agent < 3.6.0.595 UDP Packet Handling Format String
  • 20343 - Webmin 'miniserv.pl' 'username' Parameter Format String
  • 30106 - AXIGEN Mail Server AXIMilter CNHO Command Remote Format String
  • 12086 - DreamFTP Server username Remote Format String
  • 18974 - FreeBSD : gld -- format string and buffer overflow vulnerabilities (6c2d4f29-af3e-11d9-837d-000e0c2e438a)
  • 57739 - FreeBSD : sudo -- format string vulnerability (7c920bb7-4b5f-11e1-9f47-00e0815b8da8)
  • 21504 - FreeBSD : perl, webmin, usermin -- perl format string integer wrap vulnerability (bb33981a-7ac6-11da-bf72-00123f589060)
  • 22213 - FreeBSD : mysql -- format string vulnerability (fcb90eb0-2ace-11db-a6e2-000e0c2e438a)
  • 18530 - GLSA-200506-15 : PeerCast: Format string vulnerability
  • 20281 - GLSA-200512-02 : Webmin, Usermin: Format string vulnerability
  • 16265 - Berlios gpsd gpsd_report() Function Format String
  • 10522 - LPRng use_syslog() Remote Format String Arbitrary Command Execution
  • 17839 - OpenSSH < 2.1.1p3 Format String Privilege Escalation
  • 18417 - PeerCast URL Error Message Format String
  • 31642 - VLC Media Player network/httpd.c httpd_FileCallBack Function Connection Parameter Format String
  • 63075 - VMware OVF Tool 2.1 File Handling Format String Vulnerability (VMSA-2012-0015)
  • 10452 - WU-FTPD site_exec() Function Remote Format String

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file shoutcast_fmt_string.nasl version 1.21. For more plugins, visit the Nessus Plugin Library.

Go back to menu.