githubEdit

Exploiting privileged VM resources

Tools: Lava

Requirements: Contributor account/role access

Steps

1) Run Lava

python3 Lava.py 

2) Confirm authenticated user

Lava $> whoami 

3) List all modules

Lava $> ls 

4) Execute this specific module to list privileged VMs

Lava $> exec vm_list_privileged 

5) Exploit the Run Command functionality as a Contributor

Lava $> exec vm_rce -rgrp RESOURCE_GROUP -vm_name PRIVILEGED_VM 

6) In the shell, obtain an access token for the resource manager that can be used to make API calls with the owner privileges

7) Copy the "access_token" value, then press exit to return to the Lava console, then exit again.

Use the token to run commands against the resource manager with the owner privilege.

8) Store the access token as a variable

9) Get a list of subscriptions

10) Store the subscriptions ID in a variable

11) Get a list of resource groups

12) Get a list of resources

Now we escalated from the Contributor role to the Owner role.

Last updated