Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sojsonv7: 未知变种 寻求来源后适配 #100

Closed
woshicaca opened this issue Jun 16, 2024 · 5 comments
Closed

sojsonv7: 未知变种 寻求来源后适配 #100

woshicaca opened this issue Jun 16, 2024 · 5 comments

Comments

@woshicaca
Copy link

v7.txt
这个v7也会报错,麻烦研究一下

@echo094 echo094 changed the title 有一个v7无法解 sojsonv7: 无法处理最新版工具混淆后的代码 Jun 16, 2024
@echo094 echo094 changed the title sojsonv7: 无法处理最新版工具混淆后的代码 sojsonv7: 无法处理被复杂后处理后的代码 Jun 16, 2024
@echo094
Copy link
Owner

echo094 commented Jun 16, 2024

去看了下公开的工具,混淆逻辑和之前相比没有变化。

这个样本可能是用户额外进行了一系列后处理,在全局范围观察到下述变化:

  • RotateFunction的实现原理不变,但是函数结构有很大的变化
  • stringArray相关的变量名被简化,使其可能与子作用域中的变量重名
  • 使用forStatement代替whileStatement,使得BlockStatementControlFlowFlattening的特征出现了变化

后处理方法之复杂,给人一种这是V7内部测试版的感觉。

目前的方案是:

  • 完善stringArray的处理逻辑
  • 在找到混淆工具的来源后,对其所包含的后处理在主线中进行适配

目前,对于本issue中的样本,你稍稍微改几行代码就能够处理stringArray了

@echo094 echo094 changed the title sojsonv7: 无法处理被复杂后处理后的代码 sojsonv7: 未知变种 寻求来源后适配 Jun 16, 2024
@echo094
Copy link
Owner

echo094 commented Jun 16, 2024

链接 #96 具有同样的forStatement代替whileStatement特征

index

NAME = "有看头";
VALY = ["yktck"];
VER = "1.0.0";
CK = "";
LOGS = 0;
usid = 0;
Notify = 0;
let _0x26e954 = require("crypto-js"),
  _0x5a9a32 = require("fs"),
  _0xc8b87c = require("uuid").v4;
DCFHOST = process.env.DCFHOST;
dcfkey = encodeURIComponent(process.env.dcfkey);
IP = "";
IPCITY = "";

@huanzhiyi
Copy link

链接 #96 具有同样的forStatement代替whileStatement特征

https://note.ms/wfsx 这个样本不知道是不是同种类型的

@echo094
Copy link
Owner

echo094 commented Jun 17, 2024

https://note.ms/wfsx 这个样本不知道是不是同种类型的

不是,这个样本只是把第一行version往后移了,把它移回第一行就行了

var version_ = "LLQPlayer.Pro";

还原后的代码还有一些其它的控制流转换操作,比如:

function gen(len, step) {
  var table = [];
  for (var i = 0; i < len; i++) {
    table[(i + step) % len] = [];
  }
  for (var i = 0; i < len; i++) {
    for (var j = len - 1; j >= 0; j--) {
      table[i][(j + step * i) % len] = table[j];
    }
  }
  return table;
}

会生成一个二维矩阵,每个格子都指向某一行,将行作为switch语句的key

@huanzhiyi
Copy link

https://note.ms/wfsx 这个样本不知道是不是同种类型的

不是,这个样本只是把第一行version往后移了,把它移回第一行就行了

var version_ = "LLQPlayer.Pro";

还原后的代码还有一些其它的控制流转换操作,比如:

function gen(len, step) {
  var table = [];
  for (var i = 0; i < len; i++) {
    table[(i + step) % len] = [];
  }
  for (var i = 0; i < len; i++) {
    for (var j = len - 1; j >= 0; j--) {
      table[i][(j + step * i) % len] = table[j];
    }
  }
  return table;
}

会生成一个二维矩阵,每个格子都指向某一行,将行作为switch语句的key

好的 感谢提醒,以为是同一类型。

@echo094 echo094 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants