Coder Social home page Coder Social logo

winsu's Introduction

SU for Windows

WinSU allows you to run program as any user. It uses undocumented ntdll api ZwCreateToken to directly create a token for specified user.

Usage

winsu.exe [-acl SDDL] [-d desktop] [-p priv_present] [-P priv_enabled]
    [-s session_id] [-nw] [-c | -C] [-m integrity] [-M mandatory_policy]
    [-g count sid_group1 sid_group2 ...] [user_sid] [-- cmdline]

-acl SDDL
    Changes default DACL of the process and DACL of the token.
-d desktop
    Create process in specified desktop.
-p priv_present
    The privileges hold by the process, in bitmap form.
    Default is 0xFFFFFFFFE (all avaliable privileges).
-P priv_enabled
    The effective privileges hold by the process, in bitmap form.
    Default is 0xFFFFFFFFE (all avaliable privileges).
-s session_id
    Create process in specified session, default to
    the session of winsu process.
-nw
    Do not wait for process to end.
-c
    Create new console.
-C
    Do not create console window.
-m integrity
    Changes integrity level. One of:
    UT: Untrusted
    LW: Low
    ME: Medium
    MP: Medium plus
    HI: High
    SI: System
-M mandatory_policy
    Whether integrity level is enforced. One of:
    0:  TOKEN_MANDATORY_POLICY_OFF
    1:  TOKEN_MANDATORY_POLICY_NO_WRITE_UP
    2:  TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN
    3:  TOKEN_MANDATORY_POLICY_VALID_MASK
    Consult docs.microsoft.com for more details, default is 0.
-g count sid_group1 sid_group2 ...
    Add additional group membership to the token.
user_sid
    User SID of the token, default "S-1-5-18".
-- cmdline
    Command line to execute, default "%ComSpec% /K".

If you start WinSU without any commandline options, it will execute %ComSpec% as user NT AUTHORITY\SYSTEM, with NT SERVICE\TrustedInstaller added to groups, and all privileges enabled.

Notes

ntdllp.lib in WinSU\lib is taken from Windows Driver Kit 10.0.19041.0

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.