vasie commited on
Commit
279ba79
·
1 Parent(s): de93233

Trim dataset card: drop scoreboard and private-repo references

Browse files
Files changed (1) hide show
  1. README.md +12 -62
README.md CHANGED
@@ -17,77 +17,27 @@ configs:
17
 
18
  # devirt-corpus
19
 
20
- A corpus of obfuscated JavaScript with **per-sample deobfuscation metrics** for
21
- the [`devirt-core`](https://github.com/devirt-dev/devirt-core) engine. Every
22
- sample is run through the deobfuscator; the input (obfuscated) bytes, the output
23
- (deobfuscated) bytes, and readability scores are published in `metrics.jsonl`.
24
 
25
- 👉 **Use the Dataset Viewer above** to browse all 9,514 samples — filter by
26
- `source`, sort by `kept_pct`/`opaque_out`, and read each sample's `input` next
27
- to its `output`.
28
-
29
- ## What's measured
30
 
31
  | column | meaning |
32
  |---|---|
33
- | `path` | sample path in this repo |
34
  | `source` | technique / origin (e.g. `generated/strings_rc4`, `real/tranco`) |
35
  | `in_bytes` / `out_bytes` | obfuscated input vs. deobfuscated output size |
36
- | `kept_pct` | `out_bytes / in_bytes` — lower means more dead weight removed (on real *minified* input this exceeds 100% because the engine reformats/expands it; readability, not size, is the win there) |
37
- | `opaque_in` `opaque_out` | % of identifiers that look machine-generated (hex `_0x…` or 1–2 chars) before vs. after — **the headline readability metric** |
38
- | `input` / `output` | the actual obfuscated and deobfuscated source |
39
-
40
- ## Scoreboard
41
-
42
- Aggregate over the whole corpus, by source. Generated with
43
- `cargo run --release --bin report -- --markdown` in `devirt-core`.
44
-
45
- | source | files | in bytes | out bytes | kept% | opaque% in→out |
46
- |---|--:|--:|--:|--:|--:|
47
- | `generated/cf_dead` | 500 | 754109 | 61635 | 8% | 51.6% → 3.9% |
48
- | `generated/controlflow` | 500 | 762150 | 63133 | 8% | 51.5% → 4.2% |
49
- | `generated/controlflow_half` | 500 | 705909 | 63089 | 8% | 51.3% → 4.2% |
50
- | `generated/deadcode` | 500 | 637045 | 61819 | 9% | 50.9% → 4.0% |
51
- | `generated/minimal` | 500 | 638935 | 60273 | 9% | 50.9% → 3.7% |
52
- | `generated/names_hex` | 500 | 642247 | 64967 | 10% | 52.6% → 11.3% |
53
- | `generated/names_mangled` | 500 | 406652 | 58959 | 14% | 52.7% → 11.8% |
54
- | `generated/numbers` | 500 | 838299 | 61909 | 7% | 39.3% → 4.0% |
55
- | `generated/objectkeys` | 500 | 641608 | 61241 | 9% | 51.0% → 4.0% |
56
- | `generated/sa_cf` | 500 | 2019731 | 61280 | 3% | 60.0% → 3.7% |
57
- | `generated/sa_numbers` | 500 | 1519510 | 61188 | 4% | 44.3% → 3.7% |
58
- | `generated/splitstrings` | 500 | 646336 | 60023 | 9% | 51.0% → 3.7% |
59
- | `generated/strings_b64` | 500 | 1164235 | 61346 | 5% | 58.2% → 3.7% |
60
- | `generated/strings_indexshift` | 500 | 1894140 | 61255 | 3% | 60.8% → 3.7% |
61
- | `generated/strings_none` | 500 | 647016 | 59997 | 9% | 50.9% → 3.7% |
62
- | `generated/strings_rc4` | 500 | 1876836 | 61506 | 3% | 60.4% → 3.7% |
63
- | `generated/strings_rotate` | 500 | 1164235 | 61346 | 5% | 58.2% → 3.7% |
64
- | `generated/strings_wrappers` | 500 | 2098975 | 61665 | 2% | 61.0% → 3.6% |
65
- | `generated/strong` | 500 | 2604260 | 108691 | 4% | 48.4% → 3.7% |
66
- | `real/tranco` | 14 | 601126 | 982004 | 163% | 49.6% → 7.4% |
67
- | **TOTAL** | **9514** | **22263354** | **2197326** | **9%** | **52.9% → 4.6%** |
68
-
69
- **Headline:** across 9,514 samples the engine cuts machine-generated identifiers
70
- from **52.9% to 4.6%**. The `names_hex` / `names_mangled` rows (~11%) are the
71
- honest weak spot — pure identifier renaming can't be reversed to semantic names.
72
 
73
  ## Layout
74
 
75
- - `generated/<profile>/<seed>.js` — 500 deterministic seeds × 19
76
  [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator)
77
  profiles.
78
- - `real/<source>/…` — real-world scripts (crawled top sites; npm bundles; HTTP
79
- Archive), filtered + deduped.
80
  - `seeds/` — the plain source programs the generated set is built from.
81
- - `metrics/*.jsonl` — the per-sample table above; powers the Dataset Viewer
82
- (sharded to stay under HF's 10 MB-per-file limit).
83
-
84
- Regenerate the scores from scratch:
85
-
86
- ```sh
87
- git clone https://github.com/devirt-dev/devirt-core && cd devirt-core
88
- scripts/pull-corpus.sh
89
- cargo run --release --bin report -- --json samples/metrics.jsonl --markdown
90
- # shard for HF (>10 MB files need LFS otherwise):
91
- mkdir -p samples/metrics && split -C 9000000 -d --additional-suffix=.jsonl \
92
- samples/metrics.jsonl samples/metrics/part- && rm samples/metrics.jsonl
93
- ```
 
17
 
18
  # devirt-corpus
19
 
20
+ Obfuscated JavaScript with per-sample deobfuscation metrics. Each sample is run
21
+ through a deobfuscator; the obfuscated input, the deobfuscated output, and
22
+ readability scores are published in `metrics/*.jsonl` and browsable in the
23
+ Dataset Viewer.
24
 
25
+ ## Columns
 
 
 
 
26
 
27
  | column | meaning |
28
  |---|---|
29
+ | `path` | sample path |
30
  | `source` | technique / origin (e.g. `generated/strings_rc4`, `real/tranco`) |
31
  | `in_bytes` / `out_bytes` | obfuscated input vs. deobfuscated output size |
32
+ | `kept_pct` | `out_bytes / in_bytes` |
33
+ | `opaque_in` / `opaque_out` | percent of identifiers that look machine-generated (hex `_0x…` or 1–2 chars), before and after |
34
+ | `input` / `output` | the obfuscated and deobfuscated source |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  ## Layout
37
 
38
+ - `generated/<profile>/<seed>.js` — seeds obfuscated under
39
  [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator)
40
  profiles.
41
+ - `real/<source>/…` — real-world scripts, filtered and deduped.
 
42
  - `seeds/` — the plain source programs the generated set is built from.
43
+ - `metrics/*.jsonl` — the per-sample table that powers the Dataset Viewer.