处理d

关系到

  1. D = ?
  2. D == T['sample'](this['traceData'], V)// 获取this['traceData']的前50个数据

往回翻,反混淆分析鼠标事件函数:

d分析 - 图1

  1. this['traceData']应该就是滑动轨迹,通过鼠标事件读取
  1. var w6 = N(w4, w5 + '');
  2. this['traceData'].push(w6)

而w4和w5又从何得来?

  1. var w4 = this[kV(0x2d0)]['state']['token']
  2. w5 = [Math[kV(0x17a)](w0[kV(0x466)] < 0x0 ? 0x0 : w0[kV(0x466)]), Math[kV(0x17a)](w0['clientY'] - w0['startY']), T[kV(0x436)]() - w0[kV(0x3da)]];

观察w4,发现是token,解决

观察w5

d分析 - 图2

阅读整个分析代码,得知clientX,clientY,dragX,是坐标轨迹计算算法。

d分析 - 图3

然后得知w5的意义:

w5 = [移动的横坐标,移动的纵坐标,当前时间-开始时间]

w6 = N(w4, w5 + '');

接下来是算N了,可以用嫁接法:

d分析 - 图4

d分析 - 图5

N函数解决后,就可以模拟实现this['traceData']

整合代码:

  1. import subprocess
  2. import random
  3. def N_w8(v1, v2):
  4. res = subprocess.check_output(f"node N1.js {v1} {v2}")
  5. res = res.decode('utf-8').strip()
  6. return res
  7. def run():
  8. # 识别滑块的距离
  9. x_distance = 100
  10. # 背景请求返回的token
  11. bg_token = "cc7c74c959d842e69aa980a3430b7884"
  12. trace_data = []
  13. interval_value = random.randint(100, 300)
  14. step = 2
  15. for i in range(0, x_distance + 1, step):
  16. x_value = i + step
  17. if x_value > x_distance:
  18. x_value = x_distance
  19. interval_value += random.randint(10, 20)
  20. y_value = random.randint(0, 5)
  21. # trace_data
  22. line = f"{x_value},{y_value},{interval_value}"
  23. line = N_w8(bg_token, line)
  24. trace_data.append(line)
  25. print(trace_data)
  26. if __name__ == '__main__':
  27. run()

距离D的辅助,还差搞定J函数,发现J函数到处用。

直接上嫁接法:

d分析 - 图6

最终整合

  1. import subprocess
  2. import random
  3. def N_w8(v1, v2):
  4. res = subprocess.check_output(f"node N1.js {v1} {v2}")
  5. res = res.decode('utf-8').strip()
  6. return res
  7. def j_as_ww(v1):
  8. res = subprocess.check_output(f"node j.js {v1}")
  9. res = res.decode('utf-8').strip()
  10. return res
  11. def run():
  12. # 识别滑块的距离
  13. x_distance = 100
  14. # 背景请求返回的token
  15. bg_token = "cc7c74c959d842e69aa980a3430b7884"
  16. trace_data = []
  17. interval_value = random.randint(100, 300)
  18. step = 2
  19. for i in range(0, x_distance + 1, step):
  20. x_value = i + step
  21. if x_value > x_distance:
  22. x_value = x_distance
  23. interval_value += random.randint(10, 20)
  24. y_value = random.randint(0, 5)
  25. # trace_data
  26. line = f"{x_value},{y_value},{interval_value}"
  27. line = N_w8(bg_token, line)
  28. trace_data.append(line)
  29. d_string = j_as_ww(":".join(trace_data[0:50]))
  30. print(d_string)
  31. if __name__ == '__main__':
  32. run()