237 points · by jandeboevrie · 3y ago · 136 comments
These equipments are simply assuming that anyone can access the interface is not hostile. This is a pretty good assumption in most lab settings that I know, unless the operator is so ignorant. This assumption certainly have made my life much easier in the lab, of course, where every LXI test equipments are connected to a isolated LAN. I would say a lot more f*k in the lab if I have to authenticate myself before sending a SCPI command. I'm happy that most test equipment makers do agree with me.
For example, modern Rohde&Schwartz gears running Windows or Linux (FSV, FSW, FSVA, FSUP, SMA, SMC, ZNL, etc.) have VNC or Windows RDP enabled by default, and have a weak default password shared among the series. Keysight ones too (E5071C, DSOX3000T, maybe not on by default but with a supported way). A hostile user can even screw up a LAN connected, damn simple VxWorks based multimeter like Agilent 34410A badly by sending the calibration commands at the wrong time or some backdoor commands (DIAG:xxxx, haven't tried but looks possible).
Slightly off topic, some Chinese test equipment makers are making hackability as a feature, look at Siglent or Rigol scopes. They can (and they are competent enough to) lock down the system with secure boot like some Tektronix ones. However they don't, so that people with less budget can buy a cheaper model and hack for the bandwidth.
Having a password implies that it provides some meaningful security. A bad lock is worse than no lock, because it will lead people to put the instrument in inappropriate places.
But a weak password maybe useful sometimes, to prevent your coworker accidentally connect to the wrong equipment and mess up one's experiment.
Here it's never meant to deter a hostile coworker, in that case one reports to one's superior rather than rely on the password which is always stickered to the scope itself (in my lab).
I went through a similar argument with an intranet product that "didn't need to worry about SQL because it's on a trusted network" crashed when Bob O'Reilly tried to make an account.
I'm mostly disappointment that the author didn't do any research. While I get the cool-factor of trying to hack the firmware from scratch, a simple search would have found the author the EEVblog [0] for starters. But i admit, it is 104 pages atm. And the biggest dissapointment, an obviously shameless plug, is that this 'reversing' of the firmware, was done more then 5 years ago [1] where I wrote scripts to extract the whole firmware automatically.
There's even rumor that the entire source code has leaked onto the internet already.
I would expect some research would have made this 'discovery' less of an 'omg there's an RCE!'
[0]: https://www.eevblog.com/forum/testgear/hacking-the-rigol-mso... [1]: https://gitlab.com/riglol/rigolee/firmware/
After finding the vuln, I checked online if someone else had already found the vuln, and I admit I have come across the EEVblog, but I didn't find the exact vuln I found (I also must admit I didn't read all the posts there).
I am sorry if I have in some way disrespected your work, but it wasn't my intention at all!
Vulnerability found, 2022-11-08
Sent detailed PoC, 2022-11-09
RIGOL says they would have contacted me with updates from R&D, 2022-11-09
Follow-up on the vulnerability, 2023-01-25
RIGOL says they would reply in 2-3 days, 2023-01-28
Full disclosure, 2023-02-08
The style the author chose to list the timeline is IMHO the most faithful, honest, and polite way of communicating it without adding wrong or legally problematic reasoning to the situation, from their perspective.
On my Siglent scope (an SDS2104X plus) you can easily hack it to enable telnet access. This requires physical access to the device to add a USB stick with a file on it to achieve this, but it's then very open (described here https://www.eevblog.com/forum/testgear/siglent-sds2000x-plus...)
It was actually one of the things that attracted me to this scope, that it was to some extent hackable. Compared to other scopes like the old Tektronix ones running VxWorks it's nice to have something familiar behind the scenes.
Think of all the awesome things I could do!
This security vulnerability does not make me worried, it makes me happy. Rigols have always been somewhat hackable, this is an even easier way to do it.
I have a 16702A, which includes a front panel LCD and keyboard console. It's a beast.
[1] https://www.keysight.com/us/en/product/16700A/logic-analysis...
Bypassing strncmp was particularly insightful.
The "strncmp(saved_pwd,pass0,strlen(pass0))" looks equally bad. Probably someone did not understood the advice "always check the length first" and just did it everywhere.
Intel AMT checked the password in a similar way some time ago: https://www.tenable.com/blog/rediscovering-the-intel-amt-vul...
CVE-2022-23968: https://neosmart.net/blog/xerox-vulnerability-allows-unauthe...
2019-09-26 Reported to vendor with POC
2020-01-14 Followed up with vendor
2022-01-24 Publicly disclosed (still no fix over 2 years later!)
2022-01-28 Fix released by vendor
I wonder if the same will happen with this RIGOL oscilloscope vulnerability.> RIGOL says they would reply in 2-3 days, 1/28/23
> Full disclosure, 2/8/23
Those should be January 28 2023 and February 8 2023, which is the date of the post. It's only 13 days after the last communication from RIGOL, not months.
By the way, could at least us developers use ISO dates instead of whatever our local conventions are?
3 months of total stalling without a real reply to him. The last communication was only that they'd provide more details in a few days.
The fact that he asked again before the disclosure timeframe and they were like "uh, just give us a minute" doesn't change anything.
P.S. sorry for the american time dates, I don't know what I was thinking lol.
2023-28 and 2023-39 aren't any more readable.
Rigol made their own ADC chip that beats most off the shelf stuff yet they have some of the jankiest software and English translation known to man.
sprintf(&CMD_BUF,"echo admin:%s > %s",pass1,path);
system(&CMD_BUF);
You've probably heard of useless use of cat, but this is a useless use of echo. Given that the code even opens the file in question several lines above, I'm surprised that the author didn't know about fprintf.Never connect these things to the internet or any untrusted network. Last thing you need is a 10k instrument bricking itself.
Besides, if I were on a red team, I'd enumerate all devices on the LAN as well. Simply to look for all that old cruft someone set up years ago and never updated... that's where you get persistence. No one goes and checks 'scopes, network gear or printers for indicators of compromise in their firmware, because no one thinks of them if the admin isn't looking for outgoing Internet traffic.
Times have changed a lot in the past decade. No reasonable network admin would be giving public IPs to everything that connects to the network any more.
IPv4 addresses are also scarce relative to a decade ago.
Instead, you should put a default-deny rule on your firewall for all incoming traffic to user devices (which is generally the default setting anyway).
Coupled with "NAT isn't a firewall", assigning actual IPs to your end devices isn't all that silly if you happen to have a few million to spare.
Even then, though, the downsides of consumer network security (mostly) relying on NAT were obvious. Common ports (80, 25, etc) were blocked inbound; the school's printers basically had to be on their own network, or get spammed all day.
You are speaking about academia. It's not mutually exclusive, but it's different then out there in the wild.
In the network path. On the device. They control what packets get allowed or denied.
So, to have any way to connect back to my home network I have to run a permanent vpn to a server in aws and connect to that.
Security vulns happen, but come on, this is the basics.
Unlike the games industry there isn’t nearly as many people drawn to writing the shitware on a consumer router or cut rate oscilloscope.
I'm not giving you a justification, I'm telling you how it is.
> Real engineers don't get away with fuckups with real consequences because of their salary.
I mean they absolutely do.
What is a "real" engineer anyway? I am a licensed engineer (electrical) because I used to work independently as an engineering firm. I understand the various definitions.
The overwhelming majority of those with a title of electrical or computer engineer do not have any kind of professional licensure or certification - at best they may have an accredited 4 year degree.
None of these people are going to be personally liable for fuckups of any kind in their careers.
Just last year I casually inspected and found an RCE in a decade old consumer product just sitting there in plain sight:
http://www.hydrogen18.com/blog/hacking-zyxel-ip-cameras-pt-1...
It’s much easier to create secure web apps using C#, compared to cgi-bin written in C for lighthttpd web server.
The result is that you can get a hell of a lot of scope for very little money, but don't expect it to offer things like "robust security".
That's the kind of thing that makes this site special.
No, this is not Linux zealotry, I also advocate against using Linux as a daily driver on a modern laptop.
The right tool for the right job: OpenWRT on routers, Windows + WSL on laptops.
But, you are asking, how do you use your Windows laptop like this when away from home?
Easy: GL.iNet has tiny travel routers with OpenWRT supported out of the box.
If it works just as well and floats my boat, why change to windows?
I'm sure there are plenty of people that never have a problem with Windows and that can't get Linux to work on their hardware but I'd be careful to generalize from personal experience.
It supports modified OpenWRT with proprietary drivers, which are closed source. Still better than completely black-box travel routers but /shrug.
From https://github.com/gl-inet/glbuilder:
> Since the driver part uses the driver code maintained by many chip manufacturers, we have no right to open it to users. We have tried to provide it to users in the form of ko, but we will always encounter many strange problems.
Why would you do that?