Attacks and Exploits
A tester has a shell on an Azure VM with a system-assigned managed identity. No keys, passwords or secrets were found. Which vendor command authenticates to Azure as that identity?
Show the answer
Correct answerA. az login --identity
AWhy this is right: az login --identity requests a token for the VM's managed identity, so it needs no stored secret.
BWhy not this: This Azure PowerShell form needs a username and password, which the tester does not have.
CWhy not this: aws configure stores AWS access keys and does nothing for an Azure managed identity.
DWhy not this: Service principal login needs a client secret or certificate, which the tester has not found.
The --identity switch of az login uses the VM's managed identity, so no stored secret is needed. Service principal login needs a client secret or certificate, and Connect-AzAccount -Credential needs a username and password, which the tester does not have.