Checksec tool implemented in Python
Project description
checksec.py
Checksec tool in Python, Rich output, based on LIEF
Table of Contents
Overview
A simple tool to verify the security properties of your binaries.
These properties can be enabled by your compiler to enforce the security of your executables, and mitigate exploits. However it can be challenging to apply them on a whole system.
Check the level of security your Linux distro / Windows release is providing you !
Supported formats:
-
ELF
-
PE
-
Mach-O
Based on:
- Rich: Beautiful terminal output formatting
- LIEF: Cross-platform library to parse, modify and abstract ELF, PE and Mach-O formats
Requirements
Python 3.6
virtualenv
Setup
Windows
You find the checksec.exe
on the latest Github releases:
Linux
virtualenv -p python3 venv
source venv/bin/activate
(venv) pip install checksec.py
Usage
(venv) checkec <file_or_directory>...
Check --help
for more options (JSON output, recursive walk, workers count)
FAQ
checksec
is slow on some huge binaries ! What's happening ?!
checksec.py
relies on the LIEF
library to parse PE/ELF/MachO
formats.
➡️The library doesn't offer at this point on-demand parsing, so it will parse and fetch unecessary data.
➡️Retrieving symbols can be slow (ex: pandoc
, 118M
, +300 000
symbols, +2m 20sec
). See this issue
- I sent a
CTRL-C
to cancelchecksec.py
processing, the app doesn't want to quit
checksec.py
is working with multiple process workers to parallelize its execution and binary processing.
When a CRTL-C
is received, checksec.py
will wait for them to stop.
Sometimes, this is not working, and I don't know why at this point. You can kill the remaining Python workers afterwards.
References
License
Contributors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for checksec.py-0.4.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 274919d514fba0b410130cc29ad94e57b3b5ba4ebb875d65b2700a8f8af51cb3 |
|
MD5 | 92878177595e6939db20383ada1cf601 |
|
BLAKE2b-256 | 43a328aef4340806bc99a935822a269194fcba13cfed2201cadf9ac2ecaab478 |