Hey all. I've been trying to repurpose an old Linux based STB for a while. After taking a break, I came back to it today and investigated the upgrade script. It's an HTML file which contains some JavaScript. I was wondering if it would be possible to write my own commands in there and get the box to run them. I'll post the original script as I'm sure it'd help. Thanks in advance!
#JavaScript help
56 messages · Page 1 of 1 (latest)
@wispy rapids
Here's everything we've tried so far
Just to clarify, I want to either craft a new autorun.html to run my code, or put new code into the existing autorun.html
What would you want the code to do though?
You seem to have access to the box itself in some form or way
Or do you have access to the firmware binaries?
Ideally, I'd write a proof of concept webpage which could read information such as the CPU, RAM, OS Version
We do
I have plenty of upgrade files for it
Have those been binwalked?
Nope, don't think so
They might have been
But I'm not too sure
I can upload one of those
Hmm, I'm not too sure if you're able to do the whole information reading. I'm assuming the autorun is from the non-box upgrade side?
No, it's from the box
So someone has got some form of file access on the device itself?
You plug in a USB stick with the upgrade.bin and the autorun.html and it'll upgrade
Ah
There is no file browser
@wispy rapids
File Attachments Not Allowed
For safety reasons we do not allow file and video attachments.
Code Formatting
You can share your code using triple backticks like this:
```
YOUR CODE
```
Large Portions of Code
For longer scripts use Hastebin or GitHub Gists and share the link here
Ignored these files
- upgrade.bin
@wispy rapids
File Attachments Not Allowed
For safety reasons we do not allow file and video attachments.
Code Formatting
You can share your code using triple backticks like this:
```
YOUR CODE
```
Large Portions of Code
For longer scripts use Hastebin or GitHub Gists and share the link here
Ignored these files
- upgrade.bin.force.zip
Gimme a sec to see if binwalk can make any sense of that
Thank you!
But, it's gonna be a bit difficult trying to access the box from outside if there's nothing open on it
Yeah, that's why we've been trying for 13 years
Best bet would be to supply a modified firmware binary with the things you need
That's what we want to do
Ideally, we'd edit the upgrade file, then pass it to the box and let it flash it
But because of the md5 in the autorun.html, you can't really do that
We also haven't been able to successfully decompile the upgrade file
Generate a new md5 and modify the script to be that?
Tried that
I guarantee it's just a checksum for the binary file itself
And, yea, the md5 in the file is just the file signature
There's a PKCS + it's cert in the binary, yes
Would you be able to extract those?
And would I be able to use the cert in a different binary if I modified one
Hmm
Not much going on with the files, can't get them extracted properly
I can get some cleartext out, but seems like the whole thing is pretty much encrypted
I'll figure that out a bit more at some other time
But theoretically, is this how I'd pass a custom firmware to the device? (By using the certs from another firmware version)
Because I think that could work