Code Monkey home page Code Monkey logo

pelauncher's Introduction

Portable Executable launcher for Windows NT Build status

What is this?

This program lets you trick the Windows NT low-level Portable Executable (.exe) loader. It lets you load a valid executable and then replace its memory with any other portable executable you want, even if Windows does not like the target executable.

Download

Visit artifacts page on AppVeyor

image

How does this work?

  1. PE Launcher launches stub.exe (any valid executable, which may be changed by the user) in the paused state
  2. Windows NT creates a process stub.exe and loads all the executable resources into memory
  3. PE Launcher reads target.exe and replaces stub.exe memory with the target resources
  4. So at this point, even though NT loaded and verified stub.exe, the actual program that's loaded into memory is target.exe
  5. Program unpauses stub.exe
  6. Windows NT starts executing the app

Why?

There is no specific reason. This was made just for fun.

  • I can start any Windows CE application (with WCECL) without editing the executable.
  • I can start Windows kernel inside user space (this most likely won't work, I only know that it fails to resolve DLLs).
  • Windows 10 refuses to launch Windows XP setup (winnt32.exe). PELauncher tricks the system and successfully launches a soft-locked setup executable on any Windows. However, for some reason, it failed to resolve winnt32u.dll, so an investigation is needed.
  • It lets you run native NT executables inside Win32 user space. Fun fact: it's probably a Windows issue, but if you try to run the 32-bit version of smss.exe (for example, the Windows XP version) on Windows 11, then it's going to crash the system completely without administrator permissions.
  • It may avoid some antivirus checks.

Limitations and issues

  1. Shitcode. This was shitcoded by me a few years ago, so be aware that there may be code issues and memory leaks.
  2. This program works well on Windows 10. It's also known that this program runs on XP, but often fails. Also, the program for some reason doesn't work on Vista and 7.
  3. This software is 32-bit and works only with 32-bit executables. This program still works on 64-bit Windows versions, but only with 32-bit targets. Feel free to contribute if you know how to add support for other architectures.

Build

Visual Studio 2017 was used to create this project.

Credits

  • This question on Stackoverflow

Interesting fact

Initially, this program was made in VC6 for compatibility with old systems, like Windows NT 3.51:

image

But then the VS2017 solution was force-pushed instead of VC6 commits.

pelauncher's People

Contributors

dz333n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pelauncher's Issues

Working Path

When you run EXE, it looks and loads DLLs from current working folder where PELauncher.exe is located. That's why it ignores available DLLs at target EXE's folder. This should be fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.