Author Topic: Hacking the Rigol DHO800/900 Scope  (Read 1596331 times)

turmoni and 27 Guests are viewing this topic.

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6676
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2075 on: March 12, 2024, 07:38:57 am »
Answering both of those questions is not going to help you sign software as Rigol.

But wouldn't it help you sign software as "someone who can sign software which gets all privileges on this scope"? Create your own private key, place the corresponding public key in the scope's store for trusted keys, then sign apps with your own private key -- and the scope should accept them?

I understand that the public keys for "trusted keys", stored in the scope, are secured in some way for that very reason. (In a TPM module in the SOC?) So this may not be an approach that works in practice. But if one could add a new public key, it should do the trick, right?
 

Offline AndyBig

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: ru
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2076 on: March 12, 2024, 08:35:04 am »
But wouldn't it help you sign software as "someone who can sign software which gets all privileges on this scope"? Create your own private key, place the corresponding public key in the scope's store for trusted keys, then sign apps with your own private key -- and the scope should accept them?

I understand that the public keys for "trusted keys", stored in the scope, are secured in some way for that very reason. (In a TPM module in the SOC?) So this may not be an approach that works in practice. But if one could add a new public key, it should do the trick, right?
No. There is a key that signs the kernel assembly. The system application must be signed with the same key, and not some other one, even if it is also super trusted :)
 
The following users thanked this post: ebastler

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1603
  • Country: ua
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2077 on: March 12, 2024, 09:48:04 am »
Answering both of those questions is not going to help you sign software as Rigol.
But we don't need to. We need to sign APKs with a key that the system would trust. How do we make it trust a key? Right, we add the respective public key to the keystore.
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1603
  • Country: ua
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2078 on: March 12, 2024, 09:49:00 am »
No. There is a key that signs the kernel assembly. The system application must be signed with the same key, and not some other one, even if it is also super trusted :)
Then how/when exactly are these keys compared?
 

Offline AndyBig

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: ru
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2079 on: March 12, 2024, 10:04:35 am »
No. There is a key that signs the kernel assembly. The system application must be signed with the same key, and not some other one, even if it is also super trusted :)
Then how/when exactly are these keys compared?
I don’t know such details, but I think that the signature of the kernel itself is checked during boot using the key specified as system. In fact, we need to re-sign the kernel itself with our key in order to be able to sign system applications in the future.
But I could be wrong.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2080 on: March 12, 2024, 10:05:31 am »
yeah! especially an MSO that you can get at ~$600 including LA probe ::) up the game? probably 1-2GSps MSO? buy siglent SDS800X! and those AFG and LA module sold separately. (ps: i dont mind mentioning the name here as i sense rigol fanboys dont get easily insulted ;D)
FWIW I don't think the DHO900 is a very good purchase for the LA.
(and I never have...)
If there was a DHO800 with AWG optino for $100 more? That would be cool...
maybe i was not clear enough... MSO at ~$600 with LA probe and AWG module and function such as bode plot included... granted LA and AWG GUI is at stage of toyish level, but lets hope it can be better with FW upgrade from rigol and hack route fropm users.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline AndyBig

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: ru
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2081 on: March 12, 2024, 10:07:11 am »
Here is a good battery for an oscilloscope, enough for a whole day of work, 28 lithium cells with a capacity of 3200 mAh each :)  ;D
 
The following users thanked this post: AceyTech

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16853
  • Country: 00
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2082 on: March 12, 2024, 11:02:50 am »
Answering both of those questions is not going to help you sign software as Rigol.
But we don't need to. We need to sign APKs with a key that the system would trust. How do we make it trust a key? Right, we add the respective public key to the keystore.

Don't those keys need to be signed by the master key?
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16853
  • Country: 00
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2083 on: March 12, 2024, 11:03:57 am »
Here is a good battery for an oscilloscope, enough for a whole day of work, 28 lithium cells with a capacity of 3200 mAh each :)  ;D

How many days to charge that?
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2084 on: March 12, 2024, 11:10:31 am »
Here is a good battery for an oscilloscope, enough for a whole day of work, 28 lithium cells with a capacity of 3200 mAh each :)  ;D
How many days to charge that?
thats a 28-35 li-on batteries that costs $3 each the cheap and descent capacity... hence we are talking about $85-$100 cost... not to mention assembling them. if i want that kind of setup, i just buy a small 4Ah SLA battery. easier to setup and charge, but that just me maybe.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 
The following users thanked this post: AceyTech

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1603
  • Country: ua
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2085 on: March 12, 2024, 11:22:51 am »
Don't those keys need to be signed by the master key?
Whatever the "master key" is, it is at the end of the day still compared against a known public key, stored somewhere. That may ultimately end up being in the bootloader, but as long as it is unlocked, we should be able to modify it as we wish. But how exactly it is done, I have no idea. Depends on implementation.
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1603
  • Country: ua
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2086 on: March 12, 2024, 11:23:57 am »
if i want that kind of setup, i just buy a small 4Ah SLA battery
...which won't last an hour.
 

Offline AndyBig

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: ru
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2087 on: March 12, 2024, 12:25:39 pm »
How many days to charge that?
Three or four hours :)

