Scalable Snapshot Management in the Cloud for Windows and Linux Systems: Best Practices for Data Security and Forensics
Background: During a cybersecurity incident in the cloud, one of the mandatory steps is to take a snapshot of the machine that contains the threat, isolate it, and preserve the snapshot or filesystem for further analysis. When working in the cloud, especially in environments with a large blast radius, automation tools are essential to efficiently capture snapshots and prepare for forensic action. In this article, we will provide a step-by-step guide, using an example on the Azure platform, to address this challenge.
Steps
- Register an app in Entra ID to enable access to the Azure API.
- Move the newly created Entra app to the ROOT management level, which will provide the capability to work with all Azure subscriptions.
- Assign the necessary roles to the application.
- Implement Azure Oauth function to get the Bearer token for call

- On next step implement universal function to make request and response based on arguments

Import oauth token get function and then implement function which will make call to Azure snapshot taking interface and result will be ready

Conclusion This script was created quickly without spending a lot of time. However, for your convenience, you can input a list of values into the Python script, which will then export the snapshot to Blob storage or any remote location.
Happy Hunitng, J0k3r
