WSL2, Docker, & CyberChef

WSL2 is here for Windows 10 version 2004. The big difference is that Docker containers can now be run from within WSL2. I’ve never been much of a docker aficionado but thought I’d take a look to see how it all worked.

Installation: WSL2

WSL2 isn’t yet at an automatic install or upgrade. There are still some manual steps detailed here. Essentially in an Administrator PowerShell instance:

  1. dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  2. Restart your machine
  3. wsl --set-default-version 2
  4. Install a linux distribution: I chose Ubuntu 20.04
  5. Set up the distro with a username/password
  6. wsl --list --verbose
  7. wsl --set-version <distribution name> <versionNumber> so for mine: wsl --set-version Ubuntu-20.04 2

PS C:\WINDOWS\system32> wsl --list --verbose
  NAME            STATE           VERSION
* Ubuntu-20.04    Stopped         1
PS C:\WINDOWS\system32> wsl --set-version Ubuntu-20.04 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit
Conversion complete.
PS C:\WINDOWS\system32> wsl --list --verbose
  NAME            STATE           VERSION
* Ubuntu-20.04    Stopped         2
PS C:\WINDOWS\system32>

There may be some troubleshooting, but it all worked smoothly for me.

Installation: Docker

If you don’t already have Docker installed then it can be downloaded from here. This link provides a step-by-step to get it all working.

Docker Me!

From there it’s a case of pulling the CyberChef docker container. I’ve used one developed by mpepping.

  1. docker pull mpepping/cyberchef
  2. docker run -d -p 8000:8000 mpepping/cyberchef


From here it's exposed on port 8000:

Voila! It does seem *a little* excessive to run a whole docker container for CyberChef. After all I can just download the ZIP and run it locally. But it's a good 'hello-world' way to try docker and get the goodness of CyberChef. Plus, when I inevitably have to do it again, I've got the notes here!