2. What is a shellcode?
• It's bytecode
• Machine language
• Compiled Assembly source file
• A string of mostly unprintable characters
• Opcodes that the processor executes directly
• Mostly doesn't contain NULL bytes
• It is position independent
3. Types of Shellcodes
• Local shellcode
• Remote shellcode
• Download and execute shellcode
• Egg-hunt shellcode
• Omelet shellcode
10. x86 and Linux kernel ABI
EAX : Holds the system call number.
EBX : Contains the value or address of the 1st
argument to the system call.
ECX : Contains the value or address of the 2nd
argument to the system call.
EDX : Contains the value or address of the 3rd
argument to the system call.
EDI : General purpose register.
ESI : General purpose register.
EBP : Base Pointer register.
ESP : Stack Pointer register.
EIP : Instruction Pointer register.
11. x86_64 and Linux kernel ABI
RAX : Contains the system call number.
RBX : General purpose register.
RCX : General purpose register.
RDX : The 3rd argument for the system call.
RDI : The 1st argument for the system call.
RSI : The 2nd argument for the system call.
RBP : Base Pointer register.
RSP : Stack Pointer register.
RIP : Instruction Pointer register.
R8 : The 4th argument for the system call.
R9 : The 5th argument for the system call.
R10 : The 6th argument for the system call.
R11 – R15 : General purpose registers.
14. Information
• Smashing the stack for fun and profit
by Aleph1
http://www.phrack.org/issues.html?issue=49&id=14
• Shellcode: the assembly cocktail
by Samy Bahra
http://www.infosecwriters.com/hhworld/shellcode.txt
• The Shellcoder's Handbook