devirt-corpus
收藏资源简介:
devirt-corpus 是一个专门用于 JavaScript 代码反混淆研究的开源数据集。该数据集包含大量经过混淆处理的 JavaScript 代码样本,每个样本均通过反混淆器进行处理,并提供了混淆前后的源代码对比以及可读性量化指标。数据集规模在 1,000 到 10,000 个样本之间。数据内容主要由两部分构成:一是通过 javascript-obfuscator 工具在不同配置下对原始种子代码进行混淆生成的样本(位于 generated/ 目录);二是从真实世界收集并经过过滤和去重处理的 JavaScript 脚本(位于 real/ 目录)。每个样本均记录其来源路径(path)、技术类别(source,如 generated/strings_rc4 或 real/tranco)、混淆输入代码(input)及其字节大小(in_bytes)、反混淆输出代码(output)及其字节大小(out_bytes)。此外,数据集还提供了关键的可读性评估指标:保留字节比例(kept_pct,即 out_bytes / in_bytes)以及混淆前后机器生成标识符(如十六进制格式 _0x… 或短标识符)的占比(opaque_in / opaque_out)。该数据集适用于代码反混淆算法开发、混淆效果评估、源代码可读性分析以及软件安全研究等任务。所有样本的指标数据以 JSON Lines 格式存储在 metrics/*.jsonl 文件中,便于通过数据集查看器浏览或程序化处理。
devirt-corpus is an open-source dataset specifically designed for research on JavaScript code deobfuscation. It contains a large number of obfuscated JavaScript code samples, each processed by a deobfuscator, and provides comparisons of source code before and after deobfuscation along with readability quantification metrics. The dataset size ranges from 1,000 to 10,000 samples. The data content primarily consists of two parts: samples generated by obfuscating original seed code using the javascript-obfuscator tool under different configurations (located in the generated/ directory), and real-world collected JavaScript scripts that have been filtered and deduplicated (located in the real/ directory). Each sample records its source path (path), technical category (source, such as generated/strings_rc4 or real/tranco), obfuscated input code (input) and its byte size (in_bytes), deobfuscated output code (output) and its byte size (out_bytes). Additionally, the dataset provides key readability evaluation metrics: the percentage of bytes retained (kept_pct, i.e., out_bytes / in_bytes) and the proportion of machine-generated identifiers (e.g., hexadecimal format _0x… or short identifiers) before and after obfuscation (opaque_in / opaque_out). This dataset is suitable for tasks such as deobfuscation algorithm development, obfuscation effectiveness evaluation, source code readability analysis, and software security research. All sample metric data is stored in JSON Lines format in metrics/*.jsonl files, facilitating browsing via dataset viewers or programmatic processing.
数据集概述:devirt-corpus
- 数据集名称:devirt-corpus
- 许可证:MIT
- 规模:1,000 ~ 10,000 条样本
- 标签:代码、JavaScript、反混淆、混淆
- 用途:提供混淆后的 JavaScript 代码,以及每条样本经过反混淆处理后的指标数据,用于评估反混淆效果。
数据内容
每条样本包含以下字段:
| 字段 | 含义 |
|---|---|
path |
样本路径 |
source |
混淆技术或来源(例如 generated/strings_rc4 表示生成类,real/tranco 表示真实类) |
in_bytes / out_bytes |
混淆输入大小 / 反混淆输出大小 |
kept_pct |
输出大小占输入大小的百分比(out_bytes / in_bytes) |
opaque_in / opaque_out |
反混淆前 / 后,机器生成标识符(十六进制 _0x… 或 1-2 字符)的比例 |
input / output |
混淆后的源代码 / 反混淆后的源代码 |
数据布局
generated/<profile>/<seed>.js:使用 javascript-obfuscator 按不同配置处理种子文件生成的混淆样本。real/<source>/…:真实世界的 JavaScript 脚本,经过过滤和去重。seeds/:生成部分所使用的原始未混淆程序。metrics/*.jsonl:每条样本的评测指标文件,以 JSONL 格式存储,驱动数据集查看器展示。





