checksec

Checks ELF or PE binaries for missing or weak hardening protections before releases or incident reviews, such as NX, PIE, RELRO, stack canaries, and Fortify.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "checksec" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-2653b89475e113ae069d0a3800ec1ab95d145c886483a341c55ab59235541c94. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/inspect-binary-hardening-flags-and-exploit-mitigations-with-checksec before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Checks ELF or PE binaries for missing or weak hardening protections before releases or incident reviews, such as NX, PIE, RELRO, stack canaries, and Fortify.

0 Downloads

Introduction source: third_party · user_3c6cb52e · 1.0 Reference

SkillPi interpretation

Tasks
Auth/lab ref: Linux binary and kernel hardening inspection tool for RELRO, canary, NX, PIE, RPATH, RUNPATH, symbols, fortify, and kernel config checks.
Audience
Use checksec when you need to answer questions like: Is PIE enabled? Is there a stack canary? Is NX enforced? Is RELRO partial or full? Are symbols stripped? What kernel hardening settings are enabled? This is often the **first command** in pwn/reversing triage.
Inputs and outputs
checksec file /bin/ls --output json
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: checksec
description: "Auth/lab ref: Linux binary and kernel hardening inspection tool for RELRO, canary, NX, PIE, RPATH, RUNPATH, symbols, fortify, and kernel config checks."
compatibility: "Linux primary; macOS can inspect Linux files with limits; Go-based releases plus historical bash usage."
metadata:
  author: AeonDave
  version: "1.0"

checksec

Quick hardening triage for ELF binaries and Linux kernels.

When to use checksec

Use checksec when you need to answer questions like:

  • Is PIE enabled?
  • Is there a stack canary?
  • Is NX enforced?
  • Is RELRO partial or full?
  • Are symbols stripped?
  • What kernel hardening settings are enabled?

This is often the first command in pwn/reversing triage.

Quick Start

# Inspect one binary
checksec file /bin/ls

# JSON output for automation
checksec file /bin/ls --output json

# Kernel hardening survey
checksec kernel

Output Modes

checksec file ./target --output cli
checksec file ./target --output json
checksec file ./target --output yaml
checksec file ./target --output xml

Use machine-readable output when feeding exploit notes, parsers, or dashboards.

Common Workflows

Pwn triage

checksec file ./vuln

Interpret quickly:

  • No PIE → static code addresses stay stable
  • No canary → stack overflow path is simpler
  • NX enabled → likely ret2libc/ROP instead of raw stack shellcode
  • Partial RELRO → GOT overwrite may still be viable

Batch or scripted inspection

checksec file ./target --output json

Kernel review

checksec kernel
checksec kernel --output json

Useful for local privesc context or hardening audits.

Fortify-focused check

checksec fortifyProc 1

Use when you want deeper fortify coverage rather than just the summary row in normal binary output.

Cross-Compiled / Offline Filesystem Use

Upstream notes two important limits:

  • kernel checks must run on the live system you actually want to assess
  • file checks work offline except fortify may need the target libc context

For offline target filesystems, consider pairing checksec with native readelf if the environment is stripped down.

Practical Notes

  • Current upstream has moved toward a Go implementation and is faster than the old bash-heavy workflow.
  • Checksec is a triage tool, not a full exploitability oracle.
  • Always pair the result with real reversing: readelf, objdump, debugger output, and vulnerability context.

Caveats

  • A "hardened" binary can still be exploitable.
  • A missing mitigation does not guarantee an easy exploit.
  • On non-Linux hosts some checks are limited.

Resources

No bundled scripts/, references/, or assets/. Use upstream examples for the latest subcommands and output schema.

Current listing version

1.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • checksec 是二进制安全分析中的高频刚需工具,广泛用于 pwn/reversing 场景,直接解决安全研究人员的核心任务痛点(快速判断二进制加固状态)
Trigger Precision90/100

Highlights

  • 触发词精准完整,覆盖多种变体(如 'checksec file'、'checksec kernel'、'fortify'、'binary hardening'、'NX'、'PIE'、'RELRO'、'canary'、'kernel config'),边界清晰
Structure and Standards90/100

Highlights

  • Phase/步骤清晰,有出口条件说明,包含端到端示例,frontmatter完整,单文件未超限
Execution Reliability90/100

Highlights

  • 工具来源明确,参数正确,覆盖主要异常(离线使用限制、fortify需要libc context、kernel checks需live system)
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.