10

I recently bought a Samsung SmartTV. After setting up the wifi connection, I surfed to http://ip.comlex.de, which gave me the following information about the browser:

  • REMOTE_ADDR: ###.###.###.###
  • REMOTE_HOST: XXXXXXXXXXXXXXXXXXX.net
  • REQUEST_TIME: 1381093040
  • QUERY_STRING:
  • HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml,application/vnd.hbbtv.xhtml+xml,application/ce-html+xml,application/vnd.oipf.xhtml+xml;q=0.9,/;q=0.8
  • HTTP_ACCEPT_CHARSET: HTTP_ACCEPT_ENCODING: gzip, deflate
  • HTTP_ACCEPT_LANGUAGE: HTTP_REFERER: http://pagerank.comlex.de/
  • HTTP_USER_AGENT: Mozilla/5.0 (SMART-TV; X11; Linux i686) AppleWebKit/535.20+ (KHTML, like Gecko) Version/5.0 Safari/535.20+

So, is there a Linux running on my SmartTV as the HTTP_USER_AGENT suggests? How can I find out more information about the Linux used? Can I somehow login to the TV from my Desktop PC?

Possible solution: http://www.samsungdforum.com/Guide/d21/index.html#how-to-get-firmware-version-and-model-code

terdon
  • 242,166
  • 2
    Would be nice to get a comment when You vote the question down. Otherwise I can't improve the question. – John Garreth Oct 11 '13 at 12:19
  • Your question is rather broad. You are basically asking how to get into a Linux system which you don't know almost anything about. :) – peterph Oct 11 '13 at 13:03

4 Answers4

6

User Agent strings are typically information about the browser connecting to the server, not necessarily the information about the server.

For example if you go to http://www.useragentstring.com/ you can find out information about your browser: it shows a breakdown of the user agent string.

Example

Here I'm using Chrome

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36

Here is an explanation of what the values in the string mean

   ss of info

How to learn a servers OS

I would use nmap to do this. You'll likely have to install it but it will show you the fingerprint of a system based on how it responds to nmap's queries. Among other things, each OS responds in a unique way in terms of the time and sequence when network connections are made against them, this information has been compiled into nmap so that it can gleam what underlying OS is at the other end.

You can use this query to find out:

$ sudo nmap -v -A <ip address>

Example

Here I'm scanning a webserver that I use for development.

$ sudo nmap -v -A homer

Starting Nmap 5.21 ( http://nmap.org ) at 2013-10-11 09:25 EDT
NSE: Loaded 36 scripts for scanning.
Initiating ARP Ping Scan at 09:25
Scanning homer (192.168.1.105) [1 port]
Completed ARP Ping Scan at 09:25, 0.15s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 09:25
Completed Parallel DNS resolution of 1 host. at 09:25, 11.04s elapsed
Initiating SYN Stealth Scan at 09:25
Scanning homer (192.168.1.105) [1000 ports]
Discovered open port 587/tcp on 192.168.1.105
Discovered open port 25/tcp on 192.168.1.105
Discovered open port 111/tcp on 192.168.1.105
...
...
Device type: general purpose
Running: Linux 2.6.X
OS details: Linux 2.6.9 - 2.6.28
Uptime guess: 10.557 days (since Mon Sep 30 20:03:59 2013)
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=205 (Good luck!)
IP ID Sequence Generation: All zeros
Service Info: Host: homer.bubba.net; OS: Unix

HOP RTT     ADDRESS
1   4.05 ms 192.168.1.105

Read data files from: /usr/share/nmap
OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 22.16 seconds
           Raw packets sent: 1022 (45.726KB) | Rcvd: 1016 (41.372KB)

These lines will tell you what you want to know:

Running: Linux 2.6.X
OS details: Linux 2.6.9 - 2.6.28

Your HTTP_USER_AGENT String

So if you're using the browser included within your Samsung SmartTV and you see the following you can make the following 2 assumptions:

HTTP_USER_AGENT: Mozilla/5.0 (SMART-TV; X11; Linux i686) AppleWebKit/535.20+ (KHTML, like Gecko) Version/5.0 Safari/535.20+

  1. That the system is in fact a Linux system using some form of a Linux with X11 running, and a version of a browser that's based on WebKit.
  2. That the system's web browser is configured to spoof it's USER_AGENT string to sites that report this string back, and it's some unknown OS & Browser combination.

To find out more about this system, you'll likely need to use the method I outlined above using nmap.

slm
  • 369,824
  • 4
    I think you misread John's question (though your explanations are relevant nonetheless). He's using a web browser on the TV to connect to http://ip.comlex.de/ which displays the headers sent by the client (it's a way to see what the client is doing when you can't easily see it from the client itself, like here where the client is running on a closed appliance). – Gilles 'SO- stop being evil' Oct 11 '13 at 22:37
  • 1
    @Gilles - I updated my answer to reflect that he's running the browser on the SmartTV directly. Thanks for pointing that out! – slm Oct 12 '13 at 00:06
2

Yeah, it is running a streamlined 2.6 kernel. You can gain root access and telnet and ftp to your tv. It is rather nice as you can add multiple apps from various regions to one area smart hub, decrypt the tv recordings and set up a better pvr to a nas. Do a google search for SamyGo.

2

just in case someone stumbles upon this thread:

the linux sources for a variety of their models seem to be available at here.

PersianGulf
  • 10,850
  • Can you actually use it though? Or do they use DRM to keep you from using your own software on your own hardware? – aij Nov 26 '15 at 14:33
1

Technically, Linux is running on your TV, yes. But it's not a real Linux distribution, in the same way that many people would say that Android is not a real Linux distribution (not going to comment on this, since I don't want to start a flame war).

Basically, the Linux kernel is very good at adapting to the hardware it runs on - which boils down to it doing very well on embedded devices all the way up to supercomputers, with very little changes. For this reason, most embedded devices use the Linux kernel.

Now, a kernel is pretty much useless without a userland. In the case of a distribution that uses the Linux kernel, said userland is typically GNU. See What exactly do we mean when we say we are using Linux? for a more detailed explanation of the difference between the Linux kernel and GNU. You may also be interested in the Wikipedia page on kernels.

What I've been leading up to is that your TV will be based on a Linux kernel, but beyond that, it looks nothing like a GNU/Linux distribution because it doesn't have a GNU userland. So to answer your second question (can I log in to my TV), the answer is no. This is because the TV isn't designed to be used as a general-purpose operating system, and therefore, you won't have access to root.

strugee
  • 14,951