Detect It Easy (DiE) Explained: Inside Its 2,369 Rules
Detect It Easy (DiE) is a free, open-source tool that identifies the compiler, packer, protector or installer behind a file, and it does that with a database of small detection scripts plus a separate heuristic engine. O
Detect It Easy (DiE) is a free, open-source tool that identifies the compiler, packer, protector or installer behind a file, and it does that with a database of small detection scripts plus a separate heuristic engine. On 18 November 2026 we read that database straight from the project's GitHub repository, at the commit dated 17 November, and counted it: 2,369 rule files across 29 file-format folders. The counts below show what a DIE result is built from, why most of its Windows packer and protector rules still lean on one spot in the file, and what to make of a "(Heur)" line or an empty report.
When DIE says VMProtect or Themida: the name tells you how the file was wrapped, not what the protected functions do. Devirt's free browser check runs the same first look on PE, ELF and Mach-O files up to 500 MiB without uploading anything. If the code turns out to be virtualized, a free assessment of a file you own or are authorized to analyze comes back with a feasibility report and a quote before any paid work begins.
What is Detect It Easy (DiE)?
Detect It Easy is a cross-platform file identifier for Windows, Linux and macOS, written by horsicq and released under the MIT license. Malware analysts and reverse engineers use it as a first look: drop in an unknown file and DIE reports its format, compiler, linker, libraries and any packer or protector it recognizes. It comes in three builds:
- die: the graphical interface.
- diec: the command-line version, for batch scans and scripts.
- diel: a lightweight GUI that only scans.
The official source is the horsicq/Detect-It-Easy repository and the release links in its README. The README says plainly that detectiteasy.com, which ranks high for the tool's name, is not affiliated with the project.
What's in Detect It Easy's rule database?
Detect It Easy's rule database is a folder of DiE-JS scripts (.sg files) sorted by file format, and at commit 599c2b6 it held 2,369 of them. DIE works out the file's format first, then runs only the rules in that format's folder, so the size of each folder says where the coverage is:
| Format folder | Rule files |
|---|---|
| PE (Windows executables) | 1,046 |
| Binary (unclassified data) | 387 |
| MSDOS | 354 |
| COM | 251 |
| Amiga | 98 |
| APK | 52 |
| ELF | 51 |
| Mach-O | 12 |
| 21 other folders | 118 |
Almost every rule declares what it detects with a meta("type", "name") line, which makes the database easy to sort by type. Protector rules are the biggest group, at 566 files across all formats. Libraries come next with 329, then packers (218), compilers (198) and file formats (186). Another 43 files don't name a type and a product that way. They include the heuristic engines, wrappers that call shared archive parsers, and catch-all modules that report several kinds of result.
The database also moves fast. In the twelve months from November 2025 to October 2026, 1,811 commits touched the db folder, with the busiest month (September 2026) at 442. A DIE install from last year is scanning with a rule set that's a year out of date.
How does Detect It Easy detect a packer?
Detect It Easy detects a packer by running each rule's detect() function against the parsed file and reporting the rules that set bDetected. A rule is ordinary code with access to DIE's format API, so it can check whatever evidence its author trusts. Here's the shape, with an invented packer name and an invented byte pattern:
// Illustrative rule, not from the DIE database
meta("packer", "ExamplePacker");
function detect() {
if (PE.compareEP("DEADBEEF........CAFE") // bytes at the entry point
&& PE.isSectionNamePresent(".expk")) { // plus a section name
bDetected = true;
}
return result();
}
.. is a wildcard byte in DIE's signature syntax, and the pattern language isn't regex. Most real rules are about this small: the median PE packer, protector or cryptor rule is 17 lines long.
To see which evidence those rules use, we sorted the 467 PE rules typed as packer, protector, cryptor or protection by the format-API calls in their code:
- Entry-point code: 322 rules (69%) compare bytes at, or read relative to, the entry point.
- Section layout: 173 (37%) check section names, counts or positions.
- Byte patterns elsewhere: 122 (26%) search for signatures or strings in the rest of the file.
- .NET metadata: 58 (12%) check managed types, strings or methods.
- Imports and exports: 73 (16%).
- Overlay: 47 (10%).
- Resources and version info: 19 (4%).
- Entropy: 3. DIE's entropy checks live mostly in the heuristic engine, which reports "High entropy" as one piece of its evidence.
Put the rows together and the picture changes. 191 of the 467 rules (41%) use entry-point code and nothing else we counted, while 224 (48%) combine two or more kinds of evidence. So DIE's rule set is a mix: nearly half of it cross-checks the file's structure, and four in ten rules are still a single entry-point pattern in a script wrapper.
How is DIE different from PEiD?
Detect It Easy differs from PEiD mainly in that its rules are programs, while PEiD's are byte patterns. DIE still ships PEiD's database for compatibility, and the numbers show why it treats those rules as secondary: of the 4,445 signatures in the bundled userdb.txt, 3,913 (88%) are flagged ep_only = true, meaning they match at the entry point and nowhere else. Among the 467 native DIE rules counted above, 41% rely on the entry point alone.
That gap explains a lot of disagreements between the two tools. An entry-point-only signature breaks as soon as a protector changes or mutates its startup code, and short patterns start matching unrelated files. The README calls many of the bundled PEiD signatures "noisy by modern standards" and says their results should be treated as secondary evidence. DIE is one answer to what replaced PEiD, and its own rules show the shift: 145 of its 467 PE packer and protector rules (31%) never read the entry point at all.
What does (Heur) mean in Detect It Easy?
In Detect It Easy, a result line marked "(Heur)" came from the heuristic engine, not from a matched rule. The engine is a single DiE-JS file of about 18,400 lines that reads headers, sections, imports, resources, overlays, .NET metadata and the code reachable from the entry point, without running the file. Instead of matching one pattern, it adds up independent clues and lists them in brackets, for example "Strange sections + Stack-push address near EP + Rdtsc near EP".
That has three consequences:
- A (Heur) line is an inference. It says the evidence looks like a packer, a cryptor or obfuscation, not that a known product was matched.
- It can overrule a signature. The README says the engine can reject a misleading database result and suppress fake packer or protector signatures that obfuscators leave behind.
-
You can ask for the evidence. The README recommends the
--heuristicscanand--verboseoptions together for the fullest report, which keeps general, .NET and instruction-level evidence on separate lines.
Is Detect It Easy accurate?
Detect It Easy is accurate on well-known packers, but its result is a lead, not a verdict. The best public test we found is FFRI's 2021 packer detection evaluation, which ran DIE's 3.00 release over a labeled dataset of packed and unpacked files. DIE named the packer type correctly 84.9% of the time, against 73.2% for pypeid, and flagged 0.67% of the unpacked files as packed. On a second dataset of packed samples only, its accuracy fell to 69.0%. That test is from 2021 and used a much older rule set, so read it as a baseline, not as today's number.
The limits are structural, and DIE's README states them:
- An empty result proves nothing. A clean report only means the enabled rules found nothing they recognize. A new or custom protector produces exactly that.
- DIE is not an antivirus. A protector's name says how a file was wrapped. Legitimate software uses commercial protectors too.
- The bundled PEiD rules are noisy. Treat a PEiD-style hit as secondary.
When a result matters, check it against the file itself: section names and sizes, entropy, the import table and the overlay. When DIE and another identifier disagree, read a Detect It Easy result line by line and compare the evidence behind each name.
What happens when DIE names a VM protector?
When Detect It Easy names a VM-based protector such as VMProtect or Themida, it has recognized the wrapper from the file's structure, not recovered anything inside it. Our count shows how those rules decide: of the 255 PE protector rules, 190 look at entry-point code, and the other 65 read evidence such as sections, imports or .NET metadata. None of them can tell you which functions the protector turned into bytecode for its own virtual machine.
That's where identification ends. Those functions still run as bytecode inside the protector's interpreter, so a disassembler shows the interpreter, not the original logic. Getting them back is devirtualization, a different job from unpacking, and the difference between unpacking and devirtualization decides what work comes next.
How we counted
-
Source: the
db/andpeid_rules/folders of horsicq/Detect-It-Easy at commit 599c2b6 (17 November 2026), downloaded as the GitHub source archive on 18 November 2026. The rule files were read as text. Nothing was executed, and DIE itself wasn't run. -
Rule file: one
.sgfile in a format folder. We skipped the icon, metadata and debug folders. -
Type: the first argument of the file's first
meta()call. -
Evidence: regular expressions over each PE rule's direct
PE.*calls. Shared helpers pulled in withincludeScript(20 PE rules use them) weren't followed, so the evidence counts are lower bounds. -
Activity: commits touching
db/per month, from the GitHub API. - What this doesn't measure: detection accuracy. A rule file isn't a detection, since one file can report several names and the heuristic engine adds results of its own.
The scripts and the raw counts are kept with this post's source files, and rerunning them on a newer commit takes a minute. The database changes every week, so expect every number above to drift.
Written by Devirt, an automated devirtualization service for authorized analysis of protected software.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.

