Git Product home page Git Product logo

asinvoker's Introduction

AsInvoker

AsInvoker is a Windows executable "de-escalator" - it removes any administrator privilege requirement specified by the executable in its manifest.

Usage

Usage: AsInvoker.exe exe_to_deescalate.exe

(Or in explorer, drag the target executable onto AsInvoker.)

AsInvoker works by using resource APIs from kernel32.dll. It reads application manifests from executable images, searches them for requestedExecutionLevel elements, and replaces any elevation requests.

More on requestedExecutionLevel can be found here.

Example

We demonstrate AsInvoker with Disk2vhd, a Sysinternals utility that creates VHD images for disk volumes. To do this, it requests administrator privileges in its manifest.

When opened, a UAC prompt pops up. The utility runs normally.

Normal

Now we process Disk2vhd with AsInvoker. The UAC shield icon disappears from the icon of the utility.

When opened, the UAC prompt no longer pops up. Also, the utility now is unable to read the list of disk volumes due to the lack of privileges.

Patched

Caveats

When viewed with Resource Hacker, the original manifest actually still exists in the modified application. This means the executable will have two manifest resources. However, the patched manifest comes before the original one, which I suspect is why it still works.

I have yet to find a way to remove the original manifest - calling UpdateResource with lpData and cb set to zero will throw an ERROR_INVALID_PARAMETER and prevent me from inserting the new manifest or saving changes.

asinvoker's People

Contributors

xyx0826 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.