News for hackers. Stuff that matters.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by andix on Monday August 23, 2021 @10:53AM (#28276684)
This is more a Windows bug. Bad enough for Razer customers, but it affects all Windows users.

Windows should not install random drivers from the Internet when a non-admin user is logged in.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by ajross on Monday August 23, 2021 @11:57AM (#28277844)
Well, no. It's a Razer bug. Razer wrote the software. They wrote it to run as admin when you plug a new device in. They wrote it to launch a browser (!!!) under user control. Those are all Razer mistakes, Microsoft didn't do that.

Now, it's true that MS has a flawed architecture here. But it's not inherently so as I see it. Third party devices do need automatic driver install of some form. Drivers do need elevated privileges. Microsoft's model was that they'd audit and authenticate the software through the WHQL process. And it turns out that let a really glaring hole through.

But the problem is just really, really hard. If you want third party driver software to run on your system (and not all vendors want that: iOS has nothing of the sort, obviously, and Linux vendors ship all the drivers themselves) then you need to be prepared to do a ton work ensuring it's safe.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by p_j_w on Monday August 23, 2021 @12:09PM (#28278043)
>Microsoft's model was that they'd audit and authenticate the software through the WHQL process. And it turns out that let a really glaring hole through.

Not to let Razer off the hook here, because they're responsible as well, but in doing as you've described here, Microsoft are have willingly placed the onus for security on themselves.

>Linux vendors ship all the drivers themselves

Not all of them. Nvidia is a famous exception to this. If you want to install their drivers, I don't know of a Linux distro that will allow you to without root privilege.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by ajross on Monday August 23, 2021 @12:12PM (#28278093)
To be clear: there are obviously lots of third party Linux drivers out there. But they're delivered, installed and supported by that third party. Security of the NVIDIA driver is NVIDIA's job, and no one is surprised. And as a result, you need to run a tool as the root user and elevate the privilege level yourself to get it installed.

Now, that user experience broadly sucks vs. plugging the same PCIe card into a Windows box and booting it up to get an automatically installed driver. But it's not subject to the same security problems either, which was my point.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by chris37879 on Monday August 23, 2021 @06:04PM (#28282574)
There's a difference, though. Microsoft's Windows Update driver installer does not require launching executables, it never has in the past, it simply got the inf and supporting files and put them in the system's driver location. Now they're automatically running executable code that microsoft isn't verifying as an Administrator. Yes a malicious driver could be bad, but since drivers have a more finite api surface they should call, they can be audited / restricted with static analysis checks. launching a userspace app with admin privileges automatically is a bad idea.

Would you be ok with the AMD kernel driver launching a web browser as root on first boot? Or every boot?

Re:Razer bug lets you become a Windows 10 admin by plugging ... by TillE on Monday August 23, 2021 @04:36PM (#28281569)
WHQL means almost nothing, except that you have an expensive EV code signing certificate to verify your identity to Microsoft. At best it means that your drivers don't completely break the system.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by 3836293648 on Tuesday August 24, 2021 @04:20AM (#28286275)
> I don't know of a Linux distro that will allow you to without root privilege.

Sure, but a tonne of them come with them by default these days

Re:Razer bug lets you become a Windows 10 admin by plugging ... by II2II on Monday August 23, 2021 @01:22PM (#28279130)
I don't have much experience under Windows so I may be a bit off here, but this article mentioned the driver was installed by Windows Update from a non-administrative account, made no mention of UAC popping up to get administrative credentials, and allowed the installer to present a user interface. The installation wizard allowed for interactions that are intended for people who manually download and execute the driver package, which is fine in that context since the end user has already provided or has to provide administrative credentials at a UAC prompt. It is not fine in this case since a standard Windows component with elevated privileges is allowing the end user to circumvent restrictions on their account.

Clearly Razer played a role here since they were doing something that is (from my experience) unusual by presenting a wizard during a Windows Update installation. On the other hand, this is a fault that Microsoft has to fix.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by chris37879 on Monday August 23, 2021 @06:08PM (#28282604)
It's a new 'feature' of Windows update. In the past, driver vendors that were supplying to the Windows Update driver DB only had the option of providing infs and firmware, basically. I think they could provide apps too, but they had to be 'move it into place and it works' sort of apps. The mistake is that now Microsoft allows installers to run, Logitech does the same thing, plug in any logitech device and Logitech Options pops up a custom notification prompting you to 'continue' installation.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by II2II on Monday August 23, 2021 @08:16PM (#28283708)
I can understand why the vendor would want this features, and perhaps even most users. On the other hand, the one thing I liked about the limited approach was the ease of installing basic drivers. (Linux is my primary OS, so I'm accustomed to basic drivers and find the additional software that accompanies many Windows drivers repulsive. Knowing that the installer for these enhanced drivers can also present a security risk simply makes it worse.)
Re:Razer bug lets you become a Windows 10 admin by plugging ... by chris37879 on Monday August 23, 2021 @08:44PM (#28283891)
Completely agree, I've been an on-again-off-again linux user for the last 15-ish years... but these days it's more and more on, the only reason I haven't virtualized my gaming rig yet is the DRM some games I play use using those fucking kernel drivers. So that install hangs out and has steam, chrome, and other various games / game launchers and that's it. I disable as much of the OS as I can and only boot into it for games that don't work on linux (usually ones with the aforementioned DRM). Gaming on linux is getting better every day!
Re:Razer bug lets you become a Windows 10 admin by plugging ... by fomine3 on Monday August 23, 2021 @09:18PM (#28284087)
When this "feature" released? It should be reviewed not to this happen.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by pxc on Tuesday August 24, 2021 @10:42AM (#28289480)
Even more than a bug, it's a flaw in industry _culture_.

It's a flaw in Windows culture, where application publishers and device manufacturers are allowed and perhaps even encouraged to run amok, especially at install time, and run all manner of bespoke procedures with elevated privileges.

And it's a flaw in device manufacturer culture, where first-party device ‘drivers’ are expected to be bundled (sometimes optionally, sometimes by mandate) with entire applications for managing them, usually with flashy wizards and always-on GUIs that live in the system tray. More and more, it seems like manufacturers push that shit so they can track users usage of their devices, as well.

This is as much a result of device manufacturers' marketing teams' ruinous desires for customized, unique user interfaces and branding as it is a result of anything else. This kind of shit is really alien on platforms where universal management interfaces are the norm, package installation is expected to be well-behaved and non-interactive, etc. It's par for the course on Windows (and significantly so, but to a lesser extent, on macOS).

Re:Razer bug lets you become a Windows 10 admin by plugging ... by jandrese on Monday August 23, 2021 @05:15PM (#28282058)
> Third party devices do need automatic driver install of some form.

This is a mouse. It works perfectly fine as a USB HID device. The software install is to unlock optional features on the device, and that can be done after the user has authenticated to the host and gone through a security elevation prompt.

In fact there are precious few third party devices without a usable built-in driver that absolutely need to be available before the user had logged in. I can't think of any.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by IncRnd on Monday August 23, 2021 @06:43PM (#28282983)
> The software install is to unlock optional features on the device, and that can be done after the user has authenticated to the host and gone through a security elevation prompt.

That's not true. It may help you to watch the video.

The user was authenticated as a regular logged-in user. It was the driver installation that had elevated rights as SYSTEM, and there was no security elevation prompt.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by jandrese on Monday August 23, 2021 @08:24PM (#28283762)
Yeah, that's my point. There should be no automatic rights elevation. Adding a driver should require a prompt, period.

I assume the mouse driver only bypasses it because it wants to have the driver installed before the user has logged in.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by andreareina on Monday August 23, 2021 @08:04PM (#28283625)
I'm reading the "can" here as normative, i.e. because the optional stuff CAN be done after auth, it SHOULD be restricted to being done only after auth.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by michaelmrose on Monday August 23, 2021 @06:45PM (#28282995)
It is perfectly acceptable for a device to come with either a printed url where you can get the driver or software.

Also it should be if possible minimally fit for use without extra software even if all features aren't available.

There is no way any of this should ever happen automatically. People installed custom hardware for windows in the year 2000 and it worked fine then.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by maccard on Monday August 23, 2021 @05:23PM (#28282163)
A third party driver shouldnt be installable without local admin (or a UAC prompt). This is the problem.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by agumonkey on Monday August 23, 2021 @03:07PM (#28280522)
yeah it's shared, MS was rumored to have a very strong and deep (haskell based long ago IIRC) driver testing system .. it's odd something that big escaped the net.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by MichaelGroves on Monday August 23, 2021 @02:11PM (#28279791)
> Third party devices do need automatic driver install of some form.

I don't see why. Particularly not if the user wouldn't have permissions to do it themselves. If the user doesn't have permission to install a driver, there is probably a good reason for it and the system shouldn't be automatically installing drivers on their behalf either.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by ajross on Monday August 23, 2021 @02:53PM (#28280305)
You or I don't. But in the market, if you can't make your product work with no fuss, your customers will buy someone else's (or flee to another platform entirely).

If you accept the paradigm of third party hardware sales at all, then you need to have some kind of automatic secure install.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by MichaelGroves on Monday August 23, 2021 @03:17PM (#28280644)
> if you can't make your product work with no fuss, your customers will buy someone else's

If Razor can't make their gamer mouse autoinstall drivers, then neither can Logitech. This would be an equal playing field.

> (or flee to another platform entirely).

If somebody can't type in their own password when prompted to install a driver, it probably isn't their computer in the first place. The computer almost certainly belongs to their school or employer, or at least another family member, and I think any of those would rarely be receptive to "Please replace your dell with a macbook because the turbo button on my gamer mouse doesn't work."

Furthermore, the gamer mouse will have basic functionality without the razor driver anyway, and from my experience I doubt most clueless computer users would notice the difference. If they can "click the internet button and the google shows up", then the mouse is working as far as most users of this sort are concerned.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by andix on Tuesday August 24, 2021 @10:17AM (#28289152)
On Windows you don't even need to type in the password to install something. UAC just gives you a yes/no dialog. Most home users have the permissions for that.

Only if your user doesn't have admin permissions you need to type in a password to run something elevated.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by rodgerd on Monday August 23, 2021 @06:13PM (#28282672)
Perhaps you long for the good old days where we carried around piles of floppies for our hardware, but I suspect you are in a small minority.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by MichaelGroves on Monday August 23, 2021 @08:53PM (#28283942)
I'm not saying we should go back to floppies. A prompt for the administrator password followed by an otherwise automatic driver installation should be fine.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by madars on Monday August 23, 2021 @01:23PM (#28279144)
And the great thing is you don't even need Razer device to exploit this! You can just any Linux device, e.g. a phone running LineageOS as in this PoC https://twitter.com/an0n_r0/status/1429386474902917124 https://gist.github.com/tothi/3cdec3aca80e08a406afe695d54489...
Re:Razer bug lets you become a Windows 10 admin by plugging ... by IncRnd on Monday August 23, 2021 @10:51PM (#28284624)
I remember a different form of this from years ago. At the login screen, go to the accessibility/help prompts and open cmd.exe just like was done here to open PS>. This has been a standard kiosk breakout method of various effectiveness for a long time. The user rights were not always SYSTEM, though...
Re:Razer bug lets you become a Windows 10 admin by plugging ... by cozzyd on Monday August 23, 2021 @10:41PM (#28284580)
Or presumably any USB microcontroller would work!
Re:Razer bug lets you become a Windows 10 admin by plugging ... by cosmotic on Monday August 23, 2021 @11:27AM (#28277322)
In this case, I think it's fair to blame Razer. They are clearly installing way more than a driver.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by contravariant on Monday August 23, 2021 @02:55PM (#28280341)
If Microsoft lets anyone owning a Razer mouse/keyboard do whatever it wants to anyone's computer then that's on Microsoft as well.

If only Razer customers are affected then, sure let's put all of the blame on Razer but this affects everyone using Windows 10. There are some very good reasons why you cannot simply install device drivers without admin rights and if Microsoft chooses to wave those rights for trusted suppliers then they can very much be blamed for this kind of oversight.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by andix on Monday August 23, 2021 @11:52AM (#28277741)
Off course. But as a Windows customer I would expect Microsoft to prevent such issues.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by cosmotic on Monday August 23, 2021 @01:14PM (#28279006)
I agree they should block this sort of stuff, but don't count on it; When I plug in a Microsoft mouse, a Microsoft IntelliMouse install wizard pops up.

In the end, the driver is running executable code which could (I believe) just start an EXE install wizard anyway so this seems unpreventable.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by wvenable on Monday August 23, 2021 @03:41PM (#28280926)
A privileged executable can always launch another executable with less privileges.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by Algent on Monday August 23, 2021 @11:40AM (#28277523)
Windows Update should behave differently depending on what it's handling. If it's signed by MS sure go on, if it's a simple signed driver file maybe directly load it too. But for anything else always request admin credentials and meanwhile keep using generic drivers if available.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by jnwatson on Monday August 23, 2021 @11:10AM (#28276981)
And then you need to call an admin to plug in a mouse. That's not really practical for a lot of organizations.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by andix on Monday August 23, 2021 @11:18AM (#28277132)
There are generic mouse drivers.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by jefft255 on Monday August 23, 2021 @12:09PM (#28278041)
All (I hope) gaming mice with fancy drivers will also just work fine without them.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by ThePadawan on Monday August 23, 2021 @01:05PM (#28278875)
That's already the case in more secure environments (company-provided devices plugged into internal USB ports - all other ports filled with sealant).
Re:Razer bug lets you become a Windows 10 admin by plugging ... by OJFord on Monday August 23, 2021 @01:32PM (#28279239)
Oh that's why they did that! I'd forgotten until your comment, but I remember thinking that was odd on an internship. Didn't occur to me that it was to prevent there being usable ports (and nor did I try to plug in any car park devices, like a good intern!).

My work was only confidential (and that only by default) but it was definitely interesting to be an in environment with secret sauce about, and processes for handling it. (Fire procedure not being drop everything and exit the building, for one.)

Re:Razer bug lets you become a Windows 10 admin by plugging ... by gruez on Monday August 23, 2021 @06:15PM (#28282696)
That's probably more to prevent data exfiltration. If you don't want random drivers being downloaded you can more reliably prevent it using group policy.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by schoolornot on Monday August 23, 2021 @01:09PM (#28278939)
A 3rd party driver's capabilities should be scoped to whatever type of component it's for and in this case a mouse driver should only be allowed to do mouse things.

OAuth for Windows, I rest my case.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by nolok on Monday August 23, 2021 @11:21AM (#28277190)
> Windows should not install random drivers from the Internet when a non-admin user is logged in.

In a perfect world, or at least a tech user world, sure. But there was a compromise to make, either this (and that behavior can be disabled), or user stayed on admin account at all time. Which was the norm for windows since forever. Even on vista people disabled UAC.

From that point of view this is still the more secure outcome, at least the admin hatch is only broken through sometimes, instead of always.

Not saying this shouldn't be improved, but if you look not only at the end result but also at the path to get there, it does make some sense.

Re:Razer bug lets you become a Windows 10 admin by plugging ... by mhh__ on Monday August 23, 2021 @12:58PM (#28278779)
Microsoft seem to be fiddling around with eBPF, would be nice to see verified driver bytecode for simple stuff.
Re:Razer bug lets you become a Windows 10 admin by plugging ... by chaostheory on Monday August 23, 2021 @01:39PM (#28279349)
HP printers have the same bug then during installation, if you do it from USB.