-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[Security] Brave's usage of elevation service should check it was called from a trusted source #39029
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
Comments
This can be done with app commands instead so we don't have to modify the elevation service at all |
Thanks to wfh on Chromium Slack for helping suggest this I believe it would involve this code: |
Created #39953 to track doing App Commands. Will check out the trusted paths as-is |
Fixes brave/brave-browser#39029 This is based on an example from Chromium in: https://source.chromium.org/chromium/chromium/src/+/main:chrome/elevation_service/elevator.cc Please see the references in the code there to `ValidateData`.
Requires |
Verification
|
step 1 | step 3 | steps 4 - 5 | step 10 | step 11 |
---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
Case 2: After fix - PASSED
Steps:
- installed
1.69.136
with Admin privs - launched Brave
- verified no
Vpn
service is installed - ran the proof-of-concept executable from
cmd
- confirmed services are installed:
pElevator->InstallVPNServices(): Successfully installed VPNServices. \n Invoking Vpn Installation is successful.
- opened
account.bravesoftware.com
in a new tab - logged into Brave VPN using
[email protected]
- clicked
Refresh VPN
button - did NOT connect to VPN
- confirmed {
BraveVpn, BraveElevationService, etc...
} services are NOT shown - connected and disconnected VPN successfully
step 1 | step 3 | steps 4-5 | step 8 | step 10 | step 11 |
---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Verified on |
Verification
Before fix:
After fix:
|
Test plan
See plan in brave/brave-core#24900
Description
When Brave (or any Chromium browser) is installed with admin privileges (ex: it's a system install), the elevation service is registered (ex: with
services.msc
). Introduced in brave/brave-core#20754, there is a Brave-specific methodInstallVPNServices
https://github.com/brave/brave-core/blob/1bc3b9e011c17e16a7aba895cac7e845b87ba5dc/chromium_src/chrome/elevation_service/elevator.cc#L30-L51
This is only used on Windows and it'll install the services required to either connect securely connect to IKEv2 or WireGuard.
This method should implement a check to see where it was called from and only allow trusted sources. For example, we can ensure that it was called from
%programfiles%\BraveSoftware\Brave-Browser\Application\brave.exe
.The text was updated successfully, but these errors were encountered: