Just a note for me for later as other blogs have been tending to disappear lately and so I don't get unduly excited when I see a nagios NRPE exploit/bug as there are a few obstacles to overcome.
Very detailed writeup for my summarized notes below:
Nagios NRPE has now had at least two separate issues.
for less than 2.14 there is a metasploit module:
for 2.15 and below there is a newer exploit that came out in April 2014 here:
as of 23 May 2014 this is unpatched.
stuff to remember on nagios:
Obstacle #1. You have to configure the host running the NRPE daemon to talk to a nagios server, your requests to try to exploit the client running NPRE must come from one of the hosted specfiically listed in the nrpe.config. The default is local host only. If you aren't on the list, the application will forcefully disconnect your connection. You can test this by telnetting to the host on 5666.
Obstacle #2. The NRPE daemon must be configured with the dont_blame_nrpe to 1. This is not the default setting. However, if people are using the daemon I've seen this set, otherwise I don't think anyone would be able to interact with it remotely, thus to use NRPE you have to enable it. Please correct me if i'm wrong.
Obstacle #3. You have to enable commands. However, it looks like pretty much any commands that take arguments is vulnerable.
If you can gain access to any server that is allowed to access the hosts running NRPE (typically the nagios monitoring servers) and you can run the various nrpe plugins you can potentially gain access to the monitored hosts.
As always if i'm way off or there are other tricks please let me know via twitter or here in the comments and i'll update the post.