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

Addition to winget.exe: AWL/Applocker Bypass on executables(like sysinternals) with winget.exe #421

Open
FredCyberSecurity opened this issue Jan 24, 2025 · 0 comments

Comments

@FredCyberSecurity
Copy link

Hello.

A addition to winget.exe (https://lolbas-project.github.io/lolbas/Binaries/Winget/)

You have listed Execute and Download as categories.

This is also a AWL (Applocker) Bypass.

Since winget.exe is auto elevating and install packages under ProgramFiles/WindowsApps, this bypasses a Deny rule on executables in Applocker.
The default rule allows programs to run under the ProgramFiles folder(where winget put it's packages).

Poc:

  1. Set up a Deny Policy on a sysinternal executable in Applocker
  2. Open cmd as a standard user and use winget with the following command, to download and install sysinternals: winget install 9P7KNL5RWT25
  3. Navigate to the tools folder of WindowsApps sysinternals: C:\Program Files\WindowsApps\Microsoft.SysinternalsSuite_2024.12.0.0_x64__8wekyb3d8bbwe\tools
  4. Execute the .exe of one of the sysinternals that has a deny rule in Applocker
  5. It will execute and run the .exe

Video PoC:
https://www.youtube.com/watch?v=zuL7x4Wltto

ALSO the --location switch (if supported) or -i in winget - can potentially install programs and executables in other whitelisted folders in Applocker.

Let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant