Author Topic: Sniffing the Rigol's internal I2C bus  (Read 1869639 times)

0 Members and 2 Guests are viewing this topic.

Offline Daruosha

  • Regular Contributor
  • *
  • Posts: 181
  • Country: ir
Re: Sniffing the Rigol's internal I2C bus
« Reply #4275 on: November 18, 2016, 06:38:00 pm »
I have the codes :-) will confirm it soon myself  ;)
 

Offline cypcyp

  • Newbie
  • Posts: 2
  • Country: de
Re: Sniffing the Rigol's internal I2C bus
« Reply #4276 on: November 18, 2016, 06:47:23 pm »
Thanks for answering. Unfortunately both hints - other browser, other machine - give me the same "wrong" key I already had tried.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2589
  • Country: us
Re: Sniffing the Rigol's internal I2C bus
« Reply #4277 on: November 18, 2016, 11:25:31 pm »
I have the codes :-) will confirm it soon myself  ;)
I would be interested in what you have and how Rigol implemented it.
 

Offline Daruosha

  • Regular Contributor
  • *
  • Posts: 181
  • Country: ir
Re: Sniffing the Rigol's internal I2C bus
« Reply #4278 on: November 18, 2016, 11:56:58 pm »
I have the codes :-) will confirm it soon myself  ;)
I would be interested in what you have and how Rigol implemented it.

All I have is the trial license keys for my MSO1104z (all options excluding bandwidth upgrade and 500uV resolution) which Rigol kindly sent me as some sore of student bonus. I entered the keys through SCPI commands into the scope and they added 36 more hours to the remaining trial time. I wondered since the scope has no RTC and permanent license storage (not sure about this one yet), i can uninstall and then re-install the same trial licenses and achieve 36 trial hours cycles forever. 

RIGOL please don't read this post :D
 

Offline loaderr

  • Newbie
  • Posts: 6
  • Country: nz
Re: Sniffing the Rigol's internal I2C bus
« Reply #4279 on: November 21, 2016, 09:00:58 am »
Hi all,
I'm trying to unlock MSO1074Z with expired trial license with no luck so far.
A while ago quertymodo had a theory that keys are get locked some time after logo disappears which sounds credible to me.
If someone still has a correct dump could you please try to compare relevant info from it (136 bytes starting at "01 00 84 00 10 00") with unsuccessful dump or just some other dump made later to prove the theory?
Thanks.
 

Offline psysc0rpi0n

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: ar
Re: Sniffing the Rigol's internal I2C bus
« Reply #4280 on: November 21, 2016, 08:21:02 pm »
Hi all,
I'm trying to unlock MSO1074Z with expired trial license with no luck so far.
A while ago quertymodo had a theory that keys are get locked some time after logo disappears which sounds credible to me.
If someone still has a correct dump could you please try to compare relevant info from it (136 bytes starting at "01 00 84 00 10 00") with unsuccessful dump or just some other dump made later to prove the theory?
Thanks.

What you mean with "unsuccessful dump"? A dump that generated keys but which keys didn't worked? I can provide such dump but I cannot provide a successful where keys has been generated and worked!   
 

Offline loaderr

  • Newbie
  • Posts: 6
  • Country: nz
Re: Sniffing the Rigol's internal I2C bus
« Reply #4281 on: November 22, 2016, 11:22:00 am »
That's exactly what I meant! Dump that generates license which doesn't pass validation. If we compare it with one that generate correct license than we will know if problem is in scrambled keys or something else. But we need 2 from the same device. I have the same problem - I have "bad" one but no good one. We need to wait for guy who where able to unlock their devices.
 

Offline Iakabos

  • Newbie
  • Posts: 1
  • Country: ca
Re: Sniffing the Rigol's internal I2C bus
« Reply #4282 on: November 22, 2016, 11:09:11 pm »
Has anyone tried messing around with the new dg1022z function generator yet to see if it's possible to unlock other options? It does have the option to purchase increased memory depth, which leads me to believe it's made similarly to their other products with frequency limited by software. I would be very interested if 60MHz could be unlocked, as the 25MHz model sells for $360 and the 60MHz sells for $860.
 

Offline psysc0rpi0n

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: ar
Re: Sniffing the Rigol's internal I2C bus
« Reply #4283 on: November 24, 2016, 08:32:58 am »
That's exactly what I meant! Dump that generates license which doesn't pass validation. If we compare it with one that generate correct license than we will know if problem is in scrambled keys or something else. But we need 2 from the same device. I have the same problem - I have "bad" one but no good one. We need to wait for guy who where able to unlock their devices.

Ah ok... that's not my case! I can only dump memory and generate "bad keys"!
 

Offline psysc0rpi0n

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: ar
Re: Sniffing the Rigol's internal I2C bus
« Reply #4284 on: November 25, 2016, 03:13:40 pm »
Ok, I just got a new licence key (trial) for the scope. Should I do anything before/after/between applying the key and making a new dump file of my scope's memory? Someone said to try to compare the memory dumps of someone with working and non-working licence keys! I have now the possibility of having the options with Trial time again, make a new dump and try to generate new keys!
 

