Introduction
This post is for future me when I accidentally delete my VM or migrate it or forget to take snapshots. This can be helpful for others, so I'm making this public. Malware is one of my favorite hobbies. I used to collect it, and now I'm more used to dissect it and check it out.
Furthermore, I had to install a heavy game and took the tough and bold decision to delete my Windows malware lab. I had installed a lot of tools in there which I have forgotten as of now, at the time of writing. And most of the tools were installed by directly downloading their setup. This time we use scripts and the windows package manager, winget. It will keep things more in check and up to date.
Setup
I use VMware Workstation Pro for my VMs. I think It's smooth for me, you can use whatever you want: QEMU or VirtualBox. For the specific network adapter config, you might have to check with some other sources if you are deciding to follow along.
My VM has 8 gigs of RAM, 4 cores, 150 gigs of storage. Download the official Windows 11 ISO to follow along. Boot that thing up, and install windows the regular way.
Create a throwaway MS account just for the purpose of this lab, since windows disabled offline accounts recently.
Tools
We are all setup to install our tools of trade. I don't know what I will be installing right now, but when you probably read this, here is the list of all tools I want to install:
PE Bear
Ghidra
Binary Ninja Free
System Informer
Process Monitor
Regshot
HashMyFiles
Notepad++
Fakenet NG
Wireshark
ImHex
DnSpy
x64dbg
However, I could only find these in the winget repos:
winget install --id=hasherezade.PE-bear
winget install --id=WinsiderSS.SystemInformer
winget install --id=Microsoft.Sysinternals.ProcessMonitor
winget install --id=Notepad++.Notepad++
winget install --id=WiresharkFoundation.Wireshark
winget install --id=WerWolv.ImHex
winget install --id dnSpyEx.dnSpy
Run the above command in an unprivileged PowerShell, and it should be ok. It can be different at the time of your reading this, as winget is mostly community driven, like AUR. The following below still needs to be downloaded from their respective websites:
Network
You can now setup a linux box along with this, with a host only adapter connected to them both, and no internet access to the Windows box. Internet access can be provided to the linux box via a NAT adapter, that's what I do. VMware has guides about setting up networking that you can follow to learn more in depth about VM networking.
Though its optional, there are multiple benefits to run a linux aside:
Works as a C2 server of sorts
Can run wireshark and debug malware network activities
Metasploit?
Access virustotal and other cloud based stuff as it has internet
Has cool tools like binwalk and other things remnux offers
Distribution does not matter, but I prefer Parrot OS personally. It has the tools I need. You can also try Remnux. I am yet to try it though, I will likely use its containers for some upcoming labs.
Go to virtual network editor of VMware, make sure one of the adapters have all this setting. You can now connect this to both of the VMs, by going to VM settings > Add > Network adapter. Make sure to delete the existing NAT adapter in the windows VM when you are done downloading all your tools.
Make sure to select a custom adapter and plug in this VMne1 or whatever. At the end your parrot should look like this:
And the windows VM should look something like this:
Notice how the windows VM is missing the NAT. We keep it with parrot OS so that it can access the internet. Also now make sure you are able to ping the parrot VM ip from windows (just do "ip a" and there will be a new interface which denotes the new adapter.
The next step is to make windows think its internet is coming form the linux box. Its pretty simple:
Do win+R open ncpa.cpl.
Click on the interface and then the properties of ipv4.
Set a custom IP like any free IP in the same /24 as Parrot’s host‑only IP.
Subnet mask: 255.255.255.0
And set Default Gateway and DNS to your linux ip (same resolver for the host only adapter)
The above config basically says windows to request for all internet stuff from the parrot IP. Neat. Now you can do silly things like running a FakeNet on linux on the host only interface and it will respond to resolutions made by windows machine, PID wise. This is what it might look like:
I am not in the mood today to explain how to set this up. Look it up yourself.
Wireshark: All this nasty traffic from just logging into windows
Compilers & Runtime
If you want to get more into red teaming, malware and POCs to run and test around (for educational purposes) you would need a development environment too. I don't use VSCode directly because it may has MS telemetry in it, even tho I'm not connected to the internet the whole time I am still paranoid enough.
I landed on using VS Codium, the trimmed down version of VSCode which is free of all that. You don't want yourself to be flagged by copilot to not be in your best behaviour. Apart from that I use MSYS32, as it comes with the entire GCC toolchain I would need to make malware and test around with WIN32 APIs.
For dot net stuff, simply download Visual Studio or if you are paranoid simply setup dotnet with VSCodium; but that can be more work. I am yet to explore that path.
Final Tips
Take snapshot of the VM after this setup
You can make another copy of this VM using VMware and make it only for static stuff where you can access the internet and this VM might be for dynamic things etc. I do not do this for obvious lazy reasons.
Always store samples in password protected zips/partitions.

