-
-
Notifications
You must be signed in to change notification settings - Fork 238
Experimental WSL support
Lately we have tried to get EMBA running under WSL (Windows subsystem for Linux). There are some pitfalls that I want to show here. The following documentation is a quick howto to get EMBA up and running in such an environment.
WARNING: This feature is highlighted as experimental. We do not recommend using it on a productive system. Please refer to our prerequisits section
Open Power Shell on your Windows host (with admin privs):
PS C:\WINDOWS\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Do a reboot of your Windows host
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Do a reboot of your Windows host
Download and install the WSL2 Linux Kernel from here: https://aka.ms/wsl2kernel
Open PowerShell as administrator and run:
PS C:\WINDOWS\system32> wsl --set-default-version 2
PS C:\WINDOWS\system32> wsl --install -d ubuntu
PS C:\WINDOWS\system32> wsl --list --verbose
As I have used the default ubuntu image I got the 20.04 LTS version. This version is not officially supported from EMBA. Nevertheless, let's give it a try:
m1k3@md3znjec:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
First of all, I was running into issues with my DNS settings. So, I disabled the auto update and set it fixed to 8.8.8.8:
m1k3@md3znjec:~$ sudo vim /etc/wsl.conf
m1k3@md3znjec:~$ cat /etc/wsl.conf
# [network]
# generateResolvConf = false
m1k3@md3znjec:~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 8.8.8.8
After changing the DNS settings it was working as expected. As our Ubuntu is quite old, we need to update docker-compose. Another EMBA user (https://github.com/erd0spy) has already shown how this will work: https://github.com/e-m-b-a/emba/issues/247
sudo curl -L https://github.com/docker/compose/releases/download/1.28.5/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Note: If you were using the current version 22.04 LTS from the Microsoft Store you do not need to update your docker-compose environment!
After these preparation steps we are ready to install EMBA:
m1k3@md3znjec:~$ git clone https://github.com/e-m-b-a/emba.git
m1k3@md3znjec:~$ cd emba
m1k3@md3znjec:~/emba$ sudo ./installer.sh -d
- Sometimes dockerd is not starting as expected -> start it manually before the EMBA installation process:
m1k3@md3znjec:~/emba$ sudo dockerd &
If everything works you should be able to perform a firmware analysis with EMBA:
EMBA - firmware security scanning at its best
Sponsor EMBA and EMBArk:
The EMBA environment is free and open source!
We put a lot of time and energy into these tools and related research to make this happen. It's now possible for you to contribute as a sponsor!
If you like EMBA you have the chance to support future development by becoming a Sponsor
Thank You ❤️ Get a Sponsor
You can also buy us some beer here ❤️ Buy me a coffee
To show your love for EMBA with nice shirts or other merch you can check our Spreadshop
EMBA - firmware security scanning at its best