Metasploit on Windows and Android

I recently went to the trouble of installing Metasploit Framework (MSF) on a few devices (Android smartphone, Windows laptop, Kali on multiboot), with various degrees of success. My experiences may be helpful for others attempting the same, as well as for me, so that I can finish it later.

Screencap of Nmap attempt with this error message: Nmap: 'Couldn't open a raw socket. Error: Permission denied (13)MSF, together with nmap, consistently ranks in the top 10 of pentest (penetration testing) tools used by security professionals. MSF is usually installed in a Linux distribution such as Kali, but it can be installed on several others as well.

MSF even has a Windows version, which suffers from many ills. One seems to be a limitation of the platform, in that the level of access to the hardware, most specifically Wi-Fi and networking, is more difficult to obtain than in a Linux distro. It is not possible to get it in a virtual Linux environment in Windows either. The MSF for Windows version also triggers the default antivirus, so one needs to set an exception, which then becomes a security risk on a platform that’s often exploited. Finally, a bug that’s been reported since February of 2018 and still not fixed, is that any update to MSF uninstalls it from any drive other than C: and moves it there (msfgit-drive).

Luckily, it is now possible to install MSF via Kali Linux (since March 2018: kali-wsl), which itself can be installed as an app from the Microsoft Store on the latest Windows 10 64bit (aka “amd64”). To do so, one first has to enable WSL in an Administrator Power Shell:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

The installed app is a stripped down version of Kali, which is great because one does not need to waste precious SSD space that way. Like any other Linux distro installed as an app, Kali will prompt you for an account name and password, and then you can just use apt-get to update/dist-upgrade as you would any other fresh Linux distro.

Much like the “native” MSF Windows app, the

On installing MSF and running it, I got the following error (also shown above in the screen capture):

msf > db_nmap
[*] Nmap: 'Couldn't open a raw socket. Error: Permission denied (13)'

I will update this article later with a solution.


I have also installed Kali on an older Toshiba tablet hybrid in multiboot with Windows. This was a tad more complicated than it was last time I attempted it.

Firstly, I got a fatal install error about the CD-ROM not mounted even though I used a USB drive. On investigation, it turns out to be an often-reported problem with other distros as well (ububoot). I had followed Rufus recommendation for the ISO method of writing to the USB drive for hybrid images and should’ve used DD instead. Another fix (as reported by others, but didn’t work for me) is to unplug and then plug the drive back in, then attempt re-discovery. A more complicated solution involves dropping to the shell:

  1. Press Alt-F2, then Enter to start new terminal session
  2. mkdir /media/usb
  3. mount -t vfat /dev/sdb1 /media/usb
  4. mount -t iso9660 -o loop path/to/iso/file/kalilinux.ISO /cdrom
  5. Press Alt-F1
  6. Say "No" to search again. Then click "Detect and mount CD-ROM"

I haven’t tested the solution above, I simply re-wrote the USB drive with the DD method and it worked.

A secondary issue (which I might have to research and report) is that the Wacom driver for the tablet seems to crash Gnome on use, though not XFCE4 (so I switched to xfce and kept gnome until I run out of space). On the plus side, Toshiba updated most drivers on the Windows side to 2016, suggesting that it might be possible to upgrade all the way to Windows 10 (the drivers kept me on this older tablet hybrid in Windows 7 before). On the minus side, Toshiba dropped the Upek/Authentec security suite which allowed login to Windows with a fingerprint slide, most likely due to the Elcomsoft-reported issue (ars-finger, elcom-finger) and Authentec disappearance. They work fine in Kali by installing two packages: libpam-fprintd and fprint-demo. I am aware of the risks, but I still found the ability to login via a finger swipe useful for a tablet hybrid where everything important was encrypted with stronger means than the fingerprint. I also had an android-x86 install on a third partition, but that had not been detected by grub and I think I'll just replace it with a Veracrypt hidden drive to be shared by the two OSs. In Kali, there's also a warning about "ACPI call to query HDD protection failed" in "toshiba-hap" or something like that.


Installing MSF on an Android smartphone used to require installing NetHunter / Kali distro on a Nexus (and a few other devices), which also needed to be rooted.

It is now possible to install Termux via F-droid (it’s also in Google Play) and then get MSF the "hard" way. The install is automated with a shell script.

I got as far as setting up the database, but trying to update caused an error:

localhost [metasploit-framework]: ./msfupdate
[*] Attempting to update the Metasploit Framework…

Traceback (most recent call last):
3: from ./msfupdate:316:in `

2: from ./msfupdate:136:in `run!’

1: from ./msfupdate:136:in `chdir’

./msfupdate:145:in `block in run!’: Cannot determine checkout type: `.’ (RuntimeError)

I installed using two different script on two different devices, same error. I will also update this with more details shortly.

Sources / More info: kali-wsl, msfgit-drive, ububoot, ars-finger, elcom-finger,


Popular posts from this blog