Address Space Layout Randomization === 使 Stack, heap, libc 的 Address Space 隨機生成,讓攻擊者無法判斷位置在哪裡 ## 查看 Linux 中 ASLR 的設定 - 0: 關閉 ASLR,每次執行位址固定不變 - 1: 部分啟用 ASLR,只對 Stack, heap, shared libararies 的 Address Space 進行隨機化,但 text 區域不會隨機化 - 2: 完全啟用 ASLR,text segment 的 Address Space 也會隨機化 ``` kali# sysctl -a --pattern 'randomize' ```  有開 ASLR 的話可看到每次執行的地址都會變 - ldd (List Dynamic Dependencies): 列出動態鏈結的 Shared lib ## 設定 ASLR ``` kali# sudo sysctl -w kernel.randomize_va_space=0 ``` 關閉後 Address Space 就不會變了 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up