Rapid7 Vulnerability & Exploit Database

Juju-run Agent Privilege Escalation

Back to Search

Juju-run Agent Privilege Escalation

Disclosed
04/13/2017
Created
06/14/2018

Description

This module attempts to gain root privileges on Juju agent systems running the juju-run agent utility. Juju agent systems running agent tools prior to version 1.25.12, 2.0.x before 2.0.4, and 2.1.x before 2.1.3, provide a UNIX domain socket to manage software ("units") without setting appropriate permissions, allowing unprivileged local users to execute arbitrary commands as root. This module has been tested successfully with Juju agent tools versions 1.18.4, 1.25.5 and 1.25.9 on Ubuntu 14.04.1 LTS x86 deployed by Juju 1.18.1-trusty-amd64 and 1.25.6-trusty-amd64 on Ubuntu 14.04.1 LTS x86_64.

Author(s)

  • Ryan Beisner
  • David Ames ( <David Ames (@thedac)>
  • bcoles <bcoles@gmail.com>

Platform

Linux

Architectures

x86, x64

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/local/juju_run_agent_priv_esc
msf exploit(juju_run_agent_priv_esc) > show targets
    ...targets...
msf exploit(juju_run_agent_priv_esc) > set TARGET < target-id >
msf exploit(juju_run_agent_priv_esc) > show options
    ...show and set options...
msf exploit(juju_run_agent_priv_esc) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;