Skip to content

Instantly share code, notes, and snippets.

@kyhwana
Last active February 28, 2020 03:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyhwana/9f70a992cd9c256b82edc8a658777936 to your computer and use it in GitHub Desktop.
Save kyhwana/9f70a992cd9c256b82edc8a658777936 to your computer and use it in GitHub Desktop.
Ghidra Windows 1903+ sandbox
This assumes that you're running Windows 10 Pro/Enterprise 1903 or newer and have enabled the Windows Sandbox. See https://techcommunity.microsoft.com/t5/Windows-Kernel-Internals/Windows-Sandbox/ba-p/301849 for how to enable this and other requirements.
Download ghidra from https://ghidra-sre.org/ and extract it to c:\sandbox\
Download the AdoptOpenJDK Windows x64 JDK from https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot#x64_win and copy it to c:\sandbox\jdk.msi
Download install.cmd and copy it to c:\sandbox\
If you have any Ghidra scripts or extentions, copy these to a directory in c:\sandbox\ and they will be copied to C:\Users\WDAGUtilityAccount\downloads\ inside the VM as well.
Download the ghidra.wsb file and run!
The ghidra.wsb will run install.cmd which will copy the files from the shared folder into C:\Users\WDAGUtilityAccount\downloads\ inside the VM and then run the jdk installer (in passive mode, so once the install dialog disappears, it's done)
Your shiney new windows 10 sandbox VM should have the ghidra directory in the Downloads directory.
Feel free to have c:\sandbox wherever you want on the host, you'll just need to modify the ghidra.wsb HostFolder config entry.
<Configuration>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\Sandbox</HostFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>C:\Users\WDAGUtilityAccount\Desktop\Sandbox\install.cmd</Command>
</LogonCommand>
</Configuration>
xcopy /E C:\Users\WDAGUtilityAccount\Desktop\Sandbox\* C:\Users\WDAGUtilityAccount\downloads\
C:\Users\WDAGUtilityAccount\Downloads\jdk.msi /passive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment