File Inclusion -> Remote Code Execution -> Remote File Inclusion (RFI)

So im stuck and i cant figure this out to the point i feel like throwing hands with my computer lol

So heres how i created the basic web shell:

echo ‘<?php system($_GET["cmd"]); ?>’ > shell.php

And then this is the simple python server that will be used to transfer the file:

My Box’s IP Address:

Here is the target IP:

Here is the url to execute the remote file inclusion:

&& ive tried:

But i keep getting back the following error and i spent like 2 days straight trying to figure this out but no use lol and its to the point im ready to burn my computer to the ground please help lol i feel so defeated :cold_sweat: :frowning_face:(

So i beg of yall please help lol and thanks for taking the time to hear my problems lol

Here is proof that my python server is working:

Here is a picture of my python server:

Here is my box’s ip address:

Here is my simple web shell that i created:

And here is the error that it gives me when i try to execute the remote file inclusion through the url… it keeps complaining about connection timing out:

You using a valid IP?

You using a pwnbox?

1 Like

try use IP

1 Like

Thanks for the quick response man!!! And im using the IP that is generated from vm instance at the bottom of the screen after each lesson. And im targeting the target IP that it generates below the screen of the vm instance like so:

And please forgive my ignorance friend but i dont know what pwnbox is lol all i know is there is a shortcut called pwnbox on the desktop of my vm instance.

Man it worked!!! How do i ever repay you man!!! Thank you sooo much man!!! Forreal thank you!!! Ill cash app you 20 bucks to show my appreciation

You should remember. You must use a tun0 interface’s IP

1 Like

Thanks man!!! i can cash app you 20 just to show my appreciation!!! You are the best!!!