Offline psysc0rpi0n

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: ar
Re: Sniffing the Rigol's internal I2C bus
« Reply #4285 on: November 25, 2016, 08:05:18 pm »
Looks line I'm not lucky! I tried twice the memory dump right after the Rigol logo disappears and the Options screen show up but the generated keys are the same as before!
 

Offline loaderr

  • Newbie
  • Posts: 6
  • Country: nz
Re: Sniffing the Rigol's internal I2C bus
« Reply #4286 on: November 26, 2016, 08:13:54 am »
Yes, I found the same. FYI trial license is stored in memory starting at 0x43ee0058, you can dump if JTAG is still connected (small dump of 64Kb). Then run for some time and dump again - somewhere there should be counter that expires trial license. If we can roll it back trial will never expire :)

What I found so far is that option string is not decoded properly for some reason and on top of that public key is not decoded properly as well - trying to figure out why. Rigup does number of strange things that looks suspicious. If someone with knowledge why things were done in such way can contact me it would be really helpful.

In the mean time you can do a simple test - run rigup info with you trial license and see if it passes of fails - also check if options string is correct.
 

Offline loaderr

  • Newbie
  • Posts: 6
  • Country: nz
Re: Sniffing the Rigol's internal I2C bus
« Reply #4287 on: November 27, 2016, 10:21:38 am »
Good news guys - I was finally able to unlock my 1074.  :)
I can confirm that there are no good or bad images - all are good but there is a subtle bug in rigup (actually it's a bug in FW :) ) that leads to incorrect hash calculation - if you are unlucky. If your XXTEAKEY ends in couple or more zeros you will hit this bug for sure. Tested on 04.03.SP2.
I fixed rigup, who needs sources - please email me.

Big thanks to original developers of rigup - they probably spent many days creating it. It took me the whole weekend together with IDA and debugger to figure out why it doesn't work - Rigol FW is bloody convoluted.
 
The following users thanked this post: kado

Offline psysc0rpi0n

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: ar
Re: Sniffing the Rigol's internal I2C bus
« Reply #4288 on: November 27, 2016, 11:00:08 am »
Good news guys - I was finally able to unlock my 1074.  :)
I can confirm that there are no good or bad images - all are good but there is a subtle bug in rigup (actually it's a bug in FW :) ) that leads to incorrect hash calculation - if you are unlucky. If your XXTEAKEY ends in couple or more zeros you will hit this bug for sure. Tested on 04.03.SP2.
I fixed rigup, who needs sources - please email me.

Big thanks to original developers of rigup - they probably spent many days creating it. It took me the whole weekend together with IDA and debugger to figure out why it doesn't work - Rigol FW is bloody convoluted.

My XXTEAKEY ends up in 000... So I'm affected by it, no? Is that rigup fix going to work to MSO1000 series?
 

Offline janekivi

  • Frequent Contributor
  • **
  • Posts: 368
  • Country: ee
Re: Sniffing the Rigol's internal I2C bus
« Reply #4289 on: November 27, 2016, 01:17:24 pm »
I have made some memory dumps from DS1045Z when updating firmware and entering keys.
In my case most of stuff is driving randomly in memory. At the end are licenses and keys and
serial which are always at there. Somewhere I found 5 licenses, last was my DSER. They can
be trial licenses from factory. All said "License is already used" when I was trying to enter them.
So, they can't be entered again without deleting them from eeprom...
 

Offline Daruosha

  • Regular Contributor
  • *
  • Posts: 181
  • Country: ir
Re: Sniffing the Rigol's internal I2C bus
« Reply #4290 on: November 27, 2016, 04:48:18 pm »
I have made some memory dumps from DS1045Z when updating firmware and entering keys.
In my case most of stuff is driving randomly in memory. At the end are licenses and keys and
serial which are always at there. Somewhere I found 5 licenses, last was my DSER. They can
be trial licenses from factory. All said "License is already used" when I was trying to enter them.
So, they can't be entered again without deleting them from eeprom...

Have you tried to uninstall trial keys with SYSTem: OPTion:INSTall commamd ?

BTW, you can generate the keys simply by using the famous rigol keygen, no JTAG dump hassles.

 

Offline janekivi

  • Frequent Contributor
  • **
  • Posts: 368
  • Country: ee
Re: Sniffing the Rigol's internal I2C bus
« Reply #4291 on: November 27, 2016, 07:50:52 pm »
 :) I don't have problems with that. I try other things actually.
https://www.eevblog.com/forum/testgear/rigol-dsxxxx-gel-firmware-file-format/
But there was talk about using trial keys.
Uninstall doesn't delete trial keys as I see from dump. After uninstalling Your
generated key there is "Trial is over" text after every option too.
 

Offline janekivi

  • Frequent Contributor
  • **
  • Posts: 368
  • Country: ee
Re: Sniffing the Rigol's internal I2C bus
« Reply #4292 on: November 28, 2016, 04:59:56 pm »
SYSTem: OPTion:UNINSTall is deleting "All official options removed" or something like this.
But after some mem dumps I found 36 Hours Trial License Key ... key. Like for DP832
there is the same for DS1054Z too in here http://www.gotroot.ca/rigol/riglol/
And this is V for generating trial keys for DS1054Z
Option VSER is all  options like DSER but 36 hours trial version.
So others can be

DS1000z device options:
first character: D = official, V = trial

DSAB - Advanced Triggers
DSAC - Decoders
DSAE - 24M Memory
DSAJ - Recorder
DSBA - 500uV Vertical
DSEA - 100MHz
DSFR - all options
DSER - all options - 500uV Vertical

Currently I have DS1000Z-00.04.04.00.07 firmware.
Now if I add official license, all options are official and after delete
all options continue trial time. (and mem dump is messier at key regions
like he is generating all separate trial keys but factory ones are there too. )
 

Offline loaderr

  • Newbie
  • Posts: 6
  • Country: nz
Re: Sniffing the Rigol's internal I2C bus
« Reply #4293 on: November 28, 2016, 11:57:55 pm »
Hi all,
I uploaded fixed rigup sources to https://www.dropbox.com/sh/1yrh8s90ityn90s/AAA6PXlJk9gGQwoDOwO6TDQua?dl=0, feel free to use.
There are still some bugs as psysc0rpi0n was unable to unlock so far so use cautiously :)
I did some investigation how licenses are stored and it looks like they just programmed to flash and never erased. On startup FW scans all of them to decide which one to use. As longs as rigup works no need to worry about trials.
 

Offline psysc0rpi0n

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: ar
Re: Sniffing the Rigol's internal I2C bus
« Reply #4294 on: November 30, 2016, 10:36:38 am »
Hi all,
I uploaded fixed rigup sources to https://www.dropbox.com/sh/1yrh8s90ityn90s/AAA6PXlJk9gGQwoDOwO6TDQua?dl=0, feel free to use.
There are still some bugs as psysc0rpi0n was unable to unlock so far so use cautiously :)
I did some investigation how licenses are stored and it looks like they just programmed to flash and never erased. On startup FW scans all of them to decide which one to use. As longs as rigup works no need to worry about trials.

Thanks for sharing the semi-fixed rigol tool. Though I still have the MEM DEPTH locked! So, could you explain to us all how to generate the correct keys?? I have tried your tool but I could not generate correct keys, but somehow you achieved it!

It would be nice to know with some detail the steps you took to generate the keys using your semi-fixed version of rigup!

Cheers
Psy
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2691
  • Country: us
  • Not An Expert
Re: Sniffing the Rigol's internal I2C bus
« Reply #4295 on: December 01, 2016, 12:15:51 am »
Curious why the DP831 power supply wasn't worked on here.  Are the keys actually implemented differently?
 

Offline Twingy

  • Newbie
  • Posts: 3
  • Country: us
Re: Sniffing the Rigol's internal I2C bus
« Reply #4296 on: December 08, 2016, 06:21:39 am »
Downloaded the 64MB image from MSO1074Z using Olimex JTAG USB-OCD-H.  Generated the license file using rigup scan, serial number is correct from JTAG image, other licenses including tea key look valid.  Attempted to generate a triggers key (CSAR=0x1C001) with from license file using rigup license.  Invalid license! for the generated key.  Tried 0x1C002, invalid license as well.  Tried the updated rigup source from loaderr and generates the same keys, nothing different.  Firmware is 00.04.03.SP2 BOARD 2.1.4.  Any help is appreciated.
 

Offline Twingy

  • Newbie
  • Posts: 3
  • Country: us
Re: Sniffing the Rigol's internal I2C bus
« Reply #4297 on: December 10, 2016, 03:58:32 pm »
Another short update.  I changed the adapter_khz from 400 khz to 3000 (3 MHz) but the transfer speed off the mso1074 still appears to be limited to 25kB/sec, for ~45 min transfer period.  I performed all of the same steps using this new .bin image file and get same results, so I'm fairly certain the bin file is valid.

Additional Notes: On my mso1074z the jtag male header is missing.  Rather than try to solder on the header by removing the board/voiding the warranty etc, I used a male header and light force so as to avoid modifying the hardware in any way.  I also use rubber gloves to avoid getting finger prints all over the internals.
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6981
  • Country: hr
Re: Sniffing the Rigol's internal I2C bus
« Reply #4298 on: December 10, 2016, 04:39:12 pm »
Curious why the DP831 power supply wasn't worked on here.  Are the keys actually implemented differently?

For the 831 you just generate keys for 832, put your serial and go.. Worked fine on mine 831... I also made changes on one of the member DP832 python calibration script to work with DP831 and DM3068..
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2691
  • Country: us
  • Not An Expert
Re: Sniffing the Rigol's internal I2C bus
« Reply #4299 on: December 11, 2016, 01:43:26 am »
Curious why the DP831 power supply wasn't worked on here.  Are the keys actually implemented differently?

For the 831 you just generate keys for 832, put your serial and go.. Worked fine on mine 831... I also made changes on one of the member DP832 python calibration script to work with DP831 and DM3068..

Sweet.  Good to know.  I didn't see that actually stated anywhere before.  Thanks!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf