packer-section
Section names of UPX, ASPack, PECompact, MPRESS, NsPack, Themida/WinLicense, VMProtect, Enigma, Petite, FSG, MEW, Obsidium and more (default: high)
GitHub Packages · MIT · Node ≥ 18
Static PE and ELF triage in pure JavaScript: headers, sections, entropy, imports, imphash, packer hints, capabilities and hardening checks.
Static PE/ELF triage in pure JS: headers, sections, entropy, imports, imphash, Rich header, overlays, TLS callbacks, packer hints (UPX, ASPack, VMProtect...), suspicious API capabilities mapped to ATT&CK, and hardening (ASLR, NX, CFG, PIE, RELRO, canary). Never executes samples. Zero deps.
1 Point the @mrlouiswright scope at GitHub Packages in .npmrc
@mrlouiswright:registry=https://npm.pkg.github.com2 Install
npm i -D @mrlouiswright/binary-sentinelPublished to GitHub Packages, not npmjs.com. GitHub Packages needs a GitHub token with read:packages to install, even for public packages: add //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} to .npmrc or run npm login --registry=https://npm.pkg.github.com.
$ npx binary-sentinel elf-weakbinary-sentinel — 1 target(s) elf-weak type: elf size: 12528 sha256: c322806afd5b93132330246f8f7ea123fd4d128c737b6c7f3b1c27a7689e2fb7 entropy: 1.734 format: ELF64 x86-64 executable interpreter: /lib64/ld-linux-x86-64.so.2 needed: libc.so.6 importHash: b668c3a4d5308e402be5a46970c412ad hardening: pie=false nx=false execStack=true relro=none bindNow=false canary=false fortify=false sections: 30... 2 medium, 3 low, 1 info✔ Passing (fail-on: high).
binary-sentinel gives an analyst a quick first look at a Windows PE (EXE/DLL/SYS, 32- and 64-bit) or Linux/Unix ELF file without leaving the terminal or CI. The same parser can also check your own release binaries for missing hardening (ASLR, DEP/NX, CFG, PIE, RELRO, stack canaries). Samples are only ever read as bytes and are never executed or loaded.
CLI, library and GitHub Action. Node.js 18+, zero runtime dependencies, no native code.
Section names of UPX, ASPack, PECompact, MPRESS, NsPack, Themida/WinLicense, VMProtect, Enigma, Petite, FSG, MEW, Obsidium and more (default: high)
Packer/protector strings (UPX!, PECompact2, ConfuserEx…) (default: high)
Writable + executable section or LOAD segment (default: high)
Entry point outside every section, in a non-executable section or in the last section (default: high)
Overlay contains another PE/ELF or archive (droppers, installers) (default: high)
Classic injection API combinations (VirtualAllocEx + WriteProcessMemory + CreateRemoteThread, process hollowing…) (default: high)
Executable section ≥ 7.2 bits/byte, or any section ≥ 7.6 (default: medium)
Fewer than 15 imports including GetProcAddress/dlsym (default: medium)
# Example
npx binary-sentinel suspicious.exe# JSON includes full headers/sections/imports
npx binary-sentinel ./samples --format json --json triage.json# CI gate for your own binaries
npx binary-sentinel dist/ --profile hardening --fail-on highpermissions:
contents: read
security-events: write # only for the SARIF upload
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with: { persist-credentials: false }
- uses: MrLouisWright/binary-sentinel@v1
with:
targets: 'dist/'
fail-on: high
sarif: binary-sentinel.sarif
- uses: github/codeql-action/upload-sarif@v3
if: always()
with: { sarif_file: binary-sentinel.sarif }
| Flag | Description |
|---|---|
--profile <p> | triage (default: packers, capabilities, anomalies) | hardening (ASLR/NX/RELRO/PIE/canary as high) |
--details | Include full parsed headers, sections and imports in JSON output |
| Policy and output | |
-c, --config <file> | JSON config (default .binary-sentinel.json if present) |
-f, --format <fmt> | text (default) | json | sarif | markdown |
--json/--sarif/--markdown <file> | Also write that format to a file |
--fail-on <sev> | critical | high | medium | low | info | none (default high) |
--list-rules | Print rules and default severities |
--no-color | Disable colours |
Full reference, config file format and API in the README.
Support this project
I build free, open-source tools that help developers ship safer websites. Every coffee helps keep them maintained, documented and free for everyone.
Buy me a coffee (opens Stripe in a new tab)Secure checkout by Stripe