Cheat Sheets

Security - ASLR enabled

Description

Address Space Layout Randomization is to be enabled.

Tags

  • CCE-27007-4

Solution

echo 'kernel.randomize_va_space=2' >/etc/sysctl.d/50-kernel.randomize_va_space.conf

Check Script: security-aslr-enabled.sh

#!/bin/bash

if [[ $(/sbin/sysctl -n kernel.randomize_va_space 2>/dev/null) != "2" ]]; then result_failed "sysctl kernel.randomize_va_space != 2" fi