Reference

checksec(1)

check executable and kernel security properties

NAME

checksec – check executable and kernel security properties

SYNOPSIS

checksec [--help] [--version] [--output table|xml|json|yaml] [--libc path] [--no-banner] [--no-headers] [--no-warnings] [--color auto|always|never] command [command-options]

DESCRIPTION

checksec is a Go implementation of the checksec utility. It inspects ELF binaries and the running kernel for common hardening features such as RELRO, NX, PIE, RPATH/RUNPATH, stack canaries, Clang CFI hints, and fortify-able libc usage. Results can be printed as a table or serialized for machine consumption.

GLOBAL OPTIONS

-h, --help

Display help and exit.

-v, --version

Show version and exit.

-o, --output=table|xml|json|yaml

Set output format. Default is table.

-l, --libc=path

Set libc location (useful for fortify checks on offline/embedded filesystems).

--no-banner

Disable the startup banner.

--no-headers

Disable table headers.

--no-warnings

Suppress warning messages (e.g., missing libc, unreadable symbol tables).

--color=auto|always|never

Control color output. Default is auto (color when writing to a terminal). Use always to preserve color through pipes.

COMMANDS

file path

Inspect a single ELF file.

dir directory

Inspect all ELF files in a directory. Use -r, --recursive to recurse into subdirectories.

fortifyFile path

Report fortified/fortifiable libc calls in a file.

fortifyProc pid

Report fortified/fortifiable libc calls for a running process ID.

kernel [config]

Inspect kernel hardening via /proc/config.gz , /boot/config-<release> , or a supplied config path.

proc pid

Inspect the executable of a running process ID.

procAll

Inspect all running processes. Kernel threads and processes without readable /proc/<pid>/exe are skipped.

COMPATIBILITY NOTES

  • The legacy v2/bash options such as --file, --dir, and --proc-all are not the primary v3 interface.

  • Use v3 subcommands instead (for example, checksec file /path/to/bin or checksec procAll).

  • If you want compact output similar to older invocations, use --no-banner (and optionally --no-headers).

EXAMPLES

checksec file /bin/ls

checksec --no-banner --no-warnings file /bin/ls

checksec --color=always file /bin/ls | grep RELRO

checksec --output json dir /usr/bin

checksec dir /usr/bin --recursive

checksec proc 1

checksec kernel

checksec kernel /path/to/config

DIAGNOSTICS

Most commands exit non-zero on fatal errors (e.g., unreadable files). The procAll command skips processes it cannot read and continues.

SEE ALSO

hardening-check(1), feature_test_macros(7), gcc(1), ld(1)

HISTORY

checksec was originally written by Tobias Klein. The current project is maintained by Brian Davis ⟨[email protected]⟩.

History

--color since Arch Linux 2026-11-01; --libc since Arch Linux 2026-11-01; --no-banner since Arch Linux 2026-11-01; --no-headers since Arch Linux 2026-11-01; --no-warnings since Arch Linux 2026-11-01; --output since Arch Linux 2026-11-01; -h since Arch Linux 2026-11-01; -l since Arch Linux 2026-11-01; -o since Arch Linux 2026-11-01; -v since Arch Linux 2026-11-01.

--dir until Debian 13 (Trixie); --file until Debian 13 (Trixie); --format until Debian 10 (Buster); --fortify-file until Debian 13 (Trixie); --fortify-proc until Debian 13 (Trixie); --kernel until Debian 13 (Trixie); --proc until Debian 13 (Trixie); --proc-all until Debian 13 (Trixie); --proc-libs until Debian 13 (Trixie); --update until Debian 13 (Trixie); --upgrade until Debian 13 (Trixie); -d until Debian 10 (Buster); -f until Debian 10 (Buster); -ff until Debian 10 (Buster); -fp until Debian 10 (Buster); -k until Debian 10 (Buster); -p until Debian 10 (Buster); -pa until Debian 10 (Buster); -pl until Debian 10 (Buster); -u until Debian 10 (Buster).