binary-hardening

Enable and verify binary security mitigations for C/C++ builds with compiler flags.

159|20|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/mohitmishra786/low-level-dev-skills --skill binary-hardening
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: binary-hardening
Source: https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/runtimes/binary-hardening
Command: npx skills add https://github.com/mohitmishra786/low-level-dev-skills --skill binary-hardening

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires checksec.py, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you protect your compiled programs from various exploitation techniques by enabling and verifying crucial security mitigations.

Core Features & Use Cases

  • Binary Analysis: Use checksec to understand the current security posture of your executables.
  • Hardened Builds: Apply compiler and linker flags for protections like RELRO, PIE, stack canaries, and FORTIFY_SOURCE.
  • Advanced Mitigations: Implement Control Flow Integrity (CFI), hardware shadow stacks, and seccomp-bpf for defense-in-depth.
  • Use Case: You've developed a critical C++ application and want to ensure it's as resistant to buffer overflows and control-flow hijacking as possible before deployment.

Quick Start

Analyze the security mitigations present in the executable file named 'my_program' using the checksec tool.

Frequently Asked Questions about binary-hardening

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check binary security mitigations like RELRO and PIE on my compiled C++ executables?

You can check binary security mitigations by running the checksec tool against your compiled executables to analyze the current security posture, including RELRO, PIE, and stack canaries.

What compiler and linker flags are needed to enable binary hardening for C/C++ builds?

Binary hardening requires applying specific compiler and linker flags during your C/C++ builds to enable protections like PIE, stack canaries, FORTIFY_SOURCE, and RELRO for your executables.

What is seccomp-bpf and how does it filter system calls for hardened binaries?

Seccomp-bpf is a system call filtering mechanism used in advanced binary hardening to restrict kernel access, providing defense-in-depth by limiting the system calls an executable can invoke.

Do I need to configure Control Flow Integrity (CFI) and shadow stacks to secure my compiled programs?

Configuring Control Flow Integrity (CFI) and hardware shadow stacks is necessary for advanced binary hardening to protect compiled programs against control-flow hijacking and exploitation techniques.

Does checksec support verifying NSA and CISA recommendations for hardened executables?

The Skill verifies binary security mitigations against NSA and CISA recommendations for hardened executables, ensuring your C/C++ builds meet established defense-in-depth security standards.

Why are stack canaries and FORTIFY_SOURCE not working on my binary hardening build?

Binary hardening protections like stack canaries and FORTIFY_SOURCE require specific compiler flags to be properly passed during the build process; incorrect flags or unsupported compiler versions can prevent mitigations from working.