Skip to content
RCE Write-up Intermediate

How I Hacked My Smart TV from My Bed via a Command Injection

The TV's name input field was vulnerable to command injection, allowing an attacker with physical access to run system commands as root. This enabled a reverse shell and modification of displayed images.

netsparker.com

Published on netsparker.com

It was one of those lazy evenings, just watching TV after a long day. I was tired but kept on thinking about a vulnerability I found earlier on in a router someone gave me.

The author, on netsparker.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

An attacker with physical access could execute commands as root, leading to full control of the TV, but the vulnerability is not remotely exploitable.

What the attacker needed

Physical access to the TV; remote control; knowledge of hidden menu code

How it was found

  1. Open the hidden service menu using a remote control code.
  2. Navigate to the 'info' section and find the TV name input field.
  3. Enter a payload with backticks and a sleep command to test for command injection.
  4. Observe the menu freezing for a time proportional to the sleep value.
  5. Use netcat to exfiltrate command output and obtain a reverse 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.

The TV had a text box for naming the device. The software passed that text to a system command without checking it, so typing special characters like backticks let the user run their own commands. This is called command injection.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.