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:
  • Kali eth0 int:
  • DVWA container int:

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('', 1400); here's a link to the full script.

I am able to successfully ping 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:, no connection is made.

  • This looks like a networking issue, not a security issue. Start your troubleshooting process; confirm that each step is happening, and get packet captures.
    – schroeder
    Jan 24 at 20:22
  • 1
    i might be stating the bleeding obvious here, but how does python interpret the php script? simple http.server will only yield the contents of the php file...
    – brynk
    Jan 24 at 22:55
  • @brynk is totally right. If you are serving the file, then what PHP process actually executes it? Does it get loaded and executed by DVWA? You need to step through each stage and confirm that each is working.
    – schroeder
    Jan 24 at 23:36