Hi Oscar,
Any malware or well known exploit tools that are uploaded to Azure - even for academic purposes - can, and likely will, get your Azure instance shut down, and it's a difficult procedure to get it back enabled.
I speak from personal experience - I took a security related course and made the mistake of downloading some commonly used exploit tools to a windows VM in Azure. Within the same week of the training my Azure instance had been shut down by Microsoft.
I'm not sure of any ways around this, aside from storing the malware outside of the cloud, like your own home workstation/VM and having your solution use that server at the 'sandbox' for your project.
Perhaps you could argue that it's an extension of the cloud by installing Azure Arc and Defender for endpoint.