thats a 28-35 li-on batteries that costs $3 each the cheap and descent capacity... hence we are talking about $85-$100 cost... not to mention assembling them. if i want that kind of setup, i just buy a small 4Ah SLA battery. easier to setup and charge, but that just me maybe.
Yes, their cost is about that. But this, of course, is a joke. I just repacked this battery with new cells today :) In general, I’m thinking about assembling an external battery with 8 or 12 of these cells - 4S2P or 4S3P. For a voltage of 12-16 volts and a capacity of 6400 or 9200 mAh.
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16853
  • Country: 00
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2088 on: March 12, 2024, 01:06:03 pm »
I'm getting one of these:
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2089 on: March 12, 2024, 01:14:11 pm »
if i want that kind of setup, i just buy a small 4Ah SLA battery
...which won't last an hour.
i mean the normal SLA car battery 40Ah still cheaper... or we can just make a cigarette plug for it.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Flori444

  • Newbie
  • Posts: 3
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2090 on: March 12, 2024, 01:16:29 pm »
I installed RLU and BW7T10 options on a DHO804 with FW 00.01.02
100M BW works (no entry in option list, only "Max BW: 100M" in "Model").
But the 50M memory option does not show up in UI and I can select 50M only on CH2, every other channel is limited to 25M (single channel mode of course)
If I try to apply the RLU code again it says "option already activated".
I tried changing model to 814 and replacing contents of RLU.lic with the fresh generated one for 814, but it does not change anything.

Am I doing something wrong or is this a bug?
EDIT: ebastler is right, trigger on CH2  |O

Regarding fan noise: I just added 100Ohm in series to the stock fan, not noticeable anymore. CPU stays below 70°C (50°C in idle) at 20°C ambient, heatsink is 45-50°C. So maybe something around 70Ohm would be better.
« Last Edit: March 12, 2024, 04:29:29 pm by Flori444 »
 

Offline AndyBig

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: ru
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2091 on: March 12, 2024, 01:26:26 pm »
I'm getting one of these:

Such a suitcase probably weighs as much as five oscilloscopes?  :o
 

Offline AndyBig

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: ru
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2092 on: March 12, 2024, 01:28:06 pm »
i mean the normal SLA car battery 40Ah still cheaper... or we can just make a cigarette plug for it.
You will also need to buy a cart for it :))
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6676
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2093 on: March 12, 2024, 01:31:56 pm »
I can select 50M only on CH2, every other channel is limited to 25M (single channel mode of course)

You are probably still triggering on channel 2? So that channel is still active, even if it is not displayed, and will take up its share of the memory. If you display and trigger from CH1 (or 3 or 4) only, you should have the full memory available for them.
 
The following users thanked this post: Flori444

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16853
  • Country: 00
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2094 on: March 12, 2024, 01:34:35 pm »
i mean the normal SLA car battery 40Ah still cheaper... or we can just make a cigarette plug for it.
You will also need to buy a cart for it :))

Good idea! It can power the cart, too...
 
The following users thanked this post: AndyBig

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6676
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2095 on: March 12, 2024, 01:46:18 pm »
@Fungus -- don't attach that battery to your VESA mount!  ;)
(Well, maybe it can serve as the base for a VESA mount...)

Does the price of that no-name battery include fire insurance?
 

Offline norbert.kiszka

  • Regular Contributor
  • *
  • Posts: 227
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2096 on: March 12, 2024, 01:59:16 pm »
@AndyBig You are familiar with APKLab. I tried probably everything. I can deassemble original apk, rebuild it and install.

Same with apk from You - Your changes are visible. But when I made my own modifications in decompiled code (in many files at the same time, including displayed text) rebuild and install it, nothing is changed. I tried older versions of apktool (of course I changed APKLab config and to be sure I deleted ~/.apklab/apktool_2.9.3.jar).

Is there maybe some cache preventing changes?

BTW. Its hard to search thru this topic with that many posts. Can You give me url to Your repo?
« Last Edit: March 12, 2024, 02:14:59 pm by norbert.kiszka »
 

Offline AndyBig

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: ru
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2097 on: March 12, 2024, 02:38:18 pm »
@AndyBig You are familiar with APKLab. I tried probably everything. I can deassemble original apk, rebuild it and install.

Same with apk from You - Your changes are visible. But when I made my own modifications in decompiled code (in many files at the same time, including displayed text) rebuild and install it, nothing is changed. I tried older versions of apktool (of course I changed APKLab config and to be sure I deleted ~/.apklab/apktool_2.9.3.jar).

Is there maybe some cache preventing changes?
No, there are no caches there, all changes are applied directly, without additional actions.
What files exactly did you change? Was the modified file taken from the /dist directory?

BTW. Its hard to search thru this topic with that many posts. Can You give me url to Your repo?
Yes, of course - https://github.com/Andy-Big/DHO800_900_Sparrow_project
 
The following users thanked this post: norbert.kiszka

Offline norbert.kiszka

  • Regular Contributor
  • *
  • Posts: 227
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2098 on: March 12, 2024, 02:46:39 pm »
What files exactly did you change? Was the modified file taken from the /dist directory?

Exactly. After every rebuild date/time of this new apk was changed to actual. Even I tried to to manual installation with same result.

However... Now i tried to move generated apk into another folder, unpack+dissasemble it and rebuild it back - looks like it works (because of crash...). Of course that is not good way to test changes.

Maybe now I try to make it from beginning from Your repo.

BTW. FPGA Image from DHO1000 works, however after reflashing I see no changes - not at all. BTW2. PLL is driven by a kernel module.

Edit:

What files exactly did you change?

Mostly inside: smali_classes2/com/rigol/scope
« Last Edit: March 12, 2024, 02:51:35 pm by norbert.kiszka »
 

Offline AndyBig

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: ru
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2099 on: March 12, 2024, 02:57:01 pm »
However... Now i tried to move generated apk into another folder, unpack+dissasemble it and rebuild it back - looks like it works (because of crash...). Of course that is not good way to test changes.
I haven't encountered anything like this. I disassembled it through APKLab, and put it back together through it - everything worked.

Mostly inside: smali_classes2/com/rigol/scope
Well, yes, that's right. I just thought that maybe you changed the .java files, then nothing will really happen, these files are not involved in the build :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf