Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced privilege escalation on Windows #4

Open
1 of 4 tasks
retrixe opened this issue Sep 22, 2021 · 1 comment
Open
1 of 4 tasks

Enhanced privilege escalation on Windows #4

retrixe opened this issue Sep 22, 2021 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@retrixe
Copy link
Owner

retrixe commented Sep 22, 2021

  • Write a dd reimplementation in the dd folder which can be stopped using stdin.
  • Compile it, embed the manifest to run it as admin, and embed it in on Windows.
  • On flashing, extract it to a TempDir and execute it as privileged user.
  • Once it terminates, delete the TempDir.
@retrixe retrixe changed the title Enhanced privilege escalation Enhanced privilege escalation on Windows Sep 24, 2021
@retrixe
Copy link
Owner Author

retrixe commented Sep 24, 2021

This issue now targets Windows only, since on Linux and macOS, a thin wrapper around dd has been implemented into writer itself. Writer now calls itself with elevated privileges like so: pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY ./writer dd <file> <drive>. This thin wrapper can be stopped via stdin and is cleaner than this embedded executable approach.

For Windows, we can consider the following:

  • Continue with this approach.
  • Continue with this approach, but instead of rewriting dd, we reuse dd for Windows and call it from the thin wrapper.
  • Port sudo.go to Windows and then write a dd reimplementation to replace the thin wrapper around dd.

@retrixe retrixe added enhancement New feature or request good first issue Good for newcomers labels Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant