PHP file execution — Video

PHP File Execution [youtube=http://www.youtube.com/watch?v=oJmZJlLF2yo&hl=en_US&fs=1&rel=0] Explanation The files addition/subtraction .php was executed after making it executable using chmod command and adding #!/usr/bin/php as the first line of each files.

subtraction using PHP

subtraction #!/usr/bin/php # Author : Jeffrin # jeffrin@rocketmail.com # License GNU GPL V3 # usage : php subtraction.php <?php $f=’1′; $s=’1′; echo $f – $s ; echo “\n”; ?> output Like $./subtraction.php # Author : Jeffrin # jeffrin@rocketmail.com # License GNU GPL V3 # usage : php subtraction.php 0 $

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 …

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 …

modify all segment registers except ..(CS)

software | Windows | In computing, a code segment, also known as a text segment or simply as text, is a phrase used to refer to a portion of memory or of an object file that contains executable instructions. source : http://en.wikipedia.org/wiki/Code_segment Note that code may always modify all segment registers except CS (the code …