Coder Social home page Coder Social logo

Comments (1)

infoslack avatar infoslack commented on August 15, 2024

I checked by cloning the project and building the image with dockerfile on another machine:

% docker build -t dvwa .
Sending build context to Docker daemon  6.656kB
Step 1/8 : FROM tutum/lamp
latest: Pulling from tutum/lamp
[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.io registry NOW to avoid future disruption.
8387d9ff0016: Pull complete 
3b52deaaf0ed: Pull complete 
4bd501fad6de: Pull complete 
a3ed95caeb02: Pull complete 
790f0e8363b9: Pull complete 
11f87572ad81: Pull complete
...
Removing intermediate container 241b7dc3d0af
 ---> 1c325397b40a
Step 5/8 : COPY conf/* /tmp/
 ---> 67ff043fc481
Step 6/8 : RUN wget https://github.com/ethicalhack3r/DVWA/archive/v${VERSION}.tar.gz &&     tar xvf /v${VERSION}.tar.gz &&     mv -f /DVWA-${VERSION} /app &&     rm /app/.htaccess &&     mv /tmp/.htaccess /app &&     chmod +x /tmp/setup_dvwa.sh &&     /tmp/setup_dvwa.sh
 ---> Running in 5d1035cae6b5 
...
     0K .......... .......... .......... .......... ..........  253K
    50K .......... .......... .......... .......... ..........  499K
   100K .......... .......... .......... .......... .......... 8.56M
   150K .......... .......... .......... .......... ..........  538K
   200K .......... .......... .......... .......... .......... 22.8M
   250K .......... .......... .......... .......... .......... 30.7M
   300K .......... .......... .......... .......... ..........  525K
   350K .......... .......... .......... .......... .......... 37.8M
   400K .......... .......... .......... .......... .......... 41.0M
   450K .......... .......... .......... .......... .......... 39.5M
   500K .......... .......... .......... .......... .......... 21.5M
   550K .......... .......... .......... .......... .......... 36.0M
   600K .......... .......... .......... .......... .......... 38.3M
   650K .......... .......... .......... .......... ..........  554K
   700K .......... .......... .......... .......... .......... 27.6M
   750K .......... .......... .......... .......... .......... 48.4M
   800K .......... .......... .......... .......... .......... 18.6M
   850K .......... .......... .......... .......... .......... 23.0M
   900K .......... .......... .......... .......... .......... 38.4M
   950K .......... .......                                     39.7M=0.6s
...
DVWA-1.9/
DVWA-1.9/.htaccess
DVWA-1.9/CHANGELOG.md
DVWA-1.9/COPYING.txt
DVWA-1.9/README.md
DVWA-1.9/about.php
DVWA-1.9/config/
DVWA-1.9/vulnerabilities/xss_s/source/low.php
DVWA-1.9/vulnerabilities/xss_s/source/medium.php
...
Removing intermediate container 5d1035cae6b5
 ---> 6d61fd2ed87e
Step 7/8 : EXPOSE 80 3306
 ---> Running in 1d318b3ee07d
Removing intermediate container 1d318b3ee07d
 ---> 55d774c69430
Step 8/8 : CMD ["/run.sh"]
 ---> Running in 576d5b6564db
Removing intermediate container 576d5b6564db
 ---> d709a285d4a6
Successfully built d709a285d4a6
Successfully tagged dvwa:latest

And then I created a container to check for the file:

% docker run --rm -it dvwa bash
root@13669af83173:/# cd tmp/
root@13669af83173:/tmp# ls
setup_dvwa.sh

Testing full execution with generated image:

% docker run --rm -it -p 80:80 dvwa
=> An empty or uninitialized MySQL volume is detected in /var/lib/mysql
=> Installing MySQL ...
=> Done!
=> Waiting for confirmation of MySQL service startup
=> Creating MySQL admin user with random password
=> Done!
========================================================================
You can now connect to this MySQL Server using:

    mysql -uadmin -pP2X6ONJ7KFWs -h<host> -P<port>

Please remember to change the above password as soon as possible!
MySQL user 'root' has no password but only allows local connections
========================================================================
/usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2019-08-07 11:51:31,134 CRIT Supervisor running as root (no user in config file)
2019-08-07 11:51:31,135 WARN Included extra file "/etc/supervisor/conf.d/supervisord-mysqld.conf" during parsing
2019-08-07 11:51:31,135 WARN Included extra file "/etc/supervisor/conf.d/supervisord-apache2.conf" during parsing
2019-08-07 11:51:31,175 INFO RPC interface 'supervisor' initialized
2019-08-07 11:51:31,175 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-08-07 11:51:31,175 INFO supervisord started with pid 1
2019-08-07 11:51:32,179 INFO spawned: 'mysqld' with pid 434
2019-08-07 11:51:32,182 INFO spawned: 'apache2' with pid 435
2019-08-07 11:51:33,444 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-07 11:51:33,445 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Test request

% http -h http://localhost/setup.php
HTTP/1.1 200 OK
Cache-Control: no-cache, must-revalidate
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 1403
Content-Type: text/html;charset=utf-8
Date: Wed, 07 Aug 2019 11:54:07 GMT
Expires: Tue, 23 Jun 2009 12:00:00 GMT
Keep-Alive: timeout=5, max=100
Pragma: no-cache
Server: Apache/2.4.7 (Ubuntu)
Set-Cookie: PHPSESSID=m3u3svmiouljerb915e125h8e1; path=/
Set-Cookie: PHPSESSID=m3u3svmiouljerb915e125h8e1; path=/; httponly
Set-Cookie: security=impossible; httponly
Vary: Accept-Encoding
X-Powered-By: PHP/5.5.9-1ubuntu4.29

from docker-dvwa.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.