FilesystemRule - Check if specific file is accessed or written to by binary:
path
- Path to file to checkrule_type
- Generalized target parameter; currently only supportsfilename
is_whitelist
- Use true if you plan on running a whitelist check; use false if you plan on running a blacklist checkis_dir
- If true, treatpath
as a directory instead of a file
my_rule = FilesystemRule("/etc/passwd", 'filename', is_whitelist=False, is_dir=False)
- Currently only resolves one level of reaching definitions
- This means that if a value is assigned to a variable, and then that variable is assigned to another variable, it will not be detected unless the compiler optimizes the code to remove the middle variable
- This is a limitation of the current implementation, and will be fixed in the future
BanCategoryRule - Blacklist full category of system and library calls:
Intended to be a more generic "catch-all" rule type that requires less rigorous internal definitions.
category
- Category of system calls to ban- Options:
filesystem
network
- Feel free to add more!
- Options:
my_rule = BanCategoryRule('network')
BanLibraryFunctionRule - Blacklist specific system or library function calls given angr simprocedure name:
library
- system or library call to blacklist
my_rule = BanLibraryFunctionRule('open')
- NetworkRule - Check if binary makes network connections to specific IP addresses or domains
- ProcessRule - Check if binary spawns specific processes