Saturday, 15 February 2014

assembly - shellcode - simplifed code does not work -


I do not know why, but when I use hex as a shell code under code it works Is:

  section .text global _start _start: mov ebx, 0mov eax, 1 int 0x80  

But when I use the code hex instead below It does not work, and the split error occurs:

  section .text global _start _start: xor ebx, ebx mov al, 1 int 0x80  
< P> I know that 'al' I do not know why use 'ex' but works correctly but using 'al' error?

Thank you very much.

Yes Ali.

Because int 0x80 is expected 32-bit param. When you pass less than 8 beats only (AL), then there may be anything in the upper part of the eX (undefined value), so instead of crossing 1, you pass 0x. 01


No comments:

Post a Comment