Running Python Code, Without Python Installed on the System

Introduction

Have you ever imagine running python code on Windows without installing python. There are always situations where during penetration testing you get into a device under test, which does not have python installed. If that device is not installed with python, then here comes the solution for you.

When there is no python installed on the system then you can embed the python into C# portable executable file, then the user can run python code. We show you step by step process to run python without installing python on Windows machine.

Environment

OS: Windows 10, x64 with Visual Studio 2015 installed

Steps to follow

  • On Windows machine, download code from github repo.
  • After downloading compile the code with VS2015 as shown below:
Zolom compiled in VS2015
Zolom compiled in VS2015
  • After compiling, now is the time to test the some python code.
  • Go to the compiled binary path and run the python code, as shown below:
Running Python Code Without Python
Running Python Code Without Python
  • Now you can run any python code using Zolom.exe

Conclusion

So we saw on how easy is to run python code without python on the system. There are many uses on this, in the penetration testing phases.