measuring-section-entropy-to-detect-packing
Detects packing and encryption by measuring Shannon entropy across a binary''s
v1.0.03 התקנות+3 ב-7 ימים24 כוכביםApache-2.0סונכרן לפני 10 שעות
התקנה
עדיין אין לכם את ה-CLI של NotHoly? התקינו אותו קודם.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/measuring-section-entropy-to-detect-packingנכתב אל ~/.notholy/skills אחרי בדיקת החתימה וה-SHA-256.
חתימהחתום, ed25519
חבילהd10f79fa…5e39fede
d10f79fa3e24…6d0b5e39fede4 קבצים · 3.4 KBסריקהבינונישני ממצאים
- סקריפט הרצה שמגיע עם הסקילscripts/analyst.py
- קישורים לדומיינים חיצוניים
מקורgithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/measuring-section-entropy-to-detect-packing@da7600a
הפריט הזה עדיין לא נכתב בעברית, ולכן הוא מוצג בשפה אחרת: English.
בעמוד הזה
When to Use
- You want a quick statistical signal of whether a sample is packed or encrypted.
- You are triaging a PE and need to flag suspicious high-entropy executable sections.
- You are deciding whether to route a sample to an unpacking workflow.
Do not use entropy as a verdict — legitimate compressed resources and installers also show high entropy; combine with imports, section names, and raw/virtual size anomalies.
Prerequisites
- Python (
mathstdlib); optionallypefilefor per-section analysis.
Safety & Handling
- Compute entropy on the inert file; never execute the sample.
- Keep the sample password-protected at rest and reference it by hash.
Workflow
Step 1: Compute whole-file and sliding-window entropy
Calculate Shannon entropy (0–8 bits/byte). Sliding-window entropy reveals localized high-entropy regions even when the overall value is moderate.
python scripts/analyst.py entropy sample.exeStep 2: Compute per-section entropy (PE)
For each PE section, compute entropy and compare raw vs. virtual size. Executable sections with entropy > ~7.0 are a packing indicator.
Step 3: Correlate structural anomalies
Flag classic packer signs: high-entropy .text, unusual/renamed sections (UPX0, random
names), tiny raw size but large virtual size, and an entry point outside .text.
Step 4: Decide routing
If indicators stack (high entropy + thin IAT + odd sections), route to unpacking; otherwise proceed with normal static analysis.
Validation
- High-entropy executable sections are corroborated by other packing signs before concluding.
- Benign high-entropy cases (compressed resources) are not misclassified as packers.
- The routing decision (unpack vs. proceed) is justified by combined indicators.
Pitfalls
- Calling any high-entropy file "packed" without structural corroboration.
- Ignoring sliding-window entropy and missing a localized encrypted blob.
- Overlooking raw-vs-virtual size mismatch, a strong unpacking-at-runtime hint.
References
- See
references/api-reference.mdfor the entropy tool. - Shannon entropy and the PE/COFF spec (linked in frontmatter).
הקבצים בגרסה הזו
references/11.3 KB
- api-reference.md1.3 KB
scripts/13.0 KB
- analyst.py3.0 KB
- LICENSE340 B
- SKILL.md3.1 KB
הרשאות
| הרשאה | הוצהר | נמצא בסריקה |
|---|---|---|
| קורא קבצים | לא | לא |
| כותב קבצים | כן | כן |
| מריץ פקודות shell | כן | כן |
| משתמש ברשת | כן | כן |
| משתמש במחברים | לא | לא |
| שולט בדפדפן | לא | לא |
ממצאי הסריקה
נבדק ב-13 בנוב׳ 2026
- בינוניתקובץ · סקריפט הרצה שמגיע עם הסקילscripts/analyst.py
- מידעקישור · קישורים לדומיינים חיצוניים
סריקה נקייה מורידה את הסיכון, אבל לא מוכיחה שהחבילה בטוחה. כדאי לקרוא מה מתקינים.
| גרסה | פורסמה | Commit | SHA-256 | חתימה | שינוי בהרשאות |
|---|---|---|---|---|---|
| v1.0.0 | 13 בנוב׳ 2026 | da7600a | d10f79fa | חתומה | – |
עוד מ-meltedinhex
הכול מהמפרסם הזה- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-sigma-detection-rulesmeltedinhex/writing-sigma-detection-rules3
עוד בקטגוריה הנדסה לאחור ו-fuzzing
לקטגוריהשאלו כל מה שהסקופ מאפשר.
יוצרים חשבון, מוסיפים קרדיטים ושואלים את השאלה הראשונה בצ׳אט או בטרמינל.
- 1/3
יצירת חשבון
פרטי או חברה. אפשר לעבור לחשבון חברה אחר כך בלי לאבד יתרה או מפתחות.
פרטיחברה - 2/3
הוספת קרדיטים
בכרטיס אשראי. תשלום לפי טוקן, בלי מנוי.
$5.00טעינה מינימלית - 3/3
שאלה ראשונה
בצ׳אט, או להתקין את ה-CLI ולהריץ notholy login בטרמינל.
$ notholy login