• ASLR Address Space Lay­out Ran­dom­iza­tion is a tech­nique which ran­dom­izes address­es in the stack and heap. If address­es of func­tions are ran­dom­ized (e.g. from shared libraries like libc), then an attack­er can­not use a pre­de­fined exploit with hard-cod­ed addresses. Linux Dis­able ASLR: echo 0 > /proc/sys/kernel/randomize_va_space Enable ASLR: echo 2 > /proc/sys/kernel/randomize_va_space In GDB, ASLR is…

  • Stack protection

    The stack can be pro­tect­ed against buffer overflows. Stack protection with canaries Like in a coal mine, a canary can pro­vide an indi­ca­tion if some­thing goes wrong. Here, a canary is a defined val­ues which is added between the buffer (where an attack­er will start writ­ing the pay­load) and the SFP Stack Frame Point­er and…