Rambo
Rambo is a bit of automation around Windows Sandbox to generate a .wsb file that launches the designated program after mounting that program's folder.
Requirements
- Windows 10 Pro or Enterprise
- The "Windows Sandbox" feature enabled, which can be done via:
- Open an elevated PowerShell prompt
- Run
Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -All -Online
- Reboot
Try it
rambo.bat attack.bat
This should:
- Generate a temporary
rambo.wsb
file which:- Shares the folder where
attack.bat
is found, with the same path inside the sandbox, in read-only mode. - Launches a generated
rambo_launch.bat
file, which will in turn launchattack.bat
usingSTART
such that the console is visible, allowing progress to be tracked and diagnosis if there were any errors.
- Shares the folder where
- Launch Windows Sandbox against the generated
rambo.wsb
file. - Deletes the generated files once the sandbox is closed.
Here's a preview of the result!
Integration with Visual Studio Code
One-time setup
-
Do you have a batch file? If so, skip this step, otherwise create
test.bat
as follows (we're assuming thatsetup.bat
exists in the current folder and that's what we want to test in the Windows Sandbox):@echo off C:\Users\odagenais\oss\olivierdagenais\rambo\rambo.bat setup.bat
-
Do you have a task? If so, skip this step, otherwise create one as follows:
- F1 > Tasks: Run Task > Configure a Task > Create tasks.json file from template > Others
- Set the
label
toTest with Rambo
- Set the
type
toprocess
- Set the
command
totest.bat
-
F1 > Tasks: Configure Default Test Task
- Select
Test with Rambo
- Select
-
File > Preferences > Keyboard Shortcuts
- Bind "Tasks: Run Test Task" to a keyboard shortcut, such as
Ctrl
+Shift
+T
- Bind "Tasks: Run Test Task" to a keyboard shortcut, such as
Launching the "Test with Rambo" task
It's probably one of these:
- F1 > Tasks: Run Test Task
Ctrl
+Shift
+T