Skip to content
Access control Write-up Intermediate

CVE-2020-9759 - Getting root on webOS

The Downloadmanager service in webOS trusts the caller name, so a public command-line tool that identifies itself as a privileged service can download files to arbitrary writable locations as root. An attacker can overwrite a configuration file to point to a malicious script, leading to root code execution on reboot.

Andreas Lindh Follow

Published on blog.recurity-labs.com

A while back, I decided to devote some research time looking into the inner workings of webOS to be able to better understand the security posture of the platform as whole, and to better be able to spot security issues in webOS applications. This led to some interesting discoveries, including a local privilege…

Andreas Lindh (@addelindh), on blog.recurity-labs.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

Root cause

The Downloadmanager service determines privilege by checking the caller's name prefix rather than verifying actual permissions, allowing a public tool to impersonate a privileged service.

Impact

An attacker with local access can gain root privileges on the webOS emulator; LG claims the issue does not affect their devices, but the root cause remains in webOS OSE.

What the attacker needed

Local access to webOS (emulator or device); ability to run luna-send-pub; writable /etc/luna-service2; writable /home/developer

How it was found

  1. Create a modified ls-hubd.conf file that sets ExecPrefix to a writable path.
  2. Create a malicious script at that path that runs a reverse shell.
  3. Make the script executable.
  4. Use luna-send-pub to download the modified config file to /etc/luna-service2/ls-hubd.conf.
  5. Start a netcat listener on the attacker machine.
  6. Reboot the device; the listener receives a root shell.

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 service that downloads files checks the name of the program asking, not what it is allowed to do. A public tool uses a name that looks privileged, so the service lets it write files anywhere as the superuser. The attacker then changes a startup setting to run their own script as superuser.

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.

More by Andreas Lindh

View all

1 more disclosed report, best first.

More from LG

View all

The newest disclosed reports for this program.

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.