SUB – Subtract

| SUB instruction | (gdb) disass Dump of assembler code for function *__GI___poll: 0x00007fc50ab670b0 : sub $0x28,%rsp 0x00007fc50ab670b4 : mov 0x29c52e(%rip),%eax # 0x7fc50ae035e8 0x00007fc50ab670ba : test %eax,%eax 0x00007fc50ab670bc : jne 0x7fc50ab670d5 0x00007fc50ab670be : movslq %edx,%rdx 0x00007fc50ab670c1 : mov $0x7,%eax 0x00007fc50ab670c6 : syscall => 0x00007fc50ab670c8 : cmp $0xfffffffffffff000,%rax 0x00007fc50ab670ce : ja 0x7fc50ab67121 0x00007fc50ab670d0 : add $0x28,%rsp …

What is a SYSENTER instruction ?

ABOUT sysenter instruction The SYSENTER instruction is part of the “Fast System Call” facility introduced on the Pentium(R) II processor. The SYSENTER instruction is optimized to provide the maximum performance for transitions to protection ring 0 (CPL 0). The SYSENTER instruction sets the following registers according to values specified by the operating system in certain …

SYSENTER instruction.. Pentium II..

| sysenter instruction | (gdb) disass Dump of assembler code for function __kernel_vsyscall: 0xb780b414 : push %ecx 0xb780b415 : push %edx 0xb780b416 : push %ebp 0xb780b417 : mov %esp,%ebp 0xb780b419 : sysenter 0xb780b41b : nop 0xb780b41c : nop 0xb780b41d : nop 0xb780b41e : nop 0xb780b41f : nop 0xb780b420 : nop 0xb780b421 : nop 0xb780b422 : …

NOP machine instruction

| Cracking | (gdb) disass Dump of assembler code for function main: 0x0000000000400494 : push %rbp 0x0000000000400495 : mov %rsp,%rbp 0x0000000000400498 : nop => 0x0000000000400499 : jmp 0x400498 End of assembler dump. (gdb) #include<stdio.h> main () { while (1) asm(“nop”); } NOPs are often involved when cracking software that checks for serial numbers, specific hardware …

push instruction.. push %rbx

| push instruction | (gdb) disass Dump of assembler code for function _IO_default_uflow: 0x00007f7c1e9964d0 : mov 0xd8(%rdi),%rax => 0x00007f7c1e9964d7 : push %rbx 0x00007f7c1e9964d8 : mov %rdi,%rbx 0x00007f7c1e9964db : callq *0x20(%rax) 0x00007f7c1e9964de : cmp $0xffffffffffffffff,%eax 0x00007f7c1e9964e1 : je 0x7f7c1e9964f2 0x00007f7c1e9964e3 : mov 0x8(%rbx),%rdx 0x00007f7c1e9964e7 : movzbl (%rdx),%eax 0x00007f7c1e9964ea : add $0x1,%rdx 0x00007f7c1e9964ee : mov %rdx,0x8(%rbx) 0x00007f7c1e9964f2 …