From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Tool:Rustc" |
|---|
| claim | "Detect It Easy reports Rust in a non-.NET PE in two ways. (1) The first 0x5000 bytes of .rdata hold 'mod.rs' preceded by a backslash or slash, and from there seven consecutive strings of the form <11 bytes>'.rs' 00 follow (each found within 0x1000 bytes of the previous one): panic-location paths that rustc embeds. (2) Otherwise an import library named std-<8 to 16 hex digits>[.dll] or an imported function __rust_dealloc (reported as dynamic Rust runtime). The Rich header plus an entry point starting 48 83 EC 28 (x64) or 83 EC 28 (x86) only add the label MSVC and are not required. The path strings are absent when the panic location text is removed or remapped (for example a stripped or trimmed-paths build) or when .rdata is not named so, so a Rust binary can pass unnoticed." |
|---|
| scope | | level | "tool" |
|---|
| applies_to | "Tool:Rustc" |
|---|
| observed_in | |
|---|
|
|---|
| data | | method | "string scan of .rdata, then imports" |
|---|
| indicator | "'mod.rs' after \ or / in the first 0x5000 bytes of .rdata followed by 7 '.rs' path strings; or import std-<hex>.dll / __rust_dealloc; MSVC label: Rich header and EP 48 83 EC 28" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "DIE Rust detection" |
|---|
| repo | "https://github.com/horsicq/Detect-It-Easy" |
|---|
| commit | "fac6bfade82fa35e742de23f30c40b5b97a585b6" |
|---|
| path | "db/PE/compiler_Rust.4.sg" |
|---|
| lines | "9-56" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T11:22:36.731Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T03:52:11.637Z" |
|---|
| result | "confirmed" |
|---|
| method | "Re-checked the last correction: DIE compiler_Rust.4.sg at fac6bfa lines 9-56: .rdata only, 'mod.rs' within the first 0x5000 bytes preceded by 0x5C or 0x2F, then 7 times an 11-byte + '.rs' 00 pattern (15 bytes) within 0x1000 each; fallback std-<8-16 hex>[.dll] import or __rust_dealloc; Rich header + EP 4883EC28/83EC28 only set the MSVC option. Correction right." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T03:30:58.982Z" |
|---|
| summary | "Re-read compiler_Rust.4.sg lines 9-56: the path rule needs 'mod.rs' preceded by \ or / AND seven consecutive '.rs' path strings; std-<hex>.dll or __rust_dealloc is a separate fallback; Rich header…" |
|---|
| changed | |
|---|
|
|
|---|