Giter Club home page Giter Club logo

uachelper's People

Contributors

falahati 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  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uachelper's Issues

StartElevated throws NotSupportedException.

The full messaegs is:
System.NotSupportedException: 'CreateProcess is not supported for starting an elevated process. Consider using ShellExecute by setting UseShellExecute to true.'

Process owner, Elevation state, and Integrity level do not always ensure the proper permissions

I did a quick look-through of the current code and didn't find any references to the process's ACLs. I'd love it if you prove me wrong because that means there's nothing to fix!

P.S. after a few days of search engines, compiling edits of solutions on StackOverflow, and floundering around, this Issue helped me figure out exactly what I needed to do in my Intern library.

  • The built-in Administrator user account and similar accounts are capable of starting unelevated processes as needed.
  • There's also the rare-case issue of semi-elevated processes created when an elevated process fails to properly create an unelevated child process.
  • An "elevated" process could have its ACLs changed to deny permissions it should normally have.
  • When using Process Hacker 3 to start a process with Elevated status and TrustedInstaller permissions, it first creates a "TrustedInstaller.exe" process which then spawns a subprocess of the specified application.
    The ACLs of the child process in the given situation are...
    Screenshot 2021-06-11 015032

Sources:

StartLimitedTask will duplicate the instances

Using the function above I ran into the issue that a non elevated task would start a duplicate instance.

Im assuming the issue is that withing the method as it first starts a process and then also starts another task:

image

By removing the code marked as (1) the issue was resolved.

Limited Start Bug

Dear friends,
On a Windows 7 OS in a case when there is only Administrator user without assigned password, token can't be linked and token elevation type is default. If you look in class UACHelper,
function Process StartLimited(ProcessStartInfo startInfo), you can see that in a case when an extracted process owner is in Administrator group and its extracted token is default token elevation type, token won't be copied and process won't be started.

if (processIdentity.User?.Equals(sessionOwner) == true) // Same Terminal Session
                    {
                        var elevationType = Tokens.GetTokenElevationType(processIdentity.Token);
                        if (elevationType == TokenElevationType.Limited ||
                            (elevationType == TokenElevationType.Default &&
                             !new WindowsPrincipal(processIdentity).IsInRole(WindowsBuiltInRole.Administrator)))
                        {
                            return StartAndCopyProcessPermission(process, startInfo);
                        }
                    }

Did you have this problem? Why did you used role check in this if? I simply removed it, and solved this problem, but i wanted to check this with you.
Best regards.

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.