Dash Core  0.12.2.1
P2P Digital Currency
security-check Namespace Reference

Functions

def check_ELF_PIE (executable)
 
def get_ELF_program_headers (executable)
 
def check_ELF_NX (executable)
 
def check_ELF_RELRO (executable)
 
def check_ELF_Canary (executable)
 
def get_PE_dll_characteristics (executable)
 
def check_PE_PIE (executable)
 
def check_PE_NX (executable)
 
def identify_executable (executable)
 

Variables

 READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
 
 OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')
 
dictionary CHECKS
 
int retval = 0
 
def etype = identify_executable(filename)
 
list failed = []
 

Function Documentation

◆ check_ELF_Canary()

def security-check.check_ELF_Canary (   executable)
Check for use of stack canary

Definition at line 101 of file security-check.py.

◆ check_ELF_NX()

def security-check.check_ELF_NX (   executable)
Check that no sections are writable and executable (including the stack)

Definition at line 61 of file security-check.py.

◆ check_ELF_PIE()

def security-check.check_ELF_PIE (   executable)
Check for position independent executable (PIE), allowing for address space randomization.

Definition at line 16 of file security-check.py.

◆ check_ELF_RELRO()

def security-check.check_ELF_RELRO (   executable)
Check for read-only relocations.
GNU_RELRO program header must exist
Dynamic section must have BIND_NOW flag

Definition at line 74 of file security-check.py.

◆ check_PE_NX()

def security-check.check_PE_NX (   executable)
NX: DllCharacteristics bit 0x100 signifies nxcompat (DEP)

Definition at line 134 of file security-check.py.

◆ check_PE_PIE()

def security-check.check_PE_PIE (   executable)
PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)

Definition at line 130 of file security-check.py.

◆ get_ELF_program_headers()

def security-check.get_ELF_program_headers (   executable)
Return type and flags for ELF program headers

Definition at line 32 of file security-check.py.

Referenced by check_ELF_NX(), and check_ELF_RELRO().

◆ get_PE_dll_characteristics()

def security-check.get_PE_dll_characteristics (   executable)
Get PE DllCharacteristics bits

Definition at line 115 of file security-check.py.

Referenced by check_PE_NX(), and check_PE_PIE().

◆ identify_executable()

def security-check.identify_executable (   executable)

Definition at line 151 of file security-check.py.

Variable Documentation

◆ CHECKS

dictionary security-check.CHECKS
Initial value:
1 = {
2 'ELF': [
3  ('PIE', check_ELF_PIE),
4  ('NX', check_ELF_NX),
5  ('RELRO', check_ELF_RELRO),
6  ('Canary', check_ELF_Canary)
7 ],
8 'PE': [
9  ('PIE', check_PE_PIE),
10  ('NX', check_PE_NX)
11 ]
12 }

Definition at line 138 of file security-check.py.

◆ etype

def security-check.etype = identify_executable(filename)

Definition at line 164 of file security-check.py.

◆ failed

list security-check.failed = []

Definition at line 170 of file security-check.py.

◆ OBJDUMP_CMD

security-check.OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')

Definition at line 14 of file security-check.py.

◆ READELF_CMD

security-check.READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')

Definition at line 13 of file security-check.py.

◆ retval