Turn HR21 into general computer?

  • WELCOME TO THE NEW SERVER!

    If you are seeing this you are on our new server WELCOME HOME!

    While the new server is online Scott is still working on the backend including the cachine. But the site is usable while the work is being completes!

    Thank you for your patience and again WELCOME HOME!

    CLICK THE X IN THE TOP RIGHT CORNER OF THE BOX TO DISMISS THIS MESSAGE
Status
Please reply by conversation.

fire219

Member
Original poster
Aug 6, 2014
6
3
--This was originally posted over at DBSTalk, and I have decided to move it over here as well (with slight changes), due to lack of activity over at DBST. Hope you guys find this interesting. :) --

Before I get started......

Disclaimer:
First of all, I am new around here, so I may have put this in the wrong place. It may not even be welcome here on SatelliteGuys at all, due to the potentially sensitive subject at hand. I am not attempting to decrypt the transmissions/recordings from DirecTV, simply reuse this hardware. If you do choose to participate, I am not responsible if you incur the full wraith of DirecTV upon yourself.


Now let's get started. :)

A few months ago, one of our HD DVRs (HR21-700) started to act up (intermittently lock up and refuse to boot). It has been replaced by one of it's -100 brethren. However, DirecTV has not asked for this old box back (nor the access card, for that matter...), and has not incurred a non-return fee. I presume they have decided these machines are too old to continue reusing, and do not want them back. This means I have a rather capable computerized system to play with.

My end mission here is to get a new operating system on this box. I decided start my quest by dissecting the contents of the hard drive inside. Maybe it will give clues into the inner workings of this secretive box.



Reading contents of the HDD: (This happened a few months ago, so technical details may not be 100% accurate, until I gain the motivation to try this again)

After booting my computer into Ubuntu (I correctly doubted that the hard drive would be in NTFS or FAT32!), and several hours of trial, error, and profanity, I found that the hard drive has three partitions: the main XFS filesystem, a realtime (journaling) section, and swap space.

The swap space seems like it would be the easiest to pick apart, so I started there. I dumped it to a file (which I would share, but it was several hundred MB, and I seem to have lost it! :( ), and started reading. Right off the bat, I found boot logs, debug lines that confirmed that the HR2x boxes run Linux, RSA keys (no idea if it's the public or private one) and most interestingly, Java stacktraces! This gave me a lot of interesting info, but didn't help too much. Time to dive into the XFS filesystem.

After more hours of the above three stages, I finally got the XFS system mounted and readable. This is what greeted me.


(click for full screen)

Oooh, I see Linux root folders (lib and etc)!
...
Unfortunately, they don't contain much.
Screenshot%202014-08-05%2011.33.22%20thumb.png

(click for full screen)

Well, lets look at the other stuff... ooooh more java logs... can't find the actual jar files though :/
Screenshot%202014-08-05%2011.37.12%20thumb.png


(Continue exploring and not finding much. I did find the recording files, but I'm not going to cover that. I'm already likely on thin ice legally... I eventually get bored, and give up project for a few months.)
...2 months later...
Yea, lets see if I can get further this time!
...
Squashfs images! Maybe I can find something in these!
Screenshot%202014-08-05%2011.42.38%20thumb.png



The squashfs files.

These files are stored in the XFS partition, at /network/plugins.

The files are organized by three statistics: asset ID, asset version, and minimum stack version.

ID table:

7 - aac_mp4 (libraries and binaries for AAC, MP4, and "drmmanager")
13 - youtube (libs/bins for Youtube)
17 - AdInsertion (no idea, has bin "plgwrapper" and lib "libdtvport.so")
19 - itvwebkit (I assume it is for rendering of web content...)
21 - pgwsclient (some sort of administration tool(s)? contains stuff for cURL and lots of bash scripts...)
23 - hd_assets (all of the UI and sound elements)


Therefore, 7_2129_2129.squashfs is version 2129 of the libraries for AAC and MP4 files.


Also in the /network/plugins directory, is the signature files for the squashfs files.

For example, the sig file for 23_139_2100 is:

IMAGE = /var/network/plugins/23_139_2100.squashfs
SIGNATURE = 27124C37F3CE01D45674E797D752D13BAF520B1E413A226ECCCDA0F9008B4ABE4A3270CC3869AB56
SIZE = 11436032

And here is the image for the screensaver. :)

FpJ9MmX.png

to be continued.

So... what now?

Has anyone else experimented like this? If so, what have you found?

One of my current projects on this is to try to find a working serial port on the main board. So far, that has failed as well.

If someone thinks they could help, but don't have a sacrificial HD DVR, I could also send some of the files (such as squashfs images).

Thanks for reading. :)
 
  • Like
