Git Product home page Git Product logo

elevator's Introduction

Description

Elevator allows to bypass the UAC and spawn an elevated process with full administrator privileges. This is done by abusing the behaviour of the RPC server that implements the UAC feature, as demonstrated by James Forshaw in his article Calling Local Windows RPC Servers from .NET. The tool does not require to drop an extra DLL or write to the Windows Registry (as is often the case with other UAC bypass techniques), and it has been successfully tested on Windows Server 2016, Windows Server 2019, Windows 10 and Windows 11 (it probably works on other versions of Windows).

The tool is composed of a C++ stub that connects the tool itself with the RPC server exposed by the service APPINFO, and the Rust project that contains the main logic that allows to abuse the bug and bypass the UAC. The C++ stub has been obtained from compiling the IDL file that RPC View created from the RPC interface with ID 201ef99a-7fa0-444c-9399-19ba84f12a1a.

The C++ RPC stub has been compiled to a dll and its binary content has been encrypted and hardcoded into the Rust crate (check out the function get_rpc_stub() in the crate rpcclient). Then, the dll is manually mapped in runtime using DInvoke_rs. If you want to go through this process by yourself (which is not needed in order to use the tool), just open the project RPC_Stub on Visual Studio 2019+ and compile the dll. After that, use the script.py (Python 2.7) included in the repo to obtain a hex string from the binary content of the dll, that should be placed in the function rppclient::get_rpc_stub().

Valid only for x64 systems.

Compilation

Since we are using LITCRYPT plugin to obfuscate string literals, it is required to set up the environment variable LITCRYPT_ENCRYPT_KEY before compiling the code:

C:\Users\User\Desktop\Elevator> set LITCRYPT_ENCRYPT_KEY="yoursupersecretkey"

After that, move into the Elevator folder and simply compile the code:

C:\Users\User\Desktop\Elevator\Elevator> cargo build --release
C:\Users\User\Desktop\Elevator\Elevator\target\release> elevator.exe -h

Usage

USAGE:
elevator.exe <COMMAND> [OPTIONS]

ARGS:
    <COMMAND>                   Command line to run.

OPTIONS:
    -h, --help                  Print help information.
    -n, --new-console           Set CREATE_NEW_CONSOLE flag for the new process.

Examples

C:\Temp> elevator.exe c:\windows\system32\cmd.exe --new-console
C:\Temp> elevator.exe "c:\windows\system32\cmd.exe /C whoami /groups > file.txt" --new-console

Credits

elevator's People

Contributors

fengjixuchui avatar kudaes 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.