Android Pentest Lab Setup: MobSF Installation on Windows+ [ERROR] Python3 is not installed solved

h@shtalk
Level Up Coding
Published in
3 min readFeb 2, 2022

--

Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.

From @abillion on Unsplash

The installation of it on Linux is pretty straightforward, however that is not something we can say about Windows hosts. So since it took me quite a while, I figured I make a full post just about the installation process on Windows.

Get your seatbelts on and let’s hashtalk!

Prerequisites before installation

  1. Install Git — — — after downloading Git make sure you open Environment Variables -> System Variables -> Path and see if there is C:\Program Files\Git\cmd

Installation

git clone https://github.com/MobSF/Mobile-Security-Framework-MobSF.git cd Mobile-Security-Framework-MobSF

Now you did all this and the next command is setup.bat, you ran the .bat file and you have [ERROR] python3 is not installed error. You have a few options that might do the charm:

  1. Run python -V, that should print the python version, if it doesn’t you really don’t have python installed or you don’t have it in path
  2. Run python3 -V, this should also print the python version, if it doesn’t, go to the folder where python.exe is, copy python.exe and rename it in python3, so now you should have two python files in the same folder, python and python3, now re run python3 -V, that should print out the version
Python Directory

3. Last resort and probably the solution is try and run the command where in cmd. If where is installed you should see a manual for usage, if it’s not you’ll get ‘where’ is not recognized as internal or external command.

where.exe is a file in System32, so the first thing you can do is check if it’s really there, in C:\Windows\System32 folder

If you can detect it and cmd can’t, then you should add C:\Windows\System32 in System Variables -> Path. When added, close the current cmd, open a new one and type the command where again. If now it’s detected, execute setup.bat and that should do it.

Running MobSF

run.bat 127.0.0.1:8000

In your web browser, navigate to http://localhost:8000/ to access MobSF web interface.

And that’s it. You have MobSF installed. I hope this little hashtalk saved you a few hours, since it cost me so much more.

The full documentation where they don’t do troubleshooting of python3 error can be found here: https://mobsf.github.io/docs/#/

--

--