slimm609/checksec

Formatting of output and user-friendliness

Zaxeli opened this issue · 2 comments

The output is now formatted as columns with a single row, when using checksec --file={filename} Instead, it would be much more user-friendly to format it as two columns with each row having info on things like PIE, NX, Canary, etc.

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      Symbols         FORTIFY Fortified       Fortifiable     FILE
Partial RELRO   No canary found   NX disabled   No PIE          No RPATH   No RUNPATH   37) Symbols       No    0               1               example

should be replaces with this, for example:

RELRO  -  Partial RELRO
STACK CANARY  -  No Canary Found
NX  -  NX disabled
PIE  -  No PIE
RPATH  -  No RPATH
RUNPATH  -  No RUNPATH
Symbols  -  37) Symbols
FORTIFY  -  No
Fortified  -  0
Fortifiable  -  1
FILE  -  example

Also, request to make default or shorthand flags, e.g. checksec -f filename or checksec filename instead of checksec --file=filename.

If you check many files at once then two columns output would be unreadable.

This has issues when it is more than 1 file as called out above but with the golang release, this will include an option for yaml output. This is going to be the closest to what you are looking for.

- checks:
    canary: Canary Found
    fortified: "0"
    fortify_source: N/A
    fortifyable: "0"
    nx: NX enabled
    pie: PIE Enabled
    relro: Partial RELRO
    rpath: No RPATH
    runpath: No RUNPATH
    symbols: No Symbols
  name: tests/binaries/output/test