简单的 Node.jstracer,用于记录对核心模块的调用,可以伪造某些调用以绕过反分析,保存应用程序写入的文件等等。可用于分析高度混淆的 Node.js 恶意软件。
node -r .\tracer.js main.js
示例追踪(DISPLAY_STACK 激活时):

调整脚本中的常量以配置以下选项:
const DISPLAY_STACK = true // Display stack trace for each call
const SAVE_FILE_WRITES = true // Save files written by the application to the current working directory
const LOG_HTTP_REQUESTS = true // Log HTTP requests to requests.txt
const SKIP_SLEEPS = false // Skip calls to sleep and timers
const TRACE_ERRORS = false // Log errors, caught and uncaught
const IGNORED_APIS = [] // List of APIs that won't be hooked (e.g. ['path.normalize'])
根据恶意软件的不同,你可能需要调整脚本顶部的反反虚拟机拦截设置。
目前实现了以下反反虚拟机功能:
tasklist 时返回空(如果恶意软件试图枚举正在运行的分析工具)