Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

PowerUp.ps1:3158 - Check SystemPath only#263

Open
Bubbl3H3d wants to merge 2 commits intoPowerShellMafia:devfrom
Bubbl3H3d:patch-6
Open

PowerUp.ps1:3158 - Check SystemPath only#263
Bubbl3H3d wants to merge 2 commits intoPowerShellMafia:devfrom
Bubbl3H3d:patch-6

Conversation

@Bubbl3H3d
Copy link
Copy Markdown

The current instantiation of code calls the %PATH% environment variable. However, since PowerUp is normally run with the permissions of an unprivileged crappy user in order to privesc, the %PATH% variable is returned as a concatenation of the SystemPath and UserPath. Any exploitable services running as SYSTEM will not call DLLs from the UserPath. Thus, we need to focus on writable folders in the SystemPath only in order to privesc. The proposed change pulls the SystemPath value directly from the registry and places it in the same format as the original code.

The current instantiation of code calls the %PATH% environment variable. However, since PowerUp is normally run with the permissions of an unprivileged crappy user in order to privesc, the %PATH% variable is returned as a concatenation of the SystemPath and UserPath. Any exploitable services running as SYSTEM will not call DLLs from the UserPath. Thus, we need to focus on writable folders in the SystemPath only in order to privesc. The proposed change pulls the SystemPath value directly from the registry and places it in the same format as the original code.
Copy link
Copy Markdown
Author

@Bubbl3H3d Bubbl3H3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed indentation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant