Skip to content
Access control Write-up Advanced

Microsoft finds privilege escalation vulnerability in Huawei driver

A Huawei kernel driver for PC Manager allowed any process to open its control device by checking only the executable path, and its watchdog mechanism would launch a registered process as LocalSystem when terminated. An attacker could therefore escalate privileges from a low-integrity process to LocalSystem.

microsoft.com

Published on microsoft.com

With Microsoft continuously improving kernel mitigations and raising the bar for exploiting native kernel components, third-party kernel drivers are becoming a more appealing target for attackers and an important area of research for security analysts. A vulnerability in a signed third-party driver could have a…

Microsoft Defender Security Research Team, on microsoft.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

A low-integrity attacker-controlled process could escalate to LocalSystem, and a second IOCTL handler allowed mapping any physical page into user mode with read-write permissions, leading to full machine compromise.

What the attacker needed

Huawei PC Manager installed; Ability to run a low-privilege process

The fix

Huawei fixed both vulnerabilities in a security advisory released on 9 January 2019.

How it was found

  1. Spawn a copy of MateBookService.exe under attacker control, for example by process hollowing.
  2. Open a handle to the driver's control device, which succeeds because the executable path is on the allow list.
  3. Send an IOCTL to register the attacker's executable in the driver's watched process list.
  4. Terminate the registered process so the watchdog restarts it as a child of services.exe running as LocalSystem.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A kernel driver is software that runs with the highest privileges in the operating system. This driver trusted any program that had the right file name, so a low-privilege attacker could pretend to be the trusted program and ask the driver to watch their own executable. When that executable was stopped, the driver restarted it with full system rights, giving the attacker control of the machine.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.