Siglent ADS Firmware Toolkit - Page 1
Forum section: electronics / testgear

author: optotester
author_rank: Regular Contributor
timestamp: June 25, 2024, 03:39:11 pm
content: Hi everyone,A lot of information is available on this forum on the Siglent ADS firmware format. However, most of the information is highly technical and there is no ready-made solution to analyze ADS files. At first, I wanted to do a very basic tool but at the end I decided to go one step further and provide a tool to analyze, extract and rebuild ADS files. It is not universal, but it should help customize most ADS files.Important information:- If the tool reports a checksum mismatch do not even try to run the ADS file, it is not compatible.- If you are not super-expert, do not even try to alter the filesystem of the device- The decryption key is not provided (but the tool should be able to retrieve it using the -f flag. It is shared between several devices, so if it cannot be extracted from your file (e.g. for SDS800X HD), you can extract it from the ADS of another device).ADS toolkit works even for recent scope like SDS2000X HD and SDS3000X HD.This should allow people interested in modding these great scopes to build new customizations (e.g. developing a new PHP Web UI).For now, it is Windows only but I may compile a Linux version later.Disclaimer: I am not responsible/liable for any issue caused by the use of this software (e.g. devices bricked). Please note that this tool is compatible with most recent ADS file, but not necessarily all of them. You should not use this tool blindly, you should see this tool as an helper and you should be able to verify if the output matches your expectations.In addition, If you gain access to terminal (e.g. through a custom update.sh script), please perform a full backup first (although you may never be able to restore it if you brick your device !).Credits: this tool has been inspired by the huge work performed byjanekiviandtv84.RegardsCode:usage: ADS Toolkit [-h] [-v] [-o OUTPUT] [-s SECTION] [-p PAYLOAD] [-u] [-k KEY] [-x | -r | -f] filenameExtract and rebuild ADS file. By default, zip files are reprocessed to ensure best compatibility. Reprocessing a .zipdoes not retain UNIX permissions, if required, use the -u flag.positional arguments:filename ADS fileoptions:-h, --help show this help message and exit-v, --version show program's version number and exit-o OUTPUT, --output OUTPUToutput file-s SECTION, --section SECTIONID of the section to be extracted/replaced. In extract mode, all sections are extracted ifomitted.-p PAYLOAD, --payload PAYLOADnew payload (replace mode only)-u, --unaltered do not reprocess .zip payloads (replace mode only). Default is to reprocess replaced .zipsections to maximize compatibility.-k KEY, --key KEY key used for 3DES encryption/decryption (string of 32 hex characters)-x, --extract extract section-r, --replace replace section-f, --findkey try find 3DES key - this is only possible if the main app is in the unencrypted area of theADS fileDisclaimer: The author of this tool discharges of any liability/responsibility in regards to the usage of this tool.This tool is an helper, manual check of the output shall still be performed. This tool can cause devices to bepermanently bricked.Changelog- 25 Jun 2024 - clarified scope of use and risks- 26 Jun 2024 - update to version 1.1.0 adding thefind keyoption. Source is now provided (Python 3.10+ required) as the packaged versions did trigger false-positive warnings on Virustotal-26 Jun 2024 - removed (https://www.eevblog.com/forum/testgear/siglent-ads-firmware-toolkit/msg5554955/#msg5554955)

author: egonotto
author_rank: Super Contributor
timestamp: June 25, 2024, 03:51:43 pm
content: Virus warning?

author: optotester
author_rank: Regular Contributor
timestamp: June 25, 2024, 04:02:31 pm
content: You are getting a virus warning or is it a question ?I do not see any behaviour in the tool that could trigger a virus warning.It is python compiled with nuitka and it only uses very basic libraries (no os/network library).If you have any doubt you can still run it in a VM.

author: egonotto
author_rank: Super Contributor
timestamp: June 25, 2024, 04:16:51 pm
content: Hello,thanks.I was not allowed to download the file with Edge with firefox I got the file, but when unzipping I got a virus warning again.At Virustotal I got the following information:"4/72 security vendors and no sandboxes flagged this file as malicious"Best regardsegonotto

author: egonotto
author_rank: Super Contributor
timestamp: June 25, 2024, 04:31:16 pm
content: Hello,I tried, but there were errors:E:\>adstoolkit -x 9999.ADSPython path configuration:PYTHONHOME = 'C:\ProgramData\miniconda3'PYTHONPATH = (not set)program name = 'adstoolkit.exe'isolated = 0environment = 1user site = 1safe_path = 0import site = 0is in build tree = 0stdlib dir = 'C:\ProgramData\miniconda3\Lib'sys._base_executable = 'E:\\adstoolkit.exe'sys.base_prefix = 'C:\\ProgramData\\miniconda3'sys.base_exec_prefix = 'C:\\ProgramData\\miniconda3'sys.platlibdir = 'DLLs'sys.executable = 'E:\\adstoolkit.exe'sys.prefix = 'C:\\ProgramData\\miniconda3'sys.exec_prefix = 'C:\\ProgramData\\miniconda3'sys.path = ['C:\\Users\\m\\AppData\\Local\\Programs\\Python\\Python311\\python311.zip','C:\\ProgramData\\miniconda3\\Lib','C:\\ProgramData\\miniconda3\\DLLs',]Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encodingPython runtime state: core initializedModuleNotFoundError: No module named 'encodings'Current thread 0x00002340 (most recent call first):<no Python frame>Best regardsegonotto

author: optotester
author_rank: Regular Contributor
timestamp: June 25, 2024, 04:34:22 pm
content: Thanks for reporting, apparently it is "normal" when using nuitka as a packer:https://github.com/Nuitka/Nuitka/issues/2163#issuecomment-1504683673To be honest, this is a first time I use nuitka as a packer, i used pyinstaller before but the output file was huge in comparison, as it embeds Python + the libraries. Nuitka convert to C which makes it much more efficient. I can promise that I did not add any malicious code on purpose, but at the same time, as I have no idea about what nuitka do as a compiler, I can only advise to run it in a VM to be 100% safe.For now, I am not sharing the code to avoid triggering a complete change of the format used, as occurred when the Siglent keygen was shared and triggered a change to a new licensing system.

author: optotester
author_rank: Regular Contributor
timestamp: June 25, 2024, 04:39:41 pm
content: Regarding the error above, indeed the version initially posted required Miniconda 3.11 as I did not use the --standalone option in nuitka.Just recompiled it as standalone, it should work now.

author: egonotto
author_rank: Super Contributor
timestamp: June 25, 2024, 05:01:11 pm
content: Hello,thanks, I installed Miniconda but that also gave errors.Downloading adstoolkit_standalone.zip was also difficult. Also the execution was prevented at the beginning.At the end there was an error message:"SUCCESS: ADS file successfully extracted.Traceback (most recent call last):File "C:\Users\m\AppData\Local\Temp\ONEFIL~1\adstoolkit.py", line 157, in <module>NameError: name 'exit' is not defined"Here is the opinion of VirusTotal.Best regardsegonotto

author: tv84
author_rank: Super Contributor
timestamp: June 25, 2024, 05:34:41 pm
content: Quote from: optotester on June 25, 2024, 03:39:11 pmYou didn't read some important info: thereare a lot of subtypesof .ADS files. You are dealing with just one of them.Please make this info clear to the users.Providing such a tool, with an explicit warranty disclaimer, will inevitably lead some people into trouble.IMO, more quickly will a guy brick his scope than anyone will ever introduce a new PHP feature...

author: optotester
author_rank: Regular Contributor
timestamp: June 25, 2024, 06:36:28 pm
content: Quote from: tv84 on June 25, 2024, 05:34:41 pmI think it is a good point, I did already put a disclaimer but just made it more clear after your comment. I tried to add as many safeguards I could in the tool itself, if you try using it on an unsupported file, it will report a checksum error. It is not a magic tool either, more a helper.I do agree that there is a high chance people may brick their scope, but at the same time, I think that everyone is responsible for their choices. I have been hesitating a bit if I should or should not release it, but at the end, I thought it was better to work as a community to try bringing more features, even if people will for sure do mistakes.

author: tv84
author_rank: Super Contributor
timestamp: June 25, 2024, 08:50:44 pm
content: Quote from: optotester on June 25, 2024, 06:36:28 pmI understand but that's where I disagree.As you most probably know, I've been doing (all subtypes of) .ADS packages for many years, some of them at the request of users in the forum. All were supervised or filtered by me. I try my very best to not let people (un)willingly brick their devices in all the things I share.

author: Martin72
author_rank: Super Contributor
timestamp: June 25, 2024, 10:19:27 pm
content: QuoteThis cannot be emphasized enough to pay tribute to it.

author: optotester
author_rank: Regular Contributor
timestamp: June 26, 2024, 11:00:56 am
content: Quote from: egonotto on June 25, 2024, 05:01:11 pmI removed the packaged version and released the python source code at the end. The 3 files must be extracted in the same folder. It seems that all Python packager (pyinstaller or nuitka) will trigger tons of false-positive on VirusTotal as it is extensively used to pack malware too.You will see that even now, 7za.exe is detected as a malware by some random antivirus, even if it is the official version downloaded fromhttps://www.7-zip.org/a/7z2407-extra.7z(you can compare checksums).

author: Bicurico
author_rank: Super Contributor
timestamp: June 26, 2024, 01:34:18 pm
content: I agree with tv84.There are (non-public) *.ADS tools, as well as, keygens for Siglent.Two reasons they were not published:1) To not harm Siglent: their products are actively being sold and Siglent makes money from activating the options.2) To prevent users from bricking their devices.A keygen was, meanwhile, published by someone and so far Siglent did not complain - this can change in future (i.e. new devices using a new key mechanism).Now a *.ADS file was published - let's wait if people come asking for advise to unbrick their devices.

author: TomKatt
author_rank: Frequent Contributor
timestamp: June 26, 2024, 01:52:26 pm
content: Quote from: Bicurico on June 26, 2024, 01:34:18 pmThis is the same reason I did not repeat the Utility->Debug pw when I inquired about the Debug menu options on my SDS800X HD... There's nothing in that menu that's useful for the average user and a lot of potential to either brick the scope or delete it's calibration data (rendering it useless). I'm sure that many others here are just as curious as I am, but when it's suggested to me to leave something alone by people I respect then I figure it's in my best interest to do so. The minute Siglent incurs a massive increase in support requests by people who accidentally damaged their scope because they were in locked service menus is probably the time Siglent rethinks their stance on the whole 'hacking' topic. And I for one am grateful that they continue to allow this as they do.

author: egonotto
author_rank: Super Contributor
timestamp: June 26, 2024, 02:41:02 pm
content: Hello,when I try to download adstoolkit_1.1.0.zip I get the follow error message:"An Error Has Occurred!You are not allowed to access this section"Best regardsegonotto

author: optotester
author_rank: Regular Contributor
timestamp: June 26, 2024, 02:50:59 pm
content: Contrarily to a keygen, which indeed allows to enable paid options, the idea was more to provide ability to really develop new features for these scope (mostly on the Web UI side, as for sure nobody will ever mod a binary app). I think the Web UI of Siglent devices has (a lot) of room for improvement.I truly thought it would have been beneficial to allow the community to have full control over their devices, but I do get your points. Since there is a consensus in saying that this tool is too dangerous, I am removing it.@egonotto, most probably file was already removed when you clicked the link.

author: CrabApple
author_rank: Newbie
timestamp: December 05, 2024, 05:51:55 am
content: Sorry for the necro bump but I'm very interested in having full access to my hardware and learning as much as possible about how it works. I unlock and root every device I own so I can contribute to the homebrew community.Would you please share your tools with me over DM?I'd greatly appreciate it.73,Crabapps

author: coromonadalix
author_rank: Super Contributor
timestamp: March 17, 2025, 12:35:47 pm
content: Quote from: CrabApple on December 05, 2024, 05:51:55 amsame here but not to try on an actual scope, more poking in it and just see the structures or files etc ... educational purposes for real ..and i do understand all the warningswould some one share it im PM

author: cboles
author_rank: Newbie
timestamp: March 17, 2025, 08:46:03 pm
content: I am still interested as well - please PM if you have anything to look at.

author: qurvax
author_rank: Newbie
timestamp: April 24, 2025, 01:52:08 pm
content: Hello there. I'm waiting on my 3000X HD. I'm really interested in getting root access, but too scared to open it because it's most expensive piece of kit i got, ever. Does anybody have any clues, how to get one without opening?

author: coromonadalix
author_rank: Super Contributor
timestamp: April 24, 2025, 03:06:41 pm
content: Well the basic story is: get an telnet access to make a memory dump out of itA matter of getting an hash key out of the files or else ... and generate an v2 license script ... none so farTelnet in some cases have been locked out, unless you patch an actual fw, and if it works ...some models are pretty well locked ...so far only the sds1000x hd (not sure) and sds800 hd have been done ?you have to search in the numerous threads here, or check the :Unified Keygen script for SIGLENTthread ... check the supported models

author: Bicurico
author_rank: Super Contributor
timestamp: April 24, 2025, 04:21:40 pm
content: Quote from: qurvax on April 24, 2025, 01:52:08 pmA friendly note of advice: if you are too scared to open your brand new test equipment, then do NOT mess around as root.The risk of damaging your device is probably higher while doing "stuff" as root on a filesystem not intended to be used by the end user, than to physically open the device to access the serial port or JTAG. Here you will be extra careful...As root? You will get too relaxed and before you notice, you realize you made a big mistake.This is coming from someone who recently bricked a valuable test equipment and was fortunate enough to be able to pay the manufacturer for the repair (not so cheap, but better than having a brick).

author: qurvax
author_rank: Newbie
timestamp: April 25, 2025, 06:10:36 am
content: Sincere thanx for your advice. The thing is i'm only an amateur when it get's to complex electronics, but have decades experience of administering computer systems. I know a bit or two about what "root" really means.edit: typo fix