ASLRを一時的に無効化する

以下で ASLR が有効かどうか確認する。

1cat /proc/sys/kernel/randomize_va_space

この値の詳細は以下。

Normally you might expect a value of 0 (disabled), or 1 (enabled). In the case of the randomize_va_space setting, this is true as well. When setting the value to 1, address space is randomized. This includes the positions of the stack itself, virtual dynamic shared object (VDSO) page, and shared memory regions. Setting the option to value 2 will be similar to 1, and add data segments as well. For most systems, this setting is the default and the most secure setting.

要約すると:

  • 0 : disabled
  • 1 : partially enabled
  • 2 : fully enabled

この設定は一時的には以下のようにして上書きすることで書き換えられる。

1# disable
2echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
3# enable
4echo 2 | sudo tee /proc/sys/kernel/randomize_va_space

Reference

comments powered by Disqus