[−][src]Trait checksec::macho::MachOProperties
checksec Trait implementation for goblin::mach::MachO
Example
use checksec::macho::MachOProperties; use goblin::mach::MachO; use std::fs; pub fn print_results(binary: &String) { if let Ok(fp) = fs::File::open(&binary) { if let Ok(buf) = fs::read(fp) { if let Ok(macho) = MachO::parse(&buf) { println!("arc: {}", macho.has_arc()); } } } }
Required methods
fn has_arc(&self) -> bool
check import names for _objc_release
fn has_canary(&self) -> bool
check import names for ___stack_chk_fail
or ___stack_chk_guard
fn has_code_signature(&self) -> bool
check data size of code signature in load commands
fn has_encrypted(&self) -> bool
check if cryptid
has a value set for EncryptionInfo32/64 in load
commands
fn has_nx_heap(&self) -> bool
check MH_NO_HEAP_EXECUTION
(0x01000000) in MachO header flags
fn has_nx_stack(&self) -> bool
check MH_ALLOW_STACK_EXECUTION
(0x00020000) in MachO header flags
fn has_pie(&self) -> bool
check MH_PIE
(0x00200000) in MachO header flags
fn has_restrict(&self) -> bool
check for ___restrict
segment name
fn has_rpath(&self) -> bool
check for RPath in load commands