Reactions: Broe67
:welcome to Satelliteguys fire219!

Most of what you are doing is well above my computer knowledge, so I will leave the intelligent conversation to someone else. It is very interesting and I would like to see what it leads to.
 
:welcome to Satelliteguys fire219!

Most of what you are doing is well above my computer knowledge, so I will leave the intelligent conversation to someone else. It is very interesting and I would like to see what it leads to.
Thank you. :)

I think I am closing in on an attack vector for how to get my own code running on this thing. >: D
 
  • Like
Reactions: raoul5788
I was happy to just replace the hard drive on my old HR23-700 because the old one died. The old hard drive went bad,& Directv sent me a HR24-200 to replace it. Are you just trying to read the contents of the hard drive on your old HR21?
 
I was happy to just replace the hard drive on my old HR23-700 because the old one died. The old hard drive went bad,& Directv sent me a HR24-200 to replace it. Are you just trying to read the contents of the hard drive on your old HR21?

No. My end target is to get a much more open system running on the hardware, or at least get custom code running. Looking through the contents of the hard drive is the first step here, to try to find a way in.

Wasn't that the basis of what they did with the Replay platform.

What?
 
I would not mess with DirecTV like this if I was on the dark side of the moon, let alone post it or allow it at a forum!
 
  • Like
Reactions: Broe67
Yes, directv hardware does very much run linux, and this is known. You might want to start out by seeing how /proc mounts and building a custom kernel with support alternate filesystems and make sure it has common binary support. You might also want to see if you can get some serial support out of one of the USB ports on the IRD, that way you can execute commands (load applications). This should get you to your next step ;-)
 
I would not mess with DirecTV like this if I was on the dark side of the moon, let alone post it or allow it at a forum!

They have said they do not want the box, therefore we legally own it now. They cannot touch me, unless I start trying to decrypt their transmissions from the satellites. Which I'm not going to. There are much easier (and much more legal!) ways to get TV shows.

Yes, directv hardware does very much run linux, and this is known. You might want to start out by seeing how /proc mounts and building a custom kernel with support alternate filesystems and make sure it has common binary support. You might also want to see if you can get some serial support out of one of the USB ports on the IRD, that way you can execute commands (load applications). This should get you to your next step ;-)

I never claimed that the fact that these boxes run linux was my discovery. I just found plenty of confirmation. ;)

What I have found is that the hard drive seems to mount as /var. All of the other Linux root folders must be on that (at the moment, untouchable) flash chip on the main board. That means the best chance I have on getting my own code to execute is to figure out how to reliable activate one of the various bash scripts on the hard drive during operation, and modify it to launch Dropbear and/or BusyBox. I could also replace a non-essential binary with said utilities.
 
They have said they do not want the box, therefore we legally own it now. They cannot touch me, unless I start trying to decrypt their transmissions from the satellites. Which I'm not going to. There are much easier (and much more legal!) ways to get TV shows.



I never claimed that the fact that these boxes run linux was my discovery. I just found plenty of confirmation. ;)

What I have found is that the hard drive seems to mount as /var. All of the other Linux root folders must be on that (at the moment, untouchable) flash chip on the main board. That means the best chance I have on getting my own code to execute is to figure out how to reliable activate one of the various bash scripts on the hard drive during operation, and modify it to launch Dropbear and/or BusyBox. I could also replace a non-essential binary with said utilities.

Possibly both options. I'm not sure if the binaries are signed or not, tho. I've also wondered if you dropped in your own binary, would it just show in the menu?
 
Possibly both options. I'm not sure if the binaries are signed or not, tho. I've also wondered if you dropped in your own binary, would it just show in the menu?
Each of the squashfs images (as described above) has a signature in the corresponding .sig file. I think that if I modify the signature to match the changed squashfs image, it may work. I just don't know how it's signed. It's an 80 character hex signature. I also don't know if there are other security measures, hiding elsewhere. That's got me scared, as one mess up could potentially brick the box, meaning game over. (Even in that case, I've have fun, and now have a spare 320GB hard drive!)

I seriously doubt that just dropping in a binary would make it magically show up in the menu. Anything is possible, I guess.
 
We have been contact by DIRECTV about this as there are concerns about trying to reverse engineer the DIRECTV receivers could be a DMCA violation.

To err on the side of caution, I am going to close those one now until I can get some clarification.

Thanks for your understanding.
 
  • Like
Reactions: ranmic
Status
Please reply by conversation.

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

Who Read This Thread (Total Members: 1)

Latest posts