assambly
assambly
· ☕ 1 min read
注意要點 這種關於rip基底做偏移要注意%rip要帶入下一行指令的位置 0x1–mov 0x2ee6(%rip),%rdx 這裡%rip指向0x1 但執行mov 0x2ee6(%rip),%rdx

c inline assambly and system call
· ☕ 4 min read
簡介 這裡我們要學到如何利用c語言直接呼叫system call做到printf顯示的功能 範例 實做直接呼叫linux system code 根據1-1表格找到的資訊

canary analysis
· ☕ 2 min read
https://ctf-wiki.org/pwn/linux/mitigation/canary/ 你的程式 https://hardenedlinux.github.io/2016/11/27/canary.html https://stackoverflow.com/questions/10325713/why-does-this-memory-address-fs0x28-fs0x28-have-a-random-value 範例 題目 下面程式會觸發smashing detected請修好下面的程式 ** stack smashing detected ***: terminated 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 #include<stdio.h>int

system call過程
· ☕ 2 min read
linux v5.10 x64作為範例 為什麼syscal A.2 AMD64 Linux Kernel Conventions syscall_init(void) wrmsrl(MSR_LSTAR, (unsigned long)entry_SYSCALL_64); entry_SYSCALL_64 do_syscall_64 sys_call_tablenr Invalid system call number:38 為什麼syscall不符合abi? syscall macro 接下來實驗SYSCALL_DEFI