alvidaa findings — the bridge is a local HTTP API (recon §10.1–10.3, 10.5)
Split from the original FINDINGS.md lab notebook. Canonical record; the blog and STORY.md draw from these.
10. Recon deep-dive (Oct 2026): the bridge is a local HTTP API
Probed live with launcher/recon.html (v1→v5), which self-reports to the server's
/api/recon endpoint. Per-run snapshots: server/recon-report-v*.json. The page
POSTs its report incrementally after every section — needed, because the bridge
backend can die mid-run (§10.3).
10.1 Device identity
- SoC MTK9602 (MediaTek — not HiSilicon), 4K panel (3840×2160),
model
50A51HUV/ serial type50A5HU, region US / country CAN. - Firmware
V0000.09.01O.P0813, OSU09.01, capability code2025011014. - Browser "odin" = Chromium 111, 32-bit ARM (
armv7l) UA. §7's "Chrome 77" is stale on this firmware; modern JS works (recon pages still ship ES2018 out of habit).
10.2 The JS bridge is three layers
- Page JS: ~81
Hisense_*functions +HiUtils_createRequest— enumerable withObject.getOwnPropertyNames(window). They are plain JS shims. - The shims POST JSON to
http://localhost:9009/service/hiutils(file ops and utility APIs) and/service/tvinfo(Hisense_Get*info), with body{"api":"<name>","args":{...}}and a headeridentifier: <base64 16-byte token>that rotates on every request. Response shape:{"ret":bool,"msg":...,"session":-1}. Wrong api names get a clean{"ret":false,"msg":"Not supported api"}— a perfect fuzzing oracle. - The backend is phoenix — a Node.js server:
/opt/pkgs/tv.vidaa.app.phoenix/bin/phoenix(Node flags incl.--report-uncaught-exception --report-on-fatalerror, report to/var/local/log.phoenix.report) running/APPS/pkgs/tv.vidaa.jsservice.basic/CHA/phoenix.server.js— i.e. the file bridge's own source lives on the writable/APPSpartition.
10.3 The file sandbox — and the hole in it
fileRead/fileWriteresolve relative paths against/APPS; absolute paths fail with an errno leak that proves it:open("/APPS//etc/passwd") → ENOENT.../escapes to the real root.../etc/passwd,../proc/mounts,../etc/inittabread fine;../tmp/...writes succeed. Net effect: arbitrary read+write as uid 314, filesystem-wide.- Root-owned 0600/0700 files still deny (EACCES):
/etc/shadow,/usr/local/scripts/rootlogin.sh,/etc/cli_login.sh— plain DAC, because SELinux is permissive:/sys/fs/selinux/enforce= 0, andrcS.utopia.linuxexplicitly callssetenforce 0when/openbox/bin/load_policyexists. mode: 0resolves against/tmpinstead (errno leak/tmp/../etc/);mode: 6is the Appinfo-flow convention.- No directory listing:
fileReadon a directory →EISDIR. Enumeration is path-guessing fed by anything that names files (boot scripts, package names). - Reading a binary (ELF) crashes the phoenix backend. Reproduced twice
(
../bin/sh); text files are fine. The backend is back by the next page run — supervised restart — but everything queued after the crash in one run is lost (hence the incremental POSTs).
10.5 Raw API probing
- The shim's request is reproducible directly from any page: XHR to
localhost:9009with the captured shape (v4report.wirehas it verbatim). Fuzzing api names against that shape cleanly separates supported from unsupported ("Not supported api"). phoenix.server.js— the backend's own source, on our writable/APPS— is readable via../APPS/pkgs/tv.vidaa.jsservice.basic/CHA/phoenix.server.js; see 04-privilege-map.md (§10.4, §10.6–10.8) for the privilege map, lane assessment, and the v5/v6 dump results.
The hiutils service, decoded (Oct 30 — from the p41 extract)
tv.vidaa.jsservice.basic/CHA/services/hiutils/ — index.js + fileOperation.js
+ hiSecurity.js. The full authoritative API table and both "security" layers.
The "sandbox" is a mode-indexed prefix list, not a sandbox
const path_list = [
'/tmp/', // mode 0 ← the UART-key tmpfs
'/APPS/varlocal/applications/UI/', // mode 1
'/APPS/channelA/', // mode 2 ← the stock home UI
'/APPS/varlocal/', // mode 3
'/data/', // mode 4
'/vddt/', // mode 5
'/APPS/', // mode 6 ← our Appinfo lane
'/OAD/' // mode 7 ← OTA staging
]
const full_path = path_list[params.mode] + params.path
The mode parameter is a base-directory selector with eight whitelisted
mounts on the tested 09.01 firmware, including the stock home UI, OTA
staging and the console-gate tmpfs. The ../ escape was unfiltered
concatenation. A mode base can make a path addressable without traversal, but
that does not prove it is writable on other firmware: the 09.60 EU_A report
observed a separate fileWrite permission gate. Do not write to /OAD.
The full supported API table (authoritative)
fileRead, fileWrite, installApplication, hiSdkSignCreate,
hiSdkSignCreateSoundbar, hiSdkJsonVerifyHeap, writeTvRunLog,
createRandomString, getDefaultCDNInfo, securityEncrypt, securityDecrypt,
setDebugPort, getDebugPort, deviceCode, checkAccessCode, getVersionStatus,
getFrameTvSupport, getUIVersion, getOSVersion, openModuleLog, getDabTool,
setDabTool, setDns — plus serviceinfo.json parsing. Notables:
setDns (remote DNS rewrite from a page), setDebugPort (Chromium devtools
switch), securityEncrypt/Decrypt (vendor crypto via the native lib).
The security-code system, forged
hiSecurity.js — the successor to the "05328087" serial-console era:
checkAccessCode(code): codes ≥17 chars are checked directly; shorter codes read/tmp/lo_*/securecode.key(a tmpfs mode 0 of the file bridge writes).- The code embeds: offset1, a 12-char pack (valid-date digits interleaved around an 8-char auth code), the security level digit, offset2.
- auth =
HMAC-SHA1(key = base64(md5(GetDeviceCode)[:6]), msg = mac + "2015-01-01" + level)[5..8] % 1e8. Every input is public: the MAC rides the SSDP descriptor,GetDeviceCodereturns a constant we already know. - Level 9 = "develop devtool" in
setDebugPort(levels 2–6 = limited, >6 = full) and thesetDabToolfactory debugger. - Live-tested: the service logs the computed
local_access_codeon mismatch — an oracle that hands over the correct value (we found ours in/var/log/log.txtafter two failed tries; the forge itself only needs the MAC and a ≥17-char structure). Forged code accepted:{"ret":true,"result":"success"}→setDebugPort(1)→getDebugPort= 2 (develop devtool). No 9222 listener yet — the running browser applies the switch on restart, and the EULA firewall guards the port externally (our hook can open it; that decision is documented).
Impact on patched firmware (MTK9603 report)
The mode list and debug-code behavior above were decoded on 09.01, not verified on 09.60. The 09.60 EU_A report found a separate API-level write gate, including on in-sandbox paths. The mode list alone does not bypass it. Whether the debug-code behavior carries over is also untested; an accepted code on the older TV does not establish root on a newer one. See the community playbook.
Static pass over the archived jsservice.basic IPK (2026-11-04)
Source: apps/opt-pkgs/backup/tv.vidaa.jsservice.basic_1.0.0-d20250813o_mtk9602.ipk
in the pristine vendor tree (Forgejo seed) — the vendor's own backup copy of the
JS-service framework package. Control block: Phase: debug, PackageType:
Property, Persistent: true, DualChannel: true, Architecture: mtk9602,
version 1.0.0-d20250813o. It may drift from the copy actually running on the
TV; the fileRead/fileWrite behavior below is what the archived build does,
and it matches the live probe results recorded above.
- The hiutils API table, authoritatively (
services/hiutils/index.js,supportedAPI, 22 entries):hiSdkSignCreate,hiSdkSignCreateSoundbar,hiSdkJsonVerifyHeap,writeTvRunLog,createRandomString,fileRead,fileWrite,installApplication,getDefaultCDNInfo,securityEncrypt,securityDecrypt,setDebugPort,getDebugPort,deviceCode,checkAccessCode,getVersionStatus,getFrameTvSupport,getUIVersion,getOSVersion,openModuleLog,getDabTool,setDabTool,setDns. This closes the v5-era "authoritative table is in the service JS" gap: the guessed-name space (17 names, all "Not supported api") missedinstallApplication,setDebugPort,setDabTool,setDns, and others. - fileRead/fileWrite are base-dir concatenation, no normalization
(
services/hiutils/fileOperation.js):full_path = path_list[params.mode] + params.pathwithpath_list = ['/tmp/', '/APPS/varlocal/applications/UI/', '/APPS/channelA/', '/APPS/varlocal/', '/data/', '/vddt/', '/APPS/', '/OAD/']. No path normalization and no..filtering in this build — the JS layer of the traversal primitive, confirming what the live probes measured. Mode 7 is/OAD/(mode 6 is/APPS/, matching the mode table above): the bridge reaches OTA staging directly, which is one more reason for the hands-off rule recorded earlier in this file ("Do not write to/OAD") and in AGENTS.md ground rules —/OADis verified-boot OTA staging, and findings 12's cold-boot/flash traps are why local-flash assets live under/APPS/channelA, never/OAD. The 2026-07 firmware reporter's "strict path joiner" is evidently a later addition. fetcherservice (services/fetcher/index.js,autoStart: false):fetchResponse,fetchHead,fetchFile.functions/fetch/fetchfile.jsdownloads an arbitraryurlto an arbitrarydirectoryargument (axios + stream-throttle, 8 MB/s cap, optional cancel) — the FaaS-fetcher write primitive that the 100U7Q chain relies on, present in the basic package.installApplicationwrites its argument verbatim to/APPS/websdk/Appinfo.json(creating it 660, group 713 if absent) — the app-store install descriptor, writable from any page via the bridge.setDnsrepoints the TV's DNS at runtime (setTVAPI('dns', ...)plus a wired/wireless re-apply; empty arg resets to 8.8.8.8). Threat model, both directions: it is a kill-list reinforcement path — the launcher/bridge can re-pin the TV resolver at the kill-list resolver after OEM resets, network changes, or firmware defaults — and an attack surface: any page that reaches the bridge can point the TV at a hostile resolver, silently unwinding every block. Detection is asymmetric: a blocklist bypass shows up as previously-blocked domains resolving in the AdGuard query log from the TV's source IP, and the sanctioned DoH bypass (/APPS/domain/domain_list.json, dns.google via vidaahub.com) already requires the REJECT rules documented in 09-endpoints.md.setDabToolwrites the DAB debug flag file only whengetSecurityLevel()is 6 or 9, with the security validity date as content — the debug-code gate from the section above, at the API layer.ipchandler(autoStart, keepAlive) exposes a single API,sendServiceReady, over a nativeservicehandlermodule (KMQ);tvinfocarries the TV-API side. No exec-class API exists anywhere in this package.