Shellcoding is one of the code injection techniques which are used to enter in a vulnerable system and gain access to it. Most hackers write their shell code's implementing the logic with which the attacker can gain illegal access to the remote system. The Shellcode implementation varies depending on the environment of the victim’s computer such as the operating system used etc. To attack any computer, first the hacker needs to gain control over microprocessor of that computer, as microprocessor is the main part where the execution of the program takes place. So if the attacker can gain control over the microprocessor he can change the execution flow to his own Shellcode (payload) which does the things specified by his desire. These shellcodes contain direct machine instructions which are manipulated by the microprocessor reducing the execution time. Hence shellcodes are very efficient for attackers to do a desired task on the remote computer minimising the time constraint. Shellcodes are also used for testing the software for vulnerabilities. Metasploit is one of famous software used for penetration testing and security vulnerabilities.
The following are the commands used in Metasploit demo:
Ifconfig: The abbreviation of Ifconfig is internet protocol configuration. Once this command is executed it shows the internet configuration which includes the ip address, current TCP/IP connections, DNS settings. Using Ipconfig we can modify DHCP protocol and can specify the DNS server which is used by the computer to convert domain names to ip addresses while requesting for a website.
Hexedit: Hexedit also known as hexadecimal editor which is a program used to manipulate the data at basic level i.e binary data. All files and directories are stored in a hard disk in binary language. So hackers can use this tool to edit the data at very low level bypassing any constraints which are implemented by the computer. cd: Cd command is usually used to change from one directory to another in command line. While doing some work in command line interpreter we need to change directories frequently to access other files stored at other memory locations. This can be easily done using cd command.
ls: In UNIX operating system ls command is used to list all the files and directories in the current directory. It has -l option ls command when used with this option it displays all the files and directories including hidden system files and folders which its access permissions.
Ping: Ping is a network administration tool which is used to test the reachability of some network host by sending icmp packets over a network. It also displays the entire time taken for the packet from transmission to reception also called as round trip time (RTT).
ps: The full form of ps is process status. In UNIX operating system ps command is used to display all the current processes running. It