Azure VM Command Execution Using Third-Party Chef Extensions#329
Open
carlospolop wants to merge 1 commit into
Open
Azure VM Command Execution Using Third-Party Chef Extensions#329carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://netspi.com/blog/technical-blog/cloud-pentesting/azure-vm-command-execution-using-third-party-extensions Content Categories: Based on the analysis, this content was categorized under "Pentesting Cloud > Azure Pentesting > Az - Privilege Escalation > Az - Virtual Machines & Network Privesc, with a cross-reference from Az - Services > Az - Virtual Machines & Network and Az - Post Exploitation > Az - VMs & Network Post Exploitation". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Overview
The post demonstrates how an Azure principal with
Microsoft.Compute/virtualMachines/extensions/writecan turn legitimate third-party VM-extension administration into arbitrary privileged command execution on an Azure Windows or Linux VM. The attacker deploys the marketplace Chef extension, redirects it to an attacker-controlled Chef server, and selects a malicious cookbook through the extension's run list. The Azure VM Agent installs and runs the extension, after...🔧 Technical Details
Convert Azure extension-management permission into guest command execution: A cloud identity with
Microsoft.Compute/virtualMachines/extensions/writecan deploy or reconfigure software inside an Azure VM without knowing the guest's SSH, RDP, or local credentials. Configuration-management extensions are especially useful for this because the Azure VM Agent runs them in a privileged context and they are designed to make operating-system changes. This pattern applies to any extension that accepts attacker-controlled scripts, commands, policy sources, packages, or management-server settings.Redirect a trusted configuration-management client to a rogue server: If a VM extension allows its management-server URL and desired policy to be specified from the cloud control plane, set the server URL to attacker-controlled infrastructure and select a malicious policy. With Chef, set
bootstrap_options.chef_server_urlto the rogue C...🤖 Agent Actions
Updated
src/pentesting-cloud/azure-security/az-privilege-escalation/az-virtual-machines-and-network-privesc.md.Added:
executerecipe exampleVerification:
mdbook build, butmdbookis not installed in this environmentThis PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.