hardened - Man Page

Hardening Checks




The hardened script reports on the hardening status of the specified file(s).  In particular it checks that the whole file was compiled with -O2 or higher and the -fstack-protector-strong, -D_FORTIFY_SOURCE=2, -Wl,-z,now, -Wl,-z,relro, -fPIE,  -Wp,-D_GLIBCXX_ASSERTIONS, -fstack-clash-protection -fcf-protection=full and -mcet options.

The script accepts the following command line options:


Displays the usage of the script and then exits.


Displays the version of the script.


Enables verbose mode, causing the script to detail each action it takes.


Do not include the name of script in the out generated by the script.


Do not report file types that are not supported or recognised.


Directory to use to store temporary files.


Produce no output.  Just return an exit status.


Only report files that are known to be vulnerable.  Ie files that record all of the necessary information about how they were built, but which were built with an incorrect set of options.

This option is the default behaviour of the script.


Report any file that cannot be proven to be hardened.  This is like the --vulnerable option, except that it will also report files that do not record all of the necessary information.


Report the hardening status of all of the files examined.


Specifies the type of file being examined.  Possible values are:


Automatically determine the file type from its extension. This is the default.


Assume all files are shared libraries.  Checks that the -fPIC option was used.


Assume all files are executables.  Checks that the -fPIE option was used.


Assume all files are object files.  Skips checks of the bind now status.


Disables checks of various different hardening features.    This option can be repeated multiple times, and the values accumulate. Possible values are:


Disables checks of the optimization level used.


Disables checks of the stack protection level.


Disables checks for -D_FORTIFY_SOURCE.


Disables checks for BIND NOW status.


Disables checks for relro or read-only-relocs.


Disables checks for -fPIC/-fPIE.


Disables checks for -D_GLIBCXX_ASSERTIONS.


Disables checks for stack clash protection.


Disables checks for control flow protection. Note - these checks are only run on x86_64 binaries.


Disables checks for control flow enforcement. Note - these checks are only run on x86_64 binaries.


Disable checks for stack realignment. Note - these checks are only run on i686 binaries.


Use the specified program to read the notes from the files.


Stop accumulating command line options.  This allows the script to be run on files whose names starts with a dash.



2020-01-31 annobin-1 RPM Development Tools