OS Command Injection in Infoblox NetMRI Products - CVE-2014-3418 + CVE-2014-3419

Posted by Nate Kettlewell on July 09, 2014 Link 

While performing an internal security assessment for a client, I discovered an OS command injection vulnerability in an Infoblox NetMRI appliance. This was totally by accident, just going about our regular testing of web applications. I stumbled across the following page and used a proxy to submit values to the "Username" and "Password" fields of the application.

Infoblox-login.png#asset:353:urlInfoblox Login Page

Part of our testing includes that for blind command injection, in which the 'ping -n 20' command is sent in place of every GET or POST variable, as well as some HTTP headers.

Picture1.png#asset:354:urlInjecting a command to ping localhost 20 times

When command injection is present, the HTTP response to the above will be delayed while 20 pings are sent to localhost. In this case the response took 22 seconds. The next command injected the same ping, but substituted with my internal IP address.

injection-self.png#asset:355:urlInjecting command to ping my attack workstationI then started a tcpdump session to listen for pings from the target IP address. When we received them it proved that the command injection was genuine. success.png#asset:356:url

Ordinarily, I would have spent the next bit of time interrogating the target, determining what user I was running as, group membership, etc. But, in this particular instance, I tried adding a user, and setting a password. If the web server was running as any user other than root this would fail.

USeradd.png#asset:357:urlInjecting a "useradd" commandSetpass.png#asset:358:urlSetting a Password

I then attempted to connect via SSH with my newly created username and password, to my surprise I was given a shell.


My next step was adding my user to the wheel group, so I could use sudo. I simply injected a usermod command to accomplish that.

groupadd.png#asset:360:urlAdding the user account to the "wheel" group.

After my user was a member of the wheel group, I used sudo to get a root shell.pwn.png#asset:361:urlroot shell.

After getting a root shell, I went poking around discovering that the underlying OS is Fedora Core. But I also discovered a local mysql database instance. I was able to connect to this with the username "root" and a password of "root" And that weak set of credentials represents CVE-2014-3419, however this is only possible if you have a shell on the appliance already.

After getting this far, in less than 24 hours I had a crash course in ruby and wrote a metasploit module. The module was tested against NetMRI


Infoblox immediately released a hotfix on 5/16/2014 to remediate this vulnerability on existing installations, (v6.X-NETMRI-20710.gpg).

The flaw was corrected in the 6.8.5 release (created expressly for dealing with this issue), and that release has been put into manufacturing for new appliances.

Have Questions?
Get Answers