concept
Security
#security
#malware
#binary
#math

Entropy in Malware Analysis

Entropy is a statistical measure of how 'random' the bytes in a file look. In malware analysis, abnormally high entropy is a strong signal that a section is packed, encrypted or otherwise obfuscated.

Reading level

What it is

Shannon entropy: H = −Σ p(x) log₂ p(x). Range 0 (constant) to 8 (uniform random byte).

Why it's useful

Cheap, deterministic signal. Strong correlation with packing/encryption; useful to gate deeper analysis.

How Decoder implements it

Computed per PE section and per file in the static pipeline; values > 7.0 are surfaced with a rationale.

When to use it

Triage of PE/ELF binaries, suspect ZIP members, dropped artefacts.

When NOT to use it

As a sole verdict — high entropy ≠ malicious (compressed installers are also high-entropy). Always combine with other signals.

Practical example

LockBit dropper showed `.text` H ≈ 7.85 — combined with suspicious imports and an encoded PowerShell stage, it was a confident static verdict.

FAQ

Glossary

Shannon entropy
Information-theoretic measure of uncertainty in a distribution.
Packing
Compressing or encrypting an executable to hide its real payload until runtime.

Related