checksec1
Check executable and kernel security properties
Usage
checksec [--help]
[--version]
[{--output
table | xml | json | yaml}]
[--libc
path]
[--no-banner]
[--no-headers]
[--no-warnings]
[{--color
auto | always | never}]
command
[command-options]
Overview
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.
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
fortifychecks 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). Usealwaysto preserve color through pipes.
Commands
filepath-
Inspect a single ELF file.
dirdirectory-
Inspect all ELF files in a directory. Use
-r,--recursiveto recurse into subdirectories. fortifyFilepath-
Report fortified/fortifiable libc calls in a file.
fortifyProcpid-
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.
procpid-
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-allare not the primary v3 interface. -
Use v3 subcommands instead (for example,
checksecfile/path/to/binorchecksecprocAll). -
If you want compact output similar to older invocations, use
--no-banner(and optionally--no-headers).
Examples
-
checksecfile/bin/ls -
checksec--no-banner--no-warningsfile/bin/ls -
checksec--color=alwaysfile/bin/ls|grepRELRO -
checksec--outputjsondir/usr/bin -
checksecdir/usr/bin--recursive -
checksecproc1 -
checkseckernel -
checkseckernel/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.
Releases
5 releases since Debian 10 (Buster); the text changed 3 times.
--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).