ELF symbol check
Project description
Purpose
This tool does check compiled elf-files (and all dependencies) against given rules. Objectives are
- check for discouraged functions (e.g. strcpy)
- check for combinations of symbols (e.g. mutex and pthreads)
Usage
usage: pysymbolcheck [-h] [--libpath LIBPATH] rules file
Eval symbols of a binary against given rules
positional arguments:
rules Path to a rule file
file File to parse
optional arguments:
-h, --help show this help message and exit
--libpath LIBPATH ":" separated path to lookup libraries
Rule file format
a rule file consists of a json-array, like this
[]
within this n element of the following can be added
{ "severity": "error", "id": "A_Unique_ID", "msg": "some message", "rule", "<rule>" }
for severity it is advised to use only info, warning or error
Rule definition
A rule can consist of any logical combined operation such as
((A && B) || (C && D )) && !E
to get the needed information following keywords are implemented
keyword | variables | purpose | example |
---|---|---|---|
AVAILABLE() | symbol-name | check if a symbol is defined in the binary or any referenced lib | AVAILABLE(strncpy) |
USED() | symbol-name | check if a symbol is used by some binary or lib | USED(strncpy) |
SIZE() | symbol-name | get the size in bytes of a symbol | SIZE(strncpy) |
TYPE() | symbol-name | get the type in bytes of a symbol | TYPE(strncpy) |
&& | n.a. | logical and | A && B |
|| | n.a. | logical or | A || B |
! | n.a. | not operator | !A |
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
pysymbolcheck-2.6.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for pysymbolcheck-2.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd9e919189824e5e2f97dd38abc3e41d23840f558d43323af8397101439c5ce5 |
|
MD5 | 3ab4f2f7093a8dc942426669f71f2892 |
|
BLAKE2b-256 | 4d29417b99bdc8a1dfbf3fba67a2c4ad46724a0c4a58df523125f28108928fec |