software interrupt –

WinDbg shows “int” Instruction ntdll!DbgBreakPoint: 7c901230 cc int 3 7c901231 c3 ret 7c901232 8bff mov edi,edi ntdll!DbgUserBreakPoint: 7c901234 90 nop 7c901235 90 nop 7c901236 90 nop 7c901237 90 nop ntdll!DbgBreakPointWithStatus: 7c901238 90 nop ntdll!DbgUserBreakPoint: 7c901239 cc int 3 7c90123a c3 ret 7c90123b 90 nop 7c90123c 8bff mov edi,edi 7c901230 cc int 3 Process Involved WinRAR …

remainder 100/?

/* Jeffrin Jose <jeffrin@rocketmail.com> Licensed GPL v3 Copyright 2010 GPL –> http://www.gnu.org/copyleft/gpl.html */ #include<stdio.h> main () { int number,b; printf (“Enter a Number \n”); scanf(“%d”,&number); b=100%number; printf(“\n The Remainder with 100 = %d “,b); getch(); }

LEAVE Instruction ++

WinDbg shows “leave” instruction 7c901227 c9 leave 7c901228 c20400 ret 4 7c90122b 90 nop 7c90122c 90 nop 7c90122d 90 nop 7c90122e 90 nop 7c90122f 90 nop ntdll!DbgBreakPoint: 7c901230 cc int 3 7c901227 c9 leave Process Involved Program : “notepad” on Windows. Explanation LEAVE — High Level Procedure Exit LEAVE reverses the actions of the ENTER …

RET instruction :)

WinDbg shows RET Instruction 7c901042 c20400 ret 4 7c901045 52 push edx 7c901046 e8447f0100 call ntdll!RtlpWaitForCriticalSection (7c918f8f) 7c90104b 648b0d18000000 mov ecx,dword ptr fs:[18h] 7c901052 8b542404 mov edx,dword ptr [esp+4] 7c901056 ebc4 jmp ntdll!RtlEnterCriticalSection+0x17 (7c90101c) 7c901058 8da42400000000 lea esp,[esp] 7c90105f 8d9b00000000 lea ebx,[ebx] 7c901065 8b4124 mov eax,dword ptr [ecx+24h] 7c901068 39420c cmp dword ptr [edx+0Ch],eax 7c90106b …

test instruction +

| GDB shows TEST instruction | Dump of assembler code for function *__GI___poll: 0x00007f73ec2120b0 : sub $0x28,%rsp 0x00007f73ec2120b4 : mov 0x29c52e(%rip),%eax # 0x7f73ec4ae5e8 0x00007f73ec2120ba : test %eax,%eax 0x00007f73ec2120bc : jne 0x7f73ec2120d5 0x00007f73ec2120be : movslq %edx,%rdx 0x00007f73ec2120c1 : mov $0x7,%eax 0x00007f73ec2120c6 : syscall 0x00007f73ec2120c8 : cmp $0xfffffffffffff000,%rax 0x00007f73ec2120ce : ja 0x7f73ec212121 0x00007f73ec2120d0 : add $0x28,%rsp 0x00007f73ec2120d4 …

Jump if Equal :)

je instruction (gdb) disass Dump of assembler code for function fputs_unlocked: 0xb7788c30 : push %ebp 0xb7788c31 : mov %esp,%ebp 0xb7788c33 : sub $0x1c,%esp 0xb7788c36 : mov %ebx,-0xc(%ebp) 0xb7788c39 : call 0xb773daaf 0xb7788c3e : add $0xe13b6,%ebx 0xb7788c44 : mov %edi,-0x4(%ebp) => 0xb7788c47 : mov 0x8(%ebp),%edi 0xb7788c4a : mov %esi,-0x8(%ebp) 0xb7788c4d : mov 0xc(%ebp),%esi 0xb7788c50 : mov …

jmp instruction .

JMP instruction (gdb) disass Dump of assembler code for function __kernel_vsyscall: 0xb77bd414 : push %ecx 0xb77bd415 : push %edx 0xb77bd416 : push %ebp 0xb77bd417 : mov %esp,%ebp 0xb77bd419 : sysenter 0xb77bd41b : nop 0xb77bd41c : nop 0xb77bd41d : nop 0xb77bd41e : nop 0xb77bd41f : nop 0xb77bd420 : nop 0xb77bd421 : nop 0xb77bd422 : jmp 0xb77bd417 …

division using PHP

division #!/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 $./divide.php # Author : Jeffrin # jeffrin@rocketmail.com # License GNU GPL V3 # usage : php divide.php 1 $

JAE instruction .

| GDB shows JAE Instruction | (gdb) disass Dump of assembler code for function __select_nocancel: 0x00007f31a021e889 : mov %rcx,%r10 0x00007f31a021e88c : mov $0x17,%eax 0x00007f31a021e891 : syscall => 0x00007f31a021e893 : cmp $0xfffffffffffff001,%rax 0x00007f31a021e899 : jae 0x7f31a021e8cf 0x00007f31a021e89b : retq End of assembler dump. Process Involved $wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.1.tar.bz2 –2010-07-24 01:33:15– http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.1.tar.bz2 Resolving www.kernel.org… 149.20.20.133, 199.6.1.164, 204.152.191.37, … …