我知道写这玩意没人看,也没多大用,不过管他呢。姑且随便写写(ーー゛)。过程就不写了,直接结论。
Onyx系列:Internet Archive Search: subject:”Warez CD” onyx
更新:Zammis Clark提供了根目录*.dat的解密程序,解密后是包含软件包路径、名称、描述、密码等信息的XML,不再需要运行程序的方法。提供文件为C#代码,用csc onyx.cs编译即可。
工具使用方法:onyx.exe Language.dat Onyx安装程序运行密码
以Onyx DVD #02为例:onyx Language.dat onyxdvd2yourdestination
解密后文件将写到Language.dat-dec.bin,记事本打开即可查看内容。
以下内容可以不看。
推荐先运行一次start.exe/setup.exe输入CD密码,进入主界面后退出。安装程序会复制自身到用户Temp文件夹后运行该拷贝,用Process Explorer可以看到实际运行程序路径及参数。此后可以按命令行直接运行。

命令行:x:\Start(Setup).exe x:\Res(Language or whatever).dat -FROMTEMP
用x64dbg(x32dbg)按该命令行载入安装程序,然后根据文件夹大小找到软件压缩包实际所在目录。用7zip打开这些随机命名的文件可以看到该卷使用的压缩格式。
注:从Onyx #07开始压缩包密码将为随机密码或由软件名称生成的密码,不同压缩包会使用不同密码。
注2:从Onyx DVD #11开始,UNRAR.DLL等库文件被封装进其他文件,因此调试时需要直接运行进入主界面,再在程序模块列表内找到函数,在函数入口下断点。
注3:Onyx DVD #12的RAR包设置了目录结构加密,直接寻找需要的包可能不方便。在x32dbg调试到RAR密码时,密码字符串后面附近有待解压RAR包的路径,可以依此快速定位到需要的RAR包。
RAR压缩包
观察ISO根目录可知安装程序使用UNRAR.DLL解压RAR压缩包,搜索可知UNRAR.DLL中与密码设置相关函数为RARSetPassword()
函数参考:void PASCAL RARSetPassword(HANDLE hArcData,char *Password);
因此根据函数参数即可找到压缩包密码。
以下使用Onyx #01为例。x32dbg载入安装程序,工具栏内选择“运行到用户代码”:

DLL在安装程序内为动态调用,搜索当前模块的所有字符串,在其中找RARSetPassword

双击跳转到所在区域,此处正好为GetProcAddress动态调用区域。搜索可知在LoadLibrary创建句柄后,调用GetProcAddress会返回目标函数地址,所以在此处按F2下断点,运行至此,call完成后会在EAX返回函数地址。

在右侧EAX值上右键,选择“在反汇编中转到”可以快速定位到该函数地址。在函数入口下断点。

继续运行程序,在安装程序主界面选择需要解压的软件,选择解压路径后断点触发,函数栈内[esp+8]显示第二个参数地址,可看到该压缩包密码为“smiler”。

在软件压缩包内使用该密码测试成功。

ZIP压缩包
从Onyx #06开始(#05安装程序都是坏的,暂时懒得看)压缩包换成了ZIP,安装程序对应调用UNZDLL.DLL。搜索到一份比较接近的源码,并对比参考x32dbg结果。参考可知解压函数为UnzDllExec,密码字符串地址存储在参数DCL1结构体内。


DCL1结构体定义:

同时参考x32dbg结果可知,密码字符串地址位于结构体地址后偏移第7个DWORD。
以下使用Onyx DVD #04为例,安装程序直接运行一次后用x32dbg载入,命令行:”G:\Setup.exe” G:\Language.dat -FROMTEMP。运行到用户代码:

在当前模块中搜索UnzDllExec,得到唯一结果后跳转到对应位置,在GetProcAddress处断点。继续运行,触发断点后返回地址:

然后对函数入口下断点。
注意:只有解压文件前对UnzDllExec的调用才包括真密码,其他均为假密码。此后在进入安装程序主界面及选择软件项目时均可能触发函数入口断点,直接继续运行即可。
选择软件解压目录后,会触发UnzDllExec函数入口断点,此时函数栈[esp+4]即为对应DCL1结构体地址。右键选择“在内存窗口中转到[xxxx]”后会在内存窗口中显示该地址开始的结构体内容。

根据源码内描述的结构体定义,密码字符串指针位置:

选择该地址,右键选择“在当前内存窗口中转到指定DWORD”,即可定位到该软件压缩包密码:

右键选择“二进制编辑-编辑”,可在弹出窗口内快速复制该字符串内容。在ISO内找到该软件压缩包,测试密码正确。

注:某些ZIP压缩包密码包含非标准字符(如0xA0),这种ZIP包需要在英文系统内复制密码并解压。╯_╰
Very detailed guide. Do you think it is possible to write a dummy DLL to print out the password instead of searching for it with a debugger?
I believe you can copy paste non-alphanumeric characters except for those ASCII control characters. Is it possible to upload a ZIP file here and provide the password in hex notation?
I suppose it’s possible to write dummy DLL to get the password, just output the byte arrray to something like cmd echo or MsgBox blabla…but i’m not skilled in programming for it and it’s of little use anyway.
For zip with non-ASCII password, https://archive.org/download/onyxdvd-02 check ONYX_DVD02.iso/Data/idx/lib/dat/WcByyjFx.MI
password for this archive: mel28c5sd4j~#(%B3X?_[hex1])#~?<} [hex1]=0xA0 Also Data/idx/lib/dat/eQELvDYA.MI in the same ISO, password: *#`f52c84_~?<}{~&0[hex1]H&#gs07#@ [hex1]=0xA0
Simple copy paste, latest version of 7-Zip.
Wait what, I tried and it does not…I used Winhex to copy the password, paste it in 7zip password dialog, and it doesn’t work…
I used HxD 1.7.7.0. I am pretty sure all ASCII characters apart from NULL and maybe a few more of those 32 control characters can be copy and pasted as plain text.
tried HxD and it doesn’t work either…I wonder if it’s because i’m using Windows in chinese environment, mind making a short video to show how you did that?
EDIT: ok figured it out, it’s really because i’m in chinese environment. I tried copy password from notepad directly in WinXP English in my VM, it works. *sigh*
https://blog.betaworld.cn/wp-content/uploads/2021/10/decrypted_WcByyjFx.MI_.png