Hi Bimala Shrestha,
Below is a list of steps
If you are using MDE consider Immediately isolating the compromised VM from the network to prevent further lateral movement.
- Patch Vulnerabilities
Ensure that all high severity vulnerabilities on the VM are patched. This can be done by:
- Enable Network Security Groups (NSGs) - https://learn.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview
Configure NSGs to restrict inbound and outbound traffic to the VM. Only allow necessary traffic and block all other traffic.
- Implement Just-In-Time (JIT) VM Access - https://learn.microsoft.com/en-us/azure/defender-for-cloud/just-in-time-access-overview?tabs=defender-for-container-arch-aks
Use Azure Security Center to enable JIT VM access, which reduces exposure to attacks by allowing you to control the time window during which the VM can be accessed.
- Use Azure Defender
Enable Azure Defender for your VMs and storage accounts to provide advanced threat protection and security alerts.
- Review and Harden Storage Account Access
- Ensure that the storage account is not publicly accessible.
- Use Azure RBAC to grant the least privilege necessary.
- Enable Azure Storage firewalls and virtual networks to restrict access to the storage account.
- Monitor and Audit
- Use Azure Monitor and Azure Sentinel to continuously monitor for suspicious activities.
- Regularly review audit logs to detect any unauthorized access attempts.
- Implement Multi-Factor Authentication (MFA)
Ensure that MFA is enabled for all accounts that have access to the Azure environment.