How Far Does Entropy Go? Duplicates, Confounding, Drift and Padding in Entropy-Based Detection of Malicious PE Files

Abstract Shannon entropy is a common static indicator of packed or encrypted Windows executables. We measure how much the entropy of the first PE section, alone or with the size fields of the same header, tells about maliciousness, on 43,139 PE section headers and 799,920 labelled EMBER 2018 samples. In both datasets 64% of malicious files share their first section with other files, so random cross-validation largely measures memorisation: grouping identical sections lowers the AUC of an entropy-only model from 0.87 to 0.76 and from 0.77 to 0.70. On the EMBER temporal split, 97.5% of the detections of this model at 1% false positives are sections already seen in training; on unseen sections it detects 0.9% of malware, and 7.9% with the size fields added. A strong size confound in the first dataset does not replicate on EMBER, and empty-on-disk first sections are also frequent in benign software. Using standard bounds on the entropy of a section after appending arbitrary bytes, we compute from header data alone which detections are evaded whatever the section content. On the deduplicated dataset, appends guarantee evasion for 52--92% of the samples detected by an entropy-and-size model, and for 96--98% if the attacker can also use padding of benign-looking entropy; appends that stay within the alignment slack or keep the header consistent achieve only 6--24%. Since information content, size times entropy, never decreases under appends, a monotone model is provably immune, but its AUC falls to 0.52--0.62. Adversarial training reduces evasion but does not restore detection.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-09
DOI
https://doi.org/10.21203/rs.3.rs-11309969/v1
Primary Topic
Advanced Malware Detection Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

How Far Does Entropy Go? Duplicates, Confounding, Drift and Padding in Entropy-Based Detection of Malicious PE Files

Giulio Bello, Chiara Tani, Niccolò Rinaldi
Research Square
Advanced Malware Detection Techniques
preprint

How Far Does Entropy Go? Duplicates, Confounding, Drift and Padding in Entropy-Based Detection of Malicious PE Files

Giulio Bello, Chiara Tani, Niccolò Rinaldi
preprint en

Abstract

Abstract Shannon entropy is a common static indicator of packed or encrypted Windows executables. We measure how much the entropy of the first PE section, alone or with the size fields of the same header, tells about maliciousness, on 43,139 PE section headers and 799,920 labelled EMBER 2018 samples. In both datasets 64% of malicious files share their first section with other files, so random cross-validation largely measures memorisation: grouping identical sections lowers the AUC of an entropy-only model from 0.87 to 0.76 and from 0.77 to 0.70. On the EMBER temporal split, 97.5% of the detections of this model at 1% false positives are sections already seen in training; on unseen sections it detects 0.9% of malware, and 7.9% with the size fields added. A strong size confound in the first dataset does not replicate on EMBER, and empty-on-disk first sections are also frequent in benign software. Using standard bounds on the entropy of a section after appending arbitrary bytes, we compute from header data alone which detections are evaded whatever the section content. On the deduplicated dataset, appends guarantee evasion for 52--92% of the samples detected by an entropy-and-size model, and for 96--98% if the attacker can also use padding of benign-looking entropy; appends that stay within the alignment slack or keep the header consistent achieve only 6--24%. Since information content, size times entropy, never decreases under appends, a monotone model is provably immune, but its AUC falls to 0.52--0.62. Adversarial training reduces evasion but does not restore detection.

Research Square
University of Pisa (IT), University of Florence (IT)
Advanced Malware Detection Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
How Far Does Entropy Go? Duplicates, Confounding, Drift and Padding in Entropy-Based Detection of Malicious PE Files — Giulio Bello, Chiara Tani, et al. · Research Square (2026) | TGRS Research Map | TGRS