Skip to content

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

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

Closed
FredCyberSecurity opened this issue Jan 24, 2025 · 1 comment · Fixed by #436

Comments

@FredCyberSecurity
Copy link
Contributor

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!

@wietze
Copy link
Member

wietze commented May 28, 2025

Hey, cool find! The PoC video really helped bringing it to live, thanks.

It is probably worth adding another entry to https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSBinaries/Winget.yml with Category set to AWL bypass with your finding. Similar to the existing Download one, it should be kept generic, with SysInternals used as an example.

@wietze wietze linked a pull request Jun 1, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants