How Shellcodes Work
- shell code不能有data segment
The problem is that both programs use their own data segments, which means that they cannot execute inside another application. This means in chain that an exploit will not be able to inject the required code into the stack and execute it. - eax存的是function codes(can be found in /usr/include/asm/unistd.h), ebx存的是第一各parameter, ecx存的是第二各parameter,...
- array的話反著push進去stack, esp(enhanced stack pointer)會儲存stack的top element address
- int 0x80 ; Call the kernel to make the system call happen
Related Shellcodes links
- Wikipedia - Shellcodes, Buffer Overflow
- Smashing The Stack For Fun And Profit
- Writing Shell Code
- Chapter 12: Writing Exploits III from Sockets, Shellcode, Porting & Coding: Reverse Engineering Exploits and Tool Coding for Security Professionals by James C. (有Using the Metasploit Framework)
tag: hack shell code programming
沒有留言:
張貼留言