LPRng use_syslog() Remote Format String Arbitrary Command Execution - Nessus

Critical   Plugin ID: 10522

This page contains detailed information about the LPRng use_syslog() Remote Format String Arbitrary Command Execution Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 10522
Name: LPRng use_syslog() Remote Format String Arbitrary Command Execution
Filename: LPRng.nasl
Vulnerability Published: 2000-09-25
This Plugin Published: 2000-10-01
Last Modification Time: 2022-04-11
Plugin Version: 1.32
Plugin Type: remote
Plugin Family: Gain a shell remotely
Dependencies: find_service1.nasl
Required KB Items [?]: Settings/ParanoidReport

Vulnerability Information


Severity: Critical
Vulnerability Published: 2000-09-25
Patch Published: N/A
CVE [?]: CVE-2000-0917
CPE [?]: cpe:/a:caldera:openlinux_ebuilder

Synopsis

The remote print service is affected by format string vulnerabilities.

Description

LPRng seems to be running on this port.

Versions of LPRng prior to 3.6.24 are missing format string arguments in at least two calls to 'syslog()' that handle user-supplied input.

Using specially crafted input with format strings, an unauthenticated, remote attacker may be able to leverage these issues to execute arbitrary code subject to the privileges under which the service operates, typically 'root'.

Note that Nessus has not determined that the remote installation of LPRng is vulnerable, only that it is listening on this port.

Solution

Upgrade, if necessary, to LPRng version 3.6.25.

Public Exploits


Target Network Port(s): 515
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the LPRng use_syslog() Remote Format String Arbitrary Command Execution vulnerability:

  1. Metasploit: exploit/linux/misc/lprng_format_string
    [LPRng use_syslog Remote Format String Vulnerability]
  2. Exploit-DB: exploits/linux/remote/16842.rb
    [EDB-16842: LPRng - use_syslog Remote Format String (Metasploit)]
  3. GitHub: https://github.com/LEXUEYE/oinkmaster
    [CVE-2000-0917]

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:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)

Go back to menu.

Plugin Source


This is the LPRng.nasl nessus plugin source code. This script is Copyright (C) 2000-2022 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(10522);
  script_version("1.32");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2000-0917");
  script_bugtraq_id(1712);
  script_xref(name:"CERT", value:"382365");

  script_name(english:"LPRng use_syslog() Remote Format String Arbitrary Command Execution");

  script_set_attribute(attribute:"synopsis", value:
"The remote print service is affected by format string vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"LPRng seems to be running on this port.

Versions of LPRng prior to 3.6.24 are missing format string arguments
in at least two calls to 'syslog()' that handle user-supplied input.

Using specially crafted input with format strings, an unauthenticated,
remote attacker may be able to leverage these issues to execute
arbitrary code subject to the privileges under which the service
operates, typically 'root'.

Note that Nessus has not determined that the remote installation of
LPRng is vulnerable, only that it is listening on this port.");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2000/Sep/432");
  script_set_attribute(attribute:"solution", value:
"Upgrade, if necessary, to LPRng version 3.6.25.");
  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_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'LPRng use_syslog Remote Format String Vulnerability');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2000/09/25");
  script_set_attribute(attribute:"plugin_publication_date", value:"2000/10/01");

  script_set_attribute(attribute:"potential_vulnerability", value:"true");
  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:caldera:openlinux_ebuilder");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

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

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

  script_dependencies("find_service1.nasl");
  script_require_keys("Settings/ParanoidReport");
  script_require_ports(515);

  exit(0);
}


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

if (report_paranoia < 2) audit(AUDIT_PARANOID);

if (get_port_state(515))
{
soc = open_sock_tcp(515);
if(soc)
{
 snd = raw_string(9)+ string("lp") + raw_string(0x0A);

 send(socket:soc, data:snd);
 r = recv(socket:soc, length:1024);
 if("SPOOLCONTROL" >< r)
 {
  security_hole(515);
 }
}
}

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

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

Go back to menu.

How to Run


Here is how to run the LPRng use_syslog() Remote Format String Arbitrary Command Execution 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 Gain a shell remotely plugin family.
  6. On the right side table select LPRng use_syslog() Remote Format String Arbitrary Command Execution plugin ID 10522.
  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 LPRng.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - LPRng.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 LPRng.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CERT | Computer Emergency Response Team: See also: Similar and related Nessus plugins:
  • 53641 - HP Data Protector Remote Command Execution
  • 11023 - Linux lpd DVI Print Filter (dvips) Remote Command Execution
  • 11841 - Solaris sadmind AUTH_SYS Credential Remote Command Execution
  • 11513 - Solaris in.lpd Crafted Job Request Arbitrary Remote Command Execution
  • 21673 - SpamAssassin spamd Crafted Message Arbitrary Command Execution
  • 35308 - TCL Shell (tclsh) Arbitrary Command Execution
  • 10709 - BSD Based telnetd telrcv Function Remote Command Execution
  • 31419 - Versant Connection Services Daemon Arbitrary Command Execution
  • 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
  • 31732 - McAfee Common Management Agent < 3.6.0.595 UDP Packet Handling Format String
  • 17839 - OpenSSH < 2.1.1p3 Format String Privilege Escalation
  • 18417 - PeerCast URL Error Message Format String
  • 16064 - SHOUTcast Server Filename Handling 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)
  • 20343 - Webmin 'miniserv.pl' 'username' Parameter Format String
  • 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 LPRng.nasl version 1.32. For more plugins, visit the Nessus Plugin Library.

Go back to menu.