nuclei-templates/cloud/azure/virtualmachines/azure-vm-boot-diagnostics-n...

54 lines
1.8 KiB
YAML

id: azure-vm-boot-diagnostics-not-enabled
info:
name: Azure VM Boot Diagnostics Not Enabled
author: princechaddha
severity: medium
description: |
Ensure that Boot Diagnostics feature is enabled for your Azure virtual machines (VMs) in order to capture server serial console output and the operating system screenshots, required for diagnosing and troubleshooting VM startup issues.
impact: |
Disabling Boot Diagnostics may hinder effective troubleshooting and diagnosis of VM startup issues, potentially increasing the downtime of critical services.
remediation: |
Enable Boot Diagnostics for all your Azure VMs to facilitate effective troubleshooting and ensure quick recovery from startup-related issues.
reference:
- https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/boot-diagnostics
tags: cloud,devops,azure,microsoft,virtual-machines,azure-cloud-config
flow: |
code(1);
for (let VmData of iterate(template.vmList)) {
set("ids", VmData);
code(2);
}
self-contained: true
code:
- engine:
- sh
- bash
source: |
az vm list --query '[*].id'
extractors:
- type: json
name: vmList
internal: true
json:
- '.[]'
- engine:
- sh
- bash
source: |
az vm show --ids "$ids" --query '{"BootDiagnosticsStatus": diagnosticsProfile.bootDiagnostics.enabled}'
matchers-condition: and
matchers:
- type: word
words:
- '"BootDiagnosticsStatus": false'
extractors:
- type: dsl
dsl:
- 'ids + " does not have Boot Diagnostics enabled."'
# digest: 4a0a004730450220629472f02a80231235a09dfa380e407890864906cc7a1135f71b6026537e8248022100f6bcfd75d29454626fb2182616f0febae1e206f3046455a5ae60aa4e96b3f42a:922c64590222798bb761d5b6d8e72950