This blog post has been created for completing the requirements of the SecurityTube Linux Assembly Expert certification:
Student ID: SLAE-916
Assignment number one requirements are:
- create a Shell_Bind_TCP shellcode
- binds to a port
- executes shell on an incoming connection to the port (/bin/ls)
- port number should be configurable
Background Information
A Shell_Bind_TCP shellcode spawns a shell when a connection is successfully established. The code when executed achieves its aim through the use of sockets. Sockets are the endpoints of a two way network communications link. These endpoints/applications are defined by an IP address and a port number. The two applications normally run on different computers, but sockets can also be used for interprocess communication on a single computer. The port number allows you to identify the service that you require and allows concurrent connections sharing the same address. It is useful to program the problem in C as you can get a precise understanding of what exactly the assembly code will have to contain. There are numerous examples of this program. This post came in useful
This C program helped me to visualise the requirements:
1 |
|