Vulnerabilities > CVE-2013-0230 - Buffer Errors vulnerability in Miniupnp Project Miniupnpd 1.0

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
miniupnp-project
CWE-119
critical
nessus
exploit available
metasploit

Summary

Stack-based buffer overflow in the ExecuteSoapAction function in the SOAPAction handler in the HTTP service in MiniUPnP MiniUPnPd 1.0 allows remote attackers to execute arbitrary code via a long quoted method.

Vulnerable Configurations

Part Description Count
Application
Miniupnp_Project
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Exploit-Db

  • descriptionINFOMARK IMW-C920W miniupnpd 1.0 - Denial of Service. CVE-2013-0229,CVE-2013-0230. Dos exploit for hardware platform
    idEDB-ID:37517
    last seen2016-02-04
    modified2015-07-07
    published2015-07-07
    reporterTodor Donev
    sourcehttps://www.exploit-db.com/download/37517/
    titleINFOMARK IMW-C920W miniupnpd 1.0 - Denial of Service
  • descriptionMiniUPnPd 1.0 - Stack Overflow RCE for AirTies RT Series (MIPS). CVE-2013-0230. Remote exploits for multiple platform
    fileexploits/multiple/remote/36839.py
    idEDB-ID:36839
    last seen2016-02-04
    modified2015-04-27
    platformmultiple
    port
    published2015-04-27
    reporterOnur Alanbel (BGA)
    sourcehttps://www.exploit-db.com/download/36839/
    titleMiniUPnPd 1.0 - Stack Overflow RCE for AirTies RT Series MIPS
    typeremote
  • descriptionMiniUPnPd 1.0 - Stack Buffer Overflow Remote Code Execution. CVE-2013-0230. Remote exploit for linux platform
    idEDB-ID:25975
    last seen2016-02-03
    modified2013-06-05
    published2013-06-05
    reportermetasploit
    sourcehttps://www.exploit-db.com/download/25975/
    titleMiniUPnPd 1.0 - Stack Buffer Overflow Remote Code Execution

Metasploit

Nessus

NASL familyGain a shell remotely
NASL idMINIUPNPD_1_4.NASL
descriptionAccording to its banner, the version of MiniUPnP running on the remote host is prior to 1.4. It is, therefore, affected by the following vulnerabilities : - An out-of-bounds read error exists in the ProcessSSDPRequest() function in file minissdp.c that allows an unauthenticated, remote attacker to cause a denial of service condition via a specially crafted M-SEARCH request. (CVE-2013-0229) - A stack-based buffer overflow condition exists in the ExecuteSoapAction() function in the SOAPAction handler, due to improper validation of user-supplied input. An unauthenticated, remote attacker can exploit this, via a long quoted method, to cause a denial of service condition or the execution of arbitrary code. (CVE-2013-0230)
last seen2020-06-01
modified2020-06-02
plugin id64377
published2013-01-31
reporterThis script is Copyright (C) 2013-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/64377
titleMiniUPnP < 1.4 Multiple Vulnerabilities
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(64377);
  script_version("1.13");
  script_cvs_date("Date: 2018/11/15 20:50:22");

  script_cve_id("CVE-2013-0229", "CVE-2013-0230");
  script_bugtraq_id(57607, 57608);
  script_xref(name:"EDB-ID", value:"25975");
  script_xref(name:"EDB-ID", value:"36839");
  script_xref(name:"EDB-ID", value:"37517");

  script_name(english:"MiniUPnP < 1.4 Multiple Vulnerabilities");
  script_summary(english:"Checks the miniupnp version.");

  script_set_attribute(attribute:"synopsis", value:
"A network service running on the remote host has multiple
vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"According to its banner, the version of MiniUPnP running on the remote
host is prior to 1.4. It is, therefore, affected by the following
vulnerabilities :

  - An out-of-bounds read error exists in the
    ProcessSSDPRequest() function in file minissdp.c that
    allows an unauthenticated, remote attacker to cause a
    denial of service condition via a specially crafted
    M-SEARCH request. (CVE-2013-0229)

  - A stack-based buffer overflow condition exists in the
    ExecuteSoapAction() function in the SOAPAction handler,
    due to improper validation of user-supplied input. An
    unauthenticated, remote attacker can exploit this, via a
    long quoted method, to cause a denial of service
    condition or the execution of arbitrary code.
    (CVE-2013-0230)");
  # https://blog.rapid7.com/2013/01/29/security-flaws-in-universal-plug-and-play-unplug-dont-play/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?46d66d2f");
  script_set_attribute(attribute:"see_also", value:"https://help.rapid7.com/?community");
  # https://help.rapid7.com/?community
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?d381943f");
  script_set_attribute(attribute:"solution", value:
"Upgrade to MiniUPnP version 1.4 or later.");
  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:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'MiniUPnPd 1.0 Stack Buffer Overflow Remote Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2009/05/16");
  script_set_attribute(attribute:"patch_publication_date", value:"2009/10/30"); # miniupnpd 1.4 released
  script_set_attribute(attribute:"plugin_publication_date", value:"2013/01/31");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:miniupnp_project:miniupnpd");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Gain a shell remotely");

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

  script_dependencies("upnp_search.nasl", "http_version.nasl");
  script_require_ports("upnp/server", "Services/www");

  exit(0);
}

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

global_var fix, vuln;
fix = '1.4';
vuln = FALSE;

##
# Checks if the given server banner is from a vulnerable
# version of miniupnpd.  If so, a reporting function is
# called
#
# @param port port number of the service being tested
# @param server server banner advertised on "port"
# @param proto the protocol the port is accessible by (tcp or udp)
##
function _check_miniupnp_version(port, server, proto)
{
  local_var ver, report, banner;
  server = chomp(server);
  ver = eregmatch(string:server, pattern:'miniupnpd/([0-9.]+)', icase:TRUE);

  if (!isnull(ver) && ver_compare(ver:ver[1], fix:fix, strict:FALSE) < 0)
  {
    vuln = TRUE;

    banner = ereg_replace(string:server, pattern:'SERVER: *(.+)', replace:"\1", icase:TRUE);
    report =
      '\n  Server banner : ' + banner +
      '\n  Installed version : ' + ver[1] +
      '\n  Fixed version : ' + fix + '\n';

    security_report_v4(port:port,
                       proto:proto,
                       severity:SECURITY_HOLE,
                       extra:report);
  }
}

# check the server string retrieved via UDP 1900 by upnp_search.nasl
servers = get_kb_list('upnp/server');
foreach(server in servers) _check_miniupnp_version(port:1900, server:server, proto:'udp');

# check any server strings retrieved via HTTP
www_ports = get_kb_list('Services/www');

foreach port (www_ports)
{
  server = http_server_header(port:port);
  if (isnull(server)) continue;

  _check_miniupnp_version(port:port, server:server, proto:'tcp');
}

if (!vuln)
  audit(AUDIT_HOST_NOT, 'affected');

Packetstorm

The Hacker News

idTHN:E067CA1FBC7C95B306C9F3F8A9615CEA
last seen2017-01-08
modified2013-01-29
published2013-01-29
reporterMohit Kumar
sourcehttp://thehackernews.com/2013/01/security-flaws-in-upnp-protocol-put-50.html
titleSecurity Flaws in UPnP protocol put 50 million devices